Hi,
I execute a remote custom script that might take some time to execute. For that purpose I've set a custom check_nrpe command with a 240 second timeout. From what I can see, it correct any Socket timeout after x seconds but now I have this error: Command XXXX didn't terminate within the timeout period 60s. I've been looking around but can't find where is this timeout located?
Thanks for the help
Carl
Command timeout
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Command timeout
If this is a service check there is a default timeout in the nagios.cfg of 60 seconds under the directive of service_check_timeout
This is the max amount of seconds any service check can run.
This is the max amount of seconds any service check can run.
Re: Command timeout
Already set this option to 240 but I still get that 60 seconds error. This is a service check.
It run a powershell script on the remote server which run fine if called locally but it takes some time to run.
It run a powershell script on the remote server which run fine if called locally but it takes some time to run.
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Command timeout
Ok, there are also setting in your nsclient.iniMilthiade wrote:Already set this option to 240 but I still get that 60 seconds error. This is a service check.
It run a powershell script on the remote server which run fine if called locally but it takes some time to run.
You might have some timeouts in the wrapped script etc.
If you cannot figure it out, I would need to see the nsclient.ini from the remote server
Re: Command timeout
here's the nsclient... just removed the ip part.
I've already set 2 parameters for the timeout...
timeout = 240 and also command_timeout = 240
Not quite sure if there's any other to add.
For the script itself, there's no problem running it alone in powershell or starting it from a command prompt.
I've already set 2 parameters for the timeout...
timeout = 240 and also command_timeout = 240
Not quite sure if there's any other to add.
For the script itself, there's no problem running it alone in powershell or starting it from a command prompt.
You do not have the required permissions to view the files attached to this post.
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Command timeout
I think you need one more section
Also, what version of NSClient++ are you using?
Code: Select all
[/settings/external scripts]
timeout = 240Re: Command timeout
yes that did the trick.It was missing that section. I thought the first timeout would be for everything but I guess not. Is there a global timeout setting or does it have to be in each section?
thanks for the help
thanks for the help
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Command timeout
I believe /settings/external scripts has it's own timeout, I don't believe it pulls globally.Milthiade wrote:yes that did the trick.It was missing that section. I thought the first timeout would be for everything but I guess not. Is there a global timeout setting or does it have to be in each section?
thanks for the help