check_http

Marc Powell marc at ena.com
Thu Jan 12 16:41:08 CET 2006



> -----Original Message-----
> From: nagios-users-admin at lists.sourceforge.net [mailto:nagios-users-
> admin at lists.sourceforge.net] On Behalf Of Richard Gliebe
> Sent: Thursday, January 12, 2006 3:26 AM
> To: nagios-users at lists.sourceforge.net
> Subject: [Nagios-users] check_http
> 
> I'm checking some local websites with the check_http plugin.
> 
> [...]
> # 'check_http_alias' command definition
>         command_name    check_http_alias
>         command_line    $USER1$/check_http -H $ARG1$ -w $ARG2$ -c
$ARG3$
> ..
> ..
> where $ARG1$ is www.xyz.com ! $ARG2$ is 2 ! $ARG2$ is 5
> [...]
> 
> Works fine ;-)
> 
> But now I want to manipulate the output from:
> 
> [...]
> HTTP OK HTTP/1.1 200 OK - 42488 bytes in 0.013 seconds
> to
> www.xyz.com OK HTTP/1.1 200 OK - 42488 bytes in 0.013 seconds
> [...]
> 
> any thinks ?

Options that come to mind --
 - Modify check_http to output in the format you want 
 - create a wrapper script to use as your check_http_alias command that
takes the arguments above, executes check_http, capturing both it's text
output and exit code, prints the output you want and exits with the
check_http exit code.
- write your own version of check_http
- use the service_description to display the name of the alias instead
of manipulating the output of check_http. Each alias probably has its
own service definition I would expect.

--
Marc


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&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