Hi!
I am looking for a way to enrich the information about particular alert (eg. with equipment location, id of trouble ticket created etc.)
I have found the way to add service or host variables with external commands, but nothing about alerts (problems).
Am I missing something?
Alert enrichment
-
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Alert enrichment
One way to do this would be to modify the commands used for mailing notifications.
They currently should look similar to the following:
Following the protocol of using standard macro's you could add "for instance" the $HOSTNOTES$ macro:
Is this a possibility for you? If not let us know and we can brain storm some more.
They currently should look similar to the following:
Code: Select all
# 'notify-host-by-email' command definition
define command{
command_name notify-host-by-email
command_line /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /usr/bin/mailx -s "** $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ **" $CONTACTEMAIL$
}
# 'notify-service-by-email' command definition
define command{
command_name notify-service-by-email
command_line /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$\n" | /usr/bin/mailx -s "** $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$
}
These macro's can all be found in the following list: http://nagios.sourceforge.net/docs/3_0/ ... #hostnotes$HOSTNOTES$ Notes for the host. This macro may contain other macros (e.g. $HOSTNAME$), which can be useful when you want to host-specific status information, etc. in the description.
Is this a possibility for you? If not let us know and we can brain storm some more.
Re: Alert enrichment
Thanks for help. For that, event handlers can be used too.
I didn't explain well.
I would like to enrich alarm in Nagios with additional details.
I have found only how to add host or service variables, but not alarm variables.
Eg. CHANGE_CUSTOM_HOST_VAR http://old.nagios.org/developerinfo/ext ... and_id=139
I didn't explain well.
I would like to enrich alarm in Nagios with additional details.
I have found only how to add host or service variables, but not alarm variables.
Eg. CHANGE_CUSTOM_HOST_VAR http://old.nagios.org/developerinfo/ext ... and_id=139
-
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Alert enrichment
Hello gosmart, as opposed to the XI notification variables:
http://assets.nagios.com/downloads/nagi ... iables.pdf
Nagios core has a bit smaller list:
http://nagios.sourceforge.net/docs/3_0/macrolist.html
However many of the normal macro's can be used, as shown on my first post where the notification commands were placed, you can see variable macro's such as $HOSTADDRESS$ and $HOSTSTATE$ being used to pull information.
http://assets.nagios.com/downloads/nagi ... iables.pdf
Nagios core has a bit smaller list:
http://nagios.sourceforge.net/docs/3_0/macrolist.html
However many of the normal macro's can be used, as shown on my first post where the notification commands were placed, you can see variable macro's such as $HOSTADDRESS$ and $HOSTSTATE$ being used to pull information.
Re: Alert enrichment
I am not looking for customization of alert notification, but alert itself in Nagios GUI. XI would be fine too, if such thing is supported.
-
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: Alert enrichment
So you would like some form of a popup? I think we need more details as to what you mean by enriching alerts. what exactly do you want to see happening?
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Re: Alert enrichment
Hi!
Sorry for not replying earlier. Busy time.
I had in mind something like on attached picture, but popup with additional fields would be fine.
Sorry for not replying earlier. Busy time.
I had in mind something like on attached picture, but popup with additional fields would be fine.
-
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Alert enrichment
Currently there is no documented way to add additional columns in the Service / Host / Details Page's, though this is something highly requested. If you are interested, you can also add in a feature request at http://tracker.nagios.org