Welcome to Pandora FMS Community › Forums › Community support › snmptrapd.conf … where is the error?
-
snmptrapd.conf … where is the error?
Posted by nathonline on May 28, 2008 at 18:51Hello,
When i m executing this command :
snmptrapd -f -t -On -n -a -Lf logfile.txt -p pidfile -F “%02.2m/%02.2l/%y %02.2h:%02.2j:%02.2k %B %N %w %W %q %v n”
with this snmptrapd.conf :
[code:1]authCommunity log public
in my logfile.txt i have :
[code:1]/etc/snmp/snmptrapd.conf: line 18: Warning: Unknown token: authCommunity.
2008-05-28 18:49:42 NET-SNMP version 5.2.3 Started.
2008-05-28 18:49:47 NET-SNMP version 5.2.3 Stopped.Where is the problem ?
Regards
manu replied 16 years, 8 months ago 3 Members · 13 Replies -
13 Replies
-
-
::
Could you try to run the command like:
[code:1]snmptrapd –authcommunity=”log public” -f -t -On -n -a -Lf logfile.txt -p pidfile -F “%02.2m/%02.2l/%y %02.2h:%02.2j:%02.2k %B %N %w %W %q %v n”
Probably if you use that command, you have to comment the [code:1]authCommunity log public line in the snmptrapd.conf file.
Raul
-
::
Hey Raùl
Many thanks for your help but … it doesn’t work :s
in my logfile.txt i have :
[code:1]: line 0: Warning: Unknown token: authcommunity.
2008-05-29 14:26:11 NET-SNMP version 5.2.3 Started.
2008-05-29 14:26:15 NET-SNMP version 5.2.3 Stopped.and my snmptrapd.conf is empty
-
::
It is strange. By the way, which is your distro?
Looks like some dependence is missing.
Read the net:snmp manual: http://www.net-snmp.org/wiki/index.php/TUT:Configuring_snmptrapd
Raul
-
::
Hi
My distro is : Debian 4.0r3
My packages :libdate-manip-perl install
libdbd-mysql-perl install
libdbi-perl install
liblocale-gettext-perl install
libnet-daemon-perl install
libnet-snmp-perl install
libnetaddr-ip-perl install
libplrpc-perl install
libsnmp-multi-perl install
libsnmp-perl install
libtext-charwidth-perl install
libtext-iconv-perl install
libtext-wrapi18n-perl install
libtime-format-perl install
libxml-libxml-common-perl install
libxml-libxml-perl install
libxml-namespacesupport-perl install
libxml-sax-perl install
libxml-simple-perl install
perl install
perl-base install
perl-modules installMaybe i forget some packages ?
-
-
::
When i restart my server and try the snmptrapd command i have this message in logfile.txt :
[code:1]
: line 0: Warning: Unknown token: authcommunity.
2008-05-30 16:53:58 NET-SNMP version 5.2.3 Started.
couldn’t open udp:162 — errno 98 (“Address already in use”)and when I restart the snmpd daemon, i have this message
[code:1]
: line 0: Warning: Unknown token: authcommunity.
2008-05-29 14:26:11 NET-SNMP version 5.2.3 Started.
2008-05-29 14:26:15 NET-SNMP version 5.2.3 Stopped. -
-
-
-
::
I think this can be a problem with the version of Net-SNMP. Read http://linux.die.net/man/5/snmptrapd.conf
“Access Control
Starting with release 5.3, it is necessary to explicitly specify who is authorised to send traps and informs to the notification receiver (and what types of processing these are allowed to trigger). This uses an extension of the VACM model, used in the main SNMP agent.
There are currently three types of processing that can be specified:
log
log the details of the notification – either in a specified file, to standard output (or stderr), or via syslog (or similar).
executepass the details of the trap to a specified handler program, including embedded perl.
net
forward the trap to another notification receiver.
In the following directives, TYPES will be a (comma-separated) list of one or more of these tokens. Most commonly, this will typically be log,execute,net to cover any style of processing for a particular category of notification. But it is perfectly possible (even desirable) to limit certain notification sources to selected processing only.
authCommunity TYPES COMMUNITY [SOURCE [OID | -v VIEW ]]
authorises traps (and SNMPv2c INFORM requests) with the specified community to trigger the types of processing listed. By default, this will allow any notification using this community to be processed. The SOURCE field can be used to specify that the configuration should only apply to notifications received from particular sources – see snmpd.conf(5) for more details. ”That is, looks like that authCommunity option si for Net-SNMP > 5.3
Also read http://www.usenet-forums.com/snmp-users/370311-re-formatting-snmptrapd-received-traps-log-file.html
I don’t know if it’s possible to update the SNMP version (just to try).
Raul
-
-