Page 1 of 2

Host group and Service group configuration problems

Posted: Thu May 07, 2015 3:51 pm
by sgd
Hello,

I have two problems that both started occurring today. We're running Nagios XI 2014R2.7, and upgraded to that several days ago without issue.

I provisioned a number of new services today, and tried adding them to a new service group. The services for the first 5 hosts added to the service group fine, but I cannot add any more services from other hosts. I go to Configure -> Core Config Manager -> Service Groups, select my service group, go to Manage Services, select the services I want to add, click Add Selected, and they show up in the Assigned table on the right. I then click Close, then Save, then Apply Configuration. Nagios confirms that the new configuration has been verified and applied successfully, but when I go to monitor that service group the newly-added services are not there. When I go back to configure that service group the newly-added services are no longer in the Assigned column.

The other problem is with host groups.

I have a number of hosts that I just monitor with check-host-alive, using ICMP. When I create a new host group and add those hosts to it, the additions are fine, except Nagios starts trying to monitor the http port of those hosts, and they do not run an HTTP server. I've confirmed that the host configuration is still check-host-alive, but whenever I add the hosts to the host group it changes to http monitoring. Those same hosts are in another (pre-existing) host group as well, and they all show an HTTP service when monitoring now, when they did not in the past. I don't understand how this HTTP monitoring got added, nor how to remove it, as I don't see the http services in the config manager at all. I get alerts from all these services, of course, because they don't exist.

Please advise.

Re: Host group and Service group configuration problems

Posted: Thu May 07, 2015 4:43 pm
by tgriep
Can you run the following is a shell on the XI server while you Apply the Configuration and post the output here?

Code: Select all

 tail -f /usr/local/nagiosxi/var/cmdsubsys.log 

Re: Host group and Service group configuration problems

Posted: Thu May 07, 2015 4:49 pm
by lmiltchev
Run the following commands:

Code: Select all

su nagios
cd /usr/local/nagiosxi/scripts
./reconfigure_nagios.sh &> /tmp/reconfig.txt
Then also run the following command to begin capturing log output:

Code: Select all

tail -f /usr/local/nagiosxi/var/cmdsubsys.log &> /tmp/cmd.txt
Apply Configuration from the web interface. After applying configuration is done, press Ctrl+c to stop the log tail, and post the cmd.txt file and the reconfig.txt that was generated in the "/tmp/" directory by the above instructions.

Re: Host group and Service group configuration problems

Posted: Thu May 07, 2015 5:19 pm
by sgd
I'm attaching logs from adding services and adding hosts separately.
add-services.cmdsubsys.log.txt
add-hosts.cmdsubsys.log.txt

Re: Host group and Service group configuration problems

Posted: Thu May 07, 2015 5:40 pm
by sgd
Sorry - I hadn't run the reconfig script first.

I did so, and added the hosts and services again after, why the same results:
reconfig.txt
add-services.cmdsubsys.log.1.txt
add-hosts.cmdsubsys.log.1.txt

Re: Host group and Service group configuration problems

Posted: Thu May 07, 2015 6:31 pm
by Box293
I suspect this may be timezone related.

Can you go to Admin > System Config > Manage System Config
Under timezone settings, select a different timezone and click Update Settings
Now select your correct timezone and click Update Settings

Now go into CCM and Apply Config.

Did this fix the problem?

Re: Host group and Service group configuration problems

Posted: Thu May 07, 2015 9:40 pm
by sgd
Hello,

Thanks for you response. Unfortunately that did not fix the problem. Having the Timezone set properly in Nagios is important anyway, so I'm glad you pointed that out.
At least it's something we can eliminate now as the cause of the problem.

Re: Host group and Service group configuration problems

Posted: Thu May 07, 2015 10:06 pm
by Box293
Can you try this:

Go into CCM
Tools > Write Config Files
Click the Delete button
It will say "Successfully deleted all Host / Service Config Files"
Click the Write Button
It will show an output of all the files it creates
Click the Verify button
The output should end with "Total Errors: 0"

If you don't have any errors, Apply Config?
Quick Tools > Apply Configuration
Click the Apply Configuration button
sgd wrote:I provisioned a number of new services today, and tried adding them to a new service group. The services for the first 5 hosts added to the service group fine, but I cannot add any more services from other hosts. I go to Configure -> Core Config Manager -> Service Groups, select my service group, go to Manage Services, select the services I want to add, click Add Selected, and they show up in the Assigned table on the right. I then click Close, then Save, then Apply Configuration. Nagios confirms that the new configuration has been verified and applied successfully, but when I go to monitor that service group the newly-added services are not there. When I go back to configure that service group the newly-added services are no longer in the Assigned column.
Does this behaviour stil occur after running the steps above?

Re: Host group and Service group configuration problems

Posted: Fri May 08, 2015 10:47 am
by sgd
Hello,

Unfortunately that did not fix the problem. Not only that, but I've noticed that, while I add 11 hosts to the host group with the problem, there are actually 15 hosts in that host group in the monitoring view. When I go back to CCM it only shows the 11 hosts in that host group. When I delete all hosts from that host group with CCM, the monitoring view still shows the 4 hosts that I never added. Should I try deleting the host group completely and recreating it?

Also, there is still the problem with being unable to add services to a service group. I haven't tried deleting all existing services and adding them back in, but I could do that if you think it might help.

Thanks.

Re: Host group and Service group configuration problems

Posted: Fri May 08, 2015 10:54 am
by sgd
I did try deleting the host group and recreating it, and that seemed to solve that problem.

I have to on-site for a bit and can't work with the service group right now, but I can try that when I return if you think that might fix that problem.