Hi Dave,
I was followintg your suggestions. At this moment, my snmpd.conf file
looks like:
snmpd.conf
=================%<===============================================
createUser madeiracomm MD5 madeiramadeira DES madeiramadeira
trapsess -v3 -u usmuser -a MD5 -A md5passwd -x DES -X despasswd
localhost
agentSecName usmuser
monitor -S -u usmuser -r 3 -e linkUpTrap "Generate linkUp"
ifOperStatus != 2
monitor -S -u usmuser -r 3 -e linkDownTrap "Generate linkDown"
ifOperStatus == 2
NotificationEvent linkUpTrap IF-MIB::linkUp ifIndex ifAdminStatus
ifOperStatus
NotificationEvent linkDownTrap IF-MIB::linkDown ifIndex ifAdminStatus
ifOperStatus
=================%<===============================================
snmptrapd.conf
=================%<===============================================
createUser usmuser MD5 md5passwd DES despasswd
authuser log,execute,net usmuser priv
=================%<===============================================
Log of the snmptrap:
bash# snmptrapd -f -Lo -D
-----------------------%<-----------------------------------------------------
trace: snmp_sess_select_info(): snmp_api.c, 5875:
sess_select: for all sessions: 7 5 3
sess_select: next alarm 10.551 sec
verbose:sess_select: timer due in 10.551 sec
trace: snmp_sess_select_info(): snmp_api.c, 5875:
sess_select: for all sessions: 7 5 3
sess_select: next alarm 5.55 sec
verbose:sess_select: timer due in 5.55 sec
trace: run_alarms(): snmp_alarm.c, 251:
trace: agentx_reopen_session(): mibgroup/agentx/subagent.c, 852:
agentx/subagent: agentx_reopen_session(2) called
trace: subagent_open_master_session(): mibgroup/agentx/subagent.c, 745:
agentx/subagent: opening session...
trace: netsnmp_tdomain_transport_full(): snmp_transport.c, 329:
tdomain: tdomain_transport_full("agentx", "[NIL]", 0, "[NIL]", "[NIL]")
trace: netsnmp_lookup_default_domain(): snmp_service.c, 162:
defaults: netsnmp_lookup_default_domain("agentx") -> "unix"
trace: netsnmp_tdomain_transport_full(): snmp_transport.c, 382:
tdomain: Use application default domain "unix"
trace: netsnmp_tdomain_transport_full(): snmp_transport.c, 392:
tdomain: Found domain "unix" from specifier "unix"
trace: netsnmp_lookup_default_target(): snmp_service.c, 333:
defaults: netsnmp_lookup_default_target("agentx", "unix") ->
"/var/agentx/master"
trace: netsnmp_tdomain_transport_full(): snmp_transport.c, 416:
tdomain: domain "unix" address "[NIL]" default address
"/var/agentx/master"
trace: netsnmp_unix_transport(): snmpUnixDomain.c, 284:
netsnmp_unix: open remote Local IPC: /var/agentx/master
trace: netsnmp_unix_transport(): snmpUnixDomain.c, 374:
netsnmp_unix_transport: couldn't connect to "/var/agentx/master", errno
2 (No such file or directory)
trace: run_alarms(): snmp_alarm.c, 253:
snmp_alarm: alarm 2 completed
trace: snmp_sess_select_info(): snmp_api.c, 5875:
sess_select: for all sessions: 7 5 3
sess_select: next alarm 14.998642 sec
verbose:sess_select: timer due in 14.998642 sec
-----------------------%<-----------------------------------------------------
This log occurs when I unplug the cable from the Network Interface Card.
It seems as if an alarm has reached (snmp_alarm: run alarm 2). However,
there is some problems with the 'agentx'.
In my computer, the folder /var/agentx does not exist. Shall I compile
the net-snmp with any particular option?
Thanks a lot for your help!
Regards,
Ricardo
El mar, 06-03-2007 a las 09:21 +0000, Dave Shield escribió:
> On 05/03/07, Ricardo Marin Vinuesa <[EMAIL PROTECTED]> wrote:
> > The first stage of the process was making tests generating the traps
> > manually. And it worked fine. In order to generate the traps, I was
> > executing the following command:
> >
> > bash# snmptrap -v3 -u usmuser -X passwd -A passwd localhost....
>
> But those are *not* the same options that you listed in your "trapsess"
> line. In particular, you don't set an explicit engine ID here, whereas
> you did in the snmpd.conf file entry.
>
> And that trapsess line included the flag -Ci, to send an INFORM
> (rather than a TRAP). The command above is sending a TRAP.
>
>
> > At this very moment, I was trying to send the traps by unplugging the
> > network cable and configure the configuration files properly.
>
> You're probably trying to go too fast.
> If you need to trigger a trap from the agent, then the simplest way
> is probably to shut it down, or start it up. The trapsess line will
> send a notification to the trap receiver.
>
>
> > Regarding your suggestions:
> >
> > When I only leave the createUser and one authUser line in
> > snmptrapd.conf, I get the following line at the log:
>
> And what is in the snmpd.conf file?
> Just the "trapsess" line, or do you still have the "trapsink" ?
>
> This log fragment feels to be handling a v1/v2c trap,
> which is not relevant to SNMPv3 handling.
>
> Get rid of everything trap-related in the snmpd.conf file
> except the "trapsess" line, and use *exactly* the same
> options as your successful "snmptrap" command.
>
> Dave
______________________
Este mensaje, y en su caso, cualquier fichero anexo al mismo,
puede contener informacion clasificada por su emisor como confidencial
en el marco de su Sistema de Gestion de Seguridad de la
Informacion siendo para uso exclusivo del destinatario, quedando
prohibida su divulgacion copia o distribucion a terceros sin la
autorizacion expresa del remitente. Si Vd. ha recibido este mensaje
erroneamente, se ruega lo notifique al remitente y proceda a su borrado.
Gracias por su colaboracion.
______________________
This message including any attachments may contain confidential
information, according to our Information Security Management System,
and intended solely for a specific individual to whom they are addressed.
Any unauthorised copy, disclosure or distribution of this message
is strictly forbidden. If you have received this transmission in error,
please notify the sender immediately and delete it.
______________________
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders