gdnsd-plugin-extfile(8)

gdnsd-plugin-extfile8

Gdnsd plugin for importing monitor data via file

Usage

Example service_types config:

plugin => "extfile",

file => "/var/tmp/ext1data", # required

def_ttl => 600, # default max (limited by zonefile RRs)

plugin => "extfile",

file => "ext2data", # def dir: //lib/gdnsd/extfile/

Example plugin config using these service_types:

service_types => ext2,

lb01 => 192.0.2.200,

lb02 => 192.0.2.201,

lb03 => 192.0.2.202,

service_types => [ext1, http_status] ,

lb01 => 192.0.2.203,

lb02 => 192.0.2.204,

lb03 => 192.0.2.205,

service_types => ext1,

lb01 = [lb01.example.com., 99] ,

lb02 = [lb02.example.com., 15] ,

lb03 = [lb03, 1] ,

service_types => ext1,

lb01 => [192.0.2.203, 10] ,

lb02 => [192.0.2.204, 15] ,

lb03 => [192.0.2.205, 20] ,

Example extfile data defining the resource + service_types specified above:

192.0.2.203 => UP/300

192.0.2.204 => DOWN/242

192.0.2.205 => DOWN/102

lb01.example.com. => UP/60

lb02.example.com. => UP/30

lb03 => UP/45

192.0.2.200 => DOWN

192.0.2.201 => UP

192.0.2.202 => UP

Overview

gdnsd-plugin-extfile is a monitor plugin that imports monitor results from an external file (which is probably populated by some script/tool from some other monitoring software).

Modes

An extfile service_type can operate in one of two basic modes:

Monitor Mode (default)

In monitor mode, the standard parameter "interval" is used as a repeating timer. At each interval, the file is loaded for state updates (but any direct TTL values in the file are ignored).

The updates from the file are fed into the standard core monitoring system by the same mechanisms as normal monitoring plugins (e.g. http_status). This means they will be subject to the standard anti-flap measures via the standard threshold parameters ("up_thresh", "down_thresh", "ok_thresh") before affecting the final status seen by resolution plugins.

This mode is appropriate if the updates being processed are relatively-raw updates from individual monitor checks.

Direct Mode

In direct mode, the standard parameter "interval" is used only as a hint to the filesystem-watching code to try to check for updates no less often than the supplied interval. However in many cases (especially e.g. Linux with inotify() support) updates to the file may be picked up much sooner, perhaps nearly instantly.

There will be a short (~1 second) settling delay after detecting any update in order to coalesce any rapid-fire updates into a single transaction.

The results contained in the file (state and/or TTL per-resource) are applied directly as final monitoring results and made immediately available to resolution plugins for decision-making.

This mode is appropriate if the updates are from processed monitoring results that have already been through e.g. anti-flap measures before reaching gdnsd.

File format

The file is formatted using the same "vscf" language that's used for the main config file and the geoip nets databases. The expected data format is a simple key-value hash at the top level, where the keys are the monitored IP address or CNAME values from the monitor plugins and the values are of the form form "state[/ttl]", where state is either "UP" or "DOWN" and the optional ttl is an integer ttl value. TTL values are only used for "direct"-mode service_types; the TTL is calculated in the normal fashion based on intervals and thresholds for "monitor"-mode.

Configuration - per-service-type

The universal, plugin-neutral service_type parameters all apply in their usual sense: "up_thresh", "ok_thresh", "down_thresh", and "interval" (keeping in mind the notes above about how each mode uses "interval"). "timeout" is ignored. extfile-specific parameters:

direct

Boolean, default false. Sets the monitoring mode to "direct" if true, otherwise mode defaults to "monitor".

file

String filename, required. This sets the name of the file to load results from. If the pathname is not absolute, it will be considered relative to //lib/gdnsd/extfile/.

def_ttl

Integer TTL, default is max (which will be limited by zonefile RR TTL values). In "direct" mode this will be set as the monitored TTL if no optional TTL is supplied in the file data for a given resource. It is ignored in "monitor" mode.

def_down

Boolean, default false. This sets the default disposition of configured resources which are missing from the file data (which will generate warnings). If true, these resources behave as if the file data marked them "DOWN", otherwise they default to "UP".

Releases

7 releases since Debian 8 (Jessie); the text changed 6 times.

  1. 8
  2. 9
  3. 10
  4. 11
  5. 12
  6. 13
  7. Arch

From gdnsd 3.8.3-2 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.