diff options
-rw-r--r-- | .description-html | 8 | ||||
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | README.md | 32 | ||||
-rw-r--r-- | img/munin-netw.png | bin | 0 -> 37106 bytes | |||
-rw-r--r-- | img/munin-ssid.png | bin | 0 -> 36615 bytes | |||
-rw-r--r-- | ubnt_unifi.php | 3 |
6 files changed, 27 insertions, 17 deletions
diff --git a/.description-html b/.description-html index d59cff1..42a3f37 100644 --- a/.description-html +++ b/.description-html @@ -2,18 +2,18 @@ <html> <head> <meta charset="UTF-8"> - <title>unifimunin.git</title> + <title>unifi-munin.git</title> </head> <body> <h2>unifimunin.git</h2> <h3>You should clone the repository first, because the raw reading is not allowed here! <br> -( #>> git clone http://git.bmrg.hu/unifimunin.git ) </h3> +( #>> git clone http://git.bmrg.hu/unifi-munin.git ) </h3> <br> -<h3> In browserable format: <br> <a href='https://github.com/EpeR1/unifimunin'> https://github.com/EpeR1/unifimunin </a> </h3> +<h3> In browserable format: <br> <a href='https://github.com/EpeR1/unifi-munin'> https://github.com/EpeR1/unifi-munin </a> </h3> -<br> +<br> @@ -2,3 +2,4 @@ .description + @@ -1,6 +1,10 @@ -This is a [Munin](http://munin-monitoring.org/) plugin to monitor your [Ubiquity Unifi](https://www.ubnt.com/products/#unifi) wireless network status. +This is a [Munin](http://munin-monitoring.org/) plugin to monitor your [Ubiquiti Unifi](https://www.ubnt.com/products/#unifi) wireless network status. It uses SNMP v2 to get network data. +**The original version of this repo is aviable here: [http://git.bmrg.hu/unifi-munin.git](http://git.bmrg.hu/unifi-munin.git/)** + +. + ## Usage unifi_munin - Munin plugin to monitor UBNT unifi wireless APs @@ -13,13 +17,17 @@ Network usage -## Installation on Debian +## Installing on Debian 1) Copy the **ubnt_unifi.php** into the **/usr/share/munin/plugins/** folder. 2) Set the rights: - `chmod 755 /usr/share/munin/plugins/ubnt_unifi.php` + + chmod 755 /usr/share/munin/plugins/ubnt_unifi.php + 3) Create a symlink to this file: - `ln -s /usr/share/munin/plugins/ubnt_unifi.php /etc/munin/plugins/ubnt_unifi` + + ln -s /usr/share/munin/plugins/ubnt_unifi.php /etc/munin/plugins/ubnt_unifi + 4) Edit the **/etc/munin/plugin-conf.d/munin-node** file, and add the following configuration lines. 5) Test the plugin with the `munin-run ubnt_unifi` command. @@ -27,13 +35,13 @@ Network usage The following environment variables are used: -` [ubnt_unifi] ` -` timeout` - Munin-update timeout for this plugin. -` env.controller` - The unifi controller hostname/ip. -` env.devices` - A "space" separated list of the hostnames or IP addresses of wireless APs. -` env.timeout` - The maximum timeout in milliseconds of SNMP requests. (Be careful of munin max update time!). -` env.retry` - Number of retry after failed/time out SNMP requets. -` env.devnetw` - The network of the APs. (It is expreimental yet.) + [ubnt_unifi] + timeout - Munin-update timeout for this plugin. + env.controller - The unifi controller hostname/ip. + env.devices - A "space" separated list of the hostnames or IP addresses of wireless APs. + env.timeout - The maximum timeout in milliseconds of SNMP requests. (Be careful of munin max update time!). + env.retry - Number of retry after failed/time out SNMP requets. + env.devnetw - The network of the APs. (It is expreimental yet.) Configuration example for Munin: @@ -52,7 +60,7 @@ Configuration example for Munin: ### AUTHOR -Copyright (C) 2018 Gergő M. +Copyright (C) 2018 Gergő J. Miklós. diff --git a/img/munin-netw.png b/img/munin-netw.png Binary files differnew file mode 100644 index 0000000..fd825bd --- /dev/null +++ b/img/munin-netw.png diff --git a/img/munin-ssid.png b/img/munin-ssid.png Binary files differnew file mode 100644 index 0000000..a4ec8b5 --- /dev/null +++ b/img/munin-ssid.png diff --git a/ubnt_unifi.php b/ubnt_unifi.php index aa4c315..12ba5f1 100644 --- a/ubnt_unifi.php +++ b/ubnt_unifi.php @@ -1,11 +1,12 @@ #!/usr/bin/php <?php -// Munin monitoring plugin for Ubiquity Unifi AP system. +// Munin monitoring plugin for Ubiquiti Unifi AP system. //$controller = "unifi.company.com"; //$hosts = "ap01.wireless.company.lan ap02.wireless.company.lan ap03.wireless.company.lan ap04.wireless.company.lan"; + $controller = getenv('controller'); $hosts = getenv('devices'); $timeout = getenv('timeout'); |