Using NAGIOS to read data gathered by MRTG?

Cook, Garry GWCOOK at mactec.com
Wed Jun 9 17:37:08 CEST 2004


nagios-users-admin at lists.sourceforge.net wrote:
>>> I have a router which is monitored by MRTG to gather traffic stats -
>>> useage/load/data volume, and I want to have Nagios sent an
>>> alert email if
>>> the utilisation percentage on a given data link exceeds a threshold
>>> 
>>> Will one of the standard plugins do this? If so, which one,
>>> and how do I make this work?
>> 
>> It depends... Are you using MRTG with log files or an .rrd backend?
>> There are plugins available to check both. Look in the plugin source
>> contrib directory, if you don't find them in nagios/libexec.
> 
> It's just running log files.
> 
> There are a couple of mrtg pluging in nagios/libexec, but I
> can't figure
> out how to use them, and the docs aren't very helpful.
> 
> DaZZa
> 

I would suggest upgrading MRTG to use rrd files instead of the logs. I
can't offer much assistance in the way of Nagios checking MRTG log
files, but for MRTG .rrd checking you should be able to use the
contributed plugins. I've also written my own check_rrdbw plugin that
will do something similar to what you are looking for. I'm sure that the
contributed ones work well, but they just didn't work the way I wanted
them to.

Upgrading MRTG to use RRDTool is not very hard at all. In a nutshell,
install RRDTool, and then add 'LogFormat: rrdtool' to your MRTG config
files. Your existing log files will be created as rrds automagically the
next time you start MRTG, so you shouldn't lose any historical data. I
believe that log files will be replaced by rrds in MRTG v3.0 anyway, so
you may want to look into them now. They also offer a lot more features
than log files.
If you should decide to go this route, I would suggest posting further
questions to the MRTG mailing list if necessary, then come back to
Nagios-Users if you still need help checking rrds once you've got
RRDTool up and running.

Garry W. Cook, CCNA
Network Infrastructure Manager
MACTEC, Inc. - http://www.mactec.com/
303.308.6228 (Office) - 720.220.1862 (Mobile)


-------------------------------------------------------
This SF.Net email is sponsored by: GNOME Foundation
Hackers Unite!  GUADEC: The world's #1 Open Source Desktop Event.
GNOME Users and Developers European Conference, 28-30th June in Norway
http://2004/guadec.org
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list