Auto-Discovering Datastores and ESX hosts in VMware

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
barathia
Posts: 18
Joined: Thu Dec 19, 2013 8:04 pm

Auto-Discovering Datastores and ESX hosts in VMware

Post by barathia »

I have configured VMware monitoring of vcenter and esx hosts.

I used the following wizard for it. http://exchange.nagios.org/directory/Ad ... rd/details

Now in this wizard I have to enter the name of the Datastore to config a check for it.

I am able to use the auto-discovery to detect esx hosts but not Datastores (since they don't have an IP address associated with them)

In this case how can I auto-detect datastore and esx hosts given the vcenter server?

At this point I am open to options.

Kind regards.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Auto-Discovering Datastores and ESX hosts in VMware

Post by slansing »

Are you talking about running that specific wizard against them? Or using the actual "Auto-Discovery" wizard? They are two completely different tools. In either case, as far as Datastores go, I know for a fact that the new box293 virtualization monitoring plugin can check datastores, he is currently working on a wizard, but if you wanted to manually add the checks for some of the more intricate and specific devices/systems/vm's you would like to check I'd highly recommend following his documentation:

http://exchange.nagios.org/directory/Pl ... re/details
barathia
Posts: 18
Joined: Thu Dec 19, 2013 8:04 pm

Re: Auto-Discovering Datastores and ESX hosts in VMware

Post by barathia »

Hi slansing

Thanks for that I can see that the VMA with box293 approach can monitor a lot more I like this approach, but when I went through the document I see the same problem.

Say we have 100+ Datastores and 100+ esx hosts. They change often in our environment. They are very dynamic more like in a cloud environment but not cloud.

How are we going to detect these changing ESX Hosts and Datastores and how can we add and delete relevant ESX hosts and Datastores as they change. The request is to make these checks auto configured.

I have already configured checks and added them to a single host_group that way when an esx host is added to the hostgroup they will obtain all relevant checks we require, likewise when a datastore is added with will obtain its relevant check..

The problem is how can I discover datastores or ESX host be discovered. As I must refer to Vcenter and add it nagios. Wondering if nagios can detect it these changes (ESX Host and Datastores) in vcenter and we can use that to auto-configure.

My question was more on the auto-discovery part.

Many thanks.
barathia
Posts: 18
Joined: Thu Dec 19, 2013 8:04 pm

Re: Auto-Discovering Datastores and ESX hosts in VMware

Post by barathia »

I had been looking at how I am going to find the results of auto discovery and I did found the place. Its located in

/usr/local/nagiosxi/html/includes/components/autodiscovery/jobs

I can grep the hostname of new servers from here and add it into hostname.cfg which will be placed in the /usr/local/nagios/etc/import/ directory. That way I can automate it.

But the problem remains on how I can discover when a datastore is added or removed.

Kind regards
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Auto-Discovering Datastores and ESX hosts in VMware

Post by sreinhardt »

At this point to discover if a datastore was added\removed, you would need to have a script that is able to query the available datastores and store the last result for comparison. Then if a change was made, it must have the logic to either alert you or make the needed config changes and apply config. I do not believe anything, short of maybe box263's agent would have any of this logic presently.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
barathia
Posts: 18
Joined: Thu Dec 19, 2013 8:04 pm

Re: Auto-Discovering Datastores and ESX hosts in VMware

Post by barathia »

thanks very much sreinhardt

I think I will look into those options. We can close it here.

many thanks.
Locked