What is the difference between -t 120 in check command and n
-
- Posts: 222
- Joined: Thu Jul 06, 2017 8:55 am
What is the difference between -t 120 in check command and n
Hi Team,
What is the difference between configuration as -t 120 in check command and changing the timeout in nsclient.ini file
[Settings/NRPE/server]
allow arguments = true
timeout = 65
[/settings/external scripts]
allow arguments = true
timeout = 65
Ex: if we execute the command as below what nagios assumes and what clients will assume.
/usr/local/nagios/libexec/chec_nrpe - H XXXX -t 120 -c test
Please consider above client configuration timeout while calling from nagios
What is the difference between configuration as -t 120 in check command and changing the timeout in nsclient.ini file
[Settings/NRPE/server]
allow arguments = true
timeout = 65
[/settings/external scripts]
allow arguments = true
timeout = 65
Ex: if we execute the command as below what nagios assumes and what clients will assume.
/usr/local/nagios/libexec/chec_nrpe - H XXXX -t 120 -c test
Please consider above client configuration timeout while calling from nagios
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: What is the difference between -t 120 in check command a
timeout = 65 in the nsclient.ini file is how long nsclient will wait before erroring
-t 120 on the check_nrpe command is how long the plugin will wait before erroring (you will never get there if you have timeout = 65 in the nsclient.ini file
-t 120 on the check_nrpe command is how long the plugin will wait before erroring (you will never get there if you have timeout = 65 in the nsclient.ini file
-
- Posts: 222
- Joined: Thu Jul 06, 2017 8:55 am
Re: What is the difference between -t 120 in check command a
So for example
Now consider as now the time is 10:00 AM
At 10AM checknrpe is calling the remote plugin now script has taken 75sec to execute script.
Now how to understand this situation.
We have timeout=65 in nsclient.ini (just assume the value)
It's mean that the script execution time(75sec) +nsclient wait (65) = 140sec it's mean that to report back to nagios it will take 140 sec but we put the value as 120while we calling remote plugin. So in nagios console what start will come??
Please correct me if my assumption is wrong.
Now consider as now the time is 10:00 AM
At 10AM checknrpe is calling the remote plugin now script has taken 75sec to execute script.
Now how to understand this situation.
We have timeout=65 in nsclient.ini (just assume the value)
It's mean that the script execution time(75sec) +nsclient wait (65) = 140sec it's mean that to report back to nagios it will take 140 sec but we put the value as 120while we calling remote plugin. So in nagios console what start will come??
Please correct me if my assumption is wrong.
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: What is the difference between -t 120 in check command a
When you make the call, check_nrpe will wait up to 120 seconds
the call will immediately go to nsclient which is instructed to ONLY wait 65 seconds for the script to complete.
If it doesn't complete in 65 seconds it will timeout and return that to check_nrpe
the call will immediately go to nsclient which is instructed to ONLY wait 65 seconds for the script to complete.
If it doesn't complete in 65 seconds it will timeout and return that to check_nrpe
-
- Posts: 222
- Joined: Thu Jul 06, 2017 8:55 am
Re: What is the difference between -t 120 in check command a
If the script will not complete in 65 sec which output in nagios console will display
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: What is the difference between -t 120 in check command a
An external script timeout should display I believe, however we are not the authors of NSClient++ and it could vary by versiongrayloglearn wrote:If the script will not complete in 65 sec which output in nagios console will display
-
- Posts: 222
- Joined: Thu Jul 06, 2017 8:55 am
Re: What is the difference between -t 120 in check command a
We have couple of scripts in script folder.
[/settings/external scripts/wrappings]
vbs = cscript.exe //T:120 //NoLogo scripts\\lib\\wrapper.vbs %SCRIPT% %ARGS%
What is the difference putting in above line 120 and below nrpe timeout 70
[/settings/external scripts]
timeout = 65
[settings/NPRE/server]
timeout = 70
Could you please explain what will happen if we put above line by calling below
/usr/local/nagios/libexe/check_nrpe -H XXXX -t 120 -c check_usik
[/settings/external scripts/wrappings]
vbs = cscript.exe //T:120 //NoLogo scripts\\lib\\wrapper.vbs %SCRIPT% %ARGS%
What is the difference putting in above line 120 and below nrpe timeout 70
[/settings/external scripts]
timeout = 65
[settings/NPRE/server]
timeout = 70
Could you please explain what will happen if we put above line by calling below
/usr/local/nagios/libexe/check_nrpe -H XXXX -t 120 -c check_usik
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: What is the difference between -t 120 in check command a
this is how long your external scripts will be allowed to run before timing outgrayloglearn wrote:[/settings/external scripts]
timeout = 65
This is how long any NRPE command will be allowed to run before timing out (not just limited to external scripts)grayloglearn wrote: [settings/NPRE/server]
timeout = 70
I'm not sure I understand your question, this will execute the command for check_usik if one exists and then return the output provided it get a response in under 120 seconds from the server XXXXgrayloglearn wrote:Could you please explain what will happen if we put above line by calling below
/usr/local/nagios/libexe/check_nrpe -H XXXX -t 120 -c check_usik
-
- Posts: 222
- Joined: Thu Jul 06, 2017 8:55 am
Re: What is the difference between -t 120 in check command a
I will explain my concern
We have data_user.exe scirpt to execute data_user.exe we use the command check_usik(This will help execute the script while we call from nagios as below
/usr/local/nagios/libexe/check_nrpe -H XXXX -t 120 -c check_usik
Once we call check_usik this will execute data_user. data_user its taking some time and it push the output to nagios console that is regular .
If script data_user.exe taking more time execute then we are not getting the any data. we have to put the timeout in nsclient.ini
We know that data_use.exe taking more than 60 sec we want to put execution time 90 for this we have done as below
[setting/NRPE/SERVER
timeout=90
Now for above timeout=90( It means we are putting the restriction to agent can wait 90 sec for the data_use.exe output ).If the script not getting the data 90 sec data_use.exe demon will kill. Correct me i am wrong. Then again next will happen same
Now
[/settings/external scripts]
timeout = 65
What does it mean External scripts. The script which are in C:\Program Files\NSClient++\scripts ???
Now again what is timeout=65
[/settings/external scripts/wrappings]
vbs = cscript.exe //T:120 //NoLogo scripts\\lib\\wrapper.vbs %SCRIPT% %ARGS%
What does it mean external scripts/wrappings ??
what does it mean if we put 120 below
vbs = cscript.exe //T:120 //NoLogo scripts\\lib\\wrapper.vbs %SCRIPT% %ARGS%..
I
We have data_user.exe scirpt to execute data_user.exe we use the command check_usik(This will help execute the script while we call from nagios as below
/usr/local/nagios/libexe/check_nrpe -H XXXX -t 120 -c check_usik
Once we call check_usik this will execute data_user. data_user its taking some time and it push the output to nagios console that is regular .
If script data_user.exe taking more time execute then we are not getting the any data. we have to put the timeout in nsclient.ini
We know that data_use.exe taking more than 60 sec we want to put execution time 90 for this we have done as below
[setting/NRPE/SERVER
timeout=90
Now for above timeout=90( It means we are putting the restriction to agent can wait 90 sec for the data_use.exe output ).If the script not getting the data 90 sec data_use.exe demon will kill. Correct me i am wrong. Then again next will happen same
Now
[/settings/external scripts]
timeout = 65
What does it mean External scripts. The script which are in C:\Program Files\NSClient++\scripts ???
Now again what is timeout=65
[/settings/external scripts/wrappings]
vbs = cscript.exe //T:120 //NoLogo scripts\\lib\\wrapper.vbs %SCRIPT% %ARGS%
What does it mean external scripts/wrappings ??
what does it mean if we put 120 below
vbs = cscript.exe //T:120 //NoLogo scripts\\lib\\wrapper.vbs %SCRIPT% %ARGS%..
I
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: What is the difference between -t 120 in check command a
Your data_user.exe is an external script so it would be limited by
grayloglearn wrote:[/settings/external scripts]
timeout = 65