From ced47decaf24dd3f80c3c15dbd7d3ba6e5d1f9da Mon Sep 17 00:00:00 2001 From: "Kim B. Heino" Date: Wed, 31 Mar 2021 16:08:49 +0300 Subject: [PATCH] knot: use perlpod documentation format --- plugins/knot/knot | 37 +++++++++++++++++++++++++++---------- 1 file changed, 27 insertions(+), 10 deletions(-) diff --git a/plugins/knot/knot b/plugins/knot/knot index 85e6bee0..df7f1723 100755 --- a/plugins/knot/knot +++ b/plugins/knot/knot @@ -1,21 +1,38 @@ -#!/usr/bin/python3 -tt -# -*- coding: utf-8 -*- +#!/usr/bin/env python3 # pylint: disable=invalid-name # pylint: enable=invalid-name """Munin plugin to monitor Knot DNS server. -Copyright 2017, Kim B. Heino, b@bbbs.net, Foobar Oy -License GPLv2+ +=head1 NAME -This plugin requires Munin config /etc/munin/plugin-conf.d/knot: +knot - monitor Knot DNS server statistics -[knot] -user root +=head1 APPLICABLE SYSTEMS +Systems with Knot DNS server installed. -#%# capabilities=autoconf -#%# family=auto +=head1 CONFIGURATION + +This plugin requires config: + + [knot] + user root + +=head1 AUTHOR + +Kim B. Heino + +=head1 LICENSE + +GPLv2 + +=head1 MAGIC MARKERS + + #%# family=auto + #%# capabilities=autoconf + +=cut """ import os @@ -175,7 +192,7 @@ def main(args): """Do it all main program.""" values = get_stats() if len(args) > 1 and args[1] == 'autoconf': - print('yes' if values else 'no') + print('yes' if values else 'no (knot is not running)') elif len(args) > 1 and args[1] == 'config': print_config(values) else: