Custom Variables not always working for email notifcations

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
barathia
Posts: 18
Joined: Thu Dec 19, 2013 8:04 pm

Custom Variables not always working for email notifcations

Post by barathia »

Good Day

Users Service Notification Messages for email notifications for user contains for following Variable

ContactGroup = %contactgroup% |


This Variable is defined in that specific service

_CONTACTGROUP Oracle Group

But this is not getting reflected and the group it picks up is from the default template and not what is explicitly mentioned.

At first I thought its the space " " inbetween the name but when I added an underscore that the problem still remains.

However I have other services that work well but there are a large number for which the custom variables are not reflected in the email notifications as it is suppose to.

Kind regards
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Custom Variables not always working for email notifcatio

Post by lmiltchev »

Go to CCM->Services-><your service>Misc Settings tab->Manage Variable Definitions and show us a screenshot of this page.

Still in the CCM, go to Commands->type "noti" in the search bar and hit "Enter" to view the notification commands. Post the command that you use to send alerts, i.e. xi_host_notification_handler, xi_service_notification_handler, notify-host-by-email, notify-service-by-email, etc.

Click on the username in the upper right corner->Notification Messages, and show us the part where you have %contactgroup%.

Also, show us one of the actual email alerts that you received, which should've contained the macro.
Be sure to check out our Knowledgebase for helpful articles and solutions!
barathia
Posts: 18
Joined: Thu Dec 19, 2013 8:04 pm

Re: Custom Variables not always working for email notifcatio

Post by barathia »

The same custom variable _CONTACTGROUP works on some services but not on all.
You do not have the required permissions to view the files attached to this post.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Custom Variables not always working for email notifcatio

Post by scottwilkerson »

Please post the other items lmiltchev asked for
lmiltchev wrote:Still in the CCM, go to Commands->type "noti" in the search bar and hit "Enter" to view the notification commands. Post the command that you use to send alerts, i.e. xi_host_notification_handler, xi_service_notification_handler, notify-host-by-email, notify-service-by-email, etc.
Please copy the whole command line and past in the post as it will run far off the screen for a screen shot
lmiltchev wrote:Click on the username in the upper right corner->Notification Messages, and show us the part where you have %contactgroup%.
Thanks
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked