I received an email a couple of weeks ago asking for a Nagios compatible version of my vCenter locator script. After I realised what a tragedy the one I had been running in my own environment was I cleaned it up a bit and have decided to release it so people can do as they please with it. The current version will look up your ESX servers in AD using a naming pattern that you define (OpenLDAP may also work though I haven’t tested it) and then connect to those ESX servers to look for the vCenter server it is executing on.
In the future I hope to have a version that exports a CSV or JSON doc from vCenter and uses that as an alternative for ESX look ups so that it is no longer dependent on directory services. The other important update will be limiting the number of connections it attempts to perform at a time… right now if it finds 100 ESX servers it will attempt to connect to all 100 at the same time, which is bad.
You can find the script here.comments powered by Disqus