check_http problem (very strange)
check_http problem (very strange)
Hi there,
we do have a problem with a customized http check.
/usr/local/nagios/libexec/check_http -H XYZ.sika.com -S -u https://XYZ.sika.com/webconsole/app\?page=Login -p 443 -w 5 -c 10 -l
running this check with the test button in the CCM works fine
COMMAND: /usr/local/nagios/libexec/check_http -H XYZ.sika.com -S -u https://XYZ.sika.com/webconsole/app\?page=Login -p 443 -w 5 -c 10 -l
OUTPUT: HTTP OK HTTP/1.1 200 OK - 25519 bytes in 0.070 seconds |time=0.069714s;5.000000;10.000000;0.000000 size=25519B;0;0;0
running it on Unix commandline works fine
running it with NagiosXI brings following Error
(Return code of 127 is out of bounds - plugin may be missing)
Any clou ?
we do have a problem with a customized http check.
/usr/local/nagios/libexec/check_http -H XYZ.sika.com -S -u https://XYZ.sika.com/webconsole/app\?page=Login -p 443 -w 5 -c 10 -l
running this check with the test button in the CCM works fine
COMMAND: /usr/local/nagios/libexec/check_http -H XYZ.sika.com -S -u https://XYZ.sika.com/webconsole/app\?page=Login -p 443 -w 5 -c 10 -l
OUTPUT: HTTP OK HTTP/1.1 200 OK - 25519 bytes in 0.070 seconds |time=0.069714s;5.000000;10.000000;0.000000 size=25519B;0;0;0
running it on Unix commandline works fine
running it with NagiosXI brings following Error
(Return code of 127 is out of bounds - plugin may be missing)
Any clou ?
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: check_http problem (very strange)
Hmm odd, what are the permissions on the plugin, and what is the path?
Re: check_http problem (very strange)
Below you find the path (standard) and the permissions which are set on this plugin:
-rwxr-xr-x 1 root root 468776 Apr 4 2012 /usr/local/nagios/libexec/check_http
this looks pretty standard and the same plugin runs fine against other windows Servers.
-rwxr-xr-x 1 root root 468776 Apr 4 2012 /usr/local/nagios/libexec/check_http
this looks pretty standard and the same plugin runs fine against other windows Servers.
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: check_http problem (very strange)
Try altering the permissions to nagios.nagios:
Code: Select all
chown nagios.nagios /usr/local/nagios/libexec/check_httpNagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Re: check_http problem (very strange)
As you see running the command from the same machine, after i changed the user and group like you proposed, did not change anything.
Running on system prompt:
Running through NagiosXI:
Running on system prompt:
Code: Select all
[root@chsismon1 ~]# /usr/local/nagios/libexec/check_http -H blackberry.sika.com -S -u https://blackberry.sika.com/webconsole/app\?page=Login -p 443 -w 5 -c 10 -m 25000:25600 -l -t 30
HTTP OK HTTP/1.1 200 OK - 25521 bytes in 0.080 seconds |time=0.079819s;5.000000;10.000000;0.000000 size=25521B;25000;0;0
You do not have the required permissions to view the files attached to this post.
Re: check_http problem (very strange)
Have you tried wrapping the URL in single or double quotes? Can you post the service and command definition?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: check_http problem (very strange)
Hi,
below you find the service and command definitions: (before ai made the test with quoting the URL
then I made the test with Quoting and ..... it works in the normal UI!
but running the test under ccm and directly on the commandline it does not work.
Fine it works for me, but still why it is not constantly under all UI's ????
below you find the service and command definitions: (before ai made the test with quoting the URL
Code: Select all
define command {
command_name check_https_url
command_line $USER1$/check_http -H $ARG8$ -S -u $ARG1$ -p $ARG2$ $ARG3$ $ARG4$ $ARG5$
$ARG6$ $ARG7$
Code: Select all
###############################################################################
#
# Service configuration file
#
# Created by: Nagios QL Version 3.0.3
# Date: 2013-08-14 08:24:30
# Version: Nagios 3.x config file
#
# --- DO NOT EDIT THIS FILE BY HAND ---
# Nagios QL will overwite all manual settings during the next update
#
###############################################################################
define service {
host_name chsismon1.ch.sika.com
service_description SYW-DA - CH - HTTPS NLS Connection
use SIS-WindowsDC_nsclient_service
check_command check_https_url!https://blackberry.sika.com/webconsole/app?page=Login&service=page!443!-w 5!-c 10!-m 25000:25600!-l!-t 30!blackberry.sika.com
notifications_enabled 1
icon_image Windows-DC.png
register 1
}
###############################################################################
#
# Service configuration file
#
# END OF FILE
#
###############################################################################
but running the test under ccm and directly on the commandline it does not work.
Fine it works for me, but still why it is not constantly under all UI's ????
Re: check_http problem (very strange)
The "test check command" in the CCM web ui has only limited privileges. It can only run tests as user apache, not as user nagios. Additionally, it does not have access to user defined macros.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Re: check_http problem (very strange)
I still not understand fully why, especially that fact that it runs without quoting and doesn't with quoting under Test and OS prompt, has not any link to the permissions of a User for me.
Anyway the problem is solved for me and you my close this thread.
Thank you
Andy
Anyway the problem is solved for me and you my close this thread.
Thank you
Andy
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: check_http problem (very strange)
This is because it is not running your web UI under nagios, it is running it under Apache, so Apache has to be the one in the end who executes the checks done through the Test Check Command.