1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-22 14:16:00 +00:00

Merge pull request #815 from dipohl/master

Category Tree: reduce number of categories
This commit is contained in:
dipohl 2017-02-21 22:32:09 +01:00 committed by GitHub
commit 50283138ea
36 changed files with 45 additions and 44 deletions

View file

@ -71,7 +71,7 @@ sub config
print "graph_args --base 1000 -l 0\n"; print "graph_args --base 1000 -l 0\n";
print "graph_vlabel Watt\n"; print "graph_vlabel Watt\n";
print "graph_total Total\n"; print "graph_total Total\n";
print "graph_category AMR\n"; print "graph_category sensors\n";
$count = 0; $count = 0;
foreach my $station (sort keys %stations) { foreach my $station (sort keys %stations) {
@ -92,7 +92,7 @@ sub config
print "graph_args --base 1000 -l 0\n"; print "graph_args --base 1000 -l 0\n";
print "graph_vlabel kWh\n"; print "graph_vlabel kWh\n";
print "graph_scale no\n"; print "graph_scale no\n";
print "graph_category AMR\n"; print "graph_category sensors\n";
$count = 0; $count = 0;
foreach my $station (sort keys %stations) { foreach my $station (sort keys %stations) {
@ -106,7 +106,7 @@ sub config
print "graph_title Known AMR stations\n"; print "graph_title Known AMR stations\n";
print "graph_args --base 1000 -l 0\n"; print "graph_args --base 1000 -l 0\n";
print "graph_vlabel stations\n"; print "graph_vlabel stations\n";
print "graph_category AMR\n"; print "graph_category sensors\n";
print "stations.label number of stations\n"; print "stations.label number of stations\n";
print "multigraph amr_signals\n"; print "multigraph amr_signals\n";
@ -114,7 +114,7 @@ sub config
print "graph_args --base 1000 -l 0\n"; print "graph_args --base 1000 -l 0\n";
print "graph_vlabel signals / \${graph_period}\n"; print "graph_vlabel signals / \${graph_period}\n";
print "graph_period minute\n"; print "graph_period minute\n";
print "graph_category AMR\n"; print "graph_category sensors\n";
$count = 0; $count = 0;
foreach my $station (sort keys %stations) { foreach my $station (sort keys %stations) {
my $name = clean_fieldname('station signals ' . $station); my $name = clean_fieldname('station signals ' . $station);

View file

@ -65,7 +65,7 @@ if (exists $ARGV[0] and $ARGV[0] eq "autoconf") {
if (exists $ARGV[0] and $ARGV[0] eq "config") { if (exists $ARGV[0] and $ARGV[0] eq "config") {
print "graph_title Apache activity\n"; print "graph_title Apache activity\n";
print "graph_args --base 1000 -l 0\n"; print "graph_args --base 1000 -l 0\n";
print "graph_category apache\n"; print "graph_category webserver\n";
print "graph_vlabel processes\n"; print "graph_vlabel processes\n";
foreach my $port (@PORTS) { foreach my $port (@PORTS) {
while (my ($char, $val) = each (%chars)) { while (my ($char, $val) = each (%chars)) {

View file

@ -53,7 +53,7 @@ graph_title Apache average seconds last $LAST_N_REQUESTS requests
graph_args --base 1000 graph_args --base 1000
graph_scale no graph_scale no
graph_vlabel Average request time graph_vlabel Average request time
graph_category Apache graph_category webserver
graph_info This graph shows average request times for the last $LAST_N_REQUESTS requests graph_info This graph shows average request times for the last $LAST_N_REQUESTS requests
CONFIG CONFIG
; ;

View file

@ -64,7 +64,7 @@ sub print_config {
print("graph_title HTTP requests status print("graph_title HTTP requests status
graph_args --base 1000 graph_args --base 1000
graph_vlabel requests / second graph_vlabel requests / second
graph_category Network graph_category webserver
graph_total total\n"); graph_total total\n");
for my $key (sort { $WANTED{$a} cmp $WANTED{$b} } (keys %WANTED)) { for my $key (sort { $WANTED{$a} cmp $WANTED{$b} } (keys %WANTED)) {

View file

@ -88,7 +88,7 @@ graph_title Apache mod_cache_disk usage
graph_title Number of entries in mod_cache_disk Apache cache graph_title Number of entries in mod_cache_disk Apache cache
graph_args --base 1000 -l 0 graph_args --base 1000 -l 0
graph_vlabel Y graph_vlabel Y
graph_category Apache graph_category webserver
graph_order ${fieldnames[*]} total graph_order ${fieldnames[*]} total
total.draw LINE1 total.draw LINE1
total.label all total.label all

View file

@ -46,7 +46,7 @@ if [ "$1" = "config" ]; then
echo 'graph_args --base 1000 -l 0 ' echo 'graph_args --base 1000 -l 0 '
echo 'graph_vlabel Kb' echo 'graph_vlabel Kb'
echo 'graph_scale no' echo 'graph_scale no'
echo 'graph_category apache' echo 'graph_category webserver'
echo 'graph_info Indicate the memdium size of all the apache child process.' echo 'graph_info Indicate the memdium size of all the apache child process.'

View file

@ -44,7 +44,7 @@ if [ "$1" = "config" ]; then
echo 'graph_args --base 1000 -l 0 ' echo 'graph_args --base 1000 -l 0 '
echo 'graph_vlabel servers' echo 'graph_vlabel servers'
echo 'graph_scale no' echo 'graph_scale no'
echo 'graph_category apache' echo 'graph_category webserver'
echo 'graph_info Indicate the number of apache servers running (child process).' echo 'graph_info Indicate the number of apache servers running (child process).'

View file

@ -41,7 +41,7 @@ if (defined(@ARGV) && ($ARGV[0] eq 'config')) {
print "graph_title Apache Smaps\n"; print "graph_title Apache Smaps\n";
print "graph_args --base 1024 -l 0\n"; print "graph_args --base 1024 -l 0\n";
print "graph_vlabel Bytes\n"; print "graph_vlabel Bytes\n";
print "graph_category apache\n"; print "graph_category webserver\n";
print "graph_info This graph shows memory usage for each given process.\n"; print "graph_info This graph shows memory usage for each given process.\n";
print "shr_max.label Shared memory max\n"; print "shr_max.label Shared memory max\n";

View file

@ -171,7 +171,7 @@ multigraph apache_accesses
graph_title Apache accesses graph_title Apache accesses
graph_args --base 1000 -l 0 graph_args --base 1000 -l 0
graph_vlabel accesses / \${graph_period} graph_vlabel accesses / \${graph_period}
graph_category apache graph_category webserver
END END
foreach my $port (@PORTS) { foreach my $port (@PORTS) {
@ -191,7 +191,7 @@ graph_title Apache processes
graph_args --base 1000 -l 0 graph_args --base 1000 -l 0
graph_vlabel processes graph_vlabel processes
graph_total total graph_total total
graph_category apache graph_category webserver
END END
print "graph_order "; print "graph_order ";
@ -224,7 +224,7 @@ multigraph apache_volume
graph_title Apache volume graph_title Apache volume
graph_args --base 1024 -l 0 graph_args --base 1024 -l 0
graph_vlabel KiB per \${graph_period} graph_vlabel KiB per \${graph_period}
graph_category apache graph_category webserver
END END
foreach my $port (@PORTS) { foreach my $port (@PORTS) {

View file

@ -42,7 +42,7 @@ if [ "$1" = "config" ]; then
echo 'graph_args --base 1000 -l 0 ' echo 'graph_args --base 1000 -l 0 '
echo 'graph_vlabel Threads' echo 'graph_vlabel Threads'
echo 'graph_scale no' echo 'graph_scale no'
echo 'graph_category apache' echo 'graph_category webserver'
echo 'graph_info Indicate the memdium number of threads for all child process.' echo 'graph_info Indicate the memdium number of threads for all child process.'

View file

@ -45,7 +45,7 @@ if [ "$1" = "config" ]; then
echo 'graph_args --base 1000 -l 0 ' echo 'graph_args --base 1000 -l 0 '
echo 'graph_vlabel Mb' echo 'graph_vlabel Mb'
echo 'graph_scale no' echo 'graph_scale no'
echo 'graph_category apache' echo 'graph_category webserver'
echo 'graph_info Indicate the total memory used by apache.' echo 'graph_info Indicate the total memory used by apache.'
echo "servers.label servers" echo "servers.label servers"

View file

@ -133,7 +133,7 @@ then
echo "graph_title Apache users" echo "graph_title Apache users"
echo "graph_vlabel bytes per five minute period" echo "graph_vlabel bytes per five minute period"
echo "graph_args --lower-limit 1 --base 1024 --logarithmic" echo "graph_args --lower-limit 1 --base 1024 --logarithmic"
echo "graph_category Apache" echo "graph_category webserver"
echo "graph_total total" echo "graph_total total"
echo "graph_info Webserver traffic by user." echo "graph_info Webserver traffic by user."

View file

@ -117,7 +117,7 @@ multigraph apache_vhosts_$check
graph_title average $check on all active vhosts graph_title average $check on all active vhosts
graph_args --base 1000 graph_args --base 1000
graph_vlabel average $check per response graph_vlabel average $check per response
graph_category apache graph_category webserver
graph_period minute graph_period minute
graph_order $order graph_order $order
END END
@ -139,7 +139,7 @@ multigraph apache_vhosts_$check.$site
graph_title average $check on $data{$site}{'label'} graph_title average $check on $data{$site}{'label'}
graph_args --base 1000 graph_args --base 1000
graph_vlabel average response in $check graph_vlabel average response in $check
graph_category apache graph_category webserver
graph_period minute graph_period minute
END END
@ -168,7 +168,7 @@ multigraph apache_vhosts_requests
graph_title requests by vhost graph_title requests by vhost
graph_args --base 1000 graph_args --base 1000
graph_vlabel requests / \${graph_period} graph_vlabel requests / \${graph_period}
graph_category apache graph_category webserver
graph_period minute graph_period minute
graph_order $order graph_order $order
END END
@ -193,7 +193,7 @@ multigraph apache_vhosts_requests.$site
graph_title status codes on $data{$site}{'label'} graph_title status codes on $data{$site}{'label'}
graph_args --base 1000 graph_args --base 1000
graph_vlabel status codes / \${graph_period} graph_vlabel status codes / \${graph_period}
graph_category apache graph_category webserver
graph_period minute graph_period minute
END END
my $draw='AREA'; my $draw='AREA';

View file

@ -91,7 +91,7 @@ my $action = $1;
if (exists $ARGV[0] and $ARGV[0] eq "config") { if (exists $ARGV[0] and $ARGV[0] eq "config") {
print "graph_title Apache $plugs{$action}\n"; print "graph_title Apache $plugs{$action}\n";
print "graph_args --base 1000 -l 0\n"; print "graph_args --base 1000 -l 0\n";
print "graph_category apache\n"; print "graph_category webserver\n";
print "graph_vlabel activity\n"; print "graph_vlabel activity\n";
my $i = 0; my $i = 0;
foreach my $server (sort (@servers)) { foreach my $server (sort (@servers)) {

View file

@ -38,7 +38,7 @@ CRITICAL_LEVEL=${critical_level:-"90"}
if [ "$1" = "config" ]; then if [ "$1" = "config" ]; then
echo 'graph_title CEPH capacity' echo 'graph_title CEPH capacity'
echo 'graph_category ceph' echo 'graph_category fs'
echo 'graph_vlabel GB' echo 'graph_vlabel GB'
echo 'graph_info CEPH cluster capacity' echo 'graph_info CEPH cluster capacity'
echo 'graph_args --base 1000 -l 0' echo 'graph_args --base 1000 -l 0'

View file

@ -30,7 +30,7 @@ fi
if [ "$1" = "config" ]; then if [ "$1" = "config" ]; then
echo 'graph_title CEPH OSDs' echo 'graph_title CEPH OSDs'
echo 'graph_category ceph' echo 'graph_category fs'
echo 'graph_vlabel nr' echo 'graph_vlabel nr'
echo 'graph_info CEPH OSD up/down status' echo 'graph_info CEPH OSD up/down status'
echo 'graph_scale no' echo 'graph_scale no'

View file

@ -71,7 +71,7 @@ elif len(sys.argv) == 2 and sys.argv[1] == "config":
params = graph_types[graph_type] params = graph_types[graph_type]
for item in params: for item in params:
print "graph_title %s" % item["title"] print "graph_title %s" % item["title"]
print "graph_category lighttpd" print "graph_category webserver"
for field in item["fields"]: for field in item["fields"]:
print "%s.label %s" % (field, field) print "%s.label %s" % (field, field)
print "%s.type %s" % (field, item["type"]) print "%s.type %s" % (field, item["type"])

View file

@ -76,7 +76,7 @@ cat <<'EOM'
graph_title APC Hits graph_title APC Hits
graph_args -l 0 graph_args -l 0
graph_vlabel Cache hits graph_vlabel Cache hits
graph_category php-apc graph_category memory
graph_total Total graph_total Total
num_misses.label Misses num_misses.label Misses
num_misses.draw AREA num_misses.draw AREA
@ -96,7 +96,7 @@ graph_title APC Percents
graph_args -l 0 --upper-limit 100 graph_args -l 0 --upper-limit 100
graph_scale no graph_scale no
graph_vlabel Cache Percents % graph_vlabel Cache Percents %
graph_category php-apc graph_category memory
hits.label Hits hits.label Hits
hits.draw AREA hits.draw AREA
hits.min 0 hits.min 0

View file

@ -53,7 +53,7 @@ if [ "$1" = "config" ]; then
echo 'graph_args --base 1000 -l 0' echo 'graph_args --base 1000 -l 0'
echo 'graph_vlabel Time in microsecond' echo 'graph_vlabel Time in microsecond'
echo "graph_category php-time" echo "graph_category webserver"
echo "graph_info This graph shows load time in ms of $target" echo "graph_info This graph shows load time in ms of $target"
echo "minloadtime.label Min time" echo "minloadtime.label Min time"
echo "minloadtime.info Min time" echo "minloadtime.info Min time"

View file

@ -26,7 +26,7 @@ if [ "$1" = "config" ]; then
echo 'graph_title Samba Locked Files' echo 'graph_title Samba Locked Files'
echo 'graph_args --base 1000 -l 0 ' echo 'graph_args --base 1000 -l 0 '
echo 'graph_vlabel number of locked files' echo 'graph_vlabel number of locked files'
echo 'graph_category Samba' echo 'graph_category fs'
echo 'graph_info This graph shows the number locked Samba Files.' echo 'graph_info This graph shows the number locked Samba Files.'
echo 'samba_locked.label Locked Files' echo 'samba_locked.label Locked Files'
echo 'samba_locked.draw LINE2' echo 'samba_locked.draw LINE2'

View file

@ -32,7 +32,7 @@ if [ "$1" = "config" ]; then
echo 'graph_title Samba Users' echo 'graph_title Samba Users'
echo 'graph_args --base 1000 -l 0 ' echo 'graph_args --base 1000 -l 0 '
echo 'graph_vlabel number of Samba users.' echo 'graph_vlabel number of Samba users.'
echo 'graph_category Samba' echo 'graph_category fs'
echo 'graph_info This graph shows the number Samba users.' echo 'graph_info This graph shows the number Samba users.'
echo 'samba_users.label Samba Users' echo 'samba_users.label Samba Users'
echo 'samba_users.draw LINE2' echo 'samba_users.draw LINE2'

View file

@ -17,6 +17,7 @@ percent=${percent:-"no"}
if [ "$1" = "config" ] if [ "$1" = "config" ]
then then
echo "graph_title Battery $battery_name" echo "graph_title Battery $battery_name"
echo "graph_category sensors"
if [ "$percent" = "yes" ] if [ "$percent" = "yes" ]
then then
echo "graph_vlabel %" echo "graph_vlabel %"

View file

@ -41,7 +41,7 @@ if [ "$1" = "config" ]; then
graph_order usedbydataset usedbychildren usedbysnapshots usedbyrefreservation available total quota graph_order usedbydataset usedbychildren usedbysnapshots usedbyrefreservation available total quota
graph_args --base 1024 -r -l 0 --vertical-label Bytes graph_args --base 1024 -r -l 0 --vertical-label Bytes
graph_info This graph shows how is used a zfs filesystems. graph_info This graph shows how is used a zfs filesystems.
graph_category disk graph_category fs
graph_period second graph_period second
usedbydataset.label UsedByDataset usedbydataset.label UsedByDataset
usedbydataset.draw AREA usedbydataset.draw AREA

View file

@ -38,7 +38,7 @@ if [ "$1" = "config" ]; then
echo 'graph_title ZFS ARC Efficiency' echo 'graph_title ZFS ARC Efficiency'
echo 'graph_args -l 0' echo 'graph_args -l 0'
echo 'graph_vlabel %' echo 'graph_vlabel %'
echo 'graph_category disk' echo 'graph_category fs'
echo 'graph_info This graph shows the ARC Efficiency' echo 'graph_info This graph shows the ARC Efficiency'
/usr/local/bin/zfs-stats -A | awk 'BEGIN { RS = "" ; FS = "\n" } /Efficiency/ {print}' | \ /usr/local/bin/zfs-stats -A | awk 'BEGIN { RS = "" ; FS = "\n" } /Efficiency/ {print}' | \

View file

@ -38,7 +38,7 @@ if [ "$1" = "config" ]; then
echo 'graph_title ZFS ARC Size' echo 'graph_title ZFS ARC Size'
echo 'graph_args -l 0' echo 'graph_args -l 0'
echo 'graph_vlabel Size in MB' echo 'graph_vlabel Size in MB'
echo 'graph_category disk' echo 'graph_category fs'
echo 'graph_info This graph shows the ARC Size utilization' echo 'graph_info This graph shows the ARC Size utilization'
/usr/local/bin/zfs-stats -A | awk 'BEGIN { RS = "" ; FS = "\n" } /^ARC Size/ {print}' | \ /usr/local/bin/zfs-stats -A | awk 'BEGIN { RS = "" ; FS = "\n" } /^ARC Size/ {print}' | \

View file

@ -38,7 +38,7 @@ if [ "$1" = "config" ]; then
echo 'graph_title ZFS ARC Cache Hits by Cache List' echo 'graph_title ZFS ARC Cache Hits by Cache List'
echo 'graph_args -l 0' echo 'graph_args -l 0'
echo 'graph_vlabel %' echo 'graph_vlabel %'
echo 'graph_category disk' echo 'graph_category fs'
echo 'graph_info This graph shows the ARC cache hits by cache list' echo 'graph_info This graph shows the ARC cache hits by cache list'
/usr/local/bin/zfs-stats -A | awk 'BEGIN { RS = "" ; FS = "\n" } /CACHE HITS BY CACHE LIST/ {print}' | \ /usr/local/bin/zfs-stats -A | awk 'BEGIN { RS = "" ; FS = "\n" } /CACHE HITS BY CACHE LIST/ {print}' | \

View file

@ -38,7 +38,7 @@ if [ "$1" = "config" ]; then
echo 'graph_title ZFS ARC Cache Hits and Misses' echo 'graph_title ZFS ARC Cache Hits and Misses'
echo 'graph_args --upper-limit 100 -l -100' echo 'graph_args --upper-limit 100 -l -100'
echo 'graph_vlabel %' echo 'graph_vlabel %'
echo 'graph_category disk' echo 'graph_category fs'
echo 'graph_info This graph shows the ARC cache hits and misses by data type' echo 'graph_info This graph shows the ARC cache hits and misses by data type'
/usr/local/bin/zfs-stats -A | awk 'BEGIN { RS = "" ; FS = "\n" } /HITS BY DATA TYPE/ {print}' | \ /usr/local/bin/zfs-stats -A | awk 'BEGIN { RS = "" ; FS = "\n" } /HITS BY DATA TYPE/ {print}' | \

View file

@ -38,7 +38,7 @@ if [ "$1" = "config" ]; then
echo 'graph_title ZFS DMU prefech stats' echo 'graph_title ZFS DMU prefech stats'
echo 'graph_args --upper-limit 100 -l -100' echo 'graph_args --upper-limit 100 -l -100'
echo 'graph_vlabel %' echo 'graph_vlabel %'
echo 'graph_category disk' echo 'graph_category fs'
echo 'graph_info This graph shows the DMU prefech stats' echo 'graph_info This graph shows the DMU prefech stats'
/usr/local/bin/zfs-stats -Z | awk '/Hit Ratio/ {sub(/[\t ]*/,"");sub(/:.*/,""); displayname = $0; gsub(/[ .]/,"_",$0); print $0".label "displayname"\n"$0".min 0"}' /usr/local/bin/zfs-stats -Z | awk '/Hit Ratio/ {sub(/[\t ]*/,"");sub(/:.*/,""); displayname = $0; gsub(/[ .]/,"_",$0); print $0".label "displayname"\n"$0".min 0"}'

View file

@ -15,7 +15,7 @@ case $1 in
graph_title ZFS ARC efficiency graph_title ZFS ARC efficiency
graph_vlabel % graph_vlabel %
graph_scale no graph_scale no
graph_category disk graph_category fs
graph_args -l 0 graph_args -l 0
graph_info FreeBSD ZFS ARC Utilisation - Counters graph_info FreeBSD ZFS ARC Utilisation - Counters
graph_period minute graph_period minute

View file

@ -38,7 +38,7 @@ graph_title $fsname usage
graph_order usedbydataset usedbychildren usedbysnapshots usedbyrefreservation available total quota graph_order usedbydataset usedbychildren usedbysnapshots usedbyrefreservation available total quota
graph_args --base 1024 -r -l 0 --vertical-label Bytes --upper-limit ${values[6]} graph_args --base 1024 -r -l 0 --vertical-label Bytes --upper-limit ${values[6]}
graph_info This graph shows how is used a zfs filesystems. graph_info This graph shows how is used a zfs filesystems.
graph_category disk graph_category fs
graph_period second graph_period second
usedbydataset.label UsedByDataset usedbydataset.label UsedByDataset
usedbydataset.draw AREA usedbydataset.draw AREA

View file

@ -272,7 +272,7 @@ l2efficiency() {
} }
[ "$1" = "config" ] && echo "graph_category disk" [ "$1" = "config" ] && echo "graph_category fs"
case "$FUNCTION" in case "$FUNCTION" in
efficiency) efficiency)

View file

@ -183,7 +183,7 @@ sub do_config_fs {
} }
print "graph_args --base 1024 --lower-limit 0 --rigid\n"; print "graph_args --base 1024 --lower-limit 0 --rigid\n";
print "graph_vlabel bytes \n"; print "graph_vlabel bytes \n";
print "graph_category disk\n"; print "graph_category fs\n";
print "graph_order @order\n"; print "graph_order @order\n";
foreach my $key ( keys %{$filesystems->{$fs}}) { foreach my $key ( keys %{$filesystems->{$fs}}) {

View file

@ -13,7 +13,7 @@ case $1 in
graph_title ZFS ARC Counters graph_title ZFS ARC Counters
graph_vlabel per second graph_vlabel per second
graph_scale no graph_scale no
graph_category disk graph_category fs
graph_args -l 0 graph_args -l 0
graph_info FreeBSD ZFS ARC Utilisation - Counters graph_info FreeBSD ZFS ARC Utilisation - Counters
EOF EOF

View file

@ -328,7 +328,7 @@ l2efficiency() {
} }
[ "$1" = "config" ] && echo "graph_category disk" [ "$1" = "config" ] && echo "graph_category fs"
case "$FUNCTION" in case "$FUNCTION" in
efficiency) efficiency)

View file

@ -4,7 +4,7 @@ if [ "$1" = "config" ]; then
echo 'graph_title zpool list' echo 'graph_title zpool list'
echo 'graph_args --base 1000 -l 0' echo 'graph_args --base 1000 -l 0'
echo 'graph_vlabel zpool list' echo 'graph_vlabel zpool list'
echo 'graph_category disk' echo 'graph_category fs'
echo 'graph_scale no' echo 'graph_scale no'
echo 'graph_info This graph shows zpool list on the server.' echo 'graph_info This graph shows zpool list on the server.'
zlist=`/sbin/zpool list -H|awk '{print $1}'` zlist=`/sbin/zpool list -H|awk '{print $1}'`

View file

@ -17,7 +17,7 @@ if [ "$1" = "config" ]; then
echo 'graph_title zpool iostat' echo 'graph_title zpool iostat'
echo 'graph_args --base 1000 -l 0' echo 'graph_args --base 1000 -l 0'
echo 'graph_vlabel write - read KBytes/s' echo 'graph_vlabel write - read KBytes/s'
echo 'graph_category disk' echo 'graph_category fs'
echo 'graph_scale no' echo 'graph_scale no'
echo 'graph_info This graph shows zpool iostat' echo 'graph_info This graph shows zpool iostat'
echo 'graph_order '$zorder echo 'graph_order '$zorder