Page 1 of 5
SSL and Email issues with nagios
Posted: Wed Nov 13, 2013 4:48 pm
by vivithemage
I recently upgraded from 3.x to a new install of 4.01 and have been trying to resolve some issues...these seem to be the last two lingering problems!
[1384379131] SERVICE NOTIFICATION: nagiosadmin;client327_node01;Check JVM;CRITICAL;notify-service-by-email;(No output on stdout) stderr:
[1384379136] SERVICE ALERT: infprd63;Apache GRC 1201;CRITICAL;HARD;3;CHECK_NRPE: Error - Could not complete SSL handshake.
I then get these for some reason, not sure why they're no stating no output on stdout:
[1384379134] SERVICE ALERT: t003_node01;train0023;OK;SOFT;2;(No output on stdout) stderr:
[1384379134] SERVICE ALERT: p001_node01;client1000;OK;SOFT;2;(No output on stdout) stderr:
[1384379134] SERVICE ALERT: t003_node01;train0026;OK;SOFT;3;(No output on stdout) stderr:
[1384379135] SERVICE ALERT: p018_node02;client1173;OK;SOFT;2;(No output on stdout) stderr:
Re: SSL and Email issues with nagios
Posted: Thu Nov 14, 2013 10:52 am
by abrist
Can you try running the "infprd63;Apache GRC 1201" check from the cli?
Re: SSL and Email issues with nagios
Posted: Thu Nov 14, 2013 12:29 pm
by vivithemage
Is this what you mean?
[root@vmmgmtappnagios libexec]# ./check_nrpe -H infprd63
CHECK_NRPE: Error - Could not complete SSL handshake.
[root@vmmgmtappnagios libexec]#
Re: SSL and Email issues with nagios
Posted: Thu Nov 14, 2013 12:44 pm
by vivithemage
awesome, I fixed my ssl handshake issue ... had to:
and add the new IP under allowed_hosts for the servers nagios was connecting to... not on the nagios server.
still working on the other two problems though.
Re: SSL and Email issues with nagios
Posted: Thu Nov 14, 2013 1:27 pm
by abrist
Run the other two checks from the cli and report back.
Re: SSL and Email issues with nagios
Posted: Thu Nov 14, 2013 5:54 pm
by vivithemage
how can I do that exactly?
Re: SSL and Email issues with nagios
Posted: Thu Nov 14, 2013 6:00 pm
by slansing
I believe abrist meant:
still working on the other two problems though.
Re: SSL and Email issues with nagios
Posted: Mon Nov 18, 2013 10:04 am
by vivithemage
how do I run them though? I think I am having a nagios <-> mail functionality problem .. I can send mail from the server as mailx, but I do not see any messages in the mail log when an error should have alerted.
Re: SSL and Email issues with nagios
Posted: Mon Nov 18, 2013 11:40 am
by abrist
What does your notification commands (notify-host-by-email/notify-service-by-email) look like?
Re: SSL and Email issues with nagios
Posted: Mon Nov 18, 2013 2:31 pm
by vivithemage
Code: Select all
# 'notify-host-by-email' command definition
define command{
command_name notify-host-by-email
command_line /usr/bin/php -q /usr/local/nagios/bin/nagios_mail.php
# command_line /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /bin/mail -s "** $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ **" $CONTACTEMAIL$
}
# 'notify-service-by-email' command definition
define command{
command_name notify-service-by-email
command_line /usr/bin/php -q /usr/local/nagios/bin/nagios_mail.php
# 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$\n" | /bin/mail -s "** $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$
}