aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorM.Gergő2018-10-10 23:05:41 +0200
committerM.Gergő2018-10-10 23:05:41 +0200
commit85852501982888bce71dde4619d2b1ece503fdd7 (patch)
tree677cfd224ab17069b4f259691a7a7582f65c329f
parentdb2827f542e9bc9a23ffed4707be038c0b1fb478 (diff)
downloadmunin-unifi-85852501982888bce71dde4619d2b1ece503fdd7.tar.gz
munin-unifi-85852501982888bce71dde4619d2b1ece503fdd7.zip
better configuration
-rw-r--r--README.md4
-rw-r--r--ubnt_unifi.php4
2 files changed, 6 insertions, 2 deletions
diff --git a/README.md b/README.md
index c77a80b..024aa9b 100644
--- a/README.md
+++ b/README.md
@@ -22,13 +22,17 @@ Network Usage
## 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`
+
3. Create a symlink to this file:
`ln -s /usr/share/munin/plugins/ubnt_unifi.php /etc/munin/plugins/ubnt_unifi`
4. Edit the **/etc/munin/munin.conf** and **/etc/munin/plugin-conf.d/munin-node** files, add the following configuration lines.
+
5. Restart the munin, and munin-node with `/etc/init.d/munin restart` and `/etc/init.d/munin-node restart` commands.
+
6. Test the plugin with the `munin-run ubnt_unifi` command.
diff --git a/ubnt_unifi.php b/ubnt_unifi.php
index 4491a38..6dc1051 100644
--- a/ubnt_unifi.php
+++ b/ubnt_unifi.php
@@ -184,8 +184,8 @@ function collect_netw_summary($inp,$host){ //network information
$multiplier = 8;
$divider = 1;
} else { //because the normal INTEGER(32) would be overflowed
- $multiplier = 8*1024*1024; // When showing the controller's summary
- $divider = 1024*1024;
+ $multiplier = 8*4*1024; // When showing the controller's summary
+ $divider = 4*1024;
}