1

I configured Centreon CES as monitoring-system - now I'm facing the following problem:

There is a host with domain example.com which resolves to 123.123.123.123. This host is not configured by me and shows content if user visits http://example.com but 404 if user visits http://123.123.123.123 .

Well, now Centreon shows WARNING of course, because the given domain-name is resolved to the ip - and this returns 404.

Now I tried to modify the check_http-command as follows:

$USER1$/check_http -H $HOSTADDRESS$ $ARG1$

as argument I tried to give

ARG1 => -u www.example.com

What I thought was that the system combines it to

$USER1$/check_http -H $HOSTADDRESS$ -u www.example.com 

But it does not. What would be the correct way to get the result I want to get?

MyFault
  • 893
  • 3
  • 14
  • 35

1 Answers1

3

You want the final command to end up with -H www.example.com and -I $HOSTADDRESS$.

(-u would be for something like -u /index.php.)

You should make another command like this:

define command {
        command_name    check_http_name
        command_line    $USER1$/check_http -I $HOSTADDRESS$ -H $ARG1$
}

Which would then be used in the form check_http_name!www.example.com in a service definition.

(You could also omit the -I part entirely, as long as your domain name resolves correctly in DNS.)

See check_http --help output for details on the difference between -I and -H.

Keith
  • 4,627
  • 14
  • 25