Email Response Command - missing hash data

This board serves as an open discussion and support collaboration point for Nagios XI. NOTE: Nagios XI customers should use the Customer Support forum to obtain expedited support.

Re: Email Response Command - missing hash data

Postby jomann » Fri Jun 28, 2019 10:01 am

Alright, I've attached the file that needs to be updated. You unzip and place this file in:
/usr/local/nagiosxi/html/includes/components/xicore

You should make sure to rename xicore.inc.php to xicore.inc.php.old before you update the file just in case.
Attachments
xicore.inc.php.zip
from 5.6.4
(5.72 KiB) Downloaded 23 times
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
jomann
Development Lead
 
Posts: 593
Joined: Mon Apr 22, 2013 10:06 am
Location: Nagios Enterprises

Re: Email Response Command - missing hash data

Postby MediaworksNZ » Wed Jul 03, 2019 11:22 pm

Thanks for the File.

I can confirm that by replying with the below email response works:

Code: Select all
ack, downtime
now - 17:00
Someone knocked the plug out!


I'm still getting the response of "Could not submit command due to missing hash data. Did you reply with the full email?" when I submit:
Code: Select all
delay
1 hour


Any thoughts on this?

Thanks
MediaworksNZ
 
Posts: 29
Joined: Tue Aug 05, 2014 5:22 pm

Re: Email Response Command - missing hash data

Postby cdienger » Mon Jul 08, 2019 4:41 pm

The behavior seen with the delay command will occur if a host isn't in the body of the email. Do you see this all the time? The last log showed this to be successful. If you're able to reproduce it, please do so and provide a fresh log as well as a copy of the email.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
cdienger
Support Tech
 
Posts: 3518
Joined: Tue Feb 07, 2017 11:26 am

Re: Email Response Command - missing hash data

Postby MediaworksNZ » Tue Jul 23, 2019 10:45 pm

Hi,

I have now put the new server in semi production.
Users are now getting alerts and are wanting to reply via Email.
Lets see if there are any user who are getting the Missing Hash Data in their replies.

Now that it is being used by users, we have noticed that if a user has a signature, the reply to ACK fails.
Is there a solution that can prevent nagios from processing their signatures or is this just one of those scenarios where they have to remove it before sending the reply?

Or is there a way to force all users in Nagios to have emails sent in plain text only?


Thanks
MediaworksNZ
 
Posts: 29
Joined: Tue Aug 05, 2014 5:22 pm

Re: Email Response Command - missing hash data

Postby cdienger » Wed Jul 24, 2019 2:04 pm

Is there anything special about the signatures? Images, fonts, anything but text, etc... ? I've been testing with a signature but haven't been able to reproduce.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
cdienger
Support Tech
 
Posts: 3518
Joined: Tue Feb 07, 2017 11:26 am

Re: Email Response Command - missing hash data

Postby MediaworksNZ » Thu Jul 25, 2019 5:03 pm

Yea,

I have tested on my end with a signature and I can't reproduce as well.
User must have typed in the response incorrectly.

On a Separate note, I'm still getting bounce backs from random services when responding via email.
It does not matter what response I use.
Some services will be actioned and others will not and I get the email sent back to me.

Code: Select all
Subject: Nagios XI - Response Error

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


I have tested this on a newly created monitored host and also ones that were imported from an old nagios setup.

Thanks
MediaworksNZ
 
Posts: 29
Joined: Tue Aug 05, 2014 5:22 pm

Re: Email Response Command - missing hash data

Postby ssax » Fri Jul 26, 2019 4:58 pm

You are responding above the Respond above this line section, correct? That needs to be included as the hash is hidden in the message.

That's the only way that can happen IMO.

Try running this command before submitting (and leave it running):

Code: Select all
tail -F /var/log/httpd/error_log /var/log/httpd/ssl_error_log /usr/local/nagiosxi/var/cmdsubsys.log /usr/local/nagiosxi/var/eventman.log


Then once it fails again send me the full output of the still run tail command above.

Thank you!
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
ssax
Dreams In Code
 
Posts: 4238
Joined: Wed Feb 11, 2015 12:54 pm

Re: Email Response Command - missing hash data

Postby MediaworksNZ » Sun Jul 28, 2019 8:51 pm

I think this is the issue:


My email templates are set as:

Code: Select all
***** Nagios XI Alert *****

%alertsummary%

Notification Type: %type%
Host: %host%
State: %hoststate%
Address: %hostaddress%
Info: %hostoutput%
Date/Time: %datetime%

Respond: %responseurl%
Nagios URL: %xiserverurl%

******************************
*****  Email Response example1:  *****
******************************
ack or acknowledge (choose one)
I'm looking into this right now (Optional Comments for acknowledgement)

******************************
*****  Email Response example2:  *****
******************************
down or downtime (choose one)
9:40 – 10:40 / now - 11:30 (two examples: specify time range)
Someone knocked the plug out!

******************************
*****  Email Response example3:  *****
******************************
delay (Delay the next time Nagios XI sends notifications for the object)
5 hour (Must be specified)

In Case of Error:
*******************************************************************************************************************************************************
If the system cannot read a response email you will receive an email back with an error message. Otherwise, it will pass the command onto the subsystem.
*******************************************************************************************************************************************************


When I remove the actionable examples from the reply email (tested this quickly over the weekend), the service that was failing to be actioned with Hash Data gets actioned.

Code: Select all
***** Nagios XI Alert *****

%alertsummary%

Notification Type: %type%
Host: %host%
State: %hoststate%
Address: %hostaddress%
Info: %hostoutput%
Date/Time: %datetime%

Respond: %responseurl%
Nagios URL: %xiserverurl%


I have now edited the template to be like this and hoping it will work as I need examples for users to reference.
It must be that the actionable examples were being read due to not having some other characters in front to prevent it from being interpreted as a command?
How would you suggest (i.e supported comments characters) doing this?

Code: Select all
***** Nagios XI Alert *****

%alertsummary%

Notification Type: %type%
Host: %host%
State: %hoststate%
Address: %hostaddress%
Info: %hostoutput%
Date/Time: %datetime%

Respond: %responseurl%
Nagios URL: %xiserverurl%

******************************
*****  Email Response example1:  *****
******************************
*****  ack or acknowledge (choose one)  *****
*****  I'm looking into this right now (Optional Comments for acknowledgement)  *****

******************************
*****  Email Response example2:  *****
******************************
*****  down or downtime (choose one)  *****
*****  9:40 – 10:40 / now - 11:30 (two examples: specify time range)  *****
*****  Someone knocked the plug out!  *****

******************************
*****  Email Response example3:  *****
******************************
*****  delay (Delay the next time Nagios XI sends notifications for the object)  *****
*****  5 hour (Must be specified)  *****

In Case of Error:
*******************************************************************************************************************************************************
If the system cannot read a response email you will receive an email back with an error message. Otherwise, it will pass the command onto the subsystem.
*******************************************************************************************************************************************************
MediaworksNZ
 
Posts: 29
Joined: Tue Aug 05, 2014 5:22 pm

Re: Email Response Command - missing hash data

Postby ssax » Tue Jul 30, 2019 4:49 pm

Good catch! Thank you for posting your templates! I'll report this to the devs and take a look for a workaround (I'm labbing it up, if you don't hear from me by midday tomorrow, please post so that it pops up on our dashboard).

As this functionality was just released we'll need to work through these edge cases.
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
ssax
Dreams In Code
 
Posts: 4238
Joined: Wed Feb 11, 2015 12:54 pm

Re: Email Response Command - missing hash data

Postby MediaworksNZ » Thu Aug 01, 2019 4:11 pm

Hi @ssax

Just wondering how you got on with testing this in your lab?

thanks,

craig
MediaworksNZ
 
Posts: 29
Joined: Tue Aug 05, 2014 5:22 pm

PreviousNext

Return to Nagios XI

Who is online

Users browsing this forum: No registered users and 22 guests