Issue with Free Variables through Service Templates/Groups
Posted: Thu Oct 28, 2021 7:52 am
I am trying to use Service Groups and Service Templates to assign Free Variables to services and variables are not showing up. If I assign the Service Template directly to the service, the Free Variables show up, but not when the service is in a Service Group that has a Service Template with the Free Variables listed there. Here's an example of our setup:
Mem Check Major
CPU Check Major
Disk Check Major
Each has a service template assigned directly to the service with two Free Variables (_appid and _appname) called "default-template"
For each of these, I have a Service Group:
mem-major-sg
cpu-major-sg
disk-major-sg
Within each of these Service Groups is a Service Template named "major-template" with the following Free Variables:
_notify = True
_assignmentgroup = MajorGroup
When looking up the services or checking the free variables being sent when alerting, I only see the Free Variables from the template assigned directly to the services (default-template) and not the one assigned through the Service Groups (major-template). If I assign major-template directly to the service, I get the variables (which defeats the purpose of having it assigned through Service Groups).
We have this same setup for multiple thresholds and none of the Free Variables assigned through Service Templates attached to Service Groups make it to the Service inside the Service Group. I end up seeing:
_appid = AppValue
_appname = Name
With these missing:
_notify = True
_assignmentgroup = MajorGroup
We are on the latest version (5.8.6) of Nagios XI.
Mem Check Major
CPU Check Major
Disk Check Major
Each has a service template assigned directly to the service with two Free Variables (_appid and _appname) called "default-template"
For each of these, I have a Service Group:
mem-major-sg
cpu-major-sg
disk-major-sg
Within each of these Service Groups is a Service Template named "major-template" with the following Free Variables:
_notify = True
_assignmentgroup = MajorGroup
When looking up the services or checking the free variables being sent when alerting, I only see the Free Variables from the template assigned directly to the services (default-template) and not the one assigned through the Service Groups (major-template). If I assign major-template directly to the service, I get the variables (which defeats the purpose of having it assigned through Service Groups).
We have this same setup for multiple thresholds and none of the Free Variables assigned through Service Templates attached to Service Groups make it to the Service inside the Service Group. I end up seeing:
_appid = AppValue
_appname = Name
With these missing:
_notify = True
_assignmentgroup = MajorGroup
We are on the latest version (5.8.6) of Nagios XI.