@@ -18,23 +18,11 @@ Alternatively you can install with pip:
1818
1919 pip3 install -r requirements.txt
2020
21- Make sure to modify the shebang to your environment, one of the following should be fine.
22-
23- #!/usr/bin/env python3
24- #!/usr/bin/python3
25-
26- Then copy the file to your plugin dir:
27-
28- cp check_vmware_nsxt.py /usr/lib*/nagios/plugins/check_vmware_nsxt
29- chmod 755 /usr/lib*/nagios/plugins/check_vmware_nsxt
30-
31- Also see the [ Icinga 2 example command] ( icinga2/command.conf ) .
32-
3321## Usage
3422
3523```
36- $ ./ check_vmware_nsxt.py --help
37- ...
24+ check_vmware_nsxt.py --help
25+
3826optional arguments:
3927 -h, --help show this help message and exit
4028 --api API, -A API VMware NSX-T URL without any sub-path (e.g. https://vmware-nsx.local)
@@ -44,7 +32,8 @@ optional arguments:
4432 Password for Basic Auth
4533 --mode MODE, -m MODE Check mode
4634 --exclude [EXCLUDE ...]
47- Exclude alarms or usage from the check results. Can be used multiple times and supports regular expressions.
35+ Exclude alarms or usage from the check results.
36+ Can be used multiple times and supports regular expressions.
4837 --max-age MAX_AGE, -M MAX_AGE
4938 Max age in minutes for capacity usage updates. Defaults to 5
5039 --version, -V Print version
@@ -61,7 +50,8 @@ The `--exclude` parameter will match against alarms and capacity-usage. It uses
6150Mode: cluster-status
6251
6352```
64- $ ./check_vmware_nsxt.py --api 'https://vmware-nsx.local' -u icinga -p password --mode cluster-status
53+ check_vmware_nsxt.py --api 'https://vmware-nsx.local' -u icinga -p password --mode cluster-status
54+
6555[OK] control_cluster_status=STABLE - mgmt_cluster_status=STABLE - control_cluster_status=STABLE - nodes_online=3
6656
6757[OK] DATASTORE: STABLE - 3 members
@@ -80,24 +70,27 @@ $ ./check_vmware_nsxt.py --api 'https://vmware-nsx.local' -u icinga -p password
8070Mode: alarms
8171
8272```
83- $ ./check_vmware_nsxt.py --api 'https://vmware-nsx.local' -u icinga -p password --mode alarms
73+ check_vmware_nsxt.py --api 'https://vmware-nsx.local' -u icinga -p password --mode alarms
74+
8475[WARNING] 1 alarms - 1 medium
8576
8677[MEDIUM] (2021-04-26 17:25:18) (node1) Intelligence Health/Storage Latency High - Intelligence node storage latency is high.
8778| alarms=1;;;0 alarms.medium=1;;;0
8879```
8980
9081```
91- $ ./check_vmware_nsxt.py --api 'https://vmware-nsx.local' -u icinga -p password --mode alarms --exclude "LOW"
92- # Excluded alerts will still be counted, but are not factored into the exit code
82+ check_vmware_nsxt.py --api 'https://vmware-nsx.local' -u icinga -p password --mode alarms --exclude "LOW"
83+ # Hint: Excluded alerts will still be counted, but are not factored into the exit code
84+
9385[OK] 1 alarms
9486| alarms=1;;;0
9587```
9688
9789Mode: capacity-usage
9890
9991```
100- $ ./check_vmware_nsxt.py --api 'https://vmware-nsx.local' -u icinga -p password --mode capacity-usage
92+ check_vmware_nsxt.py --api 'https://vmware-nsx.local' -u icinga -p password --mode capacity-usage
93+
10194[OK] 28 info - no usages - last update: 2021-04-29 19:06:12
10295
10396[OK] [INFO] System-wide NAT rules: 0 of 25000 (0%)
0 commit comments