We have one service that times out running an SQL query. I see the below timeout, but its a global change. Is it possible to change the timeout for one service that runs a perl script?
nagios.cfg:service_check_timeout=60
service timeout
Re: service timeout
Most (but not all) plugins take a -t option to set the timeout. You can go to your service and edit the check command to include that.
You can do that from within XI (Service Status, find your service, click the configure gear icon, reconfigure, monitoring tab...) or from CCM. I"m including a screenshot from CCM. You can see I set my timeout to 66 seconds.
HOWEVER... Your individual service timeout has to be shorter than the global timeout. So, for me to get my 66-second timeout to work, I'd have to increase my global timeout to 70 or 90 (or at least 67). It's really not recommended to do this; if something is taking 60 seconds to respond, it's probably a sign that you have other problems to solve, or you should be doing it another way.
Is the issue that your SQL server is on a slow remote network link, and it really does take 60 seconds to get through to it? Or is your check running an enormous query that actually takes 60 seconds to process?
If it's the latter, you might be better served be writing a checker script that runs locally on the DB server and feeds status to Nagios via a passive check, or a similar approach.
Hope that helps!
--Jeffrey
You can do that from within XI (Service Status, find your service, click the configure gear icon, reconfigure, monitoring tab...) or from CCM. I"m including a screenshot from CCM. You can see I set my timeout to 66 seconds.
HOWEVER... Your individual service timeout has to be shorter than the global timeout. So, for me to get my 66-second timeout to work, I'd have to increase my global timeout to 70 or 90 (or at least 67). It's really not recommended to do this; if something is taking 60 seconds to respond, it's probably a sign that you have other problems to solve, or you should be doing it another way.
Is the issue that your SQL server is on a slow remote network link, and it really does take 60 seconds to get through to it? Or is your check running an enormous query that actually takes 60 seconds to process?
If it's the latter, you might be better served be writing a checker script that runs locally on the DB server and feeds status to Nagios via a passive check, or a similar approach.
Hope that helps!
--Jeffrey
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!
Be sure to check out our Knowledgebase for helpful articles and solutions!