Failed to Start Nagios service

An open discussion forum for obtaining help with Nagios Core. Nagios Core users of all experience levels are welcome here. Subforum have been created for the discussion of Nagios Core and Nagios Plugin development.

NOTE: The SourceForge.net mailing lists have been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

Re: Failed to Start Nagios service

Postby Ravikimt » Fri Dec 14, 2018 8:30 am

I am getting this output after running this command "which sendEmail" in both the machines.

Code: Select all
/usr/bin/sendEmail
Ravikimt
 
Posts: 77
Joined: Tue Apr 03, 2018 12:02 pm

Re: Failed to Start Nagios service

Postby tgriep » Fri Dec 14, 2018 10:19 am

What it could be is that the smtp.office365.com server is blocking the new nagios server from forwarding emails through it so you would have to go to them to see if there is some sort of filter they need to adjust.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
tgriep
Madmin
 
Posts: 8281
Joined: Thu Oct 30, 2014 9:02 am

Re: Failed to Start Nagios service

Postby Ravikimt » Thu Jan 10, 2019 12:24 am

Hi @tgriep , We have change the settings in smtp.office365.com and allowed all traffic which is coming from our Nagios Server.

But still we are facing the same issue, I want to add one more thing here we have deployed this Nagios application on Azure cloud and we are running Ubuntu 18.04 LTS OS top of that.

Please help me here ASAP.
Ravikimt
 
Posts: 77
Joined: Tue Apr 03, 2018 12:02 pm

Re: Failed to Start Nagios service

Postby tgriep » Thu Jan 10, 2019 3:48 pm

Are you seeing the same error as before?
NOTICE => Authentication not supported by the remote SMTP server!
ERROR => Received: 530 5.7.57 SMTP; Client was not authenticated to send anonymous mail during MAIL FROM [BYAPR11CA0100.namprd11.prod.outlook.com]


Do you see any errors in this log file?
Code: Select all
/var/log/sendEmail


Can you run this test command as root on the Nagios server without it failing? Replace everything between the <> with valid data.
Code: Select all
/usr/bin/sendEmail -s <SMTP Server> -xu <username> -xp <password> -t <to email address> -f <From email address> -l /var/log/sendEmail -u "Test Subject" -m "Test Email"
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
tgriep
Madmin
 
Posts: 8281
Joined: Thu Oct 30, 2014 9:02 am

Re: Failed to Start Nagios service

Postby Ravikimt » Fri Jan 11, 2019 5:02 am

I have fixed the issue. The problem was TLS while triggering the alert we have to use this option in you command.cfg file -o "tls=yes" .

Code: Select all
define command{
        command_name    notify-host-by-email
        command_line    /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /usr/bin/sendEmail -o "tls=yes" -s $USER7$ -xu $USER5$ -xp $USER6$ -t $CONTACTEMAIL$ -f $USER5$ -l /var/log/sendEmail -u "** $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ **" -m "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n\nNote: This is an automated message that is system generated so please do not reply to this email. For any queries write to 'tech.support@tredence.com'"
        }

# 'notify-service-by-email' command definition
Code: Select all
define command{
        command_name    notify-service-by-email
        command_line    /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$" | /usr/bin/sendEmail -o "tls=yes" -s $USER7$ -xu $USER5$ -xp $USER6$ -t $CONTACTEMAIL$ -f $USER5$ -l /var/log/sendEmail -u "** $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" -m "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$\n\nNote: This is an automated message that is system generated so please do not reply to this email. For any queries write to 'tech.support@tredence.com'"
   }



After making the changes in command.cfg file I got below error.

Code: Select all
ERROR => No TLS support!  SendEmail can't load required libraries. (try installing Net::SSLeay and IO::Socket::SSL)


I installed both the packages "Net::SSLeay" and "IO::Socket::SSL" by using below command.

Code: Select all
sudo cpan

Code: Select all
install Net::SSLeay 

Code: Select all
install IO::Socket::SSL


It fixed the problem for me.
Ravikimt
 
Posts: 77
Joined: Tue Apr 03, 2018 12:02 pm

Re: Failed to Start Nagios service

Postby tgriep » Fri Jan 11, 2019 11:10 am

Glad you have fixed the email issue and reported back what you did. I'll lock the post as solved for you but feel free to post any new questions in the future.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
tgriep
Madmin
 
Posts: 8281
Joined: Thu Oct 30, 2014 9:02 am

Previous

Return to Nagios Core

Who is online

Users browsing this forum: deemac, lmiltchev and 23 guests