Category Tree: Reduce number of categories

Don't use variable to set category, plugin gallery build script needs the pure string..
This commit is contained in:
dipohl 2017-02-21 00:41:40 +01:00
parent 9841894599
commit 8af93fce06
17 changed files with 19 additions and 21 deletions

View File

@ -41,7 +41,7 @@ if [ "$1" = "config" ]; then
echo 'graph_title HS Read port connections'
echo "graph_args --base 1000 -l 0"
echo 'graph_category mysql'
echo 'graph_category db'
echo 'total.label Total'
echo 'total.draw AREA'
echo 'total.min 0'

View File

@ -41,7 +41,7 @@ if [ "$1" = "config" ]; then
echo 'graph_title HS Write port connections'
echo "graph_args --base 1000 -l 0"
echo 'graph_category mysql'
echo 'graph_category db'
echo 'total.label Total'
echo 'total.draw AREA'
echo 'total.min 0'

View File

@ -28,7 +28,7 @@ while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
if($argc > 1 && $argv[1] == 'config') {
$text = <<<EOT
graph_title $dbname Schema Size
graph_category mysql
graph_category db
graph_vlabel Size
graph_args --base 1024 -l 0
$text

View File

@ -30,7 +30,7 @@ EOT;
if($argc > 1 && $argv[1] == 'config') {
$text = <<<EOT
graph_title $dbname Table Data Size
graph_category mysql
graph_category db
graph_vlabel Size
graph_args --base 1024 -l 0
$text

View File

@ -161,7 +161,7 @@ elif len(sys.argv) == 2 and sys.argv[1] == "config":
print "graph mysql_aggregate_%s" % table
print "graph_title %s" % label
print "graph_vlabel %s" % vlabel
print "graph_category mysql"
print "graph_category db"
print ""
if "only" in os.environ:
print "values_count.label %s" % (os.environ["only"], )
@ -171,7 +171,7 @@ elif len(sys.argv) == 2 and sys.argv[1] == "config":
print "multigraph mysql_aggregate_%s" % table
print "graph_title %s" % label
print "graph_vlabel %s" % vlabel
print "graph_category mysql"
print "graph_category db"
print ""
for key in values.keys():
@ -182,7 +182,7 @@ elif len(sys.argv) == 2 and sys.argv[1] == "config":
print "multigraph mysql_aggregate_%s.%s" % (table, key.replace(".", "_"))
print "graph_title %s, value %s" % (label, key.replace(".", "_"))
print "graph_vlabel %s" % vlabel
print "graph_category mysql"
print "graph_category db"
print ""
print "%s_count.label %s" % (key.replace(".", "_"), key)
print ""

View File

@ -102,7 +102,7 @@ graph_title MySQL Connections
graph_args --base 1000 --lower-limit 0
graph_vlabel Connections
graph_info The number of current connections with respect to the max_connections setting.
graph_category mysql
graph_category db
graph_order current available
graph_total Total
current.label In Use

View File

@ -115,7 +115,7 @@ graph_title MySQL Connections per user
graph_args --base 1000 --lower-limit 0
graph_vlabel Connections
graph_info The number of current connexions per user.
graph_category mysql
graph_category db
graph_total Total
EOM

View File

@ -79,7 +79,7 @@ sub print_config {
print('graph_title MySQL Queries in cache
graph_args --base 1000
graph_vlabel queries
graph_category mysql
graph_category db
graph_info Plugin available at <a href="http://rodolphe.quiedeville.org/hack/munin/">http://rodolphe.quiedeville.org/hack/munin/</a>
');

View File

@ -92,7 +92,7 @@ sub print_config {
print('graph_title MySQL Queries Cache Size
graph_args --base 1024 -l 0
graph_vlabel bytes
graph_category mysql
graph_category db
graph_order used free
graph_total Total
graph_info Plugin available at <a href="http://rodolphe.quiedeville.org/hack/munin/">http://rodolphe.quiedeville.org/hack/munin/</a>

View File

@ -54,7 +54,6 @@ mysqlbin=$(which mysql)
default_errorvalue=30
default_title="Results from MySQL queries"
default_category="mysql"
default_vlabel="value / sec"
default_info="This graph shows results of one or more SQL queries."
default_args="--base 1000 -l 0"
@ -77,7 +76,6 @@ fi
[ -n "${errorvalue}" ] || errorvalue=${default_errorvalue}
[ -n "${title}" ] || title="${default_title}"
[ -n "${category}" ] || category="${default_category}"
[ -n "${vlabel}" ] || vlabel="${default_vlabel}"
[ -n "${info}" ] || info="${default_info}"
[ -n "${args}" ] || args="${default_args}"
@ -89,7 +87,7 @@ graph_title ${title}
graph_args ${args}
graph_scale ${scale}
graph_vlabel ${vlabel}
graph_category ${category}
graph_category db
graph_info ${info}
EOH1
[ -n "${period}" ] && echo "graph_period ${period}"

View File

@ -115,7 +115,7 @@ sub print_config {
print("graph_title MySQL database $db size\n");
print ('graph_args --base 1024 -l 0
graph_vlabel bytes
graph_category mysql
graph_category db
graph_info Plugin available at <a href="http://rodolphe.quiedeville.org/hack/munin/">http://rodolphe.quiedeville.org/hack/munin/</a>
');

View File

@ -126,7 +126,7 @@ sub print_config {
print("graph_title MySQL databases size\n");
print ('graph_args --base 1024 -l 0
graph_vlabel bytes
graph_category mysql
graph_category db
graph_info Plugin available at <a href="http://rodolphe.quiedeville.org/hack/munin/">http://rodolphe.quiedeville.org/hack/munin/</a>
');

View File

@ -50,7 +50,7 @@ then
elif [ "${1:-}" = "config" ]
then
echo "graph_title MySQL on-disk database size"
echo "graph_category mysql"
echo "graph_category db"
# graph_info cannot have newlines - replace by <br> which will be rendered to newlines in
# the web interface.
echo "graph_info ${INFO//$'\n'/<br>}"

View File

@ -79,7 +79,7 @@ sub print_config {
print "graph_title MySQL Slave Status\n";
print "graph_args --base 1000 -l 0\n";
print "graph_vlabel Seconds\n";
print "graph_category mysql\n";
print "graph_category db\n";
print "seconds.label Seconds behind master\n";
print "seconds.min 0\n";
print "seconds.draw LINE2\n";

View File

@ -28,7 +28,7 @@ if(defined $ARGV[0] && $ARGV[0] eq 'config') {
print <<EOC
graph_title MySQL Slave Threads
graph_vlabel Running
graph_category mysql
graph_category db
graph_args -l 0
io.label I/O Thread
io.critical 1:1

View File

@ -128,7 +128,7 @@ elif len(sys.argv) == 2 and sys.argv[1] == "config":
print "graph_title %s" % label
print "graph_vlabel %s" % vlabel
print "graph_category percona"
print "graph_category db"
print ""
try:

View File

@ -185,7 +185,7 @@ if ($ARGV[0] and $ARGV[0] eq "config") {
print("host_name $host\n");
printf("graph_title %s\n", $graphs->{$mode}->{'title'});
# print "graph_args --base 1000\n";
print("graph_category envsensor\n");
print("graph_category sensors\n");
printf("graph_vlabel %s\n", $graphs->{$mode}->{'unit'});
unless (defined($graphs->{$mode}->{'thatype'})) {
print("graph_info For contact sensors, the values mean: 1 = open, 2 = closed, 3 = armed, 4 = triggered\n");