net-snmp 5.7.1_7

Where is the configuration file for snmptrapd(8)?

I'm using net-snmp-5.7.1_7 and succesfully starting snmpd(8) and snmptrapd(8).

But there is only a config snmpd.conf, any snmptrapd.conf !

Why can not I find a file snmptrapd.conf referred in man?
In this case, where do I register my "traphandlers"?
 
mm.. perhaps there should be an example? Indeed, in all mans says that snmptrapd config file should be ... also point the way where it should be
 
Normally config files for ports are stored in /usr/local/etc/. But I think this port is a notable exception. Walko posted the correct directory. For snmptrapd.conf I'd try and see if creating it in the same directory as snmpd.conf works.

If all else fails snmptrapd(8) has an option to set the config file. You can use snmptrapd_flags in /etc/rc.conf to set additional flags.
 
Ha! Yes, now I remember. The example doesn't even work. It throws a couple of errors if I recall correctly. You really have to go through the script to generate a functional config. Once you have that you can put in the aforementioned directory.
 
Yeah, when I started snmpconf (btw without any flags and args), I was offered a choice which configuration file to create
Code:
1. snmpd.conf
2.snmptrapd.conf
3.snmp.conf
Thanks for help, guys. Good luck )
 
Back
Top