2
0
mirror of https://github.com/munin-monitoring/contrib.git synced 2018-11-08 00:59:34 +01:00

Merge pull request #818 from dipohl/master

Category Tree: reduce number of categories, add pod doc
This commit is contained in:
dipohl 2017-02-22 18:22:02 +01:00 committed by GitHub
commit 7a268173f6
8 changed files with 106 additions and 10 deletions

View File

@ -206,7 +206,7 @@ elsif ( $ARGV[0] and $ARGV[0] eq "config" ) {
print "graph_title " . $mode->{'title'} . "\n";
print "graph_vlabel " . $mode->{'vlabel'} . "\n";
print "graph_args -l 0\n";
print "graph_category jabber\n";
print "graph_category chat\n";
foreach my $field_name ( keys %{ $mode->{'fields'} } ) {
my $label = $mode->{'fields'}->{$field_name}->{'label'} || $field_name;
my $desc = $mode->{'fields'}->{$field_name}->{'description'} || $mode->{'fields'}->{$field_name}->{'key'};

View File

@ -306,7 +306,7 @@ SUGGESTIONS
cat <<CONFIG
graph_title ejabberd resources - ${RESOURCE_TYPE//_/ }
graph_args --base $RESOURCE_BASE --lower-limit 0
graph_category jabber
graph_category chat
CONFIG
;;
esac

View File

@ -144,7 +144,7 @@ if ARGV.first == 'config'
puts <<CONFIG
graph_title Ejabberd Log
graph_vlabel total
graph_category jabber
graph_category chat
graph_args -l 0
CONFIG
end

View File

@ -33,7 +33,7 @@ graph_title ejabberd stats - connected users
graph_args --base 1000 --lower-limit 0
graph_vlabel users
graph_info The number of currently connected users, as of ejabberd report
graph_category jabber
graph_category chat
graph_order active
connected.label Connected users
connected.draw AREA
@ -52,7 +52,7 @@ function ejabberd_stats_s2s() {
graph_title ejabberd stats - s2s connections
graph_args --lower-limit 0
graph_vlabel active connections
graph_category jabber
graph_category chat
graph_order incoming outgoing
incoming.label incoming s2s
incoming.info ejabberdctl $ejabberdctl_cmd_in

View File

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 38 KiB

View File

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 34 KiB

View File

@ -46,7 +46,7 @@ def main():
if mode == "config":
print "graph_title Prosody C2S Connections"
print "graph_vlabel users"
print "graph_category Prosody"
print "graph_category chat"
print "all_client_connections.label client connections"
print "secure_client_connections.label secure client connections"
@ -81,7 +81,7 @@ def main():
if mode == "config":
print "graph_title Prosody S2S Connections"
print "graph_vlabel servers"
print "graph_category Prosody"
print "graph_category chat"
print "outgoing_connections.label outgoing connections"
print "incoming_connections.label incoming connections"
@ -101,7 +101,7 @@ def main():
if mode == "config":
print "graph_title Prosody Client Presence"
print "graph_vlabel clients"
print "graph_category Prosody"
print "graph_category chat"
print "available.label Avaible Clients"
print "chat.label Ready for Chat Clients"
@ -129,7 +129,7 @@ def main():
print "graph_args --base 1000 -l 0"
print "graph_scale no"
print "graph_vlabel uptime in days"
print "graph_category Prosody"
print "graph_category chat"
print "graph_order uptime"
print "uptime.draw AREA"
print "uptime.min U"
@ -153,7 +153,7 @@ def main():
if mode == "config":
print "graph_title Prosody Registered Users"
print "graph_vlabel users"
print "graph_category Prosody"
print "graph_category chat"
base_dir = os.environ.get('internal_storage_path', "/var/lib/prosody")
if os.path.isdir(base_dir):
@ -181,3 +181,99 @@ def listfiles(folder):
if __name__ == '__main__':
main()
### Here starts the prosody_ plugin documentation, intended to be used with munindoc and in plugin gallery
"""
=head1 NAME
prosody_ - Munin wildcard-plugin to monitor a L<Prosody|http://prosody.im> xmpp server.
This wildcard plugin provides at the moment only the suffixes C<c2s>, C<s2s>, C<presence>, C<uptime> and C<users> suffixes.
=head1 INSTALLATION
It is very simple to install the plugin.
=over 2
cd /usr/share/munin/plugins (or your munin plugins directory)
wget https://github.com/jarus/munin-prosody/raw/master/prosody_
chmod 755 prosody_
ln -s /usr/share/munin/plugins/prosody_ /etc/munin/plugins/prosody_c2s
ln -s /usr/share/munin/plugins/prosody_ /etc/munin/plugins/prosody_s2s
ln -s /usr/share/munin/plugins/prosody_ /etc/munin/plugins/prosody_presence
ln -s /usr/share/munin/plugins/prosody_ /etc/munin/plugins/prosody_uptime
ln -s /usr/share/munin/plugins/prosody_ /etc/munin/plugins/prosody_users
=back
After the installation you need to restart your munin-node:
=over 2
service munin-node restart
=back
=head1 CONFIGURATION
When you want to change the default host (localhost) and port (5582) do it in a file named prosody
placed in the directory /etc/munin/plugin-conf.d/ with a config like this:
=over 2
[prosody_*]
env.host example.com
env.port 5582
=back
If you want to get the number of registered users, add the following lines to /etc/munin/plugin-conf.d/prosody:
=over 2
[prosody_users]
user prosody
group prosody
=back
=head1 VERSION
Version 2.2
=head1 BUGS
None known
=head1 AUTHOR
(C) 2010 Christoph Heer <Christoph.Heer@googlemail.com>
=head1 LICENSE
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the \"Software\"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
=cut
"""