mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
some fixes, and cleanups, also bits per second not bytes ;)
git-svn-id: http://www.observium.org/svn/observer/trunk@1502 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@ -30,7 +30,7 @@ $rrd_options .= " VDEF:d95thout=doutbits,5,PERCENT";
|
||||
|
||||
$rrd_options .= " AREA:inbits_max#aDEB7B:";
|
||||
$rrd_options .= " AREA:inbits#CDEB8B:";
|
||||
$rrd_options .= " COMMENT:'BPS Now Ave Max 95th %\\n'";
|
||||
$rrd_options .= " COMMENT:'bps Now Ave Max 95th %\\n'";
|
||||
$rrd_options .= " LINE1.25:inbits#006600:'In '";
|
||||
$rrd_options .= " GPRINT:inbits:LAST:%6.2lf%s";
|
||||
$rrd_options .= " GPRINT:inbits:AVERAGE:%6.2lf%s";
|
||||
|
@ -31,7 +31,7 @@ if($inverse) { $in = 'out'; $out = 'in'; } else { $in = 'in'; $out = 'out'; }
|
||||
$rrd_options .= " LINE1.25:doutbits#".$colour_line_out.":";
|
||||
} else {
|
||||
$rrd_options .= " AREA:inbits#".$colour_area_in.":";
|
||||
$rrd_options .= " COMMENT:BPS\ \ \ \ Current\ \ \ Average\ \ \ \ \ \ Max\\\\n";
|
||||
$rrd_options .= " COMMENT:bps\ \ \ \ Current\ \ \ Average\ \ \ \ \ \ Max\\\\n";
|
||||
$rrd_options .= " LINE1.25:inbits#".$colour_line_in.":In\ ";
|
||||
$rrd_options .= " GPRINT:inbits:LAST:%6.2lf%s";
|
||||
$rrd_options .= " GPRINT:inbits:AVERAGE:%6.2lf%s";
|
||||
|
@ -68,7 +68,7 @@ if($_GET['legend']) { $legend = $_GET['legend']; }
|
||||
$rrd_options .= " LINE1.25:doutbits_tot#000099:";
|
||||
$rrd_options .= " LINE0.5:nothing#555555:";
|
||||
} else {
|
||||
$rrd_options .= " COMMENT:BPS\ \ \ \ \ \ \ \ \ \ \ \ Current\ \ \ Average\ \ \ \ \ \ Min\ \ \ \ \ \ Max\\\\n";
|
||||
$rrd_options .= " COMMENT:bps\ \ \ \ \ \ \ \ \ \ \ \ Current\ \ \ Average\ \ \ \ \ \ Min\ \ \ \ \ \ Max\\\\n";
|
||||
$rrd_options .= " AREA:inbits_tot#cdeb8b:Peering\ In\ ";
|
||||
$rrd_options .= " GPRINT:inbitsb:LAST:%6.2lf%s";
|
||||
$rrd_options .= " GPRINT:inbitsb:AVERAGE:%6.2lf%s";
|
||||
|
@ -98,7 +98,7 @@ if($_GET['legend']) { $legend = $_GET['legend']; }
|
||||
$rrd_options .= " LINE1:doutbitsb#000099:";
|
||||
$rrd_options .= " LINE0.5:nothing#555555:";
|
||||
} else {
|
||||
$rrd_options .= " COMMENT:BPS\ \ \ \ \ \ \ \ \ \ \ \ Current\ \ \ Average\ \ \ \ \ \ Min\ \ \ \ \ \ Max\\\\n";
|
||||
$rrd_options .= " COMMENT:bps\ \ \ \ \ \ \ \ \ \ \ \ Current\ \ \ Average\ \ \ \ \ \ Min\ \ \ \ \ \ Max\\\\n";
|
||||
$rrd_options .= " AREA:inbits_tot#cdeb8b:ATM\ \ In\ ";
|
||||
$rrd_options .= " GPRINT:inbits:LAST:%6.2lf%s";
|
||||
$rrd_options .= " GPRINT:inbits:AVERAGE:%6.2lf%s";
|
||||
|
@ -14,8 +14,7 @@ $sess_data = shell_exec($sess_cmd);
|
||||
list ($sessalloc, $sessmax, $sessfailed) = explode("\n", $sess_data);
|
||||
|
||||
if (!is_file($sessrrd)) {
|
||||
`rrdtool create $sessrrd \
|
||||
--step 300 \
|
||||
shell_exec($config['rrdtool'] ." create $sessrrd --step 300 \
|
||||
DS:allocate:GAUGE:600:0:3000000 \
|
||||
DS:max:GAUGE:600:0:3000000 \
|
||||
DS:failed:GAUGE:600:0:1000 \
|
||||
@ -26,9 +25,9 @@ if (!is_file($sessrrd)) {
|
||||
RRA:MAX:0.5:1:800 \
|
||||
RRA:MAX:0.5:6:800 \
|
||||
RRA:MAX:0.5:24:800 \
|
||||
RRA:MAX:0.5:288:800`;
|
||||
RRA:MAX:0.5:288:800");
|
||||
}
|
||||
|
||||
shell_exec($config['rrdtool'] . " update $sessrrd N:$sessalloc:$sessmax:$sessfailed");
|
||||
rrdtool_update("$sessrrd", "N:$sessalloc:$sessmax:$sessfailed");
|
||||
|
||||
?>
|
||||
|
@ -22,9 +22,9 @@
|
||||
$port_ifAlias['speed'] = $speed;
|
||||
$port_ifAlias['notes'] = $notes;
|
||||
|
||||
# if($debug) {
|
||||
if($debug) {
|
||||
print_r($port_ifAlias);
|
||||
# }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
2
irc.php
2
irc.php
@ -42,7 +42,7 @@ class observiumbot
|
||||
$pps_out = format_bi($port['ifOutUcastPkts_rate']);
|
||||
|
||||
$irc->message(SMARTIRC_TYPE_CHANNEL, $data->channel, 'id' . $port['interface_id'] . " " . $port['ifAdminStatus'] . "/" . $port['ifOperStatus'] . " " .
|
||||
$bps_in. " > BPS > " . $bps_out . " | " . $pps_in. "pps > PPS > " . $pps_out ."pps");
|
||||
$bps_in. " > bps > " . $bps_out . " | " . $pps_in. "pps > PPS > " . $pps_out ."pps");
|
||||
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user