Adding more monitoring metrics
Mist.io uses the open-source monitoring agent Collectd to collect monitoring data from the machines. When collectd gets installed, we enable a number of plugins that monitor server metrics like CPU, disk and network usage. The list of all preinstalled metrics that you can enable, is available when you click on the Add Graph button on the machine's page.
But there are many more plugins that can be configured to monitor various metrics and applications like web servers and databases. Depending on the plugin, you might need to install extra libraries on your server. For most of them, editing the collectd configuration file is enough. For others, like the Apache plugin, you'll need to also edit apache's conf file to add support for mod_status. Let us see some examples:
This example is based on enabling monitoring for Apache on a server running Ubuntu 14.04. Steps for other servers should be similar. First, you have to add support for mod_status on apache.
ExtendedStatus on <Location /mod_status> SetHandler server-status </Location>
Once you've added the above snippet on your apache.conf, edit /opt/mistio-collectd/collectd.conf and add some configuration for the collectd apache plugin:
LoadPlugin "apache" <Plugin "apache"> <Instance "apache80"> URL "http://localhost/mod_status?auto" User "collectd" Password "hoh2Coo6" </Instance> </Plugin>
That's it. Restart collectd by running:
# /opt/mistio-collectd/collectd.sh restart
Head over to Mist.io and you should see the apache-related graphs: