#
# PCP netcheck PMDA config file - see pmdanetcheck(1) and PMDA(3)
#
# NB. When SELinux is in use, the ping modules require the 'pcp'
# group to be able to create ICMP Echo sockets, see pmdanetcheck(1).

[pmda]
# List of enabled modules
#modules = dns_lookup,dns_reverse,ping,ping_latency,ping_loss,port_open,url_get
modules = ping

# List of hosts to check as comma-separated list,
# can be overridden for each module in their module-specific sections
# DGW will be translated to the default gateway IP address,
# DNS will be translated to the nameserver IPs from /etc/resolv.conf,
# NTP will be translated to the NTP servers from /etc/chrony.conf
hosts = DGW,DNS

# Specifies whether to run checks in the background or on demand.  Both
# of these approaches have their own advantages and disadvantages; the
# PMDA must reply to clients within ~5s or it will be disabled so checks
# taking longer than ~5s cannot run on demand.  However, on-demand checks
# always represent the current state and are run only when needed.  OTOH,
# a rogue user may cause issues by running lots of clients continuously.
# Can be overridden for each module in their module-specific sections
background_check = True

# Specifies whether the modules should check the hosts in parallel,
# can be overridden for each module in their module-specific sections
check_hosts_parallel = True

# Specifies the interval between checks used by all netcheck modules,
# can be overridden for each module in their module-specific sections
check_interval = 1min

# Specifies whether the interval between checks should be adjusted for
# the duration of previous check (deduct the time of check), so for
# example with interval 1m and previous check 10s, pause for 50s.
# Can be overridden for each module in their module-specific sections
align_interval = True

# Specifies whether the PMDA should exit when a module fails to init,
# module configuration failures are always treated as fatal errors
module_failure_fatal = True


#
# Module configurations
#

# This module does DNS lookups
#
# Configuration options:
# Name    - type - default - description
#
# timeout - int  - 1       : seconds
# family  - str  - both    : report ipv4/ipv6/both type results
[dns_lookup]
timeout = 1
family = both

# This module does reverse DNS lookups
#
# Configuration options:
# Name    - type - default - description
#
# timeout - int  - 1       : seconds
[dns_reverse]
timeout = 1

# This module pings the hosts (using ping(1))
#
# Configuration options:
# Name    - type - default - description
#
# timeout - int  - 1       : seconds
# count   - int  - 1       : ping count
[ping]
timeout = 1
count = 1

# This module checks for latency against the hosts (using ping(1))
#
# Configuration options:
# Name    - type - default - description
#
# timeout - int   - 2      : seconds
# count   - int   - 2      : ping count
[ping_latency]
timeout = 2
count = 2

# This module checks for packet loss against the hosts (using ping(1))
#
# Configuration options:
# Name    - type - default - description
#
# timeout - int   - 2      : seconds
# count   - int   - 5      : ping count
[ping_loss]
timeout = 2
count = 5

# This module checks if TCP ports are reachable and open
#
# Configuration options:
# Name    - type - default - description
#
# timeout - int  - 1       : seconds
# ports   - str  - unset   : comma-separated list of ports to check
[port_open]
timeout = 1
#ports = 80,443

# This module downloads (gets) the specified URL
# %%HOST will be replaced with the host or IP,
# the content will be searched for the string
#
# Configuration options:
# Name    - type - default - description
#
# timeout - int  - 3       : seconds
# url     - str  - unset   : URL to get
# string  - re   - unset   : string to search for in the content
[url_get]
timeout = 3
#url = http://%%HOST/
#string = OK
