[mrtg] Re: External snmp script?

Jay Christopherson jay.christopherson at mfn.com
Sat Feb 2 18:40:16 MET 2002


Easy.  I recently had to do the same thing and someone told me about
this and it worked perfectly...

create a script on the webserver that shows the integer value you want
to graph.  Then, in the snmpd.conf file (assuming you are using
net-snmp) add a line like this (there is a section for it):

exec  name_of_script  /path_to/script

then, on the mrtg server you can run snmpwalk or get:

snmpwalk remote_server community
enterprises.ucdavis.extTable.extEntry.extOutput.1

the oid is:  .1.3.6.1.4.1.2021.8.1.101.1

add that to your mrtg cfg file and you will be graphing it...

- Jay

Thus spake Eric Persson (eric at persson.tm):

> 
> Hi !
> 
> This might be a bit off-topic, but I'll give it a shot, since I will use
> mrtg for this. I have a loaded webserver on a remote location. I would
> like to make graphs of the number of users logged on to a website on the
> machine. Since I do not want to have mrtg on that box, I have another
> box for this purpose. 
> 
> The question is, how do I make mrtg able to get what I want (with snmp?)
> from that other box? I could do some script to provide the information,
> but what do I after that? I saw the possibility to run external scripts
> as targets, but that seems to require that mrtg is on the same box. 
> 
> This might be more of a snmprelated question...
> 
> Any hints? 
> 
> /eric
> -- 
> [ eric persson | eric at persson.tm | www.persson.tm ]
> 
> --
> Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
> Archive     http://www.ee.ethz.ch/~slist/mrtg
> FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
> WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi

--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://www.ee.ethz.ch/~slist/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the mrtg mailing list