Page 1 of 1

Alert Payload Fields - what are they?

Posted: Tue Oct 24, 2017 3:23 pm
by tonyjameshart
I can not find the answer to this noob question.
I am wanting to know about the alert payload sent to external applications. Such as VictorOps.
I am wanting to see if the notes_url field is part of the payload from Nagios. I am using v4.1.1.1 ... yea I know.

Re: Alert Payload Fields - what are they?

Posted: Tue Oct 24, 2017 4:51 pm
by npolovenko
Hello, @tonyjameshart.
Can you tell us the path to the file where you see the alert_payload field?
Payload, in general, refers to the size of packets that Nagios sends, so the alert payload could mean the maximum allowed the size of data packets that will be sent to VictorOps. But I could be wrong. Perhaps after I see the file I'll be able to provide more info.
Also what exactly are you trying to set up/monitor?

Re: Alert Payload Fields - what are they?

Posted: Wed Oct 25, 2017 8:23 am
by mcapra
tonyjameshart wrote:I am wanting to know about the alert payload sent to external applications. Such as VictorOps.
So there's 2 ways in which Nagios Core ships alert information:
  • Event handlers
  • Notification handlers
More on those here:
https://assets.nagios.com/downloads/nag ... dlers.html
https://assets.nagios.com/downloads/nag ... tions.html

If you wanted to send information about an alert to VictorOps, a notification handler might be a more appropriate method. When Nagios receives an alert to pass off to a notification handler, it has certain information about the host/service that it can include in that alert. I assume this is what you're looking for? This page has a list of all the available macros:
https://assets.nagios.com/downloads/nag ... olist.html

The ones relevant for (what I think is) your use case are located in the "Host notifications" and "Service notifications" columns.
tonyjameshart wrote:I am wanting to see if the notes_url field is part of the payload from Nagios.
Both $HOSTNOTESURL$ and $SERVICENOTESURL$ are available to assess that field's value. If you're not quite sure how those macros work with notification handlers, feel free to chime in and further examples can be provided :)

Re: Alert Payload Fields - what are they?

Posted: Wed Oct 25, 2017 12:12 pm
by dwasswa
Thanks @mcapra,

@tonyjameshart,have you tried what @mcapra suggested?