1

Im trying to setup mrtg to probe my snmp agent. The snmp agent has been setup with a v3 user/pass authentication and is working fine.

However, if I try to make a config file for mrtg using the following command:

sudo cfgmaker --global 'WorkDir: /var/www/mrtg' --output /etc/mrtg/mrtg.cfg \
    <IPADRESS>:2161::::3 --username=<USER> --authprotocol=md5 --authpassword=<PASSWORD>

I get the following error:

Use of --authpassword requires --contextengineid at /usr/bin/cfgmaker line 1531.

When I generate a file for SNMP v2 (with the communitry string) it goes OK.

How can I obtain the contextengineid of my snmp agent that is needed to make the cfg file?

miken32
  • 42,008
  • 16
  • 111
  • 154
user3197231
  • 123
  • 3
  • 8

2 Answers2

1

I have used this successfully on a CentOS 7 server and Fedora 20 workstation:

  1. Locate the context engine ID, location will vary:

    grep oldEngineID /var/lib/net-snmp/snmpd.conf
    
  2. Add the following line to your configmaker source file; 0x is required:

    --contextengineid=0x<whatever number you got from number 1>
    

If this is a switch, router, or Windows box your engine ID location will definitely vary. See the manufacturers operating manuals for this.

Werner
  • 14,324
  • 7
  • 55
  • 77
lewis
  • 131
  • 1
  • 9
0

You can also query engineID from commandline snmptools: snmpwalk -v3 -l auth -a md5 -A '' hostname snmpEngineID