Skip to content

Commit

Permalink
knot: use perlpod documentation format
Browse files Browse the repository at this point in the history
  • Loading branch information
kimheino authored and sumpfralle committed Mar 31, 2021
1 parent cc6f29f commit ced47de
Showing 1 changed file with 27 additions and 10 deletions.
37 changes: 27 additions & 10 deletions plugins/knot/knot
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit ced47de

Please sign in to comment.