0

I'm setting up Icinga for the first time.

I'd like to monitor websites, not their hosts (i.e. no ping, only http).

I've created a template like this:

template Host "generic-website" {
    check_command = "http"
}


apply Service "http" {
  import "generic-website"

  check_command = "http"

  assign where host.vars.http_address
}

but my "hosts" always show up even with a bogus address.

What is the proper way to check for http?

Thanks in advance

1
  • You'd probably need to define more custom attributes required by the 'http' CheckCommand as command parameters. Please add more details on the actual host object involved.
    – dnsmichi
    Oct 17, 2015 at 16:36

1 Answer 1

1

You can define a command like this:

# 'check_http' command definition
define command{
command_name    check_http
command_line    $USER1$/check_http -H $HOSTADDRESS$
}

And then calling this command as:

define service{
use                             genericservice
hostgroup_name                  hostgroup
service_description             Web Servers public site
notes                           www site check
check_command                   check_http
}
1
  • That's for Icinga 1.x but not Icinga 2 from the OP.
    – dnsmichi
    Oct 17, 2015 at 16:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .