force linux to generate snmp traps automatically

1.6k Views Asked by At

I would like to generate a trap automatically when any service goes down on a server. What I have to do for this. Is it I have to right a script for this for we i have to configure snmptrapd.conf is so please let me know some example for doing this.

-- Thanks

Farooq Hussain

1

There are 1 best solutions below

0
On

Quoting NETSNMP docs http://net-snmp.sourceforge.net/docs/man/snmpd.examples.html#lbAP

Process Monitoring

 The list of services running on a system can be monitored (and provision made for correcting any problems), using:
# At least one web server process must be running at all times
proc    httpd
procfix httpd  /etc/rc.d/init.d/httpd restart

# There should never be more than 10 mail processes running
#    (more implies a probable mail storm, so shut down the mail system)
proc    sendmail   10
procfix sendmail  /etc/rc.d/init.d/sendmail stop

# There should be a single network management agent running
#   ("There can be only one")
proc    snmpd    1  1