For When You Can't Have The Real Thing
[ start | index | login ]
start > nagios > check url

check url

Created by dave. Last edited by dave, 11 years and 274 days ago. Viewed 6,065 times. #2
[diff] [history] [edit] [rdf]
(20 August 2012)


I want to monitor a particular URL through nagios, not just http: server availability.



# 'check_http_url' command definition
define command{
        command_name    check_http_url
        command_line    $USER1$/check_http -I $HOSTADDRESS$ -u $ARG1$


define(`DOHTTPURL',`define service{
    use                 generic-service
    host_name           $1
    service_description $2
    check_command       check_http_url!$2
    normal_check_interval 20
    retry_check_interval  5
} ')dnl

Sample .m4 entry:


In our case, the __gcc.html is a page created by a script so that nagios has a specific target to hit. On one of my hosting systems, if the system is misconfigured, you get the default page, which isn't detectable if you just pull index.html. So by looking for a specific, unique file, you can catch server misconfigurations as well.

(Based on >>this)

no comments | post comment
This is a collection of techical information, much of it learned the hard way. Consider it a lab book or a /info directory. I doubt much of it will be of use to anyone else.

Useful: | Copyright 2000-2002 Matthias L. Jugel and Stephan J. Schmidt