Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
I have installed nagios-4.4.1 version on my Ubuntu 18.04 LTS. Everything look fine but I am only getting below mentioned error while starting my Nagios service can anyone help me on this how I can get rid of this problem.
@scottwilkerson Thanks for the help. The previous issue got resolved but Now I am facing the another issue. I am not getting any error while running pre-flight check command for the nagios.cfg file
I am getting below mentioned error in nagios.log. Please help me here because it's not triggering the alerts
[1544442429] wproc: stderr line 01: /bin/sh: 1: /usr/bin/sendEmail: not found
[1544442429] wproc: stderr line 02: /usr/bin/printf: write error: Broken pipe
The error is coming from the commands that send the email notifications and it looks like the sendEmail command is not installed so run this to install it.
@tgriep Thanks for the help now I am getting below error after installing sendemail. It's showing me "Authentication not supported by the remote SMTP server!"
But the same SMTP server credential I am using somewhere else and it's working fine. I am suspecting that it's a not configuration issue please share your thought on the same.
[1544614007] wproc: stdout line 01: Dec 12 11:26:40 nginx-backup sendEmail[7021]: NOTICE => Authentication not supported by the remote SMTP server!
[1544614007] wproc: stdout line 02: Dec 12 11:26:45 nginx-backup sendEmail[7021]: ERROR => Received: 530 5.7.57 SMTP; Client was not authenticated to send anonymous mail during MAIL FROM [BYAPR11CA0100.namprd11.prod.outlook.com]
Couple of thing to check. See if the SMTP server has a filter that only allows certain hosts or certain IP addresses to forward emails through it.
Another thing, if the Nagios server is not supplying a valid from address, the SMTP server may block the emails as well so make sure that is set in the email notify command on the Nagios server.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Hi tgriep, Firstly we don't have any mail server, we are using "smtp.office365.com" to send the emails we don't have suck any kind of options there "Only allows certain hosts or certain IP addresses to forward emails through ".
I verified that nagios server is supplying a valid from address. Still I am facing the same issue attaching email notify command for your reference.
I do not know sendEmail, but checking the Web (http://caspian.dotconf.net/menu/Software/SendEmail/) it looks like you can specify the message body using the -m parameter (which you have...) and then you probable do not need the " /usr/bin/printf "%b ..." part.
# 'notify-host-by-email' command definition
define command{
command_name notify-host-by-email
command_line /usr/bin/sendEmail -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@xyz.com'"
# 'notify-service-by-email' command definition
define command{
command_name notify-service-by-email
command_line /usr/bin/sendEmail -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@xyz.com'"
}
Depending on how your actual $USER6$ (password) looks like, you may have to add quotes to $USER6$ when you "use" it in the command (hint: shell special characters).
I have one doubt, We are running Nagios core on two machines with the same configuration. In one machine Nagios is working fine without any issues but in another machine we are facing this issue.
How it can be possible something works on one machine and doesn't work on another machine.? I have verified that both the machines have same configuration file with the same permissions.
Only difference is that we are running Nagios on Ubuntu 16.04 LTS in one machine and another on 18.04 LTS.