[mrtg] Re: Strings

Daniel J McDonald dmcdonald at digicontech.com
Fri Aug 17 17:19:45 MEST 2001


I'd probably do a server side include to a perl script that grabbed the
variable.  That would be easy enough to code into pagetop.

something like:
pagetop[foo]: ... <!--exec /usr/local/mrtg-2/bin/getvar.pl
 public at foo.ip sysLocation.0 --> ...
suffix[foo]:shtml


then getvar would be a pretty simple script like:

#!/usr/bin/perl -w
#
use lib qw( /usr/local/mrtg-2/lib/mrtg );
use SNMP_util;

print &snmpget(@ARGV);

Daniel J McDonald, CCIE 2495, CNX
Principal Network Specialist
Digicon Technologies
http://www.digicontech.com

Digicon, a Cisco Partner, Silver Certified.

Paul wrote:

I've thought about how to do that too.

Seems as if it would be neat to be able to have a script run
for the name of the Title or PageTop vars instead of having
them hard-coded.  Maybe change the code in mrtg where
the Title information is written to be the result of the
OID string?

Or, you could always do something on the
web server side of things, like run an snmpget when the
html (asp, php?) page is called and populate the fields
on the fly....so many ideas, so little time...

>>> <McQuaidFD at bordenchem.com> 08/17/01 10:50AM >>>

I have an OID that returns a string from a router and  would like to
display it in the header of the MRTG graphs.
The is similar to the system uptime that is displayed in the header of the
graphs.
I looked threw the FAQ's but didn't see anything.
Has anyone done this and if so could you please give me an example.

Thanks
Frank McQuaid
BCI NOC
Borden Chemical
614-225-2271




--
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