Page 1 of 1

arranging different users to monitor their own hosts

Posted: Mon Dec 16, 2019 1:42 am
by kentzeng
Hi,

What is the best way to arrange different users to monitor hosts belongs to them only?
For example.
We have users:
user_a
user_b
user_c

we have hosts:
host_a -> owned by user_a
host_b -> owned by user_b
host_c -> owned by user_c

And each of the hosts have below services monitoring
service_a
service_b
service_c

How to configure the hosts/services notification for users who owned the server?
We currently use nagios for admins monitoring but we'd extend the function to users.

Thanks for the advise.
-Kent

Re: arranging different users to monitor their own hosts

Posted: Mon Dec 16, 2019 10:36 am
by lmiltchev
As long as your "xi users" are added as monitoring contacts to an object (host or a service), and the notifications are configured correctly, they will be receiving notifications about these objects.

Here's our document on configuring notifications in Nagios XI:

https://assets.nagios.com/downloads/nag ... ios-XI.pdf

Let us know if you have any further questions.

Re: arranging different users to monitor their own hosts

Posted: Tue Dec 17, 2019 2:17 am
by kentzeng
Hi,

Thanks for the information.

I followed up the instruction to add user_a in the contact.
And add user_a to host_a. So user_a now can see all the services in host_a.
But user_a cannot get alert when service_a is down.
So I navigate to service_a -> alter settings -> manage contacts and add user_a into this service.
At this stage, user_a can get alert for service_a But...
in the "service detail" page, service_a on host_b and host_c appear in the screen.

We just only want to let user_a to see his own host and get alert for the services in host_a.
And the service detail should not display service_a for host_b and host_c.

Don't know how can I achieve this?

Thanks,
-Kent

Re: arranging different users to monitor their own hosts

Posted: Tue Dec 17, 2019 10:42 am
by lmiltchev
I followed up the instruction to add user_a in the contact.
And add user_a to host_a. So user_a now can see all the services in host_a.
But user_a cannot get alert when service_a is down.
If you didn't have any other contacts assigned to "service_a" service, "user_a" would be receiving notifications for this service via implied inheritance. Read more on implied inheritance here:

https://assets.nagios.com/downloads/nag ... tance.html
So I navigate to service_a -> alter settings -> manage contacts and add user_a into this service.
At this stage, user_a can get alert for service_a But...
in the "service detail" page, service_a on host_b and host_c appear in the screen.

We just only want to let user_a to see his own host and get alert for the services in host_a.
And the service detail should not display service_a for host_b and host_c.

Don't know how can I achieve this?
You cannot achieve that when you have the same service added to all three hosts... You will need to create separate service_a for host_a, host_b, and host_c, separate service_b, and service_c.

Note: This is happening because your contact has permissions to see the service, so he/she will see this service on ALL hosts that this service is added to. When the contact tries to access host_b and/or host_c, he/she will get "Not Authorized" as expected. However, the contact will be able to see the service (also as expected) on all hosts. I hope this makes sense.

Re: arranging different users to monitor their own hosts

Posted: Thu Dec 19, 2019 1:51 am
by kentzeng
You cannot achieve that when you have the same service added to all three hosts... You will need to create separate service_a for host_a, host_b, and host_c, separate service_b, and service_c.
This means I will need to create multiple separate services for different hosts even they're the same service...
And to be honest.. it doesn't make sense... But if this is the only way to achieve this, I'll try to live with it. :roll:

Re: arranging different users to monitor their own hosts

Posted: Thu Dec 19, 2019 9:08 am
by lmiltchev
Unfortunately, there is no other way. I will be closing this topic know. If you have any further questions/issues, please start a new thread. Thank you!