ID's for problem and recovery notifications

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
salok
Posts: 6
Joined: Fri Aug 24, 2018 6:23 am

ID's for problem and recovery notifications

Post by salok »

Hi,

We are currently building scenario where Nagios email alerts will be read to MS Dynamics 365 from mailbox. Then processed in D365 as events or cases.

Question is how we can find identifier for problem and recovery type notifications for single Nagios alert? So that custom parser in D365 could detect from the recovery email which host or service problem this recovery notification is for. The ID's (event ID, Problem ID) what we have been testing are running numbers, so recovery notification has different ID than original problem notification.

What would be your recommendation for this scenario?

Br
Kristian
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: ID's for problem and recovery notifications

Post by cdienger »

$LASTHOSTPROBLEMID$ and $LASTSERVICEPROBLEMID$ can be used to identify previous problems. See https://assets.nagios.com/downloads/nag ... olist.html for descriptions of these.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
salok
Posts: 6
Joined: Fri Aug 24, 2018 6:23 am

Re: ID's for problem and recovery notifications

Post by salok »

Thank you, we'll test with these ones.
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: ID's for problem and recovery notifications

Post by cdienger »

Sounds good. Please update the thread once you've been able to test :)
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
salok
Posts: 6
Joined: Fri Aug 24, 2018 6:23 am

Re: ID's for problem and recovery notifications

Post by salok »

cdienger wrote:$LASTHOSTPROBLEMID$ and $LASTSERVICEPROBLEMID$ can be used to identify previous problems. See https://assets.nagios.com/downloads/nag ... olist.html for descriptions of these.
Hi, dummy question but where actually these macros should be added to get last (host or service) problem ID written to recovery type emails?
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: ID's for problem and recovery notifications

Post by cdienger »

You'll need to modify the notification commands before you can include the variables in notification emails. https://assets.nagios.com/downloads/nag ... iables.pdf covers this.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
salok
Posts: 6
Joined: Fri Aug 24, 2018 6:23 am

Re: ID's for problem and recovery notifications

Post by salok »

Thanks got the macros working.

However there is one question regarding. I've created a copies from original event handlers then modified those. Then modified the contact to use those copied event handlers, after I do this I cannot anymore modify that specific contact's notification messages. I get this: Nagios XI notification handlers are not defined for this account.XI notification handlers must be defined in the Core Config Manager for customized notification settings.

Even this message is there the notifications do work and contains data as expected. Any ideas?
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: ID's for problem and recovery notifications

Post by ssax »

The code only checks if the commands match xi_host_notification_handler and xi_service_notification_handler. Because the command names are different it won't show you that because it assumes you are using a custom handler that doesn't support the stuff the XI default notification handlers do.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: ID's for problem and recovery notifications

Post by ssax »

As a workaround you could change the notification commands back to the XI defaults, modify the messages, and then change the notification commands since you have verified that it does still pick up the changes.
salok
Posts: 6
Joined: Fri Aug 24, 2018 6:23 am

Re: ID's for problem and recovery notifications

Post by salok »

Ok, thanks for the explanation.
Locked