Traphandle (TraptoEmail) Not working properly (read: Permission denied ???)
Antonio Guerra <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <[email protected]> |
Ok here is the situation. I'm receiving traps and I'm able to log them to SNMPTRAPD.LOG (example below). I'm having a serious hard time getting the traphandle utility to invoke TraptoEmail to send an email when the trap is generated. Any suggestions as to what I might be missing? ########################################################################### #/etc/init.d/SNMPTRAPD ########################################################################### #!/bin/bash . /etc/init.d/functions if [ -e /etc/sysconfig/snmptrapd.options ]; then . /etc/sysconfig/snmptrapd.options else OPTIONS="-Lf /var/log/snmptrapd.log -Cc /etc/snmp/snmptrapd.conf" # -Lsd -p /var/run/snmptrapd.pid" fi ### OUTPUT OMITTED ##### ########################################################################### # SNMPTRAPD.CONF ########################################################################### format2 %V\n% Agent Address: %A \n Agent Hostname: %B \n Date: %H - %J - %K - %L - %M - %Y \n Enterprise OID: %N \n Trap Type: %W \n Trap Sub-Type: %q \n Community/Infosec Context: %P \n Uptime: %T \n Description: %W \n PDU Attribute/Value Pair Array:\n%v \n -------------- \n #-Begin Traphandle traphandle SNMPv2-MIB::coldStart /usr/bin/traptoemail [email protected] traphandle NET-SNMP-AGENT-MIB::nsNotifyShutdown /usr/bin/traptoemail [email protected] traphandle G3-AVAYA-TRAP::alarmWarning /usr/bin/traptoemail [email protected] traphandle default /usr/bin/traptoemail -f [email protected] ##################################################### # SNMPTRAPD.LOG OUTPUT ##################################################### 2009-01-26 15:41:06 NET-SNMP version 5.1.2 Started. 2009-01-26 15:41:09 SERVER-NAME [16.8.4.195] (via 16.8.4.195) TRAP, SNMP v1, community public NET-SNMP-MIB::netSnmpNotificationPrefix Enterprise Specific Trap (NET-SNMP-AGENT-MIB::nsNotifyShutdown) Uptime: 0:01:51.23 read: Permission denied Agent Address: 0.0.0.0 Agent Hostname: SERVER-NAME Date: 19 - 1 - 56 - 31 - 12 - 1969 Enterprise OID: . Trap Type: Cold Start Trap Sub-Type: 0 Community/Infosec Context: TRAP2, SNMP v2c, community public Uptime: 0 Description: Cold Start PDU Attribute/Value Pair Array: DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (11123) 0:01:51.23 SNMPv2-MIB::snmpTrapOID.0 = OID: NET-SNMP-AGENT-MIB::nsNotifyShutdown -------------- read: Permission denied Agent Address: 0.0.0.0 Agent Hostname: SERVER-NAME Date: 19 - 1 - 56 - 31 - 12 - 1969 Enterprise OID: . Trap Type: Cold Start Trap Sub-Type: 0 Community/Infosec Context: INFORM, SNMP v2c, community public Uptime: 0 Description: Cold Start PDU Attribute/Value Pair Array: DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (11123) 0:01:51.23 SNMPv2-MIB::snmpTrapOID.0 = OID: NET-SNMP-AGENT-MIB::nsNotifyShutdown -------------- read: Permission denied 2009-01-26 15:41:09 SERVER-NAME [16.8.4.195] (via 16.8.4.195) TRAP, SNMP v1, community public NET-SNMP-TC::linux Cold Start Trap (0) Uptime: 0:00:00.22 read: Permission denied Agent Address: 0.0.0.0 Agent Hostname: SERVER-NAME Date: 19 - 1 - 56 - 31 - 12 - 1969 Enterprise OID: . Trap Type: Cold Start Trap Sub-Type: 0 Community/Infosec Context: TRAP2, SNMP v2c, community public Uptime: 0 Description: Cold Start PDU Attribute/Value Pair Array: DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (22) 0:00:00.22 SNMPv2-MIB::snmpTrapOID.0 = OID: SNMPv2-MIB::coldStart SNMPv2-MIB::snmpTrapEnterprise.0 = OID: NET-SNMP-TC::linux -------------- read: Permission denied Agent Address: 0.0.0.0 Agent Hostname: SERVER-NAME Date: 19 - 1 - 56 - 31 - 12 - 1969 Enterprise OID: . Trap Type: Cold Start Trap Sub-Type: 0 Community/Infosec Context: INFORM, SNMP v2c, community public Uptime: 0 Description: Cold Start PDU Attribute/Value Pair Array: DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (22) 0:00:00.22 SNMPv2-MIB::snmpTrapOID.0 = OID: SNMPv2-MIB::coldStart SNMPv2-MIB::snmpTrapEnterprise.0 = OID: NET-SNMP-TC::linux -------------- read: Permission denied ------------------------------------------------------------------------------ This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword _______________________________________________ Net-snmp-users mailing list [email protected] Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users