Welcome to Pandora FMS Community!

Find answers, ask questions, and connect with our community around the world.

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:51

    Hello,

    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
  • raul

    Member
    May 28, 2008 at 19:22
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    Which is the version of your linux distro? Did you take a look at the man pages, to view the correct syntax in your case?: [code:1]man snmptrapd.conf

    Raul

  • raul

    Member
    May 28, 2008 at 19:32
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    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

  • nathonline

    Member
    May 29, 2008 at 14:28
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    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

  • raul

    Member
    May 29, 2008 at 18:15
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    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

  • nathonline

    Member
    May 30, 2008 at 15:34
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    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 install

    Maybe i forget some packages ?

  • nathonline

    Member
    May 30, 2008 at 16:49
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    I’ve done a cpan install command but snmptrapd doesn’t work…

    I think it’s a configuration problem. Could you help me to configure my snmp and snmptrap daemons.

  • nathonline

    Member
    May 30, 2008 at 17:00
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    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.

  • nathonline

    Member
    June 2, 2008 at 16:31
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    Nobody know how i can resolve this problem ?
    🙁

  • manu

    Member
    June 2, 2008 at 16:40
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    Did you read what raul posted?

  • nathonline

    Member
    June 2, 2008 at 19:14
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    Yeap of course. When I ask for help I read the differents answers

  • raul

    Member
    June 2, 2008 at 19:55
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    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).
    execute

    pass 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

  • nathonline

    Member
    June 4, 2008 at 18:12
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    Hi there !

    I resolved my problem. The solution was in /etc/default/snmpd .
    The variable “TRAPDRUN” must be “TRAPDRUN=yes” 😉

    A Special Thanks to Raul
    Thanks to manu 🙂

  • manu

    Member
    June 5, 2008 at 02:24
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    This afternoon I faced a similar problem, but it turned to be a bug in net-snmp in the 8.04 ubuntu server.
    So I had to patch the sources and install net-snmp from the sources, a pain but it did work 🙂

    Glad you fixed your problem
    So long
    Manu