Host Group Nesting and Service Groups

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
maglaubig
Posts: 26
Joined: Thu Jan 03, 2019 2:02 pm

Host Group Nesting and Service Groups

Post by maglaubig »

I have 3 host groups nested into a single host group. The top level host group has a few service checks assigned to it, and that works as expected. The service checks get processed and show up in the interface.

I was creating some service groups as a way to help with reporting, but I'm unable to use these service checks in a service group. The error message I receive when applying the configuration is:

Code: Select all

Error: Service description missing from list ''
When I look at /usr/local/nagios/etc/servicegroups.cfg the section for this particular service group is blank. It's as if the underlying hosts and services aren't being expanded to be added to the config file.

If I don't use a host group nesting such as this, but use the host groups that have been directly assigned a service everything works as expected. Is this a by design sort of issue or did I stumble across a bug?
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Host Group Nesting and Service Groups

Post by benjaminsmith »

Hello @maglaubig,

Looks like there is an error in your configuration. Try the following steps to troubleshoot. Go to Configure > CCM > Tools > Config File Management .

1. Delete Files
2. Write Files
3. Verify.... if there are any errors try correcting them based on the information provided and repeat steps 1 and 2. Once the verification is OK go to step 4.
4. Restart Nagios Core

If you're unable to get it resolved, send us your system profile to review.

To send us your system profile.
Login to the Nagios XI GUI using a web browser.
Click the "Admin" > "System Profile" Menu
Click the "Download Profile" button
Save the profile.zip file and share in a private message and then reply to this post to bring it up in the queue.
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!
maglaubig
Posts: 26
Joined: Thu Jan 03, 2019 2:02 pm

Re: Host Group Nesting and Service Groups

Post by maglaubig »

Deleting the config files worked just fine, for whatever reason I had to hit write configs a few times for the files to be successfully written. I suspect some sort of HTTP timeout for the operation but am not sure where to get started with that.

I keep getting the same error in verify files when using a double nesting of host groups to apply the config. Screen shot attached.

On the hunch that nagios is having trouble expanding the nested host group for this purpose, I reconfigured the services so they use the underling host groups directly and the config applied just fine.

This crude bit of code is set to illustrate the group nesting:

Code: Select all

AllPDUs
    |
    | - 30A PDUs
    | - 60A PDUs
    | - Single Phase PDUs
When I use the AllPDUs host group to map the services to the service group the config fails. The hosts properly get their service checks with this config, it's just the service group portion that fails. When I change the service so that the underlying host groups are applied directly to the service and then nest those services into the service group the config works just fine. In the service group config it's the difference between the mappings looking like:

AllPDUs,servicename
AllPDUs,servicename1

and

30A PDUs,servicename
60A PDUs,servicename
30A PDUs,servicename1
60A PDUs,servicename1
You do not have the required permissions to view the files attached to this post.
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Host Group Nesting and Service Groups

Post by benjaminsmith »

Hello @maglaubig,

Can you send over your system profile so I can directly review the object definitions. I'm a little confused to the following service group:

AllPDUs,servicename

Isn't ALLPUs a host group? Is servicename a host or service? It's not possible to add services to host group definitions in Nagios XI. They can only contain hosts or other host groups.
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!
maglaubig
Posts: 26
Joined: Thu Jan 03, 2019 2:02 pm

Re: Host Group Nesting and Service Groups

Post by maglaubig »

That was my short hand for what I see in the NagiosXI web GUI which in looking at config examples of the actual CFG files, which has little to do with the CFG file actual content.

I attached a pic of what I was referring to, the red underline is the host group name and the yellow highlight is the service group name.

I sent you the system profile, but I don't have it in an error condition at the moment. Let me know if you need me to reproduce it and send you that profile. If I look at the servicegroups.cfg file now, the definition is properly expanded with the individual "hostnames,servicename" in the members directive of the servicegroup definition. I just don't think either the XI interface can handle the additional nesting I was attempting with the host groups before adding them to the service group definition.

It's pretty simple to reproduce. Going off the screen shot on this post, use a host group/service combo in the service group definition that contains nested host groups in it that have services assigned to them. The parent host group will have no services assigned to it. The service group definition will come up blank and show an error.

I'm OK if this is by design behavior, just need to verify it so I can build other parts of our NagiosXI deployment the same and update our internal runbooks.
You do not have the required permissions to view the files attached to this post.
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Host Group Nesting and Service Groups

Post by benjaminsmith »

Hello @maglaubig,

Thank you for sending the system profile and the screenshot. Earlier I had run some simple tests on my server here, and was not able to re-create this issue. However, your service groups are much bigger and as they are nested into other hierarchies, it's quite possible you are hitting the php limits on the system.

Follow the guide below to increase the execution time, memory and input variables and let me know if this resolves the issue.

Nagios XI - Optimizing The PHP Settings File
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