Skip to content

Latest commit

 

History

History
 
 

availability

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

CoreDNS availability

Availability plugin for CoreDNS.

Uses the coreDNS dns response metrics and error rcodes to get the correct and invalid availability.

By default the plugin will measure as errors the SERVFAIL rcodes, however this can be overwrite with a regex using custom_rcode_regex option.

Options

  • filter: (Optional) A prometheus filter string using concatenated labels (e.g: exported_service="alertmanager-api",service="alertgram")
  • custom_rcode_regex: (Optional) Custom regex to match error rcodes (e.g: (NXDOMAIN|SERVFAIL|FORMERR)). More codes here. If not set it will be used SERVFAIL by default.

Metric requirements

  • coredns_dns_responses_total: From coreDNS.

Usage examples

Without filter nor custom rcode regex

sli:
  plugin:
    id: "sloth-common/coredns/availability"

Default rcode and custom filter

sli:
  plugin:
    id: "sloth-common/coredns/availability"
    options:
      filter: job="kube-dns",server="dns://:53",service="kube-dns", zone="."

Custom rcode without filters

sli:
  plugin:
    id: "sloth-common/coredns/availability"
    options:
      custom_rcode_regex: (NXDOMAIN|SERVFAIL|FORMERR)

Custom rcode with filters

sli:
  plugin:
    id: "sloth-common/coredns/availability"
    options:
      filter: job="kube-dns",server="dns://:53",service="kube-dns", zone="."
      custom_rcode_regex: (NXDOMAIN|SERVFAIL|FORMERR)