VMWare

NSXMon

Description:

Nagios Library in PHP to monitor VMware NSX Devices via VMware API

Current Version

0.1.0

Last Release Date

2019-06-13

Compatible With

  • Nagios 4.x
  • Nagios XI

Owner

License

GPL


Nagios CSP

Meet The New Nagios Core Services Platform

Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.

Monitoring Made Magically Better

  • Nagios Core on Overdrive
  • Powerful Monitoring Dashboards
  • Time-Saving Configuration Wizards
  • Open Source Powered Monitoring On Steroids
  • And So Much More!
Project Notes
NSXMon Nagios Library to monitor VMware NSX Devices Command Line Usage: /usr/bin/php NSXMon.php -H "" -f "/path/to/authfile.cfg" -m "" -a "" -c "" -C "" -O "" -s "" -n "" NagiosXI Command Name: NSXMon /usr/bin/php -q $USER1$/NSXMon.php -H "$HOSTADDRESS$" -f "$ARG1$" -m "$ARG2$" -a "$ARG3$" -c "$ARG4$" -C "$ARG5$" -O "$ARG6$" -s "$ARG7$" -n "$ARG8$" Auth File pass the full path to the file in $ARG1 of the check command. See auth-file-example,cfg for content and format requirements NSXMon Check Options SYSTEM -m | --monitor (system) -a | --action system(uptime, version, cpu-usage, cpu-count, cpu-cap, mem-usage, mem-total, storage-usage, storage-total) -c | --critcal -n | --negate (default is false) - forces check to exit with OK state SYSTEM-EVENT -m | --monitor* (system-event) -a | --action* system-event(show-crit, show-high) -c | --critcal* (eventId to match against) -C | --criticalcount (The number of number of matched events before alert) -O | --criticalobject (Specific origin objectId to match against) -s | --scanrange (Only scan events newer than the last X seconds) - seconds only -n | --negate (default is emptyfalse) - forces check to exit with OK state SYSTEM-ALARM -m | --monitor* (system-alarm) -a | --action* system-event(show-resolvable, show-unresolvable) -c | --critcal () -C | --criticalcount (The number of number of matched events before alert) default = 1 -O | --criticalobject (Specific alarm objectId to match against) -s | --scanrange (Only scan events newer than the last X seconds) - default = 600 AUDIT-LOG -m | --monitor (audit-log) -a | --action audit-log(show-fail) -c | --critcal -C | --criticalcount (The number of number of matched events before alert) -> default = 1 -O | --criticalobject (Specific operation type to match against) -s | --scanrange (Only scan events newer than the last X seconds) - default = 600 SNMP -m | --monitor (snmp) -a | --action snmp(list-all, list-enabled, trap-info) -c | --critcal Service Check Examples SHOW-CRITICAL-SYSTEM-EVENTS /usr/bin/php -q NSXMon.php -H "yourhostname" -f "/usr/local/nagios/libexec/nsxmgrauthfile.cfg" -m "system-event" -a "show-crit" -c "1" -w "0" -n "" -x "0" SHOW-RESOLVABLE-SYSTEM-EVENTS /usr/bin/php -q NSXMon.php -H "yourhostname" -f "/usr/local/nagios/libexec/nsxmgrauthfile.cfg" -m "system-alarm" -a "show-resolvable" -c "" -C "5" -O "" -s "" -n "" MEM-USAGE (CRITICAL > 95%) /usr/bin/php -q NSXMon.php -H "yourhostname" -f "/usr/local/nagios/libexec/nsxmgrauthfile.cfg" -m "system" -a "mem-usage" -c "95" -C "" -O "" -s "" -n "" VMware Setup Create Read-Only user via the API with full permissions to the API. Use this username and password in the auth file.
Reviews (2) Add a Review
New NSX Api
by CerealK1ller, June 30, 2021
There is any possibilities to upgrade this to NEW api released?

https://code.vmware.com/apis/547/nsx-t
Helpful? Yes  No 
Errors:
by bernard@lheureux.be, November 30, 2020
php -q ./NSXMon.php -H 10.6.253.253 -f "/usr/lib/nagios/plugins/NSXauthfile.cfg" -m "system" -a "mem-usage" -c "95" -C "" -O "" -s "" -n ""
PHP Notice: Undefined variable: mymempercent in /usr/lib/nagios/plugins/NSXMon.php on line 384
PHP Stack trace:
PHP 1. {main}() /usr/lib/nagios/plugins/NSXMon.php:0
PHP 2. main() /usr/lib/nagios/plugins/NSXMon.php:1177
PHP Notice: Undefined variable: mymempercent in /usr/lib/nagios/plugins/NSXMon.php on line 389
PHP Stack trace:
PHP 1. {main}() /usr/lib/nagios/plugins/NSXMon.php:0
PHP 2. main() /usr/lib/nagios/plugins/NSXMon.php:1177

How could I fix that ?
Owner's Reply:

Can you remove the -C "" variable from your command?

Also could you provide the output from
"/api/1.0/appliance-management/summary/system"

--SN


0 of 1 found this review helpful.
Helpful? Yes  No 1
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
3 (2)
Favorites
0
Views
7,894