[mrtg] How to monitor non SNMP Device using MRTG

Fehmi Dumani albadino at hotmail.com
Wed Apr 28 17:02:33 CEST 2010


Greetings Ashok

There must be a way to monitor windows servers as well. Unfortunatly I have no clue how to get information about uptime on windows machines, I have no experience on windows machines at all, and I am new on mrtg too, this is my second-third week of  MRTG usage. 

But if you can get statistic information localy via CLI (cmd.exe) about the windows systems I think there wont be any trouble about getting these statistics on linux machines and create graphs.

I will do my best to assist you on this task.

Regards 

Fehmi. 

Date: Wed, 28 Apr 2010 18:01:12 +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

HiFehmi Dumani, 
with your very good explanation on non snmp based mrtg monitoring I'm able to monitor any linux system now.But, what about windows and printers that don't have any snmp enabled on them? 

On Mon, Apr 26, 2010 at 5:35 PM, ashok kumar <g.ashok1988 at gmail.com> wrote:


Hi Dumani.
It's working fine now. I used scp instead of ssh-copy-id.Thanks for your valuable time.If I have further queries I will post in the mailing list.
Happy Posting. Take Care. Bye :)On Mon, Apr 26, 2010 at 5:25 PM, ashok kumar <g.ashok1988 at gmail.com> wrote:


sorry Dumani,
I didn't see your line ssh-copy-id [-i [identity_file]] [user@]machine.

But my kernel says that ssh-copy-id not found. It seems I need to install that rmp.

On Mon, Apr 26, 2010 at 4:49 PM, Fehmi Dumani <albadino at hotmail.com> wrote:








Yes it is

You can run commands remotly on your machines via ssh or rsh the script is almost the same except you use command

ssh user at hostip uptime <------------
instead of
uptime <------------------




and first you have to configure ssh and install your public key via ssh-copy-id

ssh-copy-id [-i [identity_file]] [user@]machine

and than everythink is the same.

Regards 

Date: Mon, 26 Apr 2010 14:03:11 +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 again Dumani,
Thanks for your reply. In my previous reply I was more concerned about the remote system monitoring rather than my sytem. But you just mentioned about that in your last line like "Remember you can execute commands remotely via ssh or rsh so you can make load average graphs of other systems as well" which means that we can have mrtg to be running on remote machine and if you want to get that graphs you have to use httpd service. Isn't it? 



But my concern is about having all those data on my system(server) so that I can view the graphs at anytime and maintain log files on my system rather than running mrtg and maintining all the data in respective systems.



Is it possible without snmp enabled on my client machines?
On Mon, Apr 26, 2010 at 1:01 PM, Fehmi Dumani <albadino at hotmail.com> wrote:









Greetings Ashok

On your script you are showing the VAL1 of a system running mrtg uptime for 1 min, the second VAL2 is showing your uptime and the and the system load averages for the past 1, 5. Since mrtg on his own creates a graph for periodic use in your cause every 5 minutes you don't have to give bouth values showing the same thing





VAL1=`echo "$SECOND*100" | bc | cut -f1 -d"."`

and for

VAL2=100

your solid green will show the system load averages for the past 5 minutes of the system which will be periodically obtained. and the second line blue 100% that might be used.






If I can make some modifications on your mrtg.cfg I would make it like this:

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,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]: Load Average
LegendO[load_avg]: Max Load Average
Suppress[load_avg]: y
RunAsDaemon: Yes
Refresh: 600


I don't use mrtg as a daemon so it is up to you if you wana use it or do the job with crontab. All I add was LegendI and LegendO to put Max Average and Current show values and removed noinfo,nopercent, at options. Remember in order to view it on your page you have to configure httpd to set a dir /home/Ashok/mrtg2/Station21/ to be used, also if you have SELinux enabled you will have to run it on permisive mode or to create your own policies, otherwise it won't let you publish on httpd. Than all you have to do is get the indexmaker create the index.html and wait for some minutes to see your graphs. (Indexmaker usage command: indexmaker --output=/home/Ashok/mrtg2/Station21/index.html /etc/mrtg/mrtg.cfg





Remember you can execute commands remotely via ssh or rsh so you can make load average graphs of other systems as well.

Regards
 		 	   		  
The New Busy think 9 to 5 is a cute idea. Combine multiple calendars with Hotmail.  Get busy.






-- 

Thanks
G. Ashok Kumar
Softential
 		 	   		  
Hotmail is redefining busy with tools for the New Busy. Get more from your inbox. See how.





-- 

Thanks
G. Ashok Kumar
Softential



-- 

Thanks
G. Ashok Kumar
Softential



Kind RegardsG. Ashok Kumar,
Softential.
 		 	   		  
_________________________________________________________________
Hotmail has tools for the New Busy. Search, chat and e-mail from your inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oetiker.ch/pipermail/mrtg/attachments/20100428/32b23f9e/attachment-0001.htm 


More information about the mrtg mailing list