Skip to content
Snippets Groups Projects
Select Git revision
  • 4cf050d26c745c80ce17d03a4d3973897ecb9995
  • master default protected
  • eol-script
  • simple-task/7248-eol-check-add-node-22
  • 6877_check_iml_deployment
5 results

check_dns_responsetime.md

Blame
  • CHECK_DNS_RESPONSETIME

    Introduction

    check_dns_responsetime check dns response time of all dns servers found in local /etc/resolv.conf

    Requirements

    • nslookup query Internet name servers

    Syntax

    ______________________________________________________________________
    
    CHECK_DNS_RESPONSETIME 
    v1.4
    
    (c) Institute for Medical Education - University of Bern
    Licence: GNU GPL 3
    ______________________________________________________________________
    
    Loop over all defined dns servers (in /etc/resolv.conf) and check
    each:
      - detect of port 53 is available (DNS service)
      - 5x check time of a nslookup for current host (www.example.com)
    
    The a warning / critical response will be reached if the maximum time
    of nslookup on the first dns server reaches a limit.
    
    The critical response will be returned if the first of the 
    nameservers is not available.
    
    An unknown response will be returned if the current hostname 
    (hostname -f) is no FQDN.
    
    SYNTAX:
    check_dns_responsetime [ -w VALUE -c VALUE -h ]
    
    OPTIONS:
    
        -w VALUE       warning level  (default: 300)
        -c VALUE       critical level (default: 1000)
        -h or --help   Show this help.
    

    Parameters

    (none)

    Examples

    $ check_disk-io -m io returns

    ./check_dns_responsetime
    OK: DNS check for www.example.com - found maximum was 46 ms - OK: all nameservers are reachable
    
    ---------- 1 - 8.8.4.4 
    8.8.4.4 #1 >>> 36 ms
    8.8.4.4 #2 >>> 28 ms
    8.8.4.4 #3 >>> 24 ms
    8.8.4.4 #4 >>> 30 ms
    8.8.4.4 #5 >>> 31 ms
    max: 36 ms
     ^
     :
     +--- 1st nameserver is relevant for total status of the check. Limits are warning=300 and critical=1000
    
    
    ---------- 2 - 8.8.8.8 
    8.8.8.8 #1 >>> 39 ms
    8.8.8.8 #2 >>> 35 ms
    8.8.8.8 #3 >>> 33 ms
    8.8.8.8 #4 >>> 46 ms
    8.8.8.8 #5 >>> 43 ms
    max: 46 ms
    
     |response-8-8-4-4=36;; response-8-8-8-8=46;;```