-1

This ist my current setup:

Host config:

define host{

use     generic-host        ; Inherit default values from a template

host_name       A+A         ; The name we're giving to this host

alias       A+A Objektausstattung Router    ; A longer name associated with the host

address         https://87.139.203.190:444  ; IP address of the host

hostgroups      Router      ; Host groups this host is associated with

}

Service config:

define service{

use     generic-service     ; Inherit default values from a template

host_name       A+A

service_description HTTP

check_command   check_http

}

I´ll get this error from Nagios:

check_icmp: Failed to resolve https://87.139.203.190:444

What am I doing wrong here ?

Abhishek Ghosh
  • 2,593
  • 3
  • 27
  • 60
user13272
  • 1
  • 1

2 Answers2

0

Nagios tries to resolve to ip-address and port. Try ip-address only.

address         https://87.139.203.190  ; IP address of the host
rvaneijk
  • 663
  • 6
  • 20
0

Your host definition should only specify an IP address for the 'address'. The URL is not an attribute of the host, but of the HTTP check your want to perform.

The Service definition specifies the check_command, which is in turn defined in the checkcommands.cfg file. This will specify exactly what command is to be run, possibly using additional parameters passed.

You will probably want to pass the port number as a parameter, and that you are to use HTTPS. How to do this will depend on your settings. For example, you could use this in your checkcommands.cfg:

define command{
    command_name    check_https
    command_line    $USER1$/check_http -t 12 -H $HOSTADDRESS$ -f ok --ssl=1 -u "$ARG1$" -p "$ARG2$" -w $ARG3$ -c $ARG4$
    }

Then you could configure your service with a checkcommand thus:

check_command check_https!/!444!1!5

This would check for the url http://87.139.203.190:444/, giving a warning if it takes over 1s and a critical if it takes over 5s to complete. TLSv1 would be used (else you might get a false positive on web servers with Poodle protection).

Steve Shipway
  • 3,754
  • 3
  • 22
  • 39