Plug-in for https
Mohan, Ajit (CFSA)
Ajit.Mohan at dc.gov
Mon Jul 18 17:57:43 CEST 2005
Here is the output
linux:/usr/local/nagios/libexec # ./check_http -h
check_http (nagios-plugins 1.4) 1.81
Usage: check_http -H <vhost> | -I <IP-address> [-u <uri>] [-p <port>]
[-w <warn time>] [-c <critical time>] [-t <timeout>] [-L]
[-a auth] [-f <ok | warn | critcal | follow>] [-e <expect>]
[-s string] [-l] [-r <regex> | -R <case-insensitive regex>]
[-P string] [-m <min_pg_size>:<max_pg_size>] [-4|-6] [-N]
[-M <age>] [-A string] [-k string]
NOTE: One or both of -H and -I must be specified
Options:
-h, --help
Print detailed help screen
-V, --version
Print version information
-H, --hostname=ADDRESS
Host name argument for servers using host headers (virtual host)
Append a port to include it in the header (eg: example.com:5000)
-I, --IP-address=ADDRESS
IP address or name (use numeric address if possible to bypass DNS lookup).
-p, --port=INTEGER
Port number (default: 80)
-4, --use-ipv4
Use IPv4 connection
-6, --use-ipv6
Use IPv6 connection
-e, --expect=STRING
String to expect in first (status) line of server response (default: HTTP/1.)
If specified skips all other status line logic (ex: 3xx, 4xx, 5xx processing)
-s, --string=STRING
String to expect in the content
-u, --url=PATH
URL to GET or POST (default: /)
-P, --post=STRING
URL encoded http POST data
-N, --no-body
Don't wait for document body: stop reading after headers.
(Note that this still does an HTTP GET or POST, not a HEAD.)
-M, --max-age=SECONDS
Warn if document is more than SECONDS old. the number can also be of
the form "10m" for minutes, "10h" for hours, or "10d" for days.
-T, --content-type=STRING
specify Content-Type header media type when POSTing
-l, --linespan
Allow regex to span newlines (must precede -r or -R)
-r, --regex, --ereg=STRING
Search page for regex STRING
-R, --eregi=STRING
Search page for case-insensitive regex STRING
-a, --authorization=AUTH_PAIR
Username:password on sites with basic authentication
-A, --useragent=STRING
String to be sent in http header as "User Agent"
-k, --header=STRING
Any other tags to be sent in http header, separated by semicolon
-L, --link=URL
Wrap output in HTML link (obsoleted by urlize)
-f, --onredirect=<ok|warning|critical|follow>
How to handle redirected pages
-m, --pagesize=INTEGER<:INTEGER>
Minimum page size required (bytes) : Maximum page size required (bytes)
-w, --warning=DOUBLE
Response time to result in warning status (seconds)
-c, --critical=DOUBLE
Response time to result in critical status (seconds)
-t, --timeout=INTEGER
Seconds before connection times out (default: 10)
-v, --verbose
-----Original Message-----
From: admin at jpk236.com [mailto:admin at jpk236.com]
Sent: Monday, July 18, 2005 11:31 AM
To: Mohan, Ajit (CFSA)
Cc: nagios-users at lists.sourceforge.net
Subject: Re: [Nagios-users] Plug-in for https
When you run ./check_http -h, is there a -S option listed? Perhaps Nagios 1.2 doesn't support this option? I don't know. I never used Nagios 1.2 -- jumped right to Nagios 2.
As an example of how it should look/work:
#usr/local/libexec/nagios> ./check_http -S -H godaddy.com OK - HTTP/1.1 302 Object moved - 0.535 second response time
|time=0.535305s;;;0.000000 size=651B;;;0
- Justin Kulikowski
[ http://www.jpk236.com ]
Mohan, Ajit (CFSA) wrote:
> Yes, I have specified the host definition.
>
> I also tried
>
> ./check_http -H my domain name -S
> check_http: Invalid option - SSL is not available
>
> thanks
>
>
> -----Original Message-----
> From: Subhendu Ghosh [mailto:sghosh at sghosh.org]
> Sent: Monday, July 18, 2005 11:16 AM
> To: Mohan, Ajit (CFSA)
> Cc: admin at jpk236.com; pete at stuff-done.co.uk;
> nagios-users at lists.sourceforge.net
> Subject: RE: [Nagios-users] Plug-in for https
>
>
> -p only specifies port number - not protocol. Unless specified by -S, the default is to use HTTP, not HTTPS.
>
> Do you have a host definition for the service in the config?
>
> On Mon, 18 Jul 2005, Mohan, Ajit (CFSA) wrote:
>
>
>>I tried the following two commands
>>
>>./check_http -H "my domain name" -p 443 Invalid HTTP response received
>>from host on port 443
>>
>>
>>./check_http -H "my domain name:443"
>>Name or service not known
>>Unable to open TCP socket
>>
>>I am running nagios-1.2. Please help.
>>
>>Thanks
>>Ajit
>>
>>-----Original Message-----
>>From: Mohan, Ajit (CFSA)
>>Sent: Monday, July 18, 2005 10:58 AM
>>To: 'admin at jpk236.com'; 'pete at stuff-done.co.uk'
>>Cc: nagios-users at lists.sourceforge.net
>>Subject: RE: [Nagios-users] Plug-in for https
>>
>>Thanks guys for your response.
>>
>>After adding the line in the services.cfg I get this error
>>
>>" Service check command 'check_http -S -H "my domain name" specified
>>in service 'HTTP' for host 'domain name' not defined anywhere!"
>>
>>Thanks
>>
>>-----Original Message-----
>>From: admin at jpk236.com [mailto:admin at jpk236.com]
>>Sent: Monday, July 18, 2005 10:25 AM
>>To: Mohan, Ajit (CFSA)
>>Cc: nagios-users at lists.sourceforge.net
>>Subject: Re: [Nagios-users] Plug-in for https
>>
>>/usr/local/libexec/nagios#>./check_http -S -H your.domain.com
>>
>>
>>For more information, run:
>>
>>/usr/local/libexec/nagios#>./check_http -h
>>
>>
>> - Justin Kulikowski
>> [ http://www.jpk236.com ]
>>
>>Mohan, Ajit (CFSA) wrote:
>>
>>>Is there a plug-in available for monitoring https servers from Nagios
>>
>>?
>>
>>
>>-------------------------------------------------------
>>SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
>>from IBM. Find simple to follow Roadmaps, straightforward articles,
>>informative Webcasts and more! Get everything you need to get up to
>>speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&opÌk
>>_______________________________________________
>>Nagios-users mailing list
>>Nagios-users at lists.sourceforge.net
>>https://lists.sourceforge.net/lists/listinfo/nagios-users
>>::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
>>::: Messages without supporting info will risk being sent to /dev/null
>>
>
>
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list