**DEVELOPMENT OF THIS PLUGIN HAS CEASED AS OF 14/6/2014, IF YOU WOULD LIKE TO TAKE OVER THIS PROJECT PLEASE SEE THE CONTACT US PAGE**
A simple Powershell script for sending VMWare alarm information back to Nagios via the NRDP interface. Compatible with vCenter 3.5, 4.x, 5.x.
- vCenter seems to randomly fail when trying to execute commands, after testing, testing and more testing it seems that the issue is caused by vCenter but I can’t ascertain exactly why and I no longer have acquaintances at VMWare to get the problem looked into further. The script is still more than reliable enough but you will probably want to set Critical and Warning triggers to repeat every x hours and ensure that the service in Nagios has a freshness value so that it resets to OK, just in case the OK trigger doesn’t happen.
Plugin ported to Powershell v2.0
Improved logging, including better output and log rotation.
More options for configuring the Nagios output and how the alarm maps back to Nagios.
Significant improvements to the robustness of the script execution, no more failures to execute by vCenter.
For those crazy enough to try to use it for gathering performance data it now attempts to learn about more kinds of metrics.
- First release
1. Extract the vmware_sender directory onto your vCenter servers. Ensure there are NO SPACES to the extracted path.
NOTE As of the the time of writing, I’ve been unable to get vCenter to execute a Powershell script if there is a space in the path. If you have a workaround please contact me.
Create an alarm in vCenter and configure something to monitor, i.e. Virtual Machine CPU usage.
Under the actions tab of alarm settings click add then select “Run a command” as the action.
In the configuration section put the following:
“cmd.exe” “/c echo.|powershell -NonInteractive -File C:PathTovmware_sendervmware_sender.ps1”
- Save the alarm.
Read the README file in the zip file for full instructions.
The URL used to access the remote NRDP agent. i.e. http://nagiosip/nrdp/
The authentication token used to access the remote NRDP agent.
The name of the host associated with the passive host/service check result.
The name of the service associated with this check result.
The state of the service. Valid values are: OK, Green, WARNING, Yellow, CRITICAL, Red, UNKNOWN
Text output to be sent as the passive check result.
Used to specify active or passive check, 0 = active, 1 = passive. Defaults to passive.
Name of the output map to use in the vmware_sender.ini file, for more information read the README
Display this help text.