nagios check_ping: Invalid hostname/address

Posted by lgt on Ask Ubuntu See other posts from Ask Ubuntu or by lgt
Published on 2012-06-25T13:11:24Z Indexed on 2012/06/26 15:24 UTC
Read the original article Hit count: 864

Filed under:

I'm trying to setup nagios for a host what has the following webroot: www.example.com/ui/html/, but nagios won't accept as host this kind of host path check_ping: Invalid hostname/address.

Is there a workaround for this issue?

# Define a host for the local machine
define host{
        use                     linux-server            ; Name of host template to use
                                                        ; This host definition will inherit all variables that are defined
                                                        ; in (or inherited by) the linux-server host template definition.
        host_name               example.com/ui/html
        alias                   example.com/ui/html
        address                 www.example.com/ui/html/
        }
###############################################################################
###############################################################################
#
# SERVICE DEFINITIONS
#
###############################################################################
###############################################################################
# Define a service to check HTTP on the local machine.
# Disable notifications for this service by default, as not all users may have HTTP enabled.
define service{
        use                             generic-service
        name                            http-service
        service_description             HTTP
        is_volatile                     0
        check_period                    24x7
        max_check_attempts              3
        normal_check_interval           5
        retry_check_interval            1
        notifications_enabled           1
        notification_interval           0
        notification_period             24x7
        notification_options            c,r
        check_command                   check_http!$HOSTADDRESS$
        register 0
     }

Thanks

© Ask Ubuntu or respective owner

Related posts about nagios3