mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-21 18:41:03 +00:00
Merge pull request #809 from dipohl/master
Category Tree: Reduce number of categories
This commit is contained in:
commit
bb64fcbc55
17 changed files with 19 additions and 21 deletions
|
@ -41,7 +41,7 @@ if [ "$1" = "config" ]; then
|
||||||
|
|
||||||
echo 'graph_title HS Read port connections'
|
echo 'graph_title HS Read port connections'
|
||||||
echo "graph_args --base 1000 -l 0"
|
echo "graph_args --base 1000 -l 0"
|
||||||
echo 'graph_category mysql'
|
echo 'graph_category db'
|
||||||
echo 'total.label Total'
|
echo 'total.label Total'
|
||||||
echo 'total.draw AREA'
|
echo 'total.draw AREA'
|
||||||
echo 'total.min 0'
|
echo 'total.min 0'
|
||||||
|
|
|
@ -41,7 +41,7 @@ if [ "$1" = "config" ]; then
|
||||||
|
|
||||||
echo 'graph_title HS Write port connections'
|
echo 'graph_title HS Write port connections'
|
||||||
echo "graph_args --base 1000 -l 0"
|
echo "graph_args --base 1000 -l 0"
|
||||||
echo 'graph_category mysql'
|
echo 'graph_category db'
|
||||||
echo 'total.label Total'
|
echo 'total.label Total'
|
||||||
echo 'total.draw AREA'
|
echo 'total.draw AREA'
|
||||||
echo 'total.min 0'
|
echo 'total.min 0'
|
||||||
|
|
|
@ -28,7 +28,7 @@ while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
|
||||||
if($argc > 1 && $argv[1] == 'config') {
|
if($argc > 1 && $argv[1] == 'config') {
|
||||||
$text = <<<EOT
|
$text = <<<EOT
|
||||||
graph_title $dbname Schema Size
|
graph_title $dbname Schema Size
|
||||||
graph_category mysql
|
graph_category db
|
||||||
graph_vlabel Size
|
graph_vlabel Size
|
||||||
graph_args --base 1024 -l 0
|
graph_args --base 1024 -l 0
|
||||||
$text
|
$text
|
||||||
|
|
|
@ -30,7 +30,7 @@ EOT;
|
||||||
if($argc > 1 && $argv[1] == 'config') {
|
if($argc > 1 && $argv[1] == 'config') {
|
||||||
$text = <<<EOT
|
$text = <<<EOT
|
||||||
graph_title $dbname Table Data Size
|
graph_title $dbname Table Data Size
|
||||||
graph_category mysql
|
graph_category db
|
||||||
graph_vlabel Size
|
graph_vlabel Size
|
||||||
graph_args --base 1024 -l 0
|
graph_args --base 1024 -l 0
|
||||||
$text
|
$text
|
||||||
|
|
|
@ -161,7 +161,7 @@ elif len(sys.argv) == 2 and sys.argv[1] == "config":
|
||||||
print "graph mysql_aggregate_%s" % table
|
print "graph mysql_aggregate_%s" % table
|
||||||
print "graph_title %s" % label
|
print "graph_title %s" % label
|
||||||
print "graph_vlabel %s" % vlabel
|
print "graph_vlabel %s" % vlabel
|
||||||
print "graph_category mysql"
|
print "graph_category db"
|
||||||
print ""
|
print ""
|
||||||
if "only" in os.environ:
|
if "only" in os.environ:
|
||||||
print "values_count.label %s" % (os.environ["only"], )
|
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 "multigraph mysql_aggregate_%s" % table
|
||||||
print "graph_title %s" % label
|
print "graph_title %s" % label
|
||||||
print "graph_vlabel %s" % vlabel
|
print "graph_vlabel %s" % vlabel
|
||||||
print "graph_category mysql"
|
print "graph_category db"
|
||||||
print ""
|
print ""
|
||||||
|
|
||||||
for key in values.keys():
|
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 "multigraph mysql_aggregate_%s.%s" % (table, key.replace(".", "_"))
|
||||||
print "graph_title %s, value %s" % (label, key.replace(".", "_"))
|
print "graph_title %s, value %s" % (label, key.replace(".", "_"))
|
||||||
print "graph_vlabel %s" % vlabel
|
print "graph_vlabel %s" % vlabel
|
||||||
print "graph_category mysql"
|
print "graph_category db"
|
||||||
print ""
|
print ""
|
||||||
print "%s_count.label %s" % (key.replace(".", "_"), key)
|
print "%s_count.label %s" % (key.replace(".", "_"), key)
|
||||||
print ""
|
print ""
|
||||||
|
|
|
@ -102,7 +102,7 @@ graph_title MySQL Connections
|
||||||
graph_args --base 1000 --lower-limit 0
|
graph_args --base 1000 --lower-limit 0
|
||||||
graph_vlabel Connections
|
graph_vlabel Connections
|
||||||
graph_info The number of current connections with respect to the max_connections setting.
|
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_order current available
|
||||||
graph_total Total
|
graph_total Total
|
||||||
current.label In Use
|
current.label In Use
|
||||||
|
|
|
@ -115,7 +115,7 @@ graph_title MySQL Connections per user
|
||||||
graph_args --base 1000 --lower-limit 0
|
graph_args --base 1000 --lower-limit 0
|
||||||
graph_vlabel Connections
|
graph_vlabel Connections
|
||||||
graph_info The number of current connexions per user.
|
graph_info The number of current connexions per user.
|
||||||
graph_category mysql
|
graph_category db
|
||||||
graph_total Total
|
graph_total Total
|
||||||
EOM
|
EOM
|
||||||
|
|
||||||
|
|
|
@ -79,7 +79,7 @@ sub print_config {
|
||||||
print('graph_title MySQL Queries in cache
|
print('graph_title MySQL Queries in cache
|
||||||
graph_args --base 1000
|
graph_args --base 1000
|
||||||
graph_vlabel queries
|
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>
|
graph_info Plugin available at <a href="http://rodolphe.quiedeville.org/hack/munin/">http://rodolphe.quiedeville.org/hack/munin/</a>
|
||||||
');
|
');
|
||||||
|
|
||||||
|
|
|
@ -92,7 +92,7 @@ sub print_config {
|
||||||
print('graph_title MySQL Queries Cache Size
|
print('graph_title MySQL Queries Cache Size
|
||||||
graph_args --base 1024 -l 0
|
graph_args --base 1024 -l 0
|
||||||
graph_vlabel bytes
|
graph_vlabel bytes
|
||||||
graph_category mysql
|
graph_category db
|
||||||
graph_order used free
|
graph_order used free
|
||||||
graph_total Total
|
graph_total Total
|
||||||
graph_info Plugin available at <a href="http://rodolphe.quiedeville.org/hack/munin/">http://rodolphe.quiedeville.org/hack/munin/</a>
|
graph_info Plugin available at <a href="http://rodolphe.quiedeville.org/hack/munin/">http://rodolphe.quiedeville.org/hack/munin/</a>
|
||||||
|
|
|
@ -54,7 +54,6 @@ mysqlbin=$(which mysql)
|
||||||
|
|
||||||
default_errorvalue=30
|
default_errorvalue=30
|
||||||
default_title="Results from MySQL queries"
|
default_title="Results from MySQL queries"
|
||||||
default_category="mysql"
|
|
||||||
default_vlabel="value / sec"
|
default_vlabel="value / sec"
|
||||||
default_info="This graph shows results of one or more SQL queries."
|
default_info="This graph shows results of one or more SQL queries."
|
||||||
default_args="--base 1000 -l 0"
|
default_args="--base 1000 -l 0"
|
||||||
|
@ -77,7 +76,6 @@ fi
|
||||||
|
|
||||||
[ -n "${errorvalue}" ] || errorvalue=${default_errorvalue}
|
[ -n "${errorvalue}" ] || errorvalue=${default_errorvalue}
|
||||||
[ -n "${title}" ] || title="${default_title}"
|
[ -n "${title}" ] || title="${default_title}"
|
||||||
[ -n "${category}" ] || category="${default_category}"
|
|
||||||
[ -n "${vlabel}" ] || vlabel="${default_vlabel}"
|
[ -n "${vlabel}" ] || vlabel="${default_vlabel}"
|
||||||
[ -n "${info}" ] || info="${default_info}"
|
[ -n "${info}" ] || info="${default_info}"
|
||||||
[ -n "${args}" ] || args="${default_args}"
|
[ -n "${args}" ] || args="${default_args}"
|
||||||
|
@ -89,7 +87,7 @@ graph_title ${title}
|
||||||
graph_args ${args}
|
graph_args ${args}
|
||||||
graph_scale ${scale}
|
graph_scale ${scale}
|
||||||
graph_vlabel ${vlabel}
|
graph_vlabel ${vlabel}
|
||||||
graph_category ${category}
|
graph_category db
|
||||||
graph_info ${info}
|
graph_info ${info}
|
||||||
EOH1
|
EOH1
|
||||||
[ -n "${period}" ] && echo "graph_period ${period}"
|
[ -n "${period}" ] && echo "graph_period ${period}"
|
||||||
|
|
|
@ -115,7 +115,7 @@ sub print_config {
|
||||||
print("graph_title MySQL database $db size\n");
|
print("graph_title MySQL database $db size\n");
|
||||||
print ('graph_args --base 1024 -l 0
|
print ('graph_args --base 1024 -l 0
|
||||||
graph_vlabel bytes
|
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>
|
graph_info Plugin available at <a href="http://rodolphe.quiedeville.org/hack/munin/">http://rodolphe.quiedeville.org/hack/munin/</a>
|
||||||
');
|
');
|
||||||
|
|
||||||
|
|
|
@ -126,7 +126,7 @@ sub print_config {
|
||||||
print("graph_title MySQL databases size\n");
|
print("graph_title MySQL databases size\n");
|
||||||
print ('graph_args --base 1024 -l 0
|
print ('graph_args --base 1024 -l 0
|
||||||
graph_vlabel bytes
|
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>
|
graph_info Plugin available at <a href="http://rodolphe.quiedeville.org/hack/munin/">http://rodolphe.quiedeville.org/hack/munin/</a>
|
||||||
');
|
');
|
||||||
|
|
||||||
|
|
|
@ -50,7 +50,7 @@ then
|
||||||
elif [ "${1:-}" = "config" ]
|
elif [ "${1:-}" = "config" ]
|
||||||
then
|
then
|
||||||
echo "graph_title MySQL on-disk database size"
|
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
|
# graph_info cannot have newlines - replace by <br> which will be rendered to newlines in
|
||||||
# the web interface.
|
# the web interface.
|
||||||
echo "graph_info ${INFO//$'\n'/<br>}"
|
echo "graph_info ${INFO//$'\n'/<br>}"
|
||||||
|
|
|
@ -79,7 +79,7 @@ sub print_config {
|
||||||
print "graph_title MySQL Slave Status\n";
|
print "graph_title MySQL Slave Status\n";
|
||||||
print "graph_args --base 1000 -l 0\n";
|
print "graph_args --base 1000 -l 0\n";
|
||||||
print "graph_vlabel Seconds\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.label Seconds behind master\n";
|
||||||
print "seconds.min 0\n";
|
print "seconds.min 0\n";
|
||||||
print "seconds.draw LINE2\n";
|
print "seconds.draw LINE2\n";
|
||||||
|
|
|
@ -28,7 +28,7 @@ if(defined $ARGV[0] && $ARGV[0] eq 'config') {
|
||||||
print <<EOC
|
print <<EOC
|
||||||
graph_title MySQL Slave Threads
|
graph_title MySQL Slave Threads
|
||||||
graph_vlabel Running
|
graph_vlabel Running
|
||||||
graph_category mysql
|
graph_category db
|
||||||
graph_args -l 0
|
graph_args -l 0
|
||||||
io.label I/O Thread
|
io.label I/O Thread
|
||||||
io.critical 1:1
|
io.critical 1:1
|
||||||
|
|
|
@ -128,7 +128,7 @@ elif len(sys.argv) == 2 and sys.argv[1] == "config":
|
||||||
|
|
||||||
print "graph_title %s" % label
|
print "graph_title %s" % label
|
||||||
print "graph_vlabel %s" % vlabel
|
print "graph_vlabel %s" % vlabel
|
||||||
print "graph_category percona"
|
print "graph_category db"
|
||||||
print ""
|
print ""
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -185,7 +185,7 @@ if ($ARGV[0] and $ARGV[0] eq "config") {
|
||||||
print("host_name $host\n");
|
print("host_name $host\n");
|
||||||
printf("graph_title %s\n", $graphs->{$mode}->{'title'});
|
printf("graph_title %s\n", $graphs->{$mode}->{'title'});
|
||||||
# print "graph_args --base 1000\n";
|
# print "graph_args --base 1000\n";
|
||||||
print("graph_category envsensor\n");
|
print("graph_category sensors\n");
|
||||||
printf("graph_vlabel %s\n", $graphs->{$mode}->{'unit'});
|
printf("graph_vlabel %s\n", $graphs->{$mode}->{'unit'});
|
||||||
unless (defined($graphs->{$mode}->{'thatype'})) {
|
unless (defined($graphs->{$mode}->{'thatype'})) {
|
||||||
print("graph_info For contact sensors, the values mean: 1 = open, 2 = closed, 3 = armed, 4 = triggered\n");
|
print("graph_info For contact sensors, the values mean: 1 = open, 2 = closed, 3 = armed, 4 = triggered\n");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue