mirror of https://github.com/mikaku/Monitorix.git
added the section '<map>' to be able to rename the qdisc names in the graph. #74
This commit is contained in:
parent
e1561bb0f0
commit
4cc174d8c3
12
lib/tc.pm
12
lib/tc.pm
|
@ -470,6 +470,9 @@ sub tc_cgi {
|
|||
my ($q1, $q2) = (($qdisc[$n] || "") =~ m/\s*(\S+)\s*(.*)\s*/);
|
||||
my $str = ($q1 || "") . ($q2 ? " $q2" : "");
|
||||
if($str) {
|
||||
if($tc->{map}->{$n} || "" eq $str) {
|
||||
$str = $tc->{map}->{$n};
|
||||
}
|
||||
push(@tmpz, "LINE2:sent" . $n . $LC[$n] . ":$str");
|
||||
$str = sprintf("%-15s", substr($str, 0, 15));
|
||||
push(@tmp, "LINE2:sent" . $n . $LC[$n] . ":$str");
|
||||
|
@ -599,6 +602,9 @@ sub tc_cgi {
|
|||
my ($q1, $q2) = (($qdisc[$n] || "") =~ m/\s*(\S+)\s*(.*)\s*/);
|
||||
my $str = ($q1 || "") . ($q2 ? " $q2" : "");
|
||||
if($str) {
|
||||
if($tc->{map}->{$n} || "" eq $str) {
|
||||
$str = $tc->{map}->{$n};
|
||||
}
|
||||
push(@tmpz, "LINE2:drop" . $n . $LC[$n] . ":$str");
|
||||
$str = sprintf("%-15s", substr($str, 0, 15));
|
||||
push(@tmp, "LINE2:drop" . $n . $LC[$n] . ":$str");
|
||||
|
@ -702,6 +708,9 @@ sub tc_cgi {
|
|||
my ($q1, $q2) = (($qdisc[$n] || "") =~ m/\s*(\S+)\s*(.*)\s*/);
|
||||
my $str = ($q1 || "") . ($q2 ? " $q2" : "");
|
||||
if($str) {
|
||||
if($tc->{map}->{$n} || "" eq $str) {
|
||||
$str = $tc->{map}->{$n};
|
||||
}
|
||||
push(@tmpz, "LINE2:over" . $n . $LC[$n] . ":$str");
|
||||
$str = sprintf("%-15s", substr($str, 0, 15));
|
||||
push(@tmp, "LINE2:over" . $n . $LC[$n] . ":$str");
|
||||
|
@ -809,6 +818,9 @@ sub tc_cgi {
|
|||
my ($q1, $q2) = (($qdisc[$n] || "") =~ m/\s*(\S+)\s*(.*)\s*/);
|
||||
my $str = ($q1 || "") . ($q2 ? " $q2" : "");
|
||||
if($str) {
|
||||
if($tc->{map}->{$n} || "" eq $str) {
|
||||
$str = $tc->{map}->{$n};
|
||||
}
|
||||
push(@tmpz, "LINE2:requ" . $n . $LC[$n] . ":$str");
|
||||
$str = sprintf("%-15s", substr($str, 0, 15));
|
||||
push(@tmp, "LINE2:requ" . $n . $LC[$n] . ":$str");
|
||||
|
|
|
@ -292,6 +292,8 @@ secure_log_date_format = %b %e
|
|||
<desc>
|
||||
eth0 = cbq 1, sfq 10, sfq 20, sfq 30, ingress ffff
|
||||
</desc>
|
||||
<map>
|
||||
</map>
|
||||
rigid = 0, 0, 0
|
||||
limit = 1000, 1000, 1000
|
||||
</tc>
|
||||
|
|
Loading…
Reference in New Issue