[mrtg] How to monitor non SNMP Device using MRTG

Fehmi Dumani albadino at hotmail.com
Mon Apr 26 08:26:04 CEST 2010

Greetings Ashok

Can you send a copy of load_avg.sh and any sample log file it is creating. I will as soon as I get the file take a look at it.


Date: Mon, 26 Apr 2010 10:10:28 +0530
Subject: Re: [mrtg] How to monitor non SNMP Device using MRTG
From: g.ashok1988 at gmail.com
To: albadino at hotmail.com
CC: mrtg at lists.oetiker.ch

Hi All,
I customised script as:EnableIPv6: no WorkDir: /home/Ashok/mrtg2/Station21/ Interval: 5 Title[load_avg]: Average Load on Station21 
PageTop[load_avg]: <H1>( Average Load on Station21 ) * 100</H1> Options[load_avg]: nobanner,gauge,noinfo,nopercent,growright Target[load_avg]: `/home/Ashok/mrtg2/cfg/load_avg.sh` 
MaxBytes[load_avg]: 100 YLegend[load_avg]: LoadAvg * 100 Unscaled[load_avg]: ymwd LegendI[load_avg]: LegendO[load_avg]: 
Suppress[load_avg]: y RunAsDaemon: Yes Refresh: 600It's working fine showing graphs and all. But where do I specified the config file to get the data from Is it fetching the data from my system or it's from ???
Please help me.

On Mon, Apr 26, 2010 at 8:02 AM, ashok kumar <g.ashok1988 at gmail.com> wrote:

Thank you Fehmi Dumani,
I will try that on my machine and get back to you if I face any problems.
Thank you once again for your script.
On Sat, Apr 24, 2010 at 4:21 PM, Fehmi Dumani <albadino at hotmail.com> wrote:

Hi G. Ashok,

The first think to do is to get log files which contains the information, for instance do you have any logging server or maybe you can get output via CLI (Command Line Interface). 

In the first cause all you need to do is do some filtering and give your information to the mrtg service, 

On the second scenario you will have to probably remotely gather this information using ssh to execute remote commands or maybe rsh. Than all is simple I will attach a file which contains few mrtg configuration scenarios with the some scripts which are realy easy to read.

If you need more help plz send some details on what kind of information do you wana graph and how do you obtain them, and I will try to help you with your script. 

Keep in mind I don't know how windows mrtg works so I am speaking only for linux servers that serves mrtg.

By the way I found these scripts on the net and I am not sure where did I find them but they gave me really great help creating my script and mrtg.cfg, so this is not my work some1 else deserves the thanking.


Date: Sat, 24 Apr 2010 15:58:37 +0530
Subject: Re: [mrtg] How to monitor non SNMP Device using MRTG
From: g.ashok1988 at gmail.com
To: albadino at hotmail.com

CC: mrtg at lists.oetiker.ch

Thank you guys for giving such a valuable information saying that you have implemented MRTG for non SNMP devices.

But someone says, to use smokeping, write scripts which have to return four values. 
First of all I I think I don't want to switch to some other tools like smokeping as I know about MRTG. So, if you guys tried this, could you please post some practical scripts( might be complex ) so that I can implement for my non SNMP devices and then I can go for some other tools like smokeping for some enhancements.

Kind Regards,G Ashok Kumar,Softential.On Sat, Apr 24, 2010 at 1:24 PM, Fehmi Dumani <albadino at hotmail.com> wrote:

You can check this page http://mrtg.meulie.net/doc/mrtg-reference.en.html it helped me set it up for my own  use.

Check the part 

External Monitoring Scripts
		If you want to monitor something which does not provide
data via snmp you can use some external program to do
the data gathering.

		The external command must return 4 lines of output:

Line 1
					current state of the first variable, normally 'incoming bytes 

				Line 2
					current state of the second variable, normally 'outgoing bytes 

				Line 3
					string (in any human readable format), telling the uptime of the

				Line 4
					string, telling the name of the target.

Hotmail has tools for the New Busy. Search, chat and e-mail from your inbox. Learn more.


mrtg mailing list

mrtg at lists.oetiker.ch


The New Busy is not the too busy. Combine all your e-mail accounts with Hotmail. Get busy.


G. Ashok Kumar


G. Ashok Kumar
The New Busy think 9 to 5 is a cute idea. Combine multiple calendars with Hotmail. 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oetiker.ch/pipermail/mrtg/attachments/20100426/eb3aa2c8/attachment.htm 

More information about the mrtg mailing list