Email Response Command - missing hash data

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
jomann
Development Lead
Posts: 611
Joined: Mon Apr 22, 2013 10:06 am
Location: Nagios Enterprises

Re: Email Response Command - missing hash data

Post by jomann »

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.
You do not have the required permissions to view the files attached to this post.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
MediaworksNZ
Posts: 29
Joined: Tue Aug 05, 2014 5:22 pm

Re: Email Response Command - missing hash data

Post by MediaworksNZ »

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
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Email Response Command - missing hash data

Post by cdienger »

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.
MediaworksNZ
Posts: 29
Joined: Tue Aug 05, 2014 5:22 pm

Re: Email Response Command - missing hash data

Post by MediaworksNZ »

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
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Email Response Command - missing hash data

Post by cdienger »

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.
MediaworksNZ
Posts: 29
Joined: Tue Aug 05, 2014 5:22 pm

Re: Email Response Command - missing hash data

Post by MediaworksNZ »

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
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Email Response Command - missing hash data

Post by ssax »

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!
MediaworksNZ
Posts: 29
Joined: Tue Aug 05, 2014 5:22 pm

Re: Email Response Command - missing hash data

Post by MediaworksNZ »

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.
*******************************************************************************************************************************************************
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Email Response Command - missing hash data

Post by ssax »

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.
MediaworksNZ
Posts: 29
Joined: Tue Aug 05, 2014 5:22 pm

Re: Email Response Command - missing hash data

Post by MediaworksNZ »

Hi @ssax

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

thanks,

craig
Locked