plugin categories: reorganize multiple plugins
This commit is contained in:
parent
5a45d49760
commit
34eeebbe37
|
@ -11,6 +11,7 @@ case $1 in
|
||||||
cat <<'EOM'
|
cat <<'EOM'
|
||||||
graph_title Number of young files at backup directory
|
graph_title Number of young files at backup directory
|
||||||
graph_vlabel number
|
graph_vlabel number
|
||||||
|
graph_category backup
|
||||||
autobackup.label number
|
autobackup.label number
|
||||||
autobackup.critical 1:
|
autobackup.critical 1:
|
||||||
EOM
|
EOM
|
||||||
|
|
|
@ -148,7 +148,7 @@ if (sys.argv.__len__()>1) and (sys.argv[1]=="config"):
|
||||||
gr_simple=graph.replace("-","_").replace(":","_")
|
gr_simple=graph.replace("-","_").replace(":","_")
|
||||||
gr_pretty=graph.replace("_"," ").title()
|
gr_pretty=graph.replace("_"," ").title()
|
||||||
gr=graph.replace("-","_").replace(":","_")
|
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())
|
graphsettings=dict(graphdefaults.items()+graphsettings.items())
|
||||||
print "multigraph %s" % (gr_simple)
|
print "multigraph %s" % (gr_simple)
|
||||||
print "\n".join(["%s %s" % setting for setting in graphsettings.items()])
|
print "\n".join(["%s %s" % setting for setting in graphsettings.items()])
|
||||||
|
@ -182,7 +182,3 @@ else:
|
||||||
for osd in osds:
|
for osd in osds:
|
||||||
print "multigraph %s.osd%s" % (gr,osd)
|
print "multigraph %s.osd%s" % (gr,osd)
|
||||||
print "osd%s_%s.value %s" % (osd,gr,data[osd][graph])
|
print "osd%s_%s.value %s" % (osd,gr,data[osd][graph])
|
||||||
|
|
||||||
# for Munin Plugin Gallery
|
|
||||||
# graph_category fs
|
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,6 @@ plugin="${0##*/}" # name of plugin
|
||||||
pidfile="$MUNIN_PLUGSTATE/munin.$plugin.pid"
|
pidfile="$MUNIN_PLUGSTATE/munin.$plugin.pid"
|
||||||
cache="$MUNIN_PLUGSTATE/munin.$plugin.value"
|
cache="$MUNIN_PLUGSTATE/munin.$plugin.value"
|
||||||
graph="$plugin"
|
graph="$plugin"
|
||||||
section="system:cpu"
|
|
||||||
style="AREA"
|
style="AREA"
|
||||||
cpus=$(grep -c ^processor /proc/cpuinfo)
|
cpus=$(grep -c ^processor /proc/cpuinfo)
|
||||||
|
|
||||||
|
@ -52,7 +51,7 @@ run_config() {
|
||||||
run_daemon
|
run_daemon
|
||||||
cat << EOF
|
cat << EOF
|
||||||
graph_title $graph
|
graph_title $graph
|
||||||
graph_category $section
|
graph_category 1sec
|
||||||
graph_vlabel average cpu use %
|
graph_vlabel average cpu use %
|
||||||
graph_scale no
|
graph_scale no
|
||||||
graph_total All CPUs
|
graph_total All CPUs
|
||||||
|
@ -87,6 +86,3 @@ exit 0
|
||||||
# acquire which needs a different pid than watchdog, otherwise watchdog
|
# acquire which needs a different pid than watchdog, otherwise watchdog
|
||||||
# could/will kill itself when expiring before the watched process is killed.
|
# could/will kill itself when expiring before the watched process is killed.
|
||||||
# not a POSIX feature.
|
# not a POSIX feature.
|
||||||
|
|
||||||
# for Munin Plugin Gallery
|
|
||||||
# graph_category 1sec
|
|
||||||
|
|
|
@ -93,7 +93,7 @@ def print_adapter_config(dvb_adapter) :
|
||||||
print ('graph_title DVB Femon Sensors '+dvb_adapter[0])
|
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_args '+os.getenv('graph_args','--lower-limit 0 --upper-limit 100 --rigid'))
|
||||||
print ('graph_vlabel Quality')
|
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 ('graph_info This graph shows femon output for your dvb-'+dvb_adapter[0])
|
||||||
|
|
||||||
print ('str.label Signal Strength')
|
print ('str.label Signal Strength')
|
||||||
|
|
|
@ -39,7 +39,7 @@ case $1 in
|
||||||
config)
|
config)
|
||||||
echo "graph_title Number of planes in sight
|
echo "graph_title Number of planes in sight
|
||||||
graph_info Number of planes in sight with DVB-T receiver.
|
graph_info Number of planes in sight with DVB-T receiver.
|
||||||
graph_category other
|
graph_category tv
|
||||||
graph_vlabel Number of planes
|
graph_vlabel Number of planes
|
||||||
planes.label planes"
|
planes.label planes"
|
||||||
exit 0;;
|
exit 0;;
|
||||||
|
|
|
@ -98,7 +98,7 @@ if(exists $ARGV[0] and $ARGV[0] eq "config") {
|
||||||
print "graph_title GeoWebCache bandwidth\n";
|
print "graph_title GeoWebCache bandwidth\n";
|
||||||
print "graph_args --base 1024\n";
|
print "graph_args --base 1024\n";
|
||||||
print "graph_vlabel bit/s\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 "graph_info Bandwidth graph is an average on the last 60 seconds\n";
|
||||||
print "bandw.draw LINE1\n";
|
print "bandw.draw LINE1\n";
|
||||||
print "bandw.label bandwidth bit/s\n";
|
print "bandw.label bandwidth bit/s\n";
|
||||||
|
|
|
@ -98,7 +98,7 @@ if(exists $ARGV[0] and $ARGV[0] eq "config") {
|
||||||
print "graph_title GeoWebCache Percent of blank requests\n";
|
print "graph_title GeoWebCache Percent of blank requests\n";
|
||||||
print "graph_args --base 1000\n";
|
print "graph_args --base 1000\n";
|
||||||
print "graph_vlabel %\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 "graph_info Blankidth graph is an average on the last 60 seconds\n";
|
||||||
print "blank.draw LINE1\n";
|
print "blank.draw LINE1\n";
|
||||||
print "blank.label % of blank KML/HTML\n";
|
print "blank.label % of blank KML/HTML\n";
|
||||||
|
|
|
@ -98,7 +98,7 @@ if(exists $ARGV[0] and $ARGV[0] eq "config") {
|
||||||
print "graph_title GeoWebCache cache hit ratio\n";
|
print "graph_title GeoWebCache cache hit ratio\n";
|
||||||
print "graph_args --base 1000\n";
|
print "graph_args --base 1000\n";
|
||||||
print "graph_vlabel %\n";
|
print "graph_vlabel %\n";
|
||||||
print "graph_category other\n";
|
print "graph_category loadbalancer\n";
|
||||||
print "ratio.label percent\n";
|
print "ratio.label percent\n";
|
||||||
print "ratio.type GAUGE\n";
|
print "ratio.type GAUGE\n";
|
||||||
print "ratio.max 100\n";
|
print "ratio.max 100\n";
|
||||||
|
|
|
@ -47,7 +47,7 @@ if [ "$1" = "config" ]; then
|
||||||
echo "graph_title Number of downloads of $PROJECTNAME from Google Code "
|
echo "graph_title Number of downloads of $PROJECTNAME from Google Code "
|
||||||
echo "graph_args --base 1000 --lower-limit 0"
|
echo "graph_args --base 1000 --lower-limit 0"
|
||||||
echo "graph_vlabel number of downloads"
|
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."
|
echo "graph_info This graph shows the number of downloads of $PROJECTNAME from Google Code."
|
||||||
j=0
|
j=0
|
||||||
for (( i = 1 ; i < $Nfiles ; i=i+5 ))
|
for (( i = 1 ; i < $Nfiles ; i=i+5 ))
|
||||||
|
|
|
@ -89,7 +89,7 @@ if [ "$1" = "config" ]; then
|
||||||
echo "graph_args --base 1000 -l 0 --vertical-label match_count"
|
echo "graph_args --base 1000 -l 0 --vertical-label match_count"
|
||||||
echo 'graph_scale no'
|
echo 'graph_scale no'
|
||||||
echo 'graph_vlabel match_count'
|
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'
|
echo 'graph_info This graph shows the bad event count on log'
|
||||||
|
|
||||||
for(( I = 1; I < $CHECKMAX; ++I ))
|
for(( I = 1; I < $CHECKMAX; ++I ))
|
||||||
|
|
|
@ -52,7 +52,7 @@ if [ "$1" = "config" ]; then
|
||||||
echo "graph_args --base 1000 -l 0 --vertical-label MB"
|
echo "graph_args --base 1000 -l 0 --vertical-label MB"
|
||||||
echo 'graph_scale no'
|
echo 'graph_scale no'
|
||||||
echo 'graph_vlabel process memory'
|
echo 'graph_vlabel process memory'
|
||||||
echo 'graph_category other'
|
echo 'graph_category munin'
|
||||||
echo 'graph_info This graph shows the Memory used by process'
|
echo 'graph_info This graph shows the Memory used by process'
|
||||||
|
|
||||||
for(( I = 1; I < $CHECKMAX; ++I ))
|
for(( I = 1; I < $CHECKMAX; ++I ))
|
||||||
|
|
|
@ -101,7 +101,7 @@ if [ "$1" = "config" ]; then
|
||||||
echo "graph_args --base 1000 -l 0 --vertical-label second"
|
echo "graph_args --base 1000 -l 0 --vertical-label second"
|
||||||
echo 'graph_scale no'
|
echo 'graph_scale no'
|
||||||
echo 'graph_vlabel second'
|
echo 'graph_vlabel second'
|
||||||
echo 'graph_category other'
|
echo 'graph_category munin'
|
||||||
echo 'graph_info This graph shows the site speed'
|
echo 'graph_info This graph shows the site speed'
|
||||||
|
|
||||||
for(( I = 1; I < $CHECKMAX; ++I ))
|
for(( I = 1; I < $CHECKMAX; ++I ))
|
||||||
|
|
|
@ -30,7 +30,7 @@ def print_config():
|
||||||
print 'graph_title Keystone Stats'
|
print 'graph_title Keystone Stats'
|
||||||
print 'graph_vlabel count'
|
print 'graph_vlabel count'
|
||||||
print 'graph_args --base 1000 --lower-limit 0'
|
print 'graph_args --base 1000 --lower-limit 0'
|
||||||
print 'graph_category other'
|
print 'graph_category auth'
|
||||||
print 'graph_scale no'
|
print 'graph_scale no'
|
||||||
print 'graph_info This graph shows stats about keystone: ' + (', ').join(stats)
|
print 'graph_info This graph shows stats about keystone: ' + (', ').join(stats)
|
||||||
for field in stats:
|
for field in stats:
|
||||||
|
|
|
@ -12,6 +12,7 @@ if [ "$1" = "config" ]; then
|
||||||
echo 'graph_args --base 1000 -l 0'
|
echo 'graph_args --base 1000 -l 0'
|
||||||
echo 'graph_vlabel MB/s'
|
echo 'graph_vlabel MB/s'
|
||||||
echo 'graph_scale no'
|
echo 'graph_scale no'
|
||||||
|
echo 'graph_category network'
|
||||||
echo "download.label download"
|
echo "download.label download"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -120,7 +120,7 @@ my $graphs =
|
||||||
{
|
{
|
||||||
'munin' =>
|
'munin' =>
|
||||||
{
|
{
|
||||||
'category' => 'wifi',
|
'category' => 'wireless',
|
||||||
'args' => '--base 1000 -u 0',
|
'args' => '--base 1000 -u 0',
|
||||||
'title' => ':if: signal and noise levels',
|
'title' => ':if: signal and noise levels',
|
||||||
'vlabel' => 'dB',
|
'vlabel' => 'dB',
|
||||||
|
@ -134,7 +134,7 @@ my $graphs =
|
||||||
{
|
{
|
||||||
'munin' =>
|
'munin' =>
|
||||||
{
|
{
|
||||||
'category' => 'wifi',
|
'category' => 'wireless',
|
||||||
'args' => '--base 1000',
|
'args' => '--base 1000',
|
||||||
'title' => ':if: link quality',
|
'title' => ':if: link quality',
|
||||||
'vlabel' => '%',
|
'vlabel' => '%',
|
||||||
|
@ -148,7 +148,7 @@ my $graphs =
|
||||||
{
|
{
|
||||||
'munin' =>
|
'munin' =>
|
||||||
{
|
{
|
||||||
'category' => 'wifi',
|
'category' => 'wireless',
|
||||||
'args' => '--base 1000',
|
'args' => '--base 1000',
|
||||||
'title' => ':if: errors',
|
'title' => ':if: errors',
|
||||||
'vlabel' => 'Errors RX (-) / TX (+)',
|
'vlabel' => 'Errors RX (-) / TX (+)',
|
||||||
|
|
|
@ -102,7 +102,6 @@ if (!defined $ENV{MUNIN_PLUGSTATE}) {
|
||||||
sub pidfile() { "$ENV{MUNIN_PLUGSTATE}/munin.$plugin.pid" }
|
sub pidfile() { "$ENV{MUNIN_PLUGSTATE}/munin.$plugin.pid" }
|
||||||
sub cachefile() { "$ENV{MUNIN_PLUGSTATE}/munin.$plugin.cache" }
|
sub cachefile() { "$ENV{MUNIN_PLUGSTATE}/munin.$plugin.cache" }
|
||||||
|
|
||||||
sub graph_section() { "system:network" }
|
|
||||||
sub graph_name() { "interfaces" }
|
sub graph_name() { "interfaces" }
|
||||||
#sub graph_title() { "interfaces" }
|
#sub graph_title() { "interfaces" }
|
||||||
#sub graph_title_all() { "Overall CPU usage" }
|
#sub graph_title_all() { "Overall CPU usage" }
|
||||||
|
@ -327,7 +326,7 @@ sub show_config()
|
||||||
}
|
}
|
||||||
print <<EOF;
|
print <<EOF;
|
||||||
multigraph @{[ graph_name() ]}
|
multigraph @{[ graph_name() ]}
|
||||||
graph_category @{[ graph_section() ]}
|
graph_category network
|
||||||
graph_title overall bits per seconds
|
graph_title overall bits per seconds
|
||||||
graph_vlabel bits per seconds
|
graph_vlabel bits per seconds
|
||||||
update_rate 1
|
update_rate 1
|
||||||
|
|
|
@ -44,7 +44,7 @@ def print_config():
|
||||||
graph_title senderscore reputation
|
graph_title senderscore reputation
|
||||||
graph_info This graph shows senderscore.org reputation metrics
|
graph_info This graph shows senderscore.org reputation metrics
|
||||||
graphs_args --upper-limit 100 -u 100 -l 0
|
graphs_args --upper-limit 100 -u 100 -l 0
|
||||||
graph_category other
|
graph_category spamfilter
|
||||||
graph_vlabel score
|
graph_vlabel score
|
||||||
graph_scale no
|
graph_scale no
|
||||||
|
|
||||||
|
|
|
@ -92,7 +92,7 @@ if [ "$1" = "config" ]; then
|
||||||
echo 'graph_args --base 1000 -l 0'
|
echo 'graph_args --base 1000 -l 0'
|
||||||
echo 'graph_vlabel '
|
echo 'graph_vlabel '
|
||||||
echo 'graph_scale no'
|
echo 'graph_scale no'
|
||||||
echo 'graph_category other'
|
echo 'graph_category chat'
|
||||||
echo 'graph_info SMSTools Statistics'
|
echo 'graph_info SMSTools Statistics'
|
||||||
echo 'graph_oder succeeded received failed multiple_failed rejected'
|
echo 'graph_oder succeeded received failed multiple_failed rejected'
|
||||||
echo 'rejected.label Rejected'
|
echo 'rejected.label Rejected'
|
||||||
|
|
|
@ -142,7 +142,6 @@ my $fields_info = [
|
||||||
sub pidfile() { "$ENV{MUNIN_PLUGSTATE}/munin.$plugin.pid" }
|
sub pidfile() { "$ENV{MUNIN_PLUGSTATE}/munin.$plugin.pid" }
|
||||||
sub cachefile() { "$ENV{MUNIN_PLUGSTATE}/munin.$plugin.cache" }
|
sub cachefile() { "$ENV{MUNIN_PLUGSTATE}/munin.$plugin.cache" }
|
||||||
|
|
||||||
sub graph_section() { "system:cpu" };
|
|
||||||
sub graph_name() { "cpu_extended_multi_1s" };
|
sub graph_name() { "cpu_extended_multi_1s" };
|
||||||
sub graph_title() { "CPU usage" };
|
sub graph_title() { "CPU usage" };
|
||||||
sub graph_title_all() { "Overall CPU usage" };
|
sub graph_title_all() { "Overall CPU usage" };
|
||||||
|
@ -335,7 +334,7 @@ sub run_config() {
|
||||||
|
|
||||||
print <<EOF;
|
print <<EOF;
|
||||||
multigraph @{[ graph_name() ]}
|
multigraph @{[ graph_name() ]}
|
||||||
graph_category @{[ graph_section() ]}
|
graph_category cpu
|
||||||
graph_title @{[ graph_title() ]}
|
graph_title @{[ graph_title() ]}
|
||||||
graph_vlabel cpu use %
|
graph_vlabel cpu use %
|
||||||
graph_scale no
|
graph_scale no
|
||||||
|
|
Loading…
Reference in New Issue