feature: F5 LTM bandwidth controller

This commit is contained in:
Yacine BENAMSILI
2020-05-29 03:00:42 +02:00
parent fa52264de2
commit 1a152edc67
8 changed files with 8 additions and 13 deletions

View File

@@ -195,10 +195,8 @@ if (!empty($ltmVirtualServEntry) || !empty($ltmPoolEntry) || !empty($ltmPoolMemb
$result['label'] = $value;
// The UID is far too long to have in a RRD filename, use a hash of it instead.
$result['hash'] = hash('crc32', $result['UID']);
}
// Do we have any results
if (count($result) > 0) {
// Add this result to the master array.

View File

@@ -2,7 +2,7 @@
/*
* LibreNMS module to display F5 LTM Bandwidth Controller Details
*
* Copyright (c) 2019 Yacine BENAMSILI <https://github.com/yac01/ yacine.benamsili@homail.com>
* Copyright (c) 2019 Yacine BENAMSILI <https://github.com/yac01/ yacine.benamsili@homail.com>
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the

View File

@@ -36,5 +36,5 @@ if (isset($components[$vars['id']])) {
$rrd_options .= " GPRINT:INBITS:LAST:%6.2lf%s ";
$rrd_options .= " GPRINT:INBITS:AVERAGE:%6.2lf%s ";
$rrd_options .= " GPRINT:INBITS:MAX:%6.2lf%s\l ";
}
}
}

View File

@@ -36,6 +36,5 @@ if (isset($components[$vars['id']])) {
$rrd_options .= " GPRINT:INBITS:LAST:%6.2lf%s ";
$rrd_options .= " GPRINT:INBITS:AVERAGE:%6.2lf%s ";
$rrd_options .= " GPRINT:INBITS:MAX:%6.2lf%s\l ";
}
}
}

View File

@@ -35,6 +35,5 @@ if (isset($components[$vars['id']])) {
$rrd_options .= " GPRINT:DS:LAST:%6.2lf%s ";
$rrd_options .= " GPRINT:DS:AVERAGE:%6.2lf%s ";
$rrd_options .= " GPRINT:DS:MAX:%6.2lf%s\l ";
}
}
}

View File

@@ -24,7 +24,7 @@ if (!isset($vars['bwcid'])) {
if ($array['type'] != 'f5-ltm-bwc') {
continue;
}
$vars['bwcid'] = $id;
$vars['bwcid'] = $id;
}
}

View File

@@ -77,5 +77,5 @@ if ($components[$vars['bwcid']]['type'] == 'f5-ltm-bwc') {
</div>
</div>
</div>
<?php
<?php
}

View File

@@ -84,7 +84,7 @@ if (count($components > 0)) {
$hash = $array['hash'];
$rrd_name = array($type, $label, $hash);
if ($type == 'f5-ltm-bwc') {
if ($type == 'f5-ltm-bwc') {
$rrd_def = RrdDefinition::make()
->addDataset('pktsin', 'COUNTER', 0)
->addDataset('bytesin', 'COUNTER', 0)
@@ -102,8 +102,7 @@ if (count($components > 0)) {
d_echo("\n\nComponent: ".$key."\n");
d_echo(" Type: ".$type."\n");
d_echo(" Label: ".$label."\n");
} elseif ($type == 'f5-ltm-vs') {
} elseif ($type == 'f5-ltm-vs') {
$rrd_def = RrdDefinition::make()
->addDataset('pktsin', 'COUNTER', 0)
->addDataset('pktsout', 'COUNTER', 0)