VMWare

vcsa_monitor.sh

Description:

Simple script to monitor Vmware center VCSA 6.5 (sorry no actual support for 6.0) health status via REST API (https)

monitor all health status referenced here :
https://vdc-repo.vmware.com/vmwb-repository/dcr-public/1cd28284-3b72-4885-9e31-d1c6d9e26686/71ef7304-a6c9-43b3-a3cd-868b2c236c81/doc/index.html#PKG_com.vmware.appliance.health

Current Version

1.0

Last Release Date

November 17, 2017

Compatible With

  • Nagios 1.x
  • Nagios 2.x
  • Nagios 3.x
  • Nagios 4.x
  • Nagios XI

Owner


Project Notes
Script is called with IP or fqdn of VCSA as argument argument is only used to be able to call multiple config file for multiple vcenter configuration config file is supplied as example : contains 3 VAR VCENTER="https://fqdn-or-ip-of-vcsa" USERNAME="monitoring-username" PASSWORD="my password" SAMPLE OUTPUT : ./vcsa_monitor.sh 192.168.1.55 All (8/8) VCSA health checks are green : applmgmt (green),database-storage (green),load (green),mem (green),software-packages (green),storage (green),swap (green),system (green), ./vcsa_monitor.sh 192.168.1.55 One or more health checks are not green (5/8) : applmgmt (green),database-storage (yellow),load (green),mem (green),software-packages (green),storage (yellow),swap (green),system (yellow), Please visit https://fqdn-or-ip-of-vcsa:5480/
Reviews (6) Add a Review
Just What I was finding!
by aarregi, April 30, 2020

It works perfectly with 6.7! Thanks!



Problem with VCSA 6.7
by ladinek, September 30, 2019

I found solution for VCSA 6.7. It is described in VMWare KB article https://kb.vmware.com/s/article/67483, where is stated, that problem is solved in 6.5u2 - this is not true, in VCSA 6.7 latest patch (Spe/2019) there is still old version of the script. More about solution here: http://www.vryan.co.uk/index.php/2018/05/09/vcsa-automated-backup-failure/



Doesn't work with VCSA 6.7
by frantisek.bures, August 31, 2019

Very nice plugin, but unfortunately does not work in VCSA 6.7. Output: One or more health checks are not green (1/8) : applmgmt (green),database-storage (n/a),load (n/a),mem (n/a),software-packages (n/a),storage (n/a),swap (n/a),system (n/a), Please visit https://...... If I try to run "https: // {server} / rest / appliance / health / mem" directly, the output is "default_message: "This method requires authentication.", but that is strange because the script authenticates.



Great Example of VCSA Authentication
by Sam N, June 30, 2019

All around good stuff! The authentication example can be easily ported to any code flavor of preference allowing you to extend the collection and evaluation of information presented via the VMWare API.



ImportError: No module named json
by YELLOWDOG, January 31, 2019

Hello, I try to use your plugin in a FAN version of NAGIOS (core 3.4.4). But when trying to execute your script I have the followinf errors: ImportError: No module named json and Unable to login to VCSA API, please check credentials and firewall. Is my problem due that JSON is missing in FAN, if so is it possible to install that module or not, or do I have to install a new version of NAGIOS with JSON embeded ? Thanks for the answer.



Nice work
by atilaloise, January 31, 2018

Im new on nagios monitoring, so, after everything works, what is the next step for graphic monitoring? How can we make nagios show separated field for each item alerted by your script? congrats from Brazil!



Add a Review

You must be logged in to submit a review.

Thank you for your review!

Your review has been submitted and is pending approval.

Recommend

To:


From:


Thank you for your recommendation!

Your recommendation has been sent.

Project Stats
Rating
4.6 (8)
Favorites
4
Views
18,554