Setting up Service Dependencies

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Fred Kroeger
Posts: 588
Joined: Wed Oct 19, 2011 11:36 pm
Location: Perth, Western Australia
Contact:

Setting up Service Dependencies

Post by Fred Kroeger »

I've had a situation where even though the nrpe agent is running, the server is too busy to respond to any nrpe requests from the Nagios server.
This then sets all the monitors using nrpe to Critical (Connection timed out) beacuse the Host is till up and pingable.
The solution was to create another monitor to check connectivity to the nrpe agent and then setup Service dependency for the 20 nrpe services.
This worked fine with one server, however when I did the same with a Hostgroup (~25hosts) then I noticed that it takes about 5minutes to apply the configuration now.
If I add any another hostgroup (~30 hosts) then the Applying config never ends.

Is there a limitation on dependencies? Or should I be doing this differently.
Basically all I want to do is that id the nrpe agent is not contactable, then stop monitoring all the services using nrpe.

BTW I picked up a typo on the screen when you select the <Service Dependencies> link in CCM - It displays "Service Dependencys"

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

Re: Setting up Service Dependencies

Post by lmiltchev »

If I add any another hostgroup (~30 hosts) then the Applying config never ends.
Did you try increasing the "max_execution_time" in the "/etc/php.ini" file?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Fred Kroeger
Posts: 588
Joined: Wed Oct 19, 2011 11:36 pm
Location: Perth, Western Australia
Contact:

Re: Setting up Service Dependencies

Post by Fred Kroeger »

Yes I looked at that, but I guess the issue is that taking > 30mins to apply a config is not acceptable.
Would lots of dependency rules work better than grouping them all together?
eg:

At the Moment I have 1 rule for a Hostgroup where Service_1 -> Service_12 depend on Service_0
Would it be better to make it 12 individual rules instead?

regards... Fred
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Setting up Service Dependencies

Post by abrist »

Follow the steps to generate a reconfig.txt and a cmd.txt log files found in the following link and post them here.
http://support.nagios.com/wiki/index.ph ... n_Problems
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Fred Kroeger
Posts: 588
Joined: Wed Oct 19, 2011 11:36 pm
Location: Perth, Western Australia
Contact:

Re: Setting up Service Dependencies

Post by Fred Kroeger »

This config takes about 3minutes to complete
It takes 1min to get to the Running Config Check line in reconfig.txt
Then another minute to the Starting Nagios line
Prior to implementing the Service dependencies, it took about 30sec to apply a config.

regards Fred

reconfig.txt
cmd.txt
You do not have the required permissions to view the files attached to this post.
yancy
Posts: 523
Joined: Thu Oct 06, 2011 10:12 am

Re: Setting up Service Dependencies

Post by yancy »

Fred,

Would it be possible to just increase the NRPE timeout in the command definition? That would be a simpler solution to your original issue I believe. I'm not sure how long it could potentially take for the NRPE request to be answered in your environment however.

-Yancy
Fred Kroeger
Posts: 588
Joined: Wed Oct 19, 2011 11:36 pm
Location: Perth, Western Australia
Contact:

Re: Setting up Service Dependencies

Post by Fred Kroeger »

Hi Yancy
The issue is the amount of time taken to Apply a Configuration now that I have added all these Service Dependencies - not the execution of NRPE commands.
At the moment the little dots advancing across the screen during the Apply are over 1 screens worth. If I add any more service dependencies, then it never ends up applying the config. Even now, I consider +3minutes too long to wait

Fred
yancy
Posts: 523
Joined: Thu Oct 06, 2011 10:12 am

Re: Setting up Service Dependencies

Post by yancy »

Fred,

That does seem way way to long to apply config.

Could you run the database repair script to fix any possible corruption
http://assets.nagios.com/downloads/nagi ... tabase.pdf

Thanks for pointing out the typo. It has been fixed for the next release.

-Yancy
Fred Kroeger
Posts: 588
Joined: Wed Oct 19, 2011 11:36 pm
Location: Perth, Western Australia
Contact:

Re: Setting up Service Dependencies

Post by Fred Kroeger »

Yancy
I have done the repair before, but I did it again immediately before a reconfigure.
Still no difference - it still takes a long time to reconfigure.

time ./reconfigure_nagios.sh &> reconfig.txt

real 3m51.731s
user 2m42.055s
sys 0m3.274s


At the moment, I have all the services for a host (~15) dependent on whether a check_nrpe_version is successful.
Would it be more efficent to group all these services in a Service Group and then make that Service group dependent on the check_nrep_version ?
regards... Fred
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Setting up Service Dependencies

Post by scottwilkerson »

I'm not sure how you have this setup, but somehow you have
415 hosts
4019 services
25604 service dependencies

That seems like an awful lot of dependencies setup. If you can find a way to reduce this down ti certainly would improve the verify step
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked