I made a mistake on this post. I meant to post for the plugin check_curl_http, not check_http.
The command line works fine in Linux: php check_curl_http.php -U
https://node1.test.com and it results in:
Page OK: HTTP Status Code 200 - 689 bytes in 0.180142 seconds |time=0.18 size=689
The service status comes back as this:
Current Status: OK
(for 0d 2h 54m 29s)
Status Information: Usage: php [options] [-f] <file> [--] [args...]
php [options] -r <code> [--] [args...]
php [options] [-B <begin_code>] -R <code> [-E <end_code>] [--] [args...]
php [options] [-B <begin_code>] -F <file> [-E <end_code>] [--] [args...]
php [options] -- [args...]
php [options] -a
-a Run as interactive shell
-c <path>
Performance Data: <file> Look for php.ini file in this directory -n No php.ini file will be used -d foo[=bar] Define INI entry foo with value 'bar' -e Generate extended information for debugger/profiler -f <file> Parse and execute <file>. -h This help -i PHP information -l Syntax check only (lint) -m Show compiled in modules -r <code> Run PHP <code> without using script tags <?..?> -B <begin_code> Run PHP <begin_code> before processing input lines -R <code> Run PHP <code> for every input line -F <file> Parse and execute <file> for every input line -E <end_code> Run PHP <end_code> after processing all input lines -H Hide any passed arguments from external tools. -S <addr>:<port> Run with built-in web server. -t <docroot> Specify document root <docroot> for built-in web server. -s Output HTML syntax highlighted source. -v Version number -w Output source with stripped comments and whitespace. -z <file> Load Zend extension <file>. args... Arguments passed to script. Use -- args when first argument starts with - or script is read from stdin --ini Show configuration file names --rf <name> Show information about function <name>. --rc <name> Show information about class <name>. --re <name> Show information about extension <name>. --rz <name> Show information about Zend extension <name>. --ri <name> Show configuration for extension <name>.
Current Attempt: 1/3 (HARD state)
Last Check Time: 11-28-2012 13:32:38
Check Type: ACTIVE
Check Latency / Duration: 0.057 / 0.005 seconds
Next Scheduled Check: 11-28-2012 13:42:38
Last State Change: 11-28-2012 10:43:07
Last Notification: N/A (notification 0)
Is This Service Flapping? NO
(3.75% state change)
In Scheduled Downtime? NO
Last Update: 11-28-2012 13:37:33 ( 0d 0h 0m 3s ago)
Here are my definitions:
Externalnodes.cfg
define host{
use windows-server ; Inherit default values from a template
host_name sbrdsgw8 ; The name we're giving to this host
hostgroups external-servers
alias Remote Access Page ; A longer name associated with the host
address sbrdsgw8.eil-infra.com ; IP address of the host
}
define service{
use generic-service
host_name sbrdsgw8
service_description http monitor
servicegroups statservices,websites
check_command check_curl_http!
https://node1.test.com
}
commands.cfg
define command{
command_name check_curl_http
command_line $USER1$/check_curl_http.php -U $ARG1$ $ARG2$
}