# [mrtg] finding ifHC* counters by ifName

Tue Sep 4 16:14:56 CEST 2012

```That worked!

Thank you.  I never thought to just do that. :)

On Sep 4, 2012, at 1:01 AM, Pavel Ruzicka wrote:

>
> What about something like this:
> Target[network_cume_bond0]: \bond0:public at localhost:::::2
>
> cfgmaker can generate configuration based on ifDescr with option
> --ifref=descr
> This configuration you can use on every machine, where hostname, community
> and ifDescr is same.
>
> Best regards,
>
> Pavel
>
> > Hi Pavel,
> >
> > Yes, I read that in the mrtg-reference manpage.  So first I tried:
> >
> > Target[network_cume_bond0]:
> > ifInOctets\bond0&ifOutOctets\bond0:public at localhost:::::2
> >
> > but that only uses the 32bit counters, apparently since I explicitly asked
> > for them with ifInOctets and ifOutOctets.  I understand that it would
> > probably work if I just did something like:
> >
> > Target[network_cume_bond0]: 2:public at localhost:::::2
> >
> > but that wouldn't allow me to auto-detect by interface description (bond0).
> > This is important to me because I am working on an mrtg.cfg which is to be
> > used on more than one server, and different servers have different
> > interface configurations.
> >
> > Thanks,