Nagios Reply Email Acknowledgement Not Working

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
hul1
Posts: 50
Joined: Mon Jan 14, 2019 12:58 pm

Nagios Reply Email Acknowledgement Not Working

Post by hul1 »

Hi I'm trying to set up my emails to receive the nagios XI ability to handle inbound email commands.
I tried to reply back to a Nagios problem email notification with a simple
"ack"
but it doesn't work but doesn't return a reply back error. I do see the following from /data/nagiosxi/var/cleaner.log
when I reply back to the mail server. This is a pop3 mail server using port 110 that I tested works for sending emails out.

Code: Select all

DIR: /usr/local/nagiosxi/nom/checkpoints/nagioscore
NUMFOUND: 10
KEEPING ALL GOOD CHECKPOINTS
DIR: /usr/local/nagiosxi/nom/checkpoints/nagioscore/errors
NUMFOUND: 10
KEEPING ALL ERROR CHECKPOINTS
DIR: /usr/local/nagiosxi/nom/checkpoints/nagiosxi
NUMFOUND: 10
KEEPING ALL SNAPSHOTS
----------------------------------
Running callbacks:
Error - Could not find a host object in the hash provided
Processed 1 incoming emails
----------------------------------
PHP Notice:  Unknown: SECURITY PROBLEM: insecure server advertised AUTH=PLAIN (errflg=1) in Unknown on line 0
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Nagios Reply Email Acknowledgement Not Working

Post by cdienger »

Is the email an html email? Test by sending a plain 'ack' if possible. Usually the 'could not find a host object..." message is due to the message not parsing correctly. Try modifying /usr/local/nagiosxi/html/includes/components/xicore/xicore.inc.php so that the error check looks like below:

Code: Select all

// Verify that at least a hostname is present
                if (empty($obj->host)) {
                echo $email['body'];
                echo "Error - Could not find a host object in the hash provided\n";
                $error = true;
              }
This section starts on line 562. The echo $email['body']; is the new addition. Testing the function again should include the body of the email in the output.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
hul1
Posts: 50
Joined: Mon Jan 14, 2019 12:58 pm

Re: Nagios Reply Email Acknowledgement Not Working

Post by hul1 »

Okay I reran it and looked for the message in the cleaner.log and got the following:

Code: Select all

KEEPING ALL SNAPSHOTS
----------------------------------
Running callbacks:
ack
________________________________
From: Nagios XI <[email protected]>
Sent: Sunday, November 24, 2019 11:08 AM
To: <[email protected]>
Subject: PROBLEM Service Alert - reslnlhtest03.research.chop.edu/Load is CR=
ITICAL

---- Respond above this line ----

***** Nagios XI Alert *****

Nagios has detected a problem with this service.

Notification Type: PROBLEM

Service: Load
Host: reslnlhtest03.research.chop.edu
Address: reslnlhtest03.research.chop.edu
State: CRITICAL
Info:
CRITICAL - load average per CPU: 2.20, 2.04, 1.88
Date/Time: 2019-11-24 11:08:37

Respond: nagios.research.chop.edu/rr.php?oid=3D3164&token=3Dd68a94979659e50=
8e2975c4a227bba4dac4b62b4
Nagios URL: nagios.research.chop.edu/

-----

To reply, keep the following data in your response email.

##NGRkMGYxM2M0YjExNjgyYjh2eE9WWHdMeVJxQysrMnpRT05xVkJFWWg5QzJBaWxjaTBxd1FmK=
1BKU0c1VTJpcXFYakFldHV0YU91SlZPSkpYZ0ovM3c5cnkzUEtRcjBIZW9BUFpRPT0=3D##
Error - Could not find a host object in the hash provided
Processed 1 incoming emails
----------------------------------
PHP Notice:  Unknown: SECURITY PROBLEM: insecure server advertised AUTH=PLAIN (errflg=1) in Unknown on line 0
DIR: /usr/local/nagiosxi/nom/checkpoints/nagioscore
Also I get an email back with the following:

Code: Select all

Could not submit command due to missing hash data. Did you reply with the full email?

- Nagios XI System
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Nagios Reply Email Acknowledgement Not Working

Post by scottwilkerson »

It looks like the hash is wrapping, this should have been resolved in 5.6.6 of XI

Code: Select all

Fixed problem with reading multiple line hashes sent when an inbound email response is wrapped [TPS#14396] -JO
What version are you running?
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
hul1
Posts: 50
Joined: Mon Jan 14, 2019 12:58 pm

Re: Nagios Reply Email Acknowledgement Not Working

Post by hul1 »

Code: Select all

Nagios XI 5.6.5
Oh okay, I think we just need to upgrade Nagios and I can test it again. Thanks!
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Nagios Reply Email Acknowledgement Not Working

Post by scottwilkerson »

hul1 wrote:Oh okay, I think we just need to upgrade Nagios and I can test it again. Thanks!
Sounds good!
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked