Hi Everyone,
In case if I want to run a check before its (scheduled) Next Scheduled Active Check Time, I can execute the command in the command-line with required parameters. Thats all good.
Now my question is, if I execute a check from the command-line before its Next Scheduled Active Check Time with it updates the check status in Nagios system before its scheduled check time ?
Thanks.
Does manually running check command update the status ?
Re: Does manually running check command update the status ?
If you submit the check via the external commands file via a command like SCHEDULE_HOST_CHECK or SCHEDULE_SVC_CHECK, yes it will update the status once that check is completed.yosh wrote:if I execute a check from the command-line before its Next Scheduled Active Check Time with it updates the check status in Nagios system before its scheduled check time ?
If you simply run the check's associated plugin from the command-line, that will not necessarily update any given check's status.
Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/
-
npolovenko
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: Does manually running check command update the status ?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Does manually running check command update the status ?
Thanks @mcapra
This is what I was exactly looking for.
We are good to close the thread @npolovenko. Thanks..!
This is what I was exactly looking for.
We are good to close the thread @npolovenko. Thanks..!
Re: Does manually running check command update the status ?
We're re-opening this at OP's request - please let us know what else we can help you with!
Former Nagios employee
Re: Does manually running check command update the status ?
I have checked the SCHEDULE_HOST_CHECK and SCHEDULE_SVC_CHECK as adviced in above response.mcapra wrote:If you submit the check via the external commands file via a command like SCHEDULE_HOST_CHECK or SCHEDULE_SVC_CHECK, yes it will update the status once that check is completed.yosh wrote:if I execute a check from the command-line before its Next Scheduled Active Check Time with it updates the check status in Nagios system before its scheduled check time ?
If you simply run the check's associated plugin from the command-line, that will not necessarily update any given check's status.
There we can see the below code in SCHEDULE_HOST_CHECK script.
Code: Select all
#!/bin/sh
# This is a sample shell script showing how you can submit the SCHEDULE_HOST_CHECK command
# to Nagios. Adjust variables to fit your environment as necessary.
now=`date +%s`
commandfile='/usr/local/nagios/var/rw/nagios.cmd'
/bin/printf "[%lu] SCHEDULE_HOST_CHECK;host1;1110741500\n" $now > $commandfileThank you..!
Re: Does manually running check command update the status ?
Hi Everyone,
I found the answer under the sections "Submitting Passive Service Check Results" and "Submitting Passive Host Check Results" in.
https://assets.nagios.com/downloads/nag ... hecks.html
We can close the thread now.
Thank you..!
I found the answer under the sections "Submitting Passive Service Check Results" and "Submitting Passive Host Check Results" in.
https://assets.nagios.com/downloads/nag ... hecks.html
We can close the thread now.
Thank you..!
-
kyang
Re: Does manually running check command update the status ?
Sounds good! I'll be closing this thread!
If you have any more questions, feel free to create another thread.
Thanks for using the Nagios Support Forum!
If you have any more questions, feel free to create another thread.
Thanks for using the Nagios Support Forum!