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

plugins: make all of them use graph_vlabel instead of graph_vtitle.

This commit is contained in:
Diego Elio Pettenò 2012-08-23 08:56:01 -07:00
parent 55cb01870b
commit c814853976
5 changed files with 9 additions and 9 deletions

View File

@ -80,7 +80,7 @@ my %config = (
lookfor => 'Drive Temperature :', lookfor => 'Drive Temperature :',
label => 'Temp', label => 'Temp',
title => "MegaRAID Adapter $Adapter: Drive Temperatures", title => "MegaRAID Adapter $Adapter: Drive Temperatures",
vtitle => 'Celsius', vlabel => 'Celsius',
graph_args => '--base 1000 -l 0', graph_args => '--base 1000 -l 0',
warning => '55', warning => '55',
critical => '65', critical => '65',
@ -91,7 +91,7 @@ my %config = (
lookfor => 'Media Error Count: ', lookfor => 'Media Error Count: ',
label => 'Media Err', label => 'Media Err',
title => "MegaRAID Adapter $Adapter: Media Errors (SMART)", title => "MegaRAID Adapter $Adapter: Media Errors (SMART)",
vtitle => 'Number of Errors', vlabel => 'Number of Errors',
graph_args => '--base 1000 -l 0', graph_args => '--base 1000 -l 0',
warning => '', warning => '',
critical => '', critical => '',
@ -102,7 +102,7 @@ my %config = (
lookfor => 'Other Error Count: ', lookfor => 'Other Error Count: ',
label => 'Other Err', label => 'Other Err',
title => "MegaRAID Adapter $Adapter: Others Errors (SMART)", title => "MegaRAID Adapter $Adapter: Others Errors (SMART)",
vtitle => 'Number of Errors', vlabel => 'Number of Errors',
graph_args => '--base 1000 -l 0', graph_args => '--base 1000 -l 0',
warning => '', warning => '',
critical => '', critical => '',
@ -113,7 +113,7 @@ my %config = (
lookfor => 'Predictive Failure Count: ', lookfor => 'Predictive Failure Count: ',
label => 'Predictive Err', label => 'Predictive Err',
title => "MegaRAID Adapter $Adapter: Predictive Errors (SMART)", title => "MegaRAID Adapter $Adapter: Predictive Errors (SMART)",
vtitle => 'Number of Errors', vlabel => 'Number of Errors',
graph_args => '--base 1000 -l 0', graph_args => '--base 1000 -l 0',
warning => '', warning => '',
critical => '', critical => '',
@ -140,7 +140,7 @@ my @Output=qx($Command);
#Munin Config Options #Munin Config Options
if ($ARGV[0] and $ARGV[0] eq "config"){ if ($ARGV[0] and $ARGV[0] eq "config"){
print "graph_title $config{$Type}->{title}\n"; print "graph_title $config{$Type}->{title}\n";
print "graph_vtitle $config{$Type}->{vtitle}\n"; print "graph_vlabel $config{$Type}->{vlabel}\n";
print "graph_args $config{$Type}->{graph_args}\n"; print "graph_args $config{$Type}->{graph_args}\n";
print "graph_scale yes\n"; print "graph_scale yes\n";
print "graph_category disk\n"; print "graph_category disk\n";

View File

@ -157,7 +157,7 @@ File.open(CACHE_FILE, 'w') { |f| f.write log_info.to_yaml } unless $debug_mode
if ARGV.first == 'config' if ARGV.first == 'config'
puts <<CONFIG puts <<CONFIG
graph_title Ejabberd Log graph_title Ejabberd Log
graph_vtitle total graph_vlabel total
graph_category ejabberd graph_category ejabberd
graph_args -l 0 graph_args -l 0
graph_order #{(LABELS.keys + log_info.keys.select { |k| k.is_a? String }.sort).join(' ')} graph_order #{(LABELS.keys + log_info.keys.select { |k| k.is_a? String }.sort).join(' ')}

View File

@ -64,7 +64,7 @@ when 'config'
puts <<CONFIG puts <<CONFIG
graph_title Netstat: #{desc} graph_title Netstat: #{desc}
graph_category netstat graph_category netstat
graph_vtitle current graph_vlabel current
graph_order #{values.map { |name, _| name.to_s.escape }.join ' '} graph_order #{values.map { |name, _| name.to_s.escape }.join ' '}
CONFIG CONFIG
puts values.map { |name, _| puts values.map { |name, _|

View File

@ -58,7 +58,7 @@ class Graph
"multigraph #{name(unit)}", "multigraph #{name(unit)}",
"graph_title Netstat: #{@protocol}: #{@name}#{" (#{unit})" if multigraphs.size > 1}", "graph_title Netstat: #{@protocol}: #{@name}#{" (#{unit})" if multigraphs.size > 1}",
"graph_category netstat", "graph_category netstat",
"graph_vtitle per second", "graph_vlabel per second",
"graph_order #{labels.map(&:escape).join(' ')}" "graph_order #{labels.map(&:escape).join(' ')}"
] ]

View File

@ -13,7 +13,7 @@ case "$1" in
config) config)
cat << EOF cat << EOF
graph_title $TITLE graph_title $TITLE
graph_vtitle Celsius graph_vlabel Celsius
graph_args --base 1000 -l 0 graph_args --base 1000 -l 0
graph_category sensors graph_category sensors
temp.label $NAME temp.label $NAME