###############################################################################
# GOOGLE - SAMPLE OBJECT CONFIG FILE FOR MONITORING A WEBSITE
#
# Last Modified: 04/04/2025
#
###############################################################################

###############################################################################
# HOST DEFINITION
###############################################################################

# Define the host for Google

define host {
    use             xiwizard_website_host
    host_name       Google
    alias           Google
    address         www.google.com
    contacts        nagiosadmin
}

###############################################################################
# HOST GROUP DEFINITION
###############################################################################

# Define a new hostgroup including the newly created Google host

define hostgroup {
    hostgroup_name  websites
    alias           Websites
    members         Google
}

# Define a new hostgroup for switches

define hostgroup {
    hostgroup_name  switches
    alias           Switches
}

###############################################################################
# SERVICE DEFINITIONS
###############################################################################

# "HTTP" check

define service {
    use                     xiwizard_website_http_service
    host_name               Google
    service_description     HTTP
    check_command           check_xi_service_http!www.google.com!80
    contacts                nagiosadmin
}

# "SSL Certificate" check

define service {
    use                     xiwizard_website_http_cert_service
    host_name               Google
    service_description     SSL Certificate
    check_command           check_xi_service_http_cert!30 --sni
    contacts                nagiosadmin
}

# "PING" check

define service {
    use                     xiwizard_website_ping_service
    host_name               Google
    service_description     PING
    check_command           check_xi_service_ping!3000.0!80%!5000.0!100%
    contacts                nagiosadmin
}

# "Jitter" check

define service {
    use                     xiwizard_website_ping_service
    host_name               Google
    service_description     Jitter
    check_command           check_jitter!15!30
    contacts                nagiosadmin
}

# "DNS Resolution" check

define service {
    use                     xiwizard_website_dns_service
    host_name               Google
    service_description     DNS Resolution
    check_command           check_xi_service_dns
    contacts                nagiosadmin
}

###############################################################################
# SERVICE GROUP DEFINITION
###############################################################################

# Define a new servicegroup to include the HTTP check in

define servicegroup {
    servicegroup_name       web-services
    alias                   Web Services
    members                 Google,HTTP
}

# Define a new servicegroup to include the SSL check in

define servicegroup {
    servicegroup_name       ssl-certificates
    alias                   SSL Certificates
    members                 Google,SSL Certificate
}