Page 1 of 1

Best Vcenter Monitoring Practices

Posted: Fri Dec 15, 2017 10:36 am
by lndifferent
I added vcenter host and selected an option to monitor guests on the vmware host. Currently, nagios monitors five services on each guest: status, networking, cpu usage, input/output, and memory. I want to configure nagios so that when a guest machine's status service is down, to stop sending me notifications for the remaining guest's services. I also want to configure nagios to stop sending me all other guests service notifications when a vmware host is down. I am little bit confused with vcenter as it appears that nagios considers vcenter server appliance as host for all other vmware hosts and their guest machines. Thank you.

Re: Best Vcenter Monitoring Practices

Posted: Fri Dec 15, 2017 4:10 pm
by npolovenko
Hello, @lndifferent. You should try the Service Dependency Management. You can find it in Configure => Core Configuration manager, then Advanced(in the left column), and then Service Dependencies. Add new.

In the Manage Services, you'd select a "guest machine's status service", and then in the Manage Service Dependencies, you'd select all the other services that belong to that guest machine. Then you can select the Notification Failure Criteria (you can check many options: warning, critical, etc). So that means if the "guest machine's status service" goes to into any of the states that you selected, none of the notifications for dependent services will be sent out.
I also want to configure nagios to stop sending me all other guests service notifications when a vmware host is down.
You can open the following config:

Code: Select all

 /usr/local/nagios/etc/nagios.cfg
And enable the following option:

Code: Select all

host_down_disable_service_checks=1
After that please restart nagios with:

Code: Select all

service nagios restart
https://support.nagios.com/kb/article.php?id=505

Re: Best Vcenter Monitoring Practices

Posted: Mon Dec 18, 2017 1:25 pm
by lndifferent
In the Manage Services, you'd select a "guest machine's status service", and then in the Manage Service Dependencies, you'd select all the other services that belong to that guest machine. Then you can select the Notification Failure Criteria (you can check many options: warning, critical, etc). So that means if the "guest machine's status service" goes to into any of the states that you selected, none of the notifications for dependent services will be sent out.
Does it mean that I have to configure the above for each guest machine?

You can open the following config:
CODE: SELECT ALL
/usr/local/nagios/etc/nagios.cfg

And enable the following option:
CODE: SELECT ALL
host_down_disable_service_checks=1

After that please restart nagios with:
CODE: SELECT ALL
service nagios restart

https://support.nagios.com/kb/article.php?id=505
Which brings back my last question: What nagios considers as a host when monitoring virtual guest machines with vcenter? In my setup, nagios thinks that vmware vcenter server appliance is host - true physical vmware hosts are not listed anywhere. Vcenter server appliance in my system is just another virtual machine so it doesn't make sense to use that as a host for other virtual machines.

Re: Best Vcenter Monitoring Practices

Posted: Mon Dec 18, 2017 4:42 pm
by npolovenko
@lndifferent
Does it mean that I have to configure the above for each guest machine?
Yes, you'd need to set up such dependencies for each guest machine. Making all services that belong to one particular vm dependent on the corresponding VM Status check may be a way to go with this.
Which brings back my last question: What nagios considers as a host when monitoring virtual guest machines with vcenter? In my setup, nagios thinks that vmware vcenter server appliance is host - true physical vmware hosts are not listed anywhere. Vcenter server appliance in my system is just another virtual machine so it doesn't make sense to use that as a host for other virtual machines.
Yes, In your setup XI considers VMware vcenter server appliance as a host. Everything else it considers as service checks. If you want to have a host entry for each VM in the VSphere, I'd rerun the wizard against each VM separately. However, you'd need to make sure that each VM has a static IP address.
In your scenario, I agree that it wouldn't make sense to use the Vcenter server appliance status as a host status for all the other VM's.

PS: take a look at the solution in this forum post: https://support.nagios.com/forum/viewto ... 61#p240261