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
Setting up Service Dependencies
-
Fred Kroeger
- Posts: 588
- Joined: Wed Oct 19, 2011 11:36 pm
- Location: Perth, Western Australia
- Contact:
Re: Setting up Service Dependencies
Did you try increasing the "max_execution_time" in the "/etc/php.ini" file?If I add any another hostgroup (~30 hosts) then the Applying config never ends.
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
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
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
Re: Setting up Service Dependencies
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
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.
"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
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
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
You do not have the required permissions to view the files attached to this post.
Re: Setting up Service Dependencies
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
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
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
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
Re: Setting up Service Dependencies
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
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
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
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
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
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