mirror of https://github.com/mikaku/Monitorix.git
Fixed the lack of minimum definition in some data sources of 'bind' graph
This commit is contained in:
parent
e238d90cd1
commit
a790c283a4
2
Changes
2
Changes
|
@ -34,6 +34,8 @@
|
||||||
(thanks to Patrick Fallberg, patrick AT fallberg.net for pointing this out)
|
(thanks to Patrick Fallberg, patrick AT fallberg.net for pointing this out)
|
||||||
- Fixed to correctly sanitize the input string in the built-in HTTP server
|
- Fixed to correctly sanitize the input string in the built-in HTTP server
|
||||||
which led a number of security vulnerabilities. [#30]
|
which led a number of security vulnerabilities. [#30]
|
||||||
|
- Fixed the lack of minimum definition in some data sources of 'bind' graph.
|
||||||
|
(thanks to Andreas Itzchak Rehberg, izzy AT qumran.org for pointing this out)
|
||||||
- Small fixes and typos.
|
- Small fixes and typos.
|
||||||
|
|
||||||
|
|
||||||
|
|
54
lib/bind.pm
54
lib/bind.pm
|
@ -79,12 +79,12 @@ sub bind_init {
|
||||||
push(@last, "RRA:LAST:0.5:1440:" . (365 * $n));
|
push(@last, "RRA:LAST:0.5:1440:" . (365 * $n));
|
||||||
}
|
}
|
||||||
for($n = 0; $n < scalar(my @bl = split(',', $bind->{list})); $n++) {
|
for($n = 0; $n < scalar(my @bl = split(',', $bind->{list})); $n++) {
|
||||||
push(@tmp, "DS:bind" . $n . "_totalinq:GAUGE:120:U:U");
|
push(@tmp, "DS:bind" . $n . "_totalinq:GAUGE:120:0:U");
|
||||||
push(@tmp, "DS:bind" . $n . "_inq01:GAUGE:120:U:U");
|
push(@tmp, "DS:bind" . $n . "_inq01:GAUGE:120:0:U");
|
||||||
push(@tmp, "DS:bind" . $n . "_inq02:GAUGE:120:U:U");
|
push(@tmp, "DS:bind" . $n . "_inq02:GAUGE:120:0:U");
|
||||||
push(@tmp, "DS:bind" . $n . "_inq03:GAUGE:120:U:U");
|
push(@tmp, "DS:bind" . $n . "_inq03:GAUGE:120:0:U");
|
||||||
push(@tmp, "DS:bind" . $n . "_inq04:GAUGE:120:U:U");
|
push(@tmp, "DS:bind" . $n . "_inq04:GAUGE:120:0:U");
|
||||||
push(@tmp, "DS:bind" . $n . "_inq05:GAUGE:120:U:U");
|
push(@tmp, "DS:bind" . $n . "_inq05:GAUGE:120:0:U");
|
||||||
push(@tmp, "DS:bind" . $n . "_inq06:GAUGE:120:0:U");
|
push(@tmp, "DS:bind" . $n . "_inq06:GAUGE:120:0:U");
|
||||||
push(@tmp, "DS:bind" . $n . "_inq07:GAUGE:120:0:U");
|
push(@tmp, "DS:bind" . $n . "_inq07:GAUGE:120:0:U");
|
||||||
push(@tmp, "DS:bind" . $n . "_inq08:GAUGE:120:0:U");
|
push(@tmp, "DS:bind" . $n . "_inq08:GAUGE:120:0:U");
|
||||||
|
@ -100,11 +100,11 @@ sub bind_init {
|
||||||
push(@tmp, "DS:bind" . $n . "_inq18:GAUGE:120:0:U");
|
push(@tmp, "DS:bind" . $n . "_inq18:GAUGE:120:0:U");
|
||||||
push(@tmp, "DS:bind" . $n . "_inq19:GAUGE:120:0:U");
|
push(@tmp, "DS:bind" . $n . "_inq19:GAUGE:120:0:U");
|
||||||
push(@tmp, "DS:bind" . $n . "_inq20:GAUGE:120:0:U");
|
push(@tmp, "DS:bind" . $n . "_inq20:GAUGE:120:0:U");
|
||||||
push(@tmp, "DS:bind" . $n . "_ouq01:GAUGE:120:U:U");
|
push(@tmp, "DS:bind" . $n . "_ouq01:GAUGE:120:0:U");
|
||||||
push(@tmp, "DS:bind" . $n . "_ouq02:GAUGE:120:U:U");
|
push(@tmp, "DS:bind" . $n . "_ouq02:GAUGE:120:0:U");
|
||||||
push(@tmp, "DS:bind" . $n . "_ouq03:GAUGE:120:U:U");
|
push(@tmp, "DS:bind" . $n . "_ouq03:GAUGE:120:0:U");
|
||||||
push(@tmp, "DS:bind" . $n . "_ouq04:GAUGE:120:U:U");
|
push(@tmp, "DS:bind" . $n . "_ouq04:GAUGE:120:0:U");
|
||||||
push(@tmp, "DS:bind" . $n . "_ouq05:GAUGE:120:U:U");
|
push(@tmp, "DS:bind" . $n . "_ouq05:GAUGE:120:0:U");
|
||||||
push(@tmp, "DS:bind" . $n . "_ouq06:GAUGE:120:0:U");
|
push(@tmp, "DS:bind" . $n . "_ouq06:GAUGE:120:0:U");
|
||||||
push(@tmp, "DS:bind" . $n . "_ouq07:GAUGE:120:0:U");
|
push(@tmp, "DS:bind" . $n . "_ouq07:GAUGE:120:0:U");
|
||||||
push(@tmp, "DS:bind" . $n . "_ouq08:GAUGE:120:0:U");
|
push(@tmp, "DS:bind" . $n . "_ouq08:GAUGE:120:0:U");
|
||||||
|
@ -160,11 +160,11 @@ sub bind_init {
|
||||||
push(@tmp, "DS:bind" . $n . "_rs18:GAUGE:120:0:U");
|
push(@tmp, "DS:bind" . $n . "_rs18:GAUGE:120:0:U");
|
||||||
push(@tmp, "DS:bind" . $n . "_rs19:GAUGE:120:0:U");
|
push(@tmp, "DS:bind" . $n . "_rs19:GAUGE:120:0:U");
|
||||||
push(@tmp, "DS:bind" . $n . "_rs20:GAUGE:120:0:U");
|
push(@tmp, "DS:bind" . $n . "_rs20:GAUGE:120:0:U");
|
||||||
push(@tmp, "DS:bind" . $n . "_crr01:GAUGE:120:U:U");
|
push(@tmp, "DS:bind" . $n . "_crr01:GAUGE:120:0:U");
|
||||||
push(@tmp, "DS:bind" . $n . "_crr02:GAUGE:120:U:U");
|
push(@tmp, "DS:bind" . $n . "_crr02:GAUGE:120:0:U");
|
||||||
push(@tmp, "DS:bind" . $n . "_crr03:GAUGE:120:U:U");
|
push(@tmp, "DS:bind" . $n . "_crr03:GAUGE:120:0:U");
|
||||||
push(@tmp, "DS:bind" . $n . "_crr04:GAUGE:120:U:U");
|
push(@tmp, "DS:bind" . $n . "_crr04:GAUGE:120:0:U");
|
||||||
push(@tmp, "DS:bind" . $n . "_crr05:GAUGE:120:U:U");
|
push(@tmp, "DS:bind" . $n . "_crr05:GAUGE:120:0:U");
|
||||||
push(@tmp, "DS:bind" . $n . "_crr06:GAUGE:120:0:U");
|
push(@tmp, "DS:bind" . $n . "_crr06:GAUGE:120:0:U");
|
||||||
push(@tmp, "DS:bind" . $n . "_crr07:GAUGE:120:0:U");
|
push(@tmp, "DS:bind" . $n . "_crr07:GAUGE:120:0:U");
|
||||||
push(@tmp, "DS:bind" . $n . "_crr08:GAUGE:120:0:U");
|
push(@tmp, "DS:bind" . $n . "_crr08:GAUGE:120:0:U");
|
||||||
|
@ -250,6 +250,28 @@ sub bind_init {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# this fixes the lack of minimum definition in some data sources
|
||||||
|
for($n = 0; $n < scalar(my @bl = split(',', $bind->{list})); $n++) {
|
||||||
|
RRDs::tune($rrd,
|
||||||
|
"--minimum=bind" . $n . "_totalinq:0",
|
||||||
|
"--minimum=bind" . $n . "_inq01:0",
|
||||||
|
"--minimum=bind" . $n . "_inq02:0",
|
||||||
|
"--minimum=bind" . $n . "_inq03:0",
|
||||||
|
"--minimum=bind" . $n . "_inq04:0",
|
||||||
|
"--minimum=bind" . $n . "_inq05:0",
|
||||||
|
"--minimum=bind" . $n . "_ouq01:0",
|
||||||
|
"--minimum=bind" . $n . "_ouq02:0",
|
||||||
|
"--minimum=bind" . $n . "_ouq03:0",
|
||||||
|
"--minimum=bind" . $n . "_ouq04:0",
|
||||||
|
"--minimum=bind" . $n . "_ouq05:0",
|
||||||
|
"--minimum=bind" . $n . "_crr01:0",
|
||||||
|
"--minimum=bind" . $n . "_crr02:0",
|
||||||
|
"--minimum=bind" . $n . "_crr03:0",
|
||||||
|
"--minimum=bind" . $n . "_crr04:0",
|
||||||
|
"--minimum=bind" . $n . "_crr05:0",
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
$config->{bind_hist} = ();
|
$config->{bind_hist} = ();
|
||||||
push(@{$config->{func_update}}, $package);
|
push(@{$config->{func_update}}, $package);
|
||||||
logger("$myself: Ok") if $debug;
|
logger("$myself: Ok") if $debug;
|
||||||
|
|
Loading…
Reference in New Issue