monitor ntpd process and generate a trap

PoWah Wong <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
I want to monitor ntpd process with my agent and generate a trap if ntpd is down.
# ps -ef|grep ntp
ntp      30732     1  0 12:01 ?        00:00:00 ntpd -u ntp:ntp -p /var/run/ntpd.pid -g
root     22267 28041  0 13:17 pts/3    00:00:00 grep ntp

# cat /usr/local/share/snmp/snmpd.conf
rwuser "admin"
authtrapenable 1

trap2sink      172.20.11.72
#informsink      172.20.11.72 public

proc    ntpd

iquerySecName _internal
rouser        _internal

# Active the standard monitoring entries
defaultMonitors         yes
linkUpDownNotifications yes

#trapsess 172.20.11.72:162 -u "admin" -a SHA -A "12345678" -x DES -X "87654321" -v 3 -l authh
Priv


I do
createUser  _internal MD5 somejunk
in the file /var/net-snmp/snmpd.conf
createUser _internal SHA 12345678 DES 87654321
createUser admin SHA 12345678 DES 87654321


# service ntpd restart
Shutting down ntpd:                                        [  OK  ]
Starting ntpd:                                             [  OK  ]

The 172.20.11.72 computer do not receive any trap from ntpd restart.

However, the 172.20.11.72 computer receive a trap from this command:
snmptrap -v 3 -u admin -l authPriv -a SHA -A 12345678 -x DES -X 87654321 172.20.11.72 42 coldStart.0




      __________________________________________________________________
Looking for the perfect gift? Give the gift of Flickr! 

http://www.flickr.com/gift/

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.