SSL and Email issues with nagios

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.
vivithemage
Posts: 102
Joined: Tue May 21, 2013 2:52 pm

SSL and Email issues with nagios

Post 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:
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: SSL and Email issues with nagios

Post by abrist »

Can you try running the "infprd63;Apache GRC 1201" check from the cli?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
vivithemage
Posts: 102
Joined: Tue May 21, 2013 2:52 pm

Re: SSL and Email issues with nagios

Post 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]#
vivithemage
Posts: 102
Joined: Tue May 21, 2013 2:52 pm

Re: SSL and Email issues with nagios

Post by vivithemage »

awesome, I fixed my ssl handshake issue ... had to:

Code: Select all

vi /etc/nagios/nrpe.cfg
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.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: SSL and Email issues with nagios

Post by abrist »

Run the other two checks from the cli and report back.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
vivithemage
Posts: 102
Joined: Tue May 21, 2013 2:52 pm

Re: SSL and Email issues with nagios

Post by vivithemage »

how can I do that exactly?
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: SSL and Email issues with nagios

Post by slansing »

I believe abrist meant:
still working on the other two problems though.
vivithemage
Posts: 102
Joined: Tue May 21, 2013 2:52 pm

Re: SSL and Email issues with nagios

Post 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.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: SSL and Email issues with nagios

Post by abrist »

What does your notification commands (notify-host-by-email/notify-service-by-email) look like?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
vivithemage
Posts: 102
Joined: Tue May 21, 2013 2:52 pm

Re: SSL and Email issues with nagios

Post 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$
        }


Last edited by vivithemage on Mon Nov 18, 2013 5:29 pm, edited 2 times in total.
Locked