nagios监控设置monitor告警的用户名和密码默认在commands.cfg文件中定义:

其中参数解释:

 Vim commands.cfg文件:

/usr/local/bin/sendEmail –f nagios@test.com –t yahoon@test.com –s mail.test.com –u “from nagios” –xu nagios –xp p#3isoda –m happy解释:-f 表示发送者的邮箱-t 表示接收者的邮箱-s 表示SMTP服务器的域名或者ip -u 表示邮件的主题-xu 表示SMTP验证的用户名-xp 表示SMTP验证的密码(注意,这个密码貌似有限制,例如我用d!5neyland就不能被正确识别)-m 表示邮件的内容。