[mrtg] can I set, what ip MRTG must use for queries?

Steve Shipway s.shipway at auckland.ac.nz
Sun Jan 18 22:37:10 CET 2009


> Hello. On my server I have 2 ip in one subnet (192.168.1.0/24 for example
> and ips: 192.168.1.21 and 192.168.1.23).
> Can I set in conf or in another place what IP must be used for queries by
> mrtg?

Yes, you can - but you need to make a bit of a complex Target definition.

For example, if you didn't care about the SNMP options, you could use:

Target[xxxx]: 0:community at router

Then, if you want to use SNMPv2 it would be:

Target[xxxx]: 0:community at router:::::2

Or, to specify the source IP:

Target[xxxx]: 0:community at router:!192.168.1.21

The full syntax is:

Target[targetname]:
interface:community at device:port!localaddress!localport:timeout:retries:backo
ff:snmpversion|postprocesssubroutine

Where the options after 'device' can be omitted, and 'interface' can be
specified in many different ways.  See the manual pages to be overwhelmed...

Steve
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3133 bytes
Desc: not available
Url : http://lists.oetiker.ch/pipermail/mrtg/attachments/20090119/752e2796/attachment-0001.bin 


More information about the mrtg mailing list