1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-21 18:41:03 +00:00

knot: use perlpod documentation format

This commit is contained in:
Kim B. Heino 2021-03-31 16:08:49 +03:00 committed by Lars Kruse
parent cc6f29fb6c
commit ced47decaf

View file

@ -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 <b@bbbs.net>
=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: