Nagios Plugin to check a Unifi Controller (Accesspoints and Switches). |
API Version 1.1.94
You need to install php-curl and php Version above 7.4
In case of my script use -P 443 and -s
Usage: |
Usage: /usr/bin/php check_unifi.php -H [controller] -u [controlleruser] -p [controllerpassword] -P [controllerport] -m [mode] -a [Accesspoint/Switch/Client/SSID] -w [Warning] -c [Critical] ( -S [site] -s =https -C [configfile] -r [nagios result] -i =invers nagios result -d =debug)
|
-m |
controller site clients clients_wifi devices_console clients_all clients_name ( + Accesspoint) clients_name_guest ( + Accesspoint) clients_count ( + Accesspoint) clients_count_guest ( + Accesspoint) channels + Accesspoint client_transfer + Clientname or IP client_transfer+ + Clientname or IP client_uplink + Clientname or IP client_uptime transfer + Accesspoint transfer+ + Accesspoint swtich_transfer + Switch switch_transfer+ + Switch uptime + Accesspoint/Switch update + Accesspoint/Switch uplink + Accesspoint warn crit experience + Accesspoint warn crit utilisation + Accesspoint warn crit mem + Accesspoint warn crit mem% + Accesspoint warn crit cpu + Accesspoint/Switch warn crit cpu% + Accesspoint/Switch warn crit load + Accesspoint/Switch warn crit temperature + Switch ap warn crit switch warn crit clients_ssid ( + SSID Name) clients_count_ssid + SSID Name clients_count_guest_ssid + SSID Name clients_wifi
Count over all sites: switch_unifi warn crit ap_unifi_name warn crit switch_unifi_name warn crit clients_unifi clients_count_unifi clients_count_guest_unifi clients_wifi_unifi lte_uplink lte_failover lte alarms_count |
-r | controller/client_transfer/client_transfer+/client_uplink/clients_ssid result nagios - new controller version/if a client not present/or if a guest ssid is enabled or disabled 0 - OK (default) 1 - WARNING 2 - CRITICAL |
-i | inverse -r (only clients_ssid, if the guest ssid is enabled or disabled) |
-C | config file (default=unifi.php) instead off the controller parameters -H, -u, -p, -P, -s, -S (you can specify any file with path) |
-php | no check of php Version |
Would you like to support me?
Then donate to PayPal...