|
NAMEgdnsd-plugin-extfile - gdnsd plugin for importing monitor data via file SYNOPSISExample service_types config: service_types => {
ext1 => {
plugin => "extfile",
file => "/var/tmp/ext1data", # required
direct => true, # default false
def_down => false, # default false
def_ttl => 600, # default max (limited by zonefile RRs)
}
ext2 => {
plugin => "extfile",
file => "ext2data", # def dir: /var/db/gdnsd/extfile/
},
}
Example plugin config using these service_types: plugins => {
multifo => {
www1 => {
service_types => ext2,
lb01 => 192.0.2.200,
lb02 => 192.0.2.201,
lb03 => 192.0.2.202,
}
www2 => {
service_types => [ ext1, http_status ],
lb01 => 192.0.2.203,
lb02 => 192.0.2.204,
lb03 => 192.0.2.205,
}
},
weighted => {
wwwcn => {
service_types => ext1,
lb01 = [ lb01.example.com., 99 ],
lb02 = [ lb02.example.com., 15 ],
lb03 = [ lb03, 1 ],
}
wwwz => {
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: /var/tmp/ext1data:
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
/var/db/gdnsd/extfile/ext2data:
192.0.2.200 => DOWN
192.0.2.201 => UP
192.0.2.202 => UP
DESCRIPTIONgdnsd-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). MODESAn extfile service_type can operate in one of two basic modes:
FILE FORMATThe 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-TYPEThe 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:
SEE ALSOgdnsd.config(5), gdnsd(8) The gdnsd manual. COPYRIGHT AND LICENSECopyright (c) 2012 Brandon L Black <blblack@gmail.com> This file is part of gdnsd. gdnsd is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. gdnsd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gdnsd. If not, see <http://www.gnu.org/licenses/>.
|