plugin categories: reorganize multiple plugins

This commit is contained in:
Lars Kruse 2018-03-28 04:33:45 +02:00
parent 5a45d49760
commit 34eeebbe37
19 changed files with 21 additions and 29 deletions

View File

@ -11,6 +11,7 @@ case $1 in
cat <<'EOM'
graph_title Number of young files at backup directory
graph_vlabel number
graph_category backup
autobackup.label number
autobackup.critical 1:
EOM

View File

@ -148,7 +148,7 @@ if (sys.argv.__len__()>1) and (sys.argv[1]=="config"):
gr_simple=graph.replace("-","_").replace(":","_")
gr_pretty=graph.replace("_"," ").title()
gr=graph.replace("-","_").replace(":","_")
graphdefaults={"graph_title":gr_pretty,"graph_vlabel":gr_pretty,"graph_category":"osd"}
graphdefaults={"graph_title":gr_pretty,"graph_vlabel":gr_pretty,"graph_category":"fs"}
graphsettings=dict(graphdefaults.items()+graphsettings.items())
print "multigraph %s" % (gr_simple)
print "\n".join(["%s %s" % setting for setting in graphsettings.items()])
@ -182,7 +182,3 @@ else:
for osd in osds:
print "multigraph %s.osd%s" % (gr,osd)
print "osd%s_%s.value %s" % (osd,gr,data[osd][graph])
# for Munin Plugin Gallery
# graph_category fs

View File

@ -14,7 +14,6 @@ plugin="${0##*/}" # name of plugin
pidfile="$MUNIN_PLUGSTATE/munin.$plugin.pid"
cache="$MUNIN_PLUGSTATE/munin.$plugin.value"
graph="$plugin"
section="system:cpu"
style="AREA"
cpus=$(grep -c ^processor /proc/cpuinfo)
@ -52,7 +51,7 @@ run_config() {
run_daemon
cat << EOF
graph_title $graph
graph_category $section
graph_category 1sec
graph_vlabel average cpu use %
graph_scale no
graph_total All CPUs
@ -87,6 +86,3 @@ exit 0
# acquire which needs a different pid than watchdog, otherwise watchdog
# could/will kill itself when expiring before the watched process is killed.
# not a POSIX feature.
# for Munin Plugin Gallery
# graph_category 1sec

View File

@ -93,7 +93,7 @@ def print_adapter_config(dvb_adapter) :
print ('graph_title DVB Femon Sensors '+dvb_adapter[0])
print ('graph_args '+os.getenv('graph_args','--lower-limit 0 --upper-limit 100 --rigid'))
print ('graph_vlabel Quality')
print ('graph_category other')
print ('graph_category tv')
print ('graph_info This graph shows femon output for your dvb-'+dvb_adapter[0])
print ('str.label Signal Strength')

View File

@ -39,7 +39,7 @@ case $1 in
config)
echo "graph_title Number of planes in sight
graph_info Number of planes in sight with DVB-T receiver.
graph_category other
graph_category tv
graph_vlabel Number of planes
planes.label planes"
exit 0;;

View File

@ -98,7 +98,7 @@ if(exists $ARGV[0] and $ARGV[0] eq "config") {
print "graph_title GeoWebCache bandwidth\n";
print "graph_args --base 1024\n";
print "graph_vlabel bit/s\n";
print "graph_category other\n";
print "graph_category loadbalancer\n";
print "graph_info Bandwidth graph is an average on the last 60 seconds\n";
print "bandw.draw LINE1\n";
print "bandw.label bandwidth bit/s\n";

View File

@ -98,7 +98,7 @@ if(exists $ARGV[0] and $ARGV[0] eq "config") {
print "graph_title GeoWebCache Percent of blank requests\n";
print "graph_args --base 1000\n";
print "graph_vlabel %\n";
print "graph_category other\n";
print "graph_category loadbalancer\n";
print "graph_info Blankidth graph is an average on the last 60 seconds\n";
print "blank.draw LINE1\n";
print "blank.label % of blank KML/HTML\n";

View File

@ -98,7 +98,7 @@ if(exists $ARGV[0] and $ARGV[0] eq "config") {
print "graph_title GeoWebCache cache hit ratio\n";
print "graph_args --base 1000\n";
print "graph_vlabel %\n";
print "graph_category other\n";
print "graph_category loadbalancer\n";
print "ratio.label percent\n";
print "ratio.type GAUGE\n";
print "ratio.max 100\n";

View File

@ -47,7 +47,7 @@ if [ "$1" = "config" ]; then
echo "graph_title Number of downloads of $PROJECTNAME from Google Code "
echo "graph_args --base 1000 --lower-limit 0"
echo "graph_vlabel number of downloads"
echo "graph_category other"
echo "graph_category filetransfer"
echo "graph_info This graph shows the number of downloads of $PROJECTNAME from Google Code."
j=0
for (( i = 1 ; i < $Nfiles ; i=i+5 ))

View File

@ -89,7 +89,7 @@ if [ "$1" = "config" ]; then
echo "graph_args --base 1000 -l 0 --vertical-label match_count"
echo 'graph_scale no'
echo 'graph_vlabel match_count'
echo 'graph_category other'
echo 'graph_category munin'
echo 'graph_info This graph shows the bad event count on log'
for(( I = 1; I < $CHECKMAX; ++I ))

View File

@ -52,7 +52,7 @@ if [ "$1" = "config" ]; then
echo "graph_args --base 1000 -l 0 --vertical-label MB"
echo 'graph_scale no'
echo 'graph_vlabel process memory'
echo 'graph_category other'
echo 'graph_category munin'
echo 'graph_info This graph shows the Memory used by process'
for(( I = 1; I < $CHECKMAX; ++I ))

View File

@ -101,7 +101,7 @@ if [ "$1" = "config" ]; then
echo "graph_args --base 1000 -l 0 --vertical-label second"
echo 'graph_scale no'
echo 'graph_vlabel second'
echo 'graph_category other'
echo 'graph_category munin'
echo 'graph_info This graph shows the site speed'
for(( I = 1; I < $CHECKMAX; ++I ))

View File

@ -30,7 +30,7 @@ def print_config():
print 'graph_title Keystone Stats'
print 'graph_vlabel count'
print 'graph_args --base 1000 --lower-limit 0'
print 'graph_category other'
print 'graph_category auth'
print 'graph_scale no'
print 'graph_info This graph shows stats about keystone: ' + (', ').join(stats)
for field in stats:

View File

@ -12,6 +12,7 @@ if [ "$1" = "config" ]; then
echo 'graph_args --base 1000 -l 0'
echo 'graph_vlabel MB/s'
echo 'graph_scale no'
echo 'graph_category network'
echo "download.label download"
exit 0
fi

View File

@ -120,7 +120,7 @@ my $graphs =
{
'munin' =>
{
'category' => 'wifi',
'category' => 'wireless',
'args' => '--base 1000 -u 0',
'title' => ':if: signal and noise levels',
'vlabel' => 'dB',
@ -134,7 +134,7 @@ my $graphs =
{
'munin' =>
{
'category' => 'wifi',
'category' => 'wireless',
'args' => '--base 1000',
'title' => ':if: link quality',
'vlabel' => '%',
@ -148,7 +148,7 @@ my $graphs =
{
'munin' =>
{
'category' => 'wifi',
'category' => 'wireless',
'args' => '--base 1000',
'title' => ':if: errors',
'vlabel' => 'Errors RX (-) / TX (+)',

View File

@ -102,7 +102,6 @@ if (!defined $ENV{MUNIN_PLUGSTATE}) {
sub pidfile() { "$ENV{MUNIN_PLUGSTATE}/munin.$plugin.pid" }
sub cachefile() { "$ENV{MUNIN_PLUGSTATE}/munin.$plugin.cache" }
sub graph_section() { "system:network" }
sub graph_name() { "interfaces" }
#sub graph_title() { "interfaces" }
#sub graph_title_all() { "Overall CPU usage" }
@ -327,7 +326,7 @@ sub show_config()
}
print <<EOF;
multigraph @{[ graph_name() ]}
graph_category @{[ graph_section() ]}
graph_category network
graph_title overall bits per seconds
graph_vlabel bits per seconds
update_rate 1

View File

@ -44,7 +44,7 @@ def print_config():
graph_title senderscore reputation
graph_info This graph shows senderscore.org reputation metrics
graphs_args --upper-limit 100 -u 100 -l 0
graph_category other
graph_category spamfilter
graph_vlabel score
graph_scale no

View File

@ -92,7 +92,7 @@ if [ "$1" = "config" ]; then
echo 'graph_args --base 1000 -l 0'
echo 'graph_vlabel '
echo 'graph_scale no'
echo 'graph_category other'
echo 'graph_category chat'
echo 'graph_info SMSTools Statistics'
echo 'graph_oder succeeded received failed multiple_failed rejected'
echo 'rejected.label Rejected'

View File

@ -142,7 +142,6 @@ my $fields_info = [
sub pidfile() { "$ENV{MUNIN_PLUGSTATE}/munin.$plugin.pid" }
sub cachefile() { "$ENV{MUNIN_PLUGSTATE}/munin.$plugin.cache" }
sub graph_section() { "system:cpu" };
sub graph_name() { "cpu_extended_multi_1s" };
sub graph_title() { "CPU usage" };
sub graph_title_all() { "Overall CPU usage" };
@ -335,7 +334,7 @@ sub run_config() {
print <<EOF;
multigraph @{[ graph_name() ]}
graph_category @{[ graph_section() ]}
graph_category cpu
graph_title @{[ graph_title() ]}
graph_vlabel cpu use %
graph_scale no