VMWare Guest VM Monitoring on a large scale

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
CoMAdmin
Posts: 22
Joined: Sat Sep 21, 2019 9:55 pm

VMWare Guest VM Monitoring on a large scale

Post by CoMAdmin »

I have a few questions about using the VMWare plugin in our large environment and need some guidance please.

1. We currently have 350+ VM's and are scaling up slowly. If I run the guest VM wizard, is there a way to group all of the services to their respective host? I'm thinking along the lines of auto-generating a service group for each group of services belonging to each server?

2. Any good suggestions on how I can handle discovery of new VM's using this plugin? Either manual or auto-discover? I am familiar with the auto-discovery jobs but from my lab it seems that this would mostly be useful for any server that has SNMP Traps or an agent configured.

3. Once I complete this config wizard and choose all of the respective settings, what would be my best option to make changes to certain variables (add a metric to monitor, change monitoring intervals, etc.) to all VM's, or just a group of VM's?


Sorry for all the questions.

Any ideas or advice would be appreciated.
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: VMWare Guest VM Monitoring on a large scale

Post by cdienger »

1. I poked around the wizard code and was hopeful that we could come up with something within the wiazard but it looks like steps beyond what is in the wizard code dictate service group assignment.

2. Autodiscovery is good at finding hosts but not so much setting up service monitors for those hosts.

For both the above I would suggest looking into a custom automation script to find new hosts and create services/service groups. The wizard runs the following command to get a list of guests:

Code: Select all

/usr/local/nagiosxi/html/includes/configwizards/vmware/scripts/getguests.pl -H host_ip -u username -p password
And the API can be used to determine if the guest and service group exist in XI and add them if necessary. You can find API documentation and examples in the XI interface by pointing your browser to http(s)://xi_ip/nagiosxi/help/.

Adding a service group would look something like:

Code: Select all

curl -XPOST "http://xi_ip/nagiosxi/api/v1/config/servicegroup?apikey=apikey&pretty=1" -d "servicegroup_name=testapiservicegroup&alias=ServiceGroup&applyconfig=1"
and adding a service to that service group:

Code: Select all

curl -XPOST "http://xi_ip/nagiosxi/api/v1/config/service?apikey=apikey&pretty=1" -d "host_name=testapihost&service_description=PING&check_command=check_ping\!3000,80%\!5000,100%&check_interval=5&retry_interval=5&max_check_attempts=2&check_period=24x7&contacts=nagiosadmin&notification_interval=5&notification_period=24x7&servicegroups=testapiservicegroup&applyconfig=1"
3. For making bulk changes I would suggest the bulk modification tool(Enterprise edition of XI). It's found under Configure > Core Config Manager > Tools > Bulk Modifications Tool. For adding metrics to monitor you could always rerun the wizard and select the new metrics and apply them to existing hosts - it shouldn't impact any of the existing monitors.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
CoMAdmin
Posts: 22
Joined: Sat Sep 21, 2019 9:55 pm

Re: VMWare Guest VM Monitoring on a large scale

Post by CoMAdmin »

Thanks for helping me with your detailed answer. This points to me having to manually generate these for now until we can work on improvements of this system using the scripting method. That OR adding NRPE to each host... a few decisions to make. But it really does help to at least know what we cant NOT do.

Have a great one!
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: VMWare Guest VM Monitoring on a large scale

Post by cdienger »

Glad to help!
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked