Page 1 of 2

Creating custom dashlets

Posted: Mon Sep 12, 2011 8:32 am
by chris.trotter
I've done some searching but come up empty. I'd like to take the existing dashlets and customize them to only display particular hosts/groups/services as per different users in different departments.

In the /usr/local/nagiosxi/html/includes/dashlets directory there are only the 'add-on' dashlets (custom url, sans ports, time server, etc) - not the default dashlets (monitor hosts summary, service summary, host groups summary).

Can anyone point me in the right direction?

Also, any word on when there will be more dashlets available? Current dashlet choice on Nagios Exchange is pretty slim. If I can get my first question answered, I'd be happy to upload the custom dashlets we come up with.

Re: Creating custom dashlets

Posted: Mon Sep 12, 2011 11:17 am
by nscott
So you're looking to display metrics of only certain hosts/groups on a per user basis? As in the Nagios users? Each users seeing a different graph on login?

Re: Creating custom dashlets

Posted: Mon Sep 12, 2011 11:55 am
by chris.trotter
Yup, pretty much. Maybe this should be done with permissions?

Re: Creating custom dashlets

Posted: Mon Sep 12, 2011 2:17 pm
by mguthrie
The host and service summary dashlets will automatically display a filtered list of hosts and services per contact if you create an XI user without admin rights. They will only see the hosts and services that they're contacts for. You can test what a user is seeing by accessing the Admin->Manage Users, and click the "Masquerade" icon for that user.

Re: Creating custom dashlets

Posted: Mon Sep 12, 2011 2:20 pm
by chris.trotter
Aha! Okay, that makes sense, thanks!

Re: Creating custom dashlets

Posted: Mon Sep 12, 2011 2:20 pm
by mguthrie
Good deal, you bet!

Re: Creating custom dashlets

Posted: Fri Sep 30, 2011 2:15 pm
by chris.trotter
Update on this. I've created a user, assigned it to a contact group - this contact group is part of a host template, and the host template is assigned to specific hosts.

According to the above information, this user should only see the groups he is a contact for, but I am seeing all hosts, even localhost. Under the user preferences there is a checkbox for 'see all hosts', but nothing indicating 'hosts that user is contact for'.

Any ideas?

Re: Creating custom dashlets

Posted: Wed Oct 05, 2011 10:02 am
by chris.trotter
Clarification:

User is seeing all hosts, not just the hosts they are contacts for.


Is there any specific documentation on creating a distinction between a user seeing all hosts and just the hosts they are contacts for?

Re: Creating custom dashlets

Posted: Wed Oct 05, 2011 10:18 am
by mguthrie
Is this user set as an admin? If so they'll see all hosts and services no matter what. Check the Admin->Manage users page to see the user's full permission. Also, take a look at the following doc for how users and contacts differ in XI.
http://assets.nagios.com/downloads/nagi ... gement.php

Re: Creating custom dashlets

Posted: Wed Oct 05, 2011 10:29 am
by chris.trotter
No, they are set as 'user'. When I uncheck 'see all hosts', they cannot see any hosts at all.

Note that I have not assigned them directly to a template - they are part of a contact group that is part of a template. Does that make sense?