Creating custom dashlets

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
chris.trotter
Posts: 36
Joined: Tue Jul 26, 2011 12:11 pm

Creating custom dashlets

Post 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.
User avatar
nscott
Posts: 1040
Joined: Wed May 11, 2011 8:54 am

Re: Creating custom dashlets

Post 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?
Nicholas Scott
Former Nagios employee
chris.trotter
Posts: 36
Joined: Tue Jul 26, 2011 12:11 pm

Re: Creating custom dashlets

Post by chris.trotter »

Yup, pretty much. Maybe this should be done with permissions?
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Creating custom dashlets

Post 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.
chris.trotter
Posts: 36
Joined: Tue Jul 26, 2011 12:11 pm

Re: Creating custom dashlets

Post by chris.trotter »

Aha! Okay, that makes sense, thanks!
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Creating custom dashlets

Post by mguthrie »

Good deal, you bet!
chris.trotter
Posts: 36
Joined: Tue Jul 26, 2011 12:11 pm

Re: Creating custom dashlets

Post 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?
chris.trotter
Posts: 36
Joined: Tue Jul 26, 2011 12:11 pm

Re: Creating custom dashlets

Post 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?
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Creating custom dashlets

Post 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
chris.trotter
Posts: 36
Joined: Tue Jul 26, 2011 12:11 pm

Re: Creating custom dashlets

Post 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?