强制linux自动生成snmp陷阱

时间:2013-11-05 10:45:40

标签: snmp snmptrapd

我想在服务器上出现任何服务时自动生成陷阱。我必须为此做些什么。是不是我必须为这个脚本做好准备因为我必须配置snmptrapd.conf所以请让我知道这样做的一些例子。

- 感谢

Farooq Hussain

1 个答案:

答案 0 :(得分:0)

引用NETSNMP文档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