mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-21 10:39:53 +00:00
snmp__if_combined: use instance name in graph titles
Signed-off-by: Olivier Mehani <shtrom@ssji.net>
This commit is contained in:
parent
b14e2347f4
commit
ada3160e9c
1 changed files with 5 additions and 3 deletions
|
@ -242,8 +242,10 @@ use Munin::Plugin::SNMP;
|
||||||
|
|
||||||
my $scriptname='snmp_if_combined';
|
my $scriptname='snmp_if_combined';
|
||||||
my @scriptname_components= split(/_/,$0);
|
my @scriptname_components= split(/_/,$0);
|
||||||
|
my $instance = 'All interfaces';
|
||||||
if ($scriptname_components[-1] ne 'combined') {
|
if ($scriptname_components[-1] ne 'combined') {
|
||||||
$scriptname .= "_${scriptname_components[-1]}";
|
$instance = $scriptname_components[-1];
|
||||||
|
$scriptname .= "_${instance}";
|
||||||
}
|
}
|
||||||
|
|
||||||
my $response;
|
my $response;
|
||||||
|
@ -651,7 +653,7 @@ sub do_config_root {
|
||||||
print <<END;
|
print <<END;
|
||||||
|
|
||||||
multigraph $scriptname
|
multigraph $scriptname
|
||||||
graph_title All interfaces traffic
|
graph_title $instance traffic
|
||||||
graph_args --base 1000
|
graph_args --base 1000
|
||||||
graph_vlabel bits in (-) / out (+) per \${graph_period}
|
graph_vlabel bits in (-) / out (+) per \${graph_period}
|
||||||
graph_category network
|
graph_category network
|
||||||
|
@ -725,7 +727,7 @@ END
|
||||||
|
|
||||||
print <<END;
|
print <<END;
|
||||||
multigraph ${scriptname}_err
|
multigraph ${scriptname}_err
|
||||||
graph_title All interfaces errors
|
graph_title $instance errors
|
||||||
graph_args --base 1000
|
graph_args --base 1000
|
||||||
graph_vlabel errors in (-) / out (+) per \${graph_period}
|
graph_vlabel errors in (-) / out (+) per \${graph_period}
|
||||||
graph_category network
|
graph_category network
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue