Issue with Free Variables through Service Templates/Groups

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
antdis
Posts: 6
Joined: Wed Jul 07, 2021 11:12 pm

Issue with Free Variables through Service Templates/Groups

Post by antdis »

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.
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Issue with Free Variables through Service Templates/Grou

Post by benjaminsmith »

Hi,

The best way to assign the template to the Service Group would be to use the Bulk Mods Tool. Go to Tools > Bulk Mods Tool > + Free Variable and choose the service group.
add-free-variables-groups.png
When you're creating a Service Template, the service group assignment is only going to add the service to the corresponding group, it's not going to pass along the other values in the template to all members of the service group.

Let me know if that helps or if you have any questions or comments.

--Benjamin
You do not have the required permissions to view the files attached to this post.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked