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.
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
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:
// 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.
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