Unable to remove Ping Check from Web Servers

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
aaronrosenberg
Posts: 2
Joined: Tue Mar 19, 2019 4:35 pm

Unable to remove Ping Check from Web Servers

Post by aaronrosenberg »

All,

These websites are hosted in azure and don't allow pings. Based on several forum posts i've modified the check commands, as well as edited the default template, but now i'm stumped. Can anyone help me remove the ping status check?

Image

Here is my config.

Code: Select all

define host {

    name                            web-server          ; The name of this host template
    use                             generic-host            ; Inherit default values from the generic-host template
    check_period                    24x7                    ; By default, Windows servers are monitored round the clock
    check_interval                  5                       ; Actively check the server every 5 minutes
    retry_interval                  1                       ; Schedule host check retries at 1 minute intervals
    max_check_attempts              10                      ; Check each server 10 times (max)
    check_command                   check_tcp!443       ; Default command to check if servers are "alive"
    notification_period             24x7                    ; Send notification out at any time - day or night
    notification_interval           60                      ; Resend notifications every 30 minutes
    notification_options            d,r                     ; Only send notifications for specific host states
    contact_groups                  admins                  ; Notifications get sent to the admins by default
    hostgroups                      websites         ; Host groups that Windows servers should be a member of
    register                        0                       ; DON'T REGISTER THIS - ITS JUST A TEMPLATE
    retain_status_information       0
    retain_nonstatus_information    0
  }
define host {

    use                     web-server           ; Inherit default values from a template
    host_name               beacon.domain.com               ; The name we're giving to this host
    alias                   Beacon       ; A longer name associated with the host
    address                 beacon.domain.com            ; IP address of the host
    check_command        check_tcp!443
    hostgroups              websites
}

define service {

    use                     generic-service
    host_name               beacon.domain.com
    service_description     check_beacon_certificate
    check_command           check_http! --ssl -p 443 --sni -C 90,14 -u https://beacon.domain.com/login///
}
define service {

    use                     generic-service
    host_name               beacon.domain.com
    service_description     check_beacon_website
    check_command           check_http! -u https://beacon.domain.com/login/// -p 443 -w 400 -c 5000 --ssl --sni
}


scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Unable to remove Ping Check from Web Servers

Post by scottwilkerson »

My guess would be you have a ping service somewhere that has the hostgroup websites attached to it

I would grep your nagios etc directory for PING to find it, something like:

Code: Select all

grep PING -R /usr/local/nagios/etc
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
aaronrosenberg
Posts: 2
Joined: Tue Mar 19, 2019 4:35 pm

Re: Unable to remove Ping Check from Web Servers

Post by aaronrosenberg »

Thank you i found this innocuous statement. I added a statement to comment out websites group.

define service {

use generic-service ; Inherit values from a template
hostgroup_name *,!cradlepoints,!websites ; The name of the host the service is associated with
service_description PING ; The service description
check_command check_ping!400.0,20%!1000.0,100% ; The command used to monitor the service
check_interval 10 ; Check the service every 5 minutes under normal conditions
#retry_interval 45 ; Re-check the service every minute until its final/hard state is determined
notification_options c,r,f
contact_groups admins
}
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Unable to remove Ping Check from Web Servers

Post by scottwilkerson »

That should do it!
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked