1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-22 02:51: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 #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# pylint: disable=invalid-name # pylint: disable=invalid-name
# pylint: enable=invalid-name # pylint: enable=invalid-name
"""Munin plugin to monitor Knot DNS server. """Munin plugin to monitor Knot DNS server.
Copyright 2017, Kim B. Heino, b@bbbs.net, Foobar Oy =head1 NAME
License GPLv2+
This plugin requires Munin config /etc/munin/plugin-conf.d/knot: knot - monitor Knot DNS server statistics
[knot] =head1 APPLICABLE SYSTEMS
user root
Systems with Knot DNS server installed.
#%# capabilities=autoconf =head1 CONFIGURATION
#%# family=auto
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 import os
@ -175,7 +192,7 @@ def main(args):
"""Do it all main program.""" """Do it all main program."""
values = get_stats() values = get_stats()
if len(args) > 1 and args[1] == 'autoconf': 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': elif len(args) > 1 and args[1] == 'config':
print_config(values) print_config(values)
else: else: