[mrtg] Using symbolic names in Target[] definitions

McDonald, Dan Dan.McDonald at austinenergy.com
Wed May 20 00:47:28 CEST 2009

On Tue, 2009-05-19 at 15:29 -0700, Freddie Cash wrote:
> For network interfaces, it's possible to use symbolic names like eth0,
> em3, lagg0, bond3 and so on in the Target[] definition.  This way, no
> matter how the devices are enumerated at each boot, the data is polled
> correctly.  These names are listed in the ifDescr.* variables that
> have the same index value as the if*Octets.* variables.
> Is it possible to do the same for any other OIDs that provide *Descr
> variables?  

For interface variables, which use the same ifNum, certainly.

> For example, hrStorage* includes hrStorageDescr that links
> the symbolic names (/, /var, /tmp, and so on) to the specific OID
> index.  

This capability doesn't currently exist.

> Is there anyway to use this symbolic name (as shown in the
> *Descr output) instead of the OID numbers?

> If it's not currently possible to do this, are there any plans to add
> this? 

Patches welcome.  you would want to hack up the library, and come up
with a notation that would uniquely identify it for the main regex.

>  Or is there some way this can be tacked/hacked onto the system?

if you didn't want to re-write the mrtg lib to handle it, you could
write a perl wrapper script that did that kind of parsing, then use that
as your target.
Daniel J McDonald, CCIE # 2495, CISSP # 78281, CNX
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : http://lists.oetiker.ch/pipermail/mrtg/attachments/20090519/d5196fc4/attachment.bin 

More information about the mrtg mailing list