Warning: count(): Parameter must be an array or an object that implements Countable in /home/customer/www/vmguru.com/public_html/wp-content/plugins/amp-plugin-filter/amp-plugin-filter.php on line 24

Warning: Illegal string offset 'width' in /home/customer/www/vmguru.com/public_html/wp-content/plugins/amp-plugin-filter/amp-plugin-filter.php on line 28

Warning: Illegal string offset 'height' in /home/customer/www/vmguru.com/public_html/wp-content/plugins/amp-plugin-filter/amp-plugin-filter.php on line 28

Warning: Illegal string offset 'width' in /home/customer/www/vmguru.com/public_html/wp-content/plugins/amp-plugin-filter/amp-plugin-filter.php on line 28
vRealize Operations: Adding an OS Monitor Script

vRealize Operations: Adding an OS Monitor Script

Besides monitoring Windows Services and the vCenter Server Appliance, you can also use vRealize Operations to monitor custom data through OS scripts. Attached to an Operating System object, an OS Script can output the health status and/or a metric for use in analysis. I will dive into the health status part for this post.

Setting the Stage

In this article, I’ll be using an example with a Linux server and the open source storage product Gluster. The OS Script will be checking whether a Gluster volume is healthy and allows vROps to generate alerts when something goes wrong with the Gluster volume. Before we continue, the rest of this article assumes there is an existing End-Point Operations Agent installed on the Linux server.

The OS Monitor Script

Gluster is a storage replication service which can serve as a redundant storage system. It does this by replicating block volumes between servers, or as Gluster calls them; bricks. To determine if the service is healthy; a volume needs to be “started” and the amount of bricks needs to be equal to the amount of servers you’re replicating between. Here’s the script I’ll be using for the health status:


Basically this checks whether a specific volume is running and if the amount of servers is what you’d expect it to be. The exit code is the bit that determines the health for vROps. Zero (0) means healthy and one (1) means broken.

Adding the OS Script

After putting the script on the server and adding the server to vROps, navigate to the server and use the Actions > Monitor OS Object > Add Monitor Script menu to enter the details of the scripts location and parameters it needs.

Here are the settings that you can use:

After adding the Monitor Script, it will start collecting via the End-Point Operations Agent and it will be visible under the server in the Operating Systems World. The health status can now be used for notifications and can be put in a dashboard for easy access.

So that’s how you add a monitor inside vRealize Operations that executes a script to determine the health status of a service. Next time I’ll cover integrating metrics into OS scripts.

 

Related posts

A low budget SMB environment – A HowTo (Part 1: Parts and budget)

by Alex Muetstege
8 years ago

Kubernetes persistent volumes with NetApp Trident – Part 2

by Dimitri de Swart
2 years ago

PowerShell Friday: Configuring vSphere MTU Size

by Martijn Smit
8 years ago
Exit mobile version