VMware Cloud Community
Baoth
Enthusiast
Enthusiast
Jump to solution

PowerCLI script to interrogate VIEvents and then output to a file Nagios can read

Hi all

Has anyone got experience with running a PowerCLI script to grab some events using Get-VIEvent, or LucD​​'s Get-VIEventPlus, and output to a file that Nagios is able to read and use?

This comes off the back of my recent post for a script that would generate a report of VR violations, which outputs to either a CSV or e-mail, but as we use Nagios as our monitoring tool, i'd like to get it working in more of an automated way.

Thanks.

0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

By using a Nagios plugin, you can, in theory, run whatever script to read external files or query APIs.

A sample for a plugin that checks RPO warnings, it is in Italian, but Google translate should be able to help if needed, can be found in Plugin per Nagios

The script is a bit outdated, the PSSnapin isn't needed anymore, but it shows the basic concept.

I'm not a regular Nagios user, but you might discover more scripts when you search the Nagios Exchange.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

1 Reply
LucD
Leadership
Leadership
Jump to solution

By using a Nagios plugin, you can, in theory, run whatever script to read external files or query APIs.

A sample for a plugin that checks RPO warnings, it is in Italian, but Google translate should be able to help if needed, can be found in Plugin per Nagios

The script is a bit outdated, the PSSnapin isn't needed anymore, but it shows the basic concept.

I'm not a regular Nagios user, but you might discover more scripts when you search the Nagios Exchange.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference