Hello,
I am using Nagios Core 3.5.1 in Ubuntu Ubuntu 14.04.5 LTS.
Suddenly since yesterday, I am facing problem with force checks.
When I execute force check from web gui, its said "Your command request was successfully submitted to Nagios for processing."
I can even see it in nagios3.log "[1541498447] EXTERNAL COMMAND: SCHEDULE_FORCED_SVC_CHECK;host.ext;Network bandwidth;1541498445"
but its actually not fired as process in system background...
When I run testing script:
now=`date +%s`
commandfile='/var/lib/nagios3/rw/nagios.cmd'
/usr/bin/printf "[%lu] ADD_HOST_COMMENT;host.ext;1;Comment;Comment test" > $commandfile
It works! it ads comment to host.
But when I run:
/usr/bin/printf "[%lu] SCHEDULE_HOST_CHECK;host.ext;$NOW" > $commandfile
It doesn work! I can see in log, it was fired. But command to ping host isnt executed...
Any idea?
Thanks lot for help...
Peter.
Nagios Core - SCHEDULE_FORCED_SVC_CHECK not working anymore
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Nagios Core - SCHEDULE_FORCED_SVC_CHECK not working anym
To be clear, are you saying the "Last Check Time" for the service isn't updating along with the check results?
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Nagios Core - SCHEDULE_FORCED_SVC_CHECK not working anym
looking at your example script you have this
and the command in your second line is calling $NOW which is a different case than $now and the variable wouldn't populate if you had that same this.
Let's also try this:
Code: Select all
now=`date +%s`
commandfile='/var/lib/nagios3/rw/nagios.cmd'
/usr/bin/printf "[%lu] ADD_HOST_COMMENT;host.ext;1;Comment;Comment test" > $commandfile
Let's also try this:
Code: Select all
now=`date +%s`
commandfile='/var/lib/nagios3/rw/nagios.cmd'
/usr/bin/printf "[%lu] SCHEDULE_HOST_CHECK;host.ext;$now" > $commandfile
Re: Nagios Core - SCHEDULE_FORCED_SVC_CHECK not working anym
Hello,
thanks for you reply.
After few hours of leaving server with nagios alone, I just tried it and... It works again - miracle? It fixed itself... I cant reproduce the error ;-(
I hate this situation
Peter
thanks for you reply.
After few hours of leaving server with nagios alone, I just tried it and... It works again - miracle? It fixed itself... I cant reproduce the error ;-(
I hate this situation
Peter
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Nagios Core - SCHEDULE_FORCED_SVC_CHECK not working anym
I'm glad to hear it is working again, but I agree it's not an optimal outcome because you are going to be unable to find the root cause.