Page 1 of 2

check_http is never scheduled

Posted: Tue Nov 14, 2017 11:53 am
by vmesquita
I added a new check using check_http, but for some reason it is never executed, even if I try to force an immediate check. I realized that the same issue happens with other checks using the same plugin. I already tried restarting the nagios service, but the problem remains. Any ideas?

Re: check_http is never scheduled

Posted: Tue Nov 14, 2017 12:32 pm
by npolovenko
Hello, @vmesquita.
Do other plugins get scheduled just fine? What output does Nagios Service Status menu give you, any error messages? Can you also navigate to /usr/local/nagios/libexec/ and run

Code: Select all

ls -l check_http
Also please try running this plugin from the command line and let us know if it errors out.

Re: check_http is never scheduled

Posted: Tue Nov 14, 2017 12:53 pm
by vmesquita
Other plugins run just fine. It is shown on service status as "Pending". This is the result of the command:

Code: Select all

-rwxrwxr-x 1 apache nagios 335892 Jan 12  2015 check_http
Running on command-line works fine:

Code: Select all

HTTP OK: HTTP/1.1 200 OK - 32119 bytes in 0.303 second response time |time=0.302512s;;;0.000000 size=32119B;;;0

Re: check_http is never scheduled

Posted: Tue Nov 14, 2017 2:23 pm
by dwasswa
Hi @vmesquita,

Can you please post a snapshot of how you have your service_check defined.

Example 1:
Service_management_1.PNG

Example 2:
Check_settings.PNG
Are you running this check on localhost or a remote host?

Please run the following command to watch the command subsystem logs:
tail -f /usr/local/nagiosxi/var/cmdsubsys.log

The command subsystem of Nagios XI is responsible for processing commands that are initiated from the Nagios XI web UI.

Then, go to your Nagios XI web UI and force an immediate check on the check_http service as you watch the command subsystem logs from your command line and post the output.

Re: check_http is never scheduled

Posted: Tue Nov 14, 2017 3:05 pm
by kyang
Along with what @dwasswa said,

Could you PM him your system profile?

It can be downloaded from your your XI by going to Admin -> System Config -> System Profile -> Download Profile

Re: check_http is never scheduled

Posted: Tue Nov 21, 2017 11:56 am
by vmesquita
Are you running this check on localhost or a remote host?
localhost.

Command result:
tail -f /usr/local/nagiosxi/var/cmdsubsys.log
PROCESSED 0 COMMANDS
............................................................
PROCESSED 0 COMMANDS
..........................................................
PROCESSED 0 COMMANDS
............................................................
PROCESSED 0 COMMANDS
............................................................
PROCESSED 0 COMMANDS
................................................PROCESSING COMMAND ID 46140...
PROCESS COMMAND: CMD=16, DATA=a:4:{s:9:"host_name";s:15:"<<<same host>>>";s:12:"service_name";s:39:"<<<same as service name>>>";s:3:"cmd";i:54;s:10:"start_time";i:1511282989;}
COMMAND DATA: a:4:{s:9:"host_name";s:15:"<<<same host>>>";s:12:"service_name";s:39:"<<<same as sevice description>>>";s:3:"cmd";i:54;s:10:"start_time";i:1511282989;}
CMDARR:
Array
(
[host_name] => <<<same host>>>
[service_name] => <<<same as service description>>>
[cmd] => 54
[start_time] => 1511282989
)
CORE CMD: SCHEDULE_FORCED_SVC_CHECK;<<<same host>>>;<<<same as service description>>>;1511282989
SUBMITTING A NAGIOSCORE COMMAND...
..........
PROCESSED 1 COMMANDS
.............................................................
PROCESSED 0 COMMANDS
.............
The "Last Check" information on Nagios XI interfaces doesn't change.

I will PM the system profile.

Re: check_http is never scheduled

Posted: Tue Nov 21, 2017 1:39 pm
by dwasswa
Hi @vmesquita,

Please PM the following information for me:

1. How you are running the check_http command on the command line.

2.Fields marked in red in the attachment below:
Customer_serviceM.PNG


Secondly, do you have SSL configured to that website?

Re: check_http is never scheduled

Posted: Tue Nov 28, 2017 2:41 pm
by kyang
Hey vmesquita, just checking in to see if your issue is resolved?

Did you have any more questions? Or did you figure this out?

Re: check_http is never scheduled

Posted: Thu Nov 30, 2017 11:44 am
by vmesquita
Hi dwasswa and kyang,

Sorry for the late reply.
dwasswa wrote:1. How you are running the check_http command on the command line.
/usr/local/nagios/libexec/check_http -H www3 -s "informacoesPesquisaRegistros" -H www3... -f ok -I
2.Fields marked in red in the attachment below:
Customer_serviceM.PNG
I will PM you since it reveals some sensitive info.
Secondly, do you have SSL configured to that website?
We have the issue with websites both with and without SSL. Actually if we create a new service with check_http the problem manifests itself.

Re: check_http is never scheduled

Posted: Thu Nov 30, 2017 2:04 pm
by kyang
I will PM you since it reveals some sensitive info
Could you PM me instead? Thanks.

If you go to XI Home --> Configure --> Core Config Manager --> under Tools click "Config File Management"

Click Delete --> Write --> Verify (Show us the output of verify) --> restart nagios core --> Apply Configs

Then check to see if the check is executed?