check_http is never scheduled

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
vmesquita
Posts: 315
Joined: Fri Aug 10, 2012 12:52 pm

check_http is never scheduled

Post 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?
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: check_http is never scheduled

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
vmesquita
Posts: 315
Joined: Fri Aug 10, 2012 12:52 pm

Re: check_http is never scheduled

Post 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
dwasswa

Re: check_http is never scheduled

Post 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.
You do not have the required permissions to view the files attached to this post.
kyang

Re: check_http is never scheduled

Post 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
vmesquita
Posts: 315
Joined: Fri Aug 10, 2012 12:52 pm

Re: check_http is never scheduled

Post 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.
You do not have the required permissions to view the files attached to this post.
dwasswa

Re: check_http is never scheduled

Post 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?
You do not have the required permissions to view the files attached to this post.
kyang

Re: check_http is never scheduled

Post 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?
vmesquita
Posts: 315
Joined: Fri Aug 10, 2012 12:52 pm

Re: check_http is never scheduled

Post 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.
kyang

Re: check_http is never scheduled

Post 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?
Locked