Today we add nginx to out Monitorix, and install BandwidthD for extra bandwidth monitoring. I would like to see who our biggest bandwidth movers are. I use bandwidthd on a few PFSense boxes I run, and I love the way it works 🙂
Nginx seems to have its own monitoring running on localhost:
w3m localhost
Active connection: 1
server accepts handled requests
2147 2147 17038
Reading: 0 Writing: 1 Waiting: 0
Monitorix seems to know about this, and so we just need to tell it to go looking.
Edit /etc/monitorix/monitorix.conf:
Find this line: nginx = n
Make it: nginx = y
Change any other things you would like in this file, then just save it.
Now, you should see the graph in Monitorix 🙂
Now we wanna install BandwidthD, and link it into Monitorix (Sorta)
Run:
apt-get install bandwidthd
And complete the installation.
Then we wanna add it to the same webservice as monitorix. We run:
ln -s /var/lib/bandwidthd/htdocs/ /var/lib/monitorix/www/bandwidth
Now we just open: http://192.168.1.12:8080/monitorix/bandwidth/index.html
Now we have more pretty graphs! 🙂
The data may not save on a reboot though, so that is something we have to look into…