Nagios Library to monitor VMware NSX Devices
Usage: /usr/bin/php NSXMon.php -H "" -f "/path/to/authfile.cfg" -m "" -a "" -c "" -C "" -O "" -s "" -n "<true, false>"
Name: NSXMon
/usr/bin/php -q
- pass the full path to the file in $ARG1 of the check command.
- See auth-file-example,cfg for content and format requirements
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 empty\false) - 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
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 ""
- Create Read-Only user via the API with full permissions to the API.
- Use this username and password in the auth file.