Nagios MUTT+MSMTP received no alarm messages

Source: Internet
Author: User

Problem Description:

1, the/nagioshome/var/nagios.log file shows that the message has been sent

2. The root user performs echo "Hello" |mutt-s "test" [email protected] to send normally

Su-nagios-c ' echo ' hello ' |mutt-s ' test ' [email protected]' can also be sent normally

3. Messages sent by Nagios runtime are not received

Solution Ideas:

The above can be explained that the MUTT+MSMTP program itself is not a problem, perhaps the reason or in Nagios, the specific reason can only be analyzed by the log, and Nagios.log and system

There is not much useful information in the log, so try to print out the relevant information yourself.

The MSMTP command parameter has a "-D" parameter, which can be used to output the debug information of the entire process.

Resolution process:

Modifying the/etc/mutt configuration file

    

Also modify the Nagios configuration file/nagioshome/etc/objects/commands.cfg and restart the Nagios service.

    

At this point, open the Nagios interface, send a custom message, and open/tmp/nagios.log to see the information. Here are the errors I encountered

    

The problem here is basically clear. Is the file does not write permission, the simplest way is of course to change the permissions, but, this is the root directory, in order to security does not recommend the root of the default permissions 550 to change to other, so, to start from the source of sent.

Modify the/etc/mutt configuration file and manually create the Sent.log file under/var/log/, give it 777 permissions or change the person to the Nagios user.

    

The problem has been resolved.

Finally, restore all the places that were modified for the test to complete the mail delivery.

    

    

Nagios MUTT+MSMTP received no alarm messages

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.