MRTG, or Multi Router Traffic Grapher, is a project which provides basic input/output traffic information for devices that communicate via SNMP.
MRTG does not have fine grained access control. If you enable user access to a slave web interface, all users can see all graphs produced by MRTG.
If you list the hosts with MRTG from Opsview, only links will be shown for hosts that the current user has access to. However, a user could “guess” the appropriate URL to show the graphs from MRTG for other hosts.
From the Opsview master, you can define which hosts can have MRTG configured by clicking on the Use MRTG for Interfaces field.
At an Opsview reload, the MRTG configuration generator will go to all hosts with MRTG enabled, and look for all interfaces on those devices. This MRTG generation only occurs if a host with MRTG enabled has recently been changed.
MRTG polls every 5 minutes for all hosts with MRTG enabled.
In a distributed environment, MRTG will work as expected. However, to view the graphs, you need web access to the slave server. This is because the graphs are generated using RRD which are stored on the slave itself and not sent back to the Opsview master.
When viewing MRTG graphs on the Opsview master, Opsview will calculate the hostname and check that the user has the appropriate access to view the host. When viewing MRTG graphs on a slave, this is not possible so there is no access control on slaves (although unauthenticated users will not be able to view anything).
MRTG is invoked every 5 minutes from the nagios user's crontab. MRTG will then poll all devices (from the
/usr/local/nagios/etc/mrtg.cfg configuration file) for the current input/output byte information and save it to the RRD store (in
In a distributed environment, MRTG will look for all hosts monitored by that particular slave server. However, to view the graphs, you need web access to the slave server. This is because the graphs are generated using RRD which are stored on the slave itself and not sent back to the Opsview master.
If you have a lot of hosts that you can running MRTG against, you can increase the number of concurrent MRTG checks by amending the MRTG forks parameter.
It has been seen that some devices do not work with MRTG on RHEL5 or CentOS5. These devices cause
cfgmaker to hang while communicating with the device, so
/usr/local/nagios/etc/mrtg.cfg and thus MRTG will not collect data. Remove these hosts from being monitored via MRTG.
Devices that have are known to have issues:
- HP ProCurve 1810G