# netdata python.d.plugin configuration for httpcheck
#
# This file is in YaML format. Generally the format is:
#
# name: value
#
# There are 2 sections:
#  - global variables
#  - one or more JOBS
#
# JOBS allow you to collect values from multiple sources.
# Each source will have its own set of charts.
#
# JOB parameters have to be indented (using spaces only, example below).

# ----------------------------------------------------------------------
# Global Variables
# These variables set the defaults for all JOBs, however each JOB
# may define its own, overriding the defaults.

# update_every sets the default data collection frequency.
# If unset, the httpcheck default is used, which is at 3 seconds.
# update_every: 1

# priority controls the order of charts at the netdata dashboard.
# Lower numbers move the charts towards the top of the page.
# If unset, the default for python.d.plugin is used.
# priority: 60000

# penalty indicates whether to apply penalty to update_every in case of failures.
# Penalty will increase every 5 failed updates in a row. Maximum penalty is 10 minutes.
# penalty: yes

# chart_cleanup sets the default chart cleanup interval in iterations.
# A chart is marked as obsolete if it has not been updated
# 'chart_cleanup' iterations in a row.
# They will be hidden immediately (not offered to dashboard viewer,
# streamed upstream and archived to backends) and deleted one hour
# later (configurable from netdata.conf).
# -- For this plugin, cleanup MUST be disabled, otherwise we lose response
#    time charts
chart_cleanup: 0

# Autodetection and retries do not work for this plugin

# ----------------------------------------------------------------------
# JOBS (data collection sources)
#
# The default JOBS share the same *name*. JOBS with the same name
# are mutually exclusive. Only one of them will be allowed running at
# any time. This allows autodetection to try several alternatives and
# pick the one that works.
#
# Any number of jobs is supported.
#
# -------------------------------
# ATTENTION: Any valid configuration will be accepted, even if initial connection fails!
# -------------------------------
#
# There is intentionally no default config, e.g. for 'localhost'

# job_name:
#     name: myname            # [optional] the JOB's name as it will appear at the
#                             #   dashboard (by default is the job_name)
#                             #   JOBs sharing a name are mutually exclusive
#     update_every: 3         # [optional] the JOB's data collection frequency
#     priority: 60000         # [optional] the JOB's order on the dashboard
#     penalty: yes            # the JOB's penalty
#     timeout: 1              # [optional] the timeout when connecting, supports decimals (e.g. 0.5s)
#     url: 'http[s]://host-ip-or-dns[:port][path]'
#                             # [required] the remote host url to connect to. If [:port] is missing, it defaults to 80
#                             #   for HTTP and 443 for HTTPS. [path] is optional too, defaults to /
#     header: {'Content-Type': 'application/json'}
#                             # [optional] the HTTP header sent with the request.
#     method: GET             # [optional] the HTTP request method (POST, PUT, DELETE, HEAD etc.)
#     redirect: yes           # [optional] If the remote host returns 3xx status codes, the redirection url will be
#                             #   followed (default).
#     body: {'key': 'value'}  # [optional] the body sent with the request (e.g. POST, PUT, PATCH).
#     status_accepted:        # [optional] By default, 200 is accepted. Anything else will result in 'bad status' in the
#                             #   status chart, however: The response time will still be > 0, since the
#                             #   host responded with something.
#                             #   If redirect is enabled, the accepted status will be checked against the redirected page.
#       - 200                 # Multiple status codes are possible. If you specify 'status_accepted', you would still
#                             #   need to add '200'. E.g. 'status_accepted: [301]' will trigger an error in 'bad status'
#                             #   if code is 200. Do specify numerical entries such as 200, not 'OK'.
#     regex: None             # [optional] If the status code is accepted, the content of the response will be searched for this
#                             #   regex (if defined). Be aware that you may need to escape the regex string. If redirect is enabled,
#                             #   the regex will be matched to the redirected page, not the initial 3xx response.

# Simple example:
#
# jira:
#   url: 'https://jira.localdomain/'


# Complex example:
#
# cool_website:
#   url: 'http://cool.website:8080/home'
#   status_accepted:
#     - 200
#     - 204
#   regex: <title>My cool website!<\/title>
#   timeout: 2

# This plugin is intended for simple cases. Currently, the accuracy of the response time is low and should be used as reference only.

