[mrtg] Page Top OID value

Steve Shipway s.shipway at auckland.ac.nz
Thu Nov 19 01:26:46 CET 2009

If you are using Routers2 as the frontend to MRTG/RRD, then this functionality is being added to v2.21 via the embedded variables in PageTop/PageFoot text.  It is not working in the current beta yet; development was delayed thanks to a car driver trying to drive through my bike while I was riding it but I'll be back working soon.

The planned syntax will be to add something like:  %OID( to the PageTop text and Routers2 will do an on-the-fly SNMP lookup to retrieve that OID from the current device, provided the SNMP details can be identified (SNMPv1 and v2 support only at first).  The drawback of this is that SNMP timeouts could lead to slow page generation when using this feature.

Alternatively, you can already achieve this with routers2 2.21beta1 if you are able to code up a script that does the SNMP lookup as v2.21beta allows the %EXEC(programname)% symbol to call an external program and include the output into the generated web page (for security reasons this is disabled by default unless you put an option in the routers2.conf)


From: mrtg-bounces at lists.oetiker.ch [mrtg-bounces at lists.oetiker.ch] On Behalf Of Scott Ocken [scott at infobunker.com]
Sent: Thursday, 19 November 2009 11:41 a.m.
To: mrtg at lists.oetiker.ch
Subject: [mrtg] Page Top OID value

Is there a way to put an OID SNMP GET/WALK value in the PageTop?

I have graphs for a Chiller Fluid Temp In/Out and want to put the
Setpoint in Plain text in the PageTop.  This might change, so I don't
want to manually put it in the PageTop.  I would be fine with writing
a script to write the text, but I don't see a way to set PageTop = the
output from a script.


More information about the mrtg mailing list