Thanq for ur response.
I've added traptoemail in my snmptrapd.conf file like this :
traphandle default /usr/local/bin/traptoemail/ [EMAIL PROTECTED]
Here I prefer defaults :- -f FROM root -s SMTPSERVER localhost, b'cos i'm executing snmpd & snmptrapd on the same host.
I've added sinks in snmpd.conf like :
trapcommunity public
trapsink 172.16.15.34
trapsink KrishnaMohan
trap2sink KrishnaMohan
informsink KrishnaMohan
I've executed snmpd : /usr/local/sbin/snmpd -a -c /etc/snmp/snmpd.conf -d -DALL -Lf /var/log/snmpd.log -p /var/run/snmpd -Lsd"
when i executed snmptrapd : snmptrapd -f -c /etc/snmp/snmptrapd.conf -Dread_config
read_config: Reading optional config file: "/etc/snmp/snmptrapd.conf"
read_config: Reading configuration /etc/snmp/snmptrapd.conf
read_config: /etc/snmp/snmptrapd.conf:1 examining: traphandle default /usr/local/bin/traptoemail/ [EMAIL PROTECTED]
read_config: Found a parser. Calling it: traphandle / default /usr/local/bin/traptoemail/ [EMAIL PROTECTED]
read_config:traphandle: GKM :: token : traphandle line : default /usr/local/bin/traptoemail/ [EMAIL PROTECTED] // I've hacked the code in snmpd_traphandler.c to display
read_config:traphandle: registering handler for: default
read_config:traphandle: GKM :: netsnmp_add_default_traphandler returning // I've hacked the code to display
I found that though traphandle is read, but the external program is not invoked. Even traptoemail is not all seen, it seems.
Plz help me in this regard
thanx in advance
Regards
KM
On Tue, 2005-10-18 at 19:22, Wes Hardaker wrote:
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders>>>>> On 18 Oct 2005 19:08:23 +0530, Krishna Mohan <[EMAIL PROTECTED]> said: Krishna> "traphandle default /usr/bin/krsna.pl" Krishna> It's a perl script which gives message "u have recved a trap" Krishna> infinite times. Can you tell us more about what it's doing? It certainly should work. See the 'local/traptoemail' script which comes with the package to see an example of what a traphandle should look like. -- Wes Hardaker Sparta, Inc. ------------------------------------------------------- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl _______________________________________________ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net