mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Revert "F5 LTM" (#5199)
This commit is contained in:
committed by
Neil Lathwood
parent
86ea18fed8
commit
17f5cfef90
@@ -1,75 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* LibreNMS module to display F5 LTM Virtual Server Details
|
||||
*
|
||||
* Copyright (c) 2016 Aaron Daniels <[email protected]>
|
||||
*
|
||||
* 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
|
||||
* Free Software Foundation, either version 3 of the License, or (at your
|
||||
* option) any later version. Please see LICENSE.txt at the top level of
|
||||
* the source code distribution for details.
|
||||
*/
|
||||
|
||||
$component = new LibreNMS\Component();
|
||||
$components = $component->getComponents($device['device_id']);
|
||||
|
||||
// We only care about our device id.
|
||||
$components = $components[$device['device_id']];
|
||||
|
||||
// We extracted all the components for this device, now lets only get the LTM ones.
|
||||
$keep = array();
|
||||
$types = array('f5-ltm-pool', 'f5-ltm-poolmember');
|
||||
foreach ($components as $k => $v) {
|
||||
foreach ($types as $type) {
|
||||
if ($v['type'] == $type) {
|
||||
$keep[$k] = $v;
|
||||
}
|
||||
}
|
||||
}
|
||||
$components = $keep;
|
||||
|
||||
include "includes/graphs/common.inc.php";
|
||||
$rrd_options .= " -l 0 -E ";
|
||||
$rrd_options .= " COMMENT:'LTM Pool Members Now Avg Max\\n'";
|
||||
$colours = array_merge($config['graph_colours']['mixed'], $config['graph_colours']['manycolours'], $config['graph_colours']['manycolours']);
|
||||
$count = 0;
|
||||
d_echo("<pre>");
|
||||
|
||||
// Is the ID we are looking for a valid LTM VS Pool
|
||||
if ($components[$vars['id']]['type'] == 'f5-ltm-pool') {
|
||||
$parent = $components[$vars['id']]['UID'];
|
||||
|
||||
// Find all pool members
|
||||
foreach ($components as $compid => $comp) {
|
||||
if ($comp['type'] != 'f5-ltm-poolmember') {
|
||||
continue;
|
||||
}
|
||||
if (!strstr($comp['UID'], $parent)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$label = $comp['label'];
|
||||
$hash = $comp['hash'];
|
||||
$rrd_filename = rrd_name($device['hostname'], array($comp['type'], $label, $hash));
|
||||
if (file_exists($rrd_filename)) {
|
||||
d_echo("\n Adding PM: " . $label . "\t+ added to the graph");
|
||||
|
||||
// Grab a colour from the array.
|
||||
if (isset($colours[$count])) {
|
||||
$colour = $colours[$count];
|
||||
} else {
|
||||
d_echo("\nError: Out of colours. Have: " . (count($colours) - 1) . ", Requesting:" . $count);
|
||||
}
|
||||
|
||||
$rrd_options .= " DEF:DS" . $count . "=" . $rrd_filename . ":bytesin:AVERAGE ";
|
||||
$rrd_options .= " CDEF:MOD" . $count . "=DS" . $count . ",8,* ";
|
||||
$rrd_options .= " LINE1.25:MOD" . $count . "#" . $colour . ":'" . str_pad(substr($label, 0, 40), 40) . "'";
|
||||
$rrd_options .= " GPRINT:MOD" . $count . ":LAST:%6.2lf%s ";
|
||||
$rrd_options .= " GPRINT:MOD" . $count . ":AVERAGE:%6.2lf%s ";
|
||||
$rrd_options .= " GPRINT:MOD" . $count . ":MAX:%6.2lf%s\l ";
|
||||
$count++;
|
||||
}
|
||||
} // End Foreach
|
||||
}
|
||||
d_echo("</pre>");
|
||||
@@ -1,75 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* LibreNMS module to display F5 LTM Virtual Server Details
|
||||
*
|
||||
* Copyright (c) 2016 Aaron Daniels <[email protected]>
|
||||
*
|
||||
* 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
|
||||
* Free Software Foundation, either version 3 of the License, or (at your
|
||||
* option) any later version. Please see LICENSE.txt at the top level of
|
||||
* the source code distribution for details.
|
||||
*/
|
||||
|
||||
$component = new LibreNMS\Component();
|
||||
$components = $component->getComponents($device['device_id']);
|
||||
|
||||
// We only care about our device id.
|
||||
$components = $components[$device['device_id']];
|
||||
|
||||
// We extracted all the components for this device, now lets only get the LTM ones.
|
||||
$keep = array();
|
||||
$types = array('f5-ltm-pool', 'f5-ltm-poolmember');
|
||||
foreach ($components as $k => $v) {
|
||||
foreach ($types as $type) {
|
||||
if ($v['type'] == $type) {
|
||||
$keep[$k] = $v;
|
||||
}
|
||||
}
|
||||
}
|
||||
$components = $keep;
|
||||
|
||||
include "includes/graphs/common.inc.php";
|
||||
$rrd_options .= " -l 0 -E ";
|
||||
$rrd_options .= " COMMENT:'LTM Pool Members Now Avg Max\\n'";
|
||||
$colours = array_merge($config['graph_colours']['mixed'], $config['graph_colours']['manycolours'], $config['graph_colours']['manycolours']);
|
||||
$count = 0;
|
||||
d_echo("<pre>");
|
||||
|
||||
// Is the ID we are looking for a valid LTM VS Pool
|
||||
if ($components[$vars['id']]['type'] == 'f5-ltm-pool') {
|
||||
$parent = $components[$vars['id']]['UID'];
|
||||
|
||||
// Find all pool members
|
||||
foreach ($components as $compid => $comp) {
|
||||
if ($comp['type'] != 'f5-ltm-poolmember') {
|
||||
continue;
|
||||
}
|
||||
if (!strstr($comp['UID'], $parent)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$label = $comp['label'];
|
||||
$hash = $comp['hash'];
|
||||
$rrd_filename = rrd_name($device['hostname'], array($comp['type'], $label, $hash));
|
||||
if (file_exists($rrd_filename)) {
|
||||
d_echo("\n Adding PM: " . $label . "\t+ added to the graph");
|
||||
|
||||
// Grab a colour from the array.
|
||||
if (isset($colours[$count])) {
|
||||
$colour = $colours[$count];
|
||||
} else {
|
||||
d_echo("\nError: Out of colours. Have: " . (count($colours) - 1) . ", Requesting:" . $count);
|
||||
}
|
||||
|
||||
$rrd_options .= " DEF:DS" . $count . "=" . $rrd_filename . ":bytesout:AVERAGE ";
|
||||
$rrd_options .= " CDEF:MOD" . $count . "=DS" . $count . ",8,* ";
|
||||
$rrd_options .= " LINE1.25:MOD" . $count . "#" . $colour . ":'" . str_pad(substr($label, 0, 40), 40) . "'";
|
||||
$rrd_options .= " GPRINT:MOD" . $count . ":LAST:%6.2lf%s ";
|
||||
$rrd_options .= " GPRINT:MOD" . $count . ":AVERAGE:%6.2lf%s ";
|
||||
$rrd_options .= " GPRINT:MOD" . $count . ":MAX:%6.2lf%s\l ";
|
||||
$count++;
|
||||
}
|
||||
} // End Foreach
|
||||
}
|
||||
d_echo("</pre>");
|
||||
@@ -1,74 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* LibreNMS module to display F5 LTM Virtual Server Details
|
||||
*
|
||||
* Copyright (c) 2016 Aaron Daniels <[email protected]>
|
||||
*
|
||||
* 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
|
||||
* Free Software Foundation, either version 3 of the License, or (at your
|
||||
* option) any later version. Please see LICENSE.txt at the top level of
|
||||
* the source code distribution for details.
|
||||
*/
|
||||
|
||||
$component = new LibreNMS\Component();
|
||||
$components = $component->getComponents($device['device_id']);
|
||||
|
||||
// We only care about our device id.
|
||||
$components = $components[$device['device_id']];
|
||||
|
||||
// We extracted all the components for this device, now lets only get the LTM ones.
|
||||
$keep = array();
|
||||
$types = array('f5-ltm-pool', 'f5-ltm-poolmember');
|
||||
foreach ($components as $k => $v) {
|
||||
foreach ($types as $type) {
|
||||
if ($v['type'] == $type) {
|
||||
$keep[$k] = $v;
|
||||
}
|
||||
}
|
||||
}
|
||||
$components = $keep;
|
||||
|
||||
include "includes/graphs/common.inc.php";
|
||||
$rrd_options .= " -l 0 -E ";
|
||||
$rrd_options .= " COMMENT:'LTM Pool Members Now Avg Max\\n'";
|
||||
$colours = array_merge($config['graph_colours']['mixed'], $config['graph_colours']['manycolours'], $config['graph_colours']['manycolours']);
|
||||
$count = 0;
|
||||
d_echo("<pre>");
|
||||
|
||||
// Is the ID we are looking for a valid LTM VS Pool
|
||||
if ($components[$vars['id']]['type'] == 'f5-ltm-pool') {
|
||||
$parent = $components[$vars['id']]['UID'];
|
||||
|
||||
// Find all pool members
|
||||
foreach ($components as $compid => $comp) {
|
||||
if ($comp['type'] != 'f5-ltm-poolmember') {
|
||||
continue;
|
||||
}
|
||||
if (!strstr($comp['UID'], $parent)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$label = $comp['label'];
|
||||
$hash = $comp['hash'];
|
||||
$rrd_filename = rrd_name($device['hostname'], array($comp['type'], $label, $hash));
|
||||
if (file_exists($rrd_filename)) {
|
||||
d_echo("\n Adding PM: " . $label . "\t+ added to the graph");
|
||||
|
||||
// Grab a colour from the array.
|
||||
if (isset($colours[$count])) {
|
||||
$colour = $colours[$count];
|
||||
} else {
|
||||
d_echo("\nError: Out of colours. Have: " . (count($colours) - 1) . ", Requesting:" . $count);
|
||||
}
|
||||
|
||||
$rrd_options .= " DEF:DS" . $count . "=" . $rrd_filename . ":totconns:AVERAGE ";
|
||||
$rrd_options .= " LINE1.25:DS" . $count . "#" . $colour . ":'" . str_pad(substr($label, 0, 40), 40) . "'";
|
||||
$rrd_options .= " GPRINT:DS" . $count . ":LAST:%6.2lf%s ";
|
||||
$rrd_options .= " GPRINT:DS" . $count . ":AVERAGE:%6.2lf%s ";
|
||||
$rrd_options .= " GPRINT:DS" . $count . ":MAX:%6.2lf%s\l ";
|
||||
$count++;
|
||||
}
|
||||
} // End Foreach
|
||||
}
|
||||
d_echo("</pre>");
|
||||
@@ -1,74 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* LibreNMS module to display F5 LTM Virtual Server Details
|
||||
*
|
||||
* Copyright (c) 2016 Aaron Daniels <[email protected]>
|
||||
*
|
||||
* 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
|
||||
* Free Software Foundation, either version 3 of the License, or (at your
|
||||
* option) any later version. Please see LICENSE.txt at the top level of
|
||||
* the source code distribution for details.
|
||||
*/
|
||||
|
||||
$component = new LibreNMS\Component();
|
||||
$components = $component->getComponents($device['device_id']);
|
||||
|
||||
// We only care about our device id.
|
||||
$components = $components[$device['device_id']];
|
||||
|
||||
// We extracted all the components for this device, now lets only get the LTM ones.
|
||||
$keep = array();
|
||||
$types = array('f5-ltm-pool', 'f5-ltm-poolmember');
|
||||
foreach ($components as $k => $v) {
|
||||
foreach ($types as $type) {
|
||||
if ($v['type'] == $type) {
|
||||
$keep[$k] = $v;
|
||||
}
|
||||
}
|
||||
}
|
||||
$components = $keep;
|
||||
|
||||
include "includes/graphs/common.inc.php";
|
||||
$rrd_options .= " -l 0 -E ";
|
||||
$rrd_options .= " COMMENT:'LTM Pool Members Now Avg Max\\n'";
|
||||
$colours = array_merge($config['graph_colours']['mixed'], $config['graph_colours']['manycolours'], $config['graph_colours']['manycolours']);
|
||||
$count = 0;
|
||||
d_echo("<pre>");
|
||||
|
||||
// Is the ID we are looking for a valid LTM VS Pool
|
||||
if ($components[$vars['id']]['type'] == 'f5-ltm-pool') {
|
||||
$parent = $components[$vars['id']]['UID'];
|
||||
|
||||
// Find all pool members
|
||||
foreach ($components as $compid => $comp) {
|
||||
if ($comp['type'] != 'f5-ltm-poolmember') {
|
||||
continue;
|
||||
}
|
||||
if (!strstr($comp['UID'], $parent)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$label = $comp['label'];
|
||||
$hash = $comp['hash'];
|
||||
$rrd_filename = rrd_name($device['hostname'], array($comp['type'], $label, $hash));
|
||||
if (file_exists($rrd_filename)) {
|
||||
d_echo("\n Adding PM: " . $label . "\t+ added to the graph");
|
||||
|
||||
// Grab a colour from the array.
|
||||
if (isset($colours[$count])) {
|
||||
$colour = $colours[$count];
|
||||
} else {
|
||||
d_echo("\nError: Out of colours. Have: " . (count($colours) - 1) . ", Requesting:" . $count);
|
||||
}
|
||||
|
||||
$rrd_options .= " DEF:DS" . $count . "=" . $rrd_filename . ":pktsin:AVERAGE ";
|
||||
$rrd_options .= " LINE1.25:DS" . $count . "#" . $colour . ":'" . str_pad(substr($label, 0, 40), 40) . "'";
|
||||
$rrd_options .= " GPRINT:DS" . $count . ":LAST:%6.2lf%s ";
|
||||
$rrd_options .= " GPRINT:DS" . $count . ":AVERAGE:%6.2lf%s ";
|
||||
$rrd_options .= " GPRINT:DS" . $count . ":MAX:%6.2lf%s\l ";
|
||||
$count++;
|
||||
}
|
||||
} // End Foreach
|
||||
}
|
||||
d_echo("</pre>");
|
||||
@@ -1,74 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* LibreNMS module to display F5 LTM Virtual Server Details
|
||||
*
|
||||
* Copyright (c) 2016 Aaron Daniels <[email protected]>
|
||||
*
|
||||
* 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
|
||||
* Free Software Foundation, either version 3 of the License, or (at your
|
||||
* option) any later version. Please see LICENSE.txt at the top level of
|
||||
* the source code distribution for details.
|
||||
*/
|
||||
|
||||
$component = new LibreNMS\Component();
|
||||
$components = $component->getComponents($device['device_id']);
|
||||
|
||||
// We only care about our device id.
|
||||
$components = $components[$device['device_id']];
|
||||
|
||||
// We extracted all the components for this device, now lets only get the LTM ones.
|
||||
$keep = array();
|
||||
$types = array('f5-ltm-pool', 'f5-ltm-poolmember');
|
||||
foreach ($components as $k => $v) {
|
||||
foreach ($types as $type) {
|
||||
if ($v['type'] == $type) {
|
||||
$keep[$k] = $v;
|
||||
}
|
||||
}
|
||||
}
|
||||
$components = $keep;
|
||||
|
||||
include "includes/graphs/common.inc.php";
|
||||
$rrd_options .= " -l 0 -E ";
|
||||
$rrd_options .= " COMMENT:'LTM Pool Members Now Avg Max\\n'";
|
||||
$colours = array_merge($config['graph_colours']['mixed'], $config['graph_colours']['manycolours'], $config['graph_colours']['manycolours']);
|
||||
$count = 0;
|
||||
d_echo("<pre>");
|
||||
|
||||
// Is the ID we are looking for a valid LTM VS Pool
|
||||
if ($components[$vars['id']]['type'] == 'f5-ltm-pool') {
|
||||
$parent = $components[$vars['id']]['UID'];
|
||||
|
||||
// Find all pool members
|
||||
foreach ($components as $compid => $comp) {
|
||||
if ($comp['type'] != 'f5-ltm-poolmember') {
|
||||
continue;
|
||||
}
|
||||
if (!strstr($comp['UID'], $parent)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$label = $comp['label'];
|
||||
$hash = $comp['hash'];
|
||||
$rrd_filename = rrd_name($device['hostname'], array($comp['type'], $label, $hash));
|
||||
if (file_exists($rrd_filename)) {
|
||||
d_echo("\n Adding PM: " . $label . "\t+ added to the graph");
|
||||
|
||||
// Grab a colour from the array.
|
||||
if (isset($colours[$count])) {
|
||||
$colour = $colours[$count];
|
||||
} else {
|
||||
d_echo("\nError: Out of colours. Have: " . (count($colours) - 1) . ", Requesting:" . $count);
|
||||
}
|
||||
|
||||
$rrd_options .= " DEF:DS" . $count . "=" . $rrd_filename . ":pktsout:AVERAGE ";
|
||||
$rrd_options .= " LINE1.25:DS" . $count . "#" . $colour . ":'" . str_pad(substr($label, 0, 40), 40) . "'";
|
||||
$rrd_options .= " GPRINT:DS" . $count . ":LAST:%6.2lf%s ";
|
||||
$rrd_options .= " GPRINT:DS" . $count . ":AVERAGE:%6.2lf%s ";
|
||||
$rrd_options .= " GPRINT:DS" . $count . ":MAX:%6.2lf%s\l ";
|
||||
$count++;
|
||||
}
|
||||
} // End Foreach
|
||||
}
|
||||
d_echo("</pre>");
|
||||
@@ -1,53 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* LibreNMS module to display F5 LTM Virtual Server Details
|
||||
*
|
||||
* Copyright (c) 2016 Aaron Daniels <[email protected]>
|
||||
*
|
||||
* 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
|
||||
* Free Software Foundation, either version 3 of the License, or (at your
|
||||
* option) any later version. Please see LICENSE.txt at the top level of
|
||||
* the source code distribution for details.
|
||||
*/
|
||||
|
||||
$component = new LibreNMS\Component();
|
||||
$options = array();
|
||||
$options['filter']['type'] = array('=','f5-ltm-vs');
|
||||
$components = $component->getComponents($device['device_id'], $options);
|
||||
|
||||
// We only care about our device id.
|
||||
$components = $components[$device['device_id']];
|
||||
|
||||
include "includes/graphs/common.inc.php";
|
||||
$rrd_options .= " -l 0 -E ";
|
||||
$rrd_options .= " COMMENT:'LTM Vitrual Servers Now Avg Max\\n'";
|
||||
$colours = array_merge($config['graph_colours']['mixed'], $config['graph_colours']['manycolours'], $config['graph_colours']['manycolours']);
|
||||
$count = 0;
|
||||
d_echo("<pre>");
|
||||
|
||||
// add all LTM VS on this device.
|
||||
foreach ($components as $compid => $comp) {
|
||||
$label = $comp['label'];
|
||||
$hash = $comp['hash'];
|
||||
$rrd_filename = rrd_name($device['hostname'], array($comp['type'], $label, $hash));
|
||||
if (file_exists($rrd_filename)) {
|
||||
d_echo("\n Adding VS: ".$comp['label']."\t+ added to the graph");
|
||||
|
||||
// Grab a colour from the array.
|
||||
if (isset($colours[$count])) {
|
||||
$colour = $colours[$count];
|
||||
} else {
|
||||
d_echo("\nError: Out of colours. Have: ".(count($colours)-1).", Requesting:".$count);
|
||||
}
|
||||
|
||||
$rrd_options .= " DEF:DS" . $count . "=" . $rrd_filename . ":bytesin:AVERAGE ";
|
||||
$rrd_options .= " CDEF:MOD" . $count . "=DS" . $count . ",8,* ";
|
||||
$rrd_options .= " LINE1.25:MOD" . $count . "#" . $colour . ":'" . str_pad(substr($label, 0, 60), 60) . "'";
|
||||
$rrd_options .= " GPRINT:MOD" . $count . ":LAST:%6.2lf%s ";
|
||||
$rrd_options .= " GPRINT:MOD" . $count . ":AVERAGE:%6.2lf%s ";
|
||||
$rrd_options .= " GPRINT:MOD" . $count . ":MAX:%6.2lf%s\l ";
|
||||
$count++;
|
||||
}
|
||||
}
|
||||
d_echo("</pre>");
|
||||
@@ -1,53 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* LibreNMS module to display F5 LTM Virtual Server Details
|
||||
*
|
||||
* Copyright (c) 2016 Aaron Daniels <[email protected]>
|
||||
*
|
||||
* 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
|
||||
* Free Software Foundation, either version 3 of the License, or (at your
|
||||
* option) any later version. Please see LICENSE.txt at the top level of
|
||||
* the source code distribution for details.
|
||||
*/
|
||||
|
||||
$component = new LibreNMS\Component();
|
||||
$options = array();
|
||||
$options['filter']['type'] = array('=','f5-ltm-vs');
|
||||
$components = $component->getComponents($device['device_id'], $options);
|
||||
|
||||
// We only care about our device id.
|
||||
$components = $components[$device['device_id']];
|
||||
|
||||
include "includes/graphs/common.inc.php";
|
||||
$rrd_options .= " -l 0 -E ";
|
||||
$rrd_options .= " COMMENT:'LTM Vitrual Servers Now Avg Max\\n'";
|
||||
$colours = array_merge($config['graph_colours']['mixed'], $config['graph_colours']['manycolours'], $config['graph_colours']['manycolours']);
|
||||
$count = 0;
|
||||
d_echo("<pre>");
|
||||
|
||||
// add all LTM VS on this device.
|
||||
foreach ($components as $compid => $comp) {
|
||||
$label = $comp['label'];
|
||||
$hash = $comp['hash'];
|
||||
$rrd_filename = rrd_name($device['hostname'], array($comp['type'], $label, $hash));
|
||||
if (file_exists($rrd_filename)) {
|
||||
d_echo("\n Adding VS: ".$comp['label']."\t+ added to the graph");
|
||||
|
||||
// Grab a colour from the array.
|
||||
if (isset($colours[$count])) {
|
||||
$colour = $colours[$count];
|
||||
} else {
|
||||
d_echo("\nError: Out of colours. Have: ".(count($colours)-1).", Requesting:".$count);
|
||||
}
|
||||
|
||||
$rrd_options .= " DEF:DS" . $count . "=" . $rrd_filename . ":bytesout:AVERAGE ";
|
||||
$rrd_options .= " CDEF:MOD" . $count . "=DS" . $count . ",8,* ";
|
||||
$rrd_options .= " LINE1.25:MOD" . $count . "#" . $colour . ":'" . str_pad(substr($label, 0, 60), 60) . "'";
|
||||
$rrd_options .= " GPRINT:MOD" . $count . ":LAST:%6.2lf%s ";
|
||||
$rrd_options .= " GPRINT:MOD" . $count . ":AVERAGE:%6.2lf%s ";
|
||||
$rrd_options .= " GPRINT:MOD" . $count . ":MAX:%6.2lf%s\l ";
|
||||
$count++;
|
||||
}
|
||||
}
|
||||
d_echo("</pre>");
|
||||
@@ -1,52 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* LibreNMS module to display F5 LTM Virtual Server Details
|
||||
*
|
||||
* Copyright (c) 2016 Aaron Daniels <[email protected]>
|
||||
*
|
||||
* 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
|
||||
* Free Software Foundation, either version 3 of the License, or (at your
|
||||
* option) any later version. Please see LICENSE.txt at the top level of
|
||||
* the source code distribution for details.
|
||||
*/
|
||||
|
||||
$component = new LibreNMS\Component();
|
||||
$options = array();
|
||||
$options['filter']['type'] = array('=','f5-ltm-vs');
|
||||
$components = $component->getComponents($device['device_id'], $options);
|
||||
|
||||
// We only care about our device id.
|
||||
$components = $components[$device['device_id']];
|
||||
|
||||
include "includes/graphs/common.inc.php";
|
||||
$rrd_options .= " -l 0 -E ";
|
||||
$rrd_options .= " COMMENT:'VS Total Connections Now Avg Max\\n'";
|
||||
$colours = array_merge($config['graph_colours']['mixed'], $config['graph_colours']['manycolours'], $config['graph_colours']['manycolours']);
|
||||
$count = 0;
|
||||
d_echo("<pre>");
|
||||
|
||||
// add all LTM VS on this device.
|
||||
foreach ($components as $compid => $comp) {
|
||||
$label = $comp['label'];
|
||||
$hash = $comp['hash'];
|
||||
$rrd_filename = rrd_name($device['hostname'], array($comp['type'], $label, $hash));
|
||||
if (file_exists($rrd_filename)) {
|
||||
d_echo("\n Adding VS: ".$comp['label']."\t+ added to the graph");
|
||||
|
||||
// Grab a colour from the array.
|
||||
if (isset($colours[$count])) {
|
||||
$colour = $colours[$count];
|
||||
} else {
|
||||
d_echo("\nError: Out of colours. Have: ".(count($colours)-1).", Requesting:".$count);
|
||||
}
|
||||
|
||||
$rrd_options .= " DEF:DS" . $count . "=" . $rrd_filename . ":totconns:AVERAGE ";
|
||||
$rrd_options .= " LINE1.25:DS" . $count . "#" . $colour . ":'" . str_pad(substr($label, 0, 60), 60) . "'";
|
||||
$rrd_options .= " GPRINT:DS" . $count . ":LAST:%6.2lf%s ";
|
||||
$rrd_options .= " GPRINT:DS" . $count . ":AVERAGE:%6.2lf%s ";
|
||||
$rrd_options .= " GPRINT:DS" . $count . ":MAX:%6.2lf%s\l ";
|
||||
$count++;
|
||||
}
|
||||
}
|
||||
d_echo("</pre>");
|
||||
@@ -1,52 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* LibreNMS module to display F5 LTM Virtual Server Details
|
||||
*
|
||||
* Copyright (c) 2016 Aaron Daniels <aaron@daniels.id.au>
|
||||
*
|
||||
* 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
|
||||
* Free Software Foundation, either version 3 of the License, or (at your
|
||||
* option) any later version. Please see LICENSE.txt at the top level of
|
||||
* the source code distribution for details.
|
||||
*/
|
||||
|
||||
$component = new LibreNMS\Component();
|
||||
$options = array();
|
||||
$options['filter']['type'] = array('=','f5-ltm-vs');
|
||||
$components = $component->getComponents($device['device_id'], $options);
|
||||
|
||||
// We only care about our device id.
|
||||
$components = $components[$device['device_id']];
|
||||
|
||||
include "includes/graphs/common.inc.php";
|
||||
$rrd_options .= " -l 0 -E ";
|
||||
$rrd_options .= " COMMENT:'LTM Vitrual Servers Now Avg Max\\n'";
|
||||
$colours = array_merge($config['graph_colours']['mixed'], $config['graph_colours']['manycolours'], $config['graph_colours']['manycolours']);
|
||||
$count = 0;
|
||||
d_echo("<pre>");
|
||||
|
||||
// add all LTM VS on this device.
|
||||
foreach ($components as $compid => $comp) {
|
||||
$label = $comp['label'];
|
||||
$hash = $comp['hash'];
|
||||
$rrd_filename = rrd_name($device['hostname'], array($comp['type'], $label, $hash));
|
||||
if (file_exists($rrd_filename)) {
|
||||
d_echo("\n Adding VS: ".$comp['label']."\t+ added to the graph");
|
||||
|
||||
// Grab a colour from the array.
|
||||
if (isset($colours[$count])) {
|
||||
$colour = $colours[$count];
|
||||
} else {
|
||||
d_echo("\nError: Out of colours. Have: ".(count($colours)-1).", Requesting:".$count);
|
||||
}
|
||||
|
||||
$rrd_options .= " DEF:DS" . $count . "=" . $rrd_filename . ":pktsin:AVERAGE ";
|
||||
$rrd_options .= " LINE1.25:DS" . $count . "#" . $colour . ":'" . str_pad(substr($label, 0, 60), 60) . "'";
|
||||
$rrd_options .= " GPRINT:DS" . $count . ":LAST:%6.2lf%s ";
|
||||
$rrd_options .= " GPRINT:DS" . $count . ":AVERAGE:%6.2lf%s ";
|
||||
$rrd_options .= " GPRINT:DS" . $count . ":MAX:%6.2lf%s\l ";
|
||||
$count++;
|
||||
}
|
||||
}
|
||||
d_echo("</pre>");
|
||||
@@ -1,52 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* LibreNMS module to display F5 LTM Virtual Server Details
|
||||
*
|
||||
* Copyright (c) 2016 Aaron Daniels <aaron@daniels.id.au>
|
||||
*
|
||||
* 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
|
||||
* Free Software Foundation, either version 3 of the License, or (at your
|
||||
* option) any later version. Please see LICENSE.txt at the top level of
|
||||
* the source code distribution for details.
|
||||
*/
|
||||
|
||||
$component = new LibreNMS\Component();
|
||||
$options = array();
|
||||
$options['filter']['type'] = array('=','f5-ltm-vs');
|
||||
$components = $component->getComponents($device['device_id'], $options);
|
||||
|
||||
// We only care about our device id.
|
||||
$components = $components[$device['device_id']];
|
||||
|
||||
include "includes/graphs/common.inc.php";
|
||||
$rrd_options .= " -l 0 -E ";
|
||||
$rrd_options .= " COMMENT:'LTM Vitrual Servers Now Avg Max\\n'";
|
||||
$colours = array_merge($config['graph_colours']['mixed'], $config['graph_colours']['manycolours'], $config['graph_colours']['manycolours']);
|
||||
$count = 0;
|
||||
d_echo("<pre>");
|
||||
|
||||
// add all LTM VS on this device.
|
||||
foreach ($components as $compid => $comp) {
|
||||
$label = $comp['label'];
|
||||
$hash = $comp['hash'];
|
||||
$rrd_filename = rrd_name($device['hostname'], array($comp['type'], $label, $hash));
|
||||
if (file_exists($rrd_filename)) {
|
||||
d_echo("\n Adding VS: ".$comp['label']."\t+ added to the graph");
|
||||
|
||||
// Grab a colour from the array.
|
||||
if (isset($colours[$count])) {
|
||||
$colour = $colours[$count];
|
||||
} else {
|
||||
d_echo("\nError: Out of colours. Have: ".(count($colours)-1).", Requesting:".$count);
|
||||
}
|
||||
|
||||
$rrd_options .= " DEF:DS" . $count . "=" . $rrd_filename . ":pktsout:AVERAGE ";
|
||||
$rrd_options .= " LINE1.25:DS" . $count . "#" . $colour . ":'" . str_pad(substr($label, 0, 60), 60) . "'";
|
||||
$rrd_options .= " GPRINT:DS" . $count . ":LAST:%6.2lf%s ";
|
||||
$rrd_options .= " GPRINT:DS" . $count . ":AVERAGE:%6.2lf%s ";
|
||||
$rrd_options .= " GPRINT:DS" . $count . ":MAX:%6.2lf%s\l ";
|
||||
$count++;
|
||||
}
|
||||
}
|
||||
d_echo("</pre>");
|
||||
@@ -1,47 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* LibreNMS module to display F5 LTM Virtual Server Details
|
||||
*
|
||||
* Copyright (c) 2016 Aaron Daniels <aaron@daniels.id.au>
|
||||
*
|
||||
* 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
|
||||
* Free Software Foundation, either version 3 of the License, or (at your
|
||||
* option) any later version. Please see LICENSE.txt at the top level of
|
||||
* the source code distribution for details.
|
||||
*/
|
||||
|
||||
$component = new LibreNMS\Component();
|
||||
$options = array();
|
||||
$options['filter']['type'] = array('=','f5-ltm-vs');
|
||||
$components = $component->getComponents($device['device_id'], $options);
|
||||
|
||||
// We only care about our device id.
|
||||
$components = $components[$device['device_id']];
|
||||
|
||||
// Is the ID we are looking for a valid LTM VS
|
||||
if (isset($components[$vars['id']])) {
|
||||
$label = $components[$vars['id']]['label'];
|
||||
$hash = $components[$vars['id']]['hash'];
|
||||
|
||||
include "includes/graphs/common.inc.php";
|
||||
$rrd_options .= " -l 0 -E ";
|
||||
$rrd_options .= " COMMENT:'Bits Now Ave Max\\n'";
|
||||
|
||||
$rrd_filename = rrd_name($device['hostname'], array('f5-ltm-vs', $label, $hash));
|
||||
if (file_exists($rrd_filename)) {
|
||||
$rrd_options .= " DEF:INBYTES=" . $rrd_filename . ":bytesin:AVERAGE ";
|
||||
$rrd_options .= " CDEF:INBITS=INBYTES,8,* ";
|
||||
$rrd_options .= " LINE1.25:INBITS#330033:'Bits In '";
|
||||
$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 ";
|
||||
|
||||
$rrd_options .= " DEF:OUTBYTES=" . $rrd_filename . ":bytesout:AVERAGE ";
|
||||
$rrd_options .= " CDEF:OUTBITS=OUTBYTES,8,* ";
|
||||
$rrd_options .= " LINE1.25:OUTBITS#FF6600:'Bits Out'";
|
||||
$rrd_options .= " GPRINT:OUTBITS:LAST:%6.2lf%s ";
|
||||
$rrd_options .= " GPRINT:OUTBITS:AVERAGE:%6.2lf%s ";
|
||||
$rrd_options .= " GPRINT:OUTBITS:MAX:%6.2lf%s\l ";
|
||||
}
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* LibreNMS module to display F5 LTM Virtual Server Details
|
||||
*
|
||||
* Copyright (c) 2016 Aaron Daniels <aaron@daniels.id.au>
|
||||
*
|
||||
* 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
|
||||
* Free Software Foundation, either version 3 of the License, or (at your
|
||||
* option) any later version. Please see LICENSE.txt at the top level of
|
||||
* the source code distribution for details.
|
||||
*/
|
||||
|
||||
$component = new LibreNMS\Component();
|
||||
$options = array();
|
||||
$options['filter']['type'] = array('=','f5-ltm-vs');
|
||||
$components = $component->getComponents($device['device_id'], $options);
|
||||
|
||||
// We only care about our device id.
|
||||
$components = $components[$device['device_id']];
|
||||
|
||||
// Is the ID we are looking for a valid LTM VS
|
||||
if (isset($components[$vars['id']])) {
|
||||
$label = $components[$vars['id']]['label'];
|
||||
$hash = $components[$vars['id']]['hash'];
|
||||
|
||||
$rrd_filename = rrd_name($device['hostname'], array('f5-ltm-vs', $label, $hash));
|
||||
if (file_exists($rrd_filename)) {
|
||||
require 'includes/graphs/common.inc.php';
|
||||
$ds = 'totconns';
|
||||
|
||||
$colour_area = '9999cc';
|
||||
$colour_line = '0000cc';
|
||||
|
||||
$colour_area_max = '9999cc';
|
||||
|
||||
$graph_max = 1;
|
||||
$graph_min = 0;
|
||||
|
||||
$unit_text = 'Total Connections';
|
||||
$line_text = 'Connections';
|
||||
require 'includes/graphs/generic_simplex.inc.php';
|
||||
}
|
||||
}
|
||||
@@ -1,48 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* LibreNMS module to display F5 LTM Virtual Server Details
|
||||
*
|
||||
* Copyright (c) 2016 Aaron Daniels <aaron@daniels.id.au>
|
||||
*
|
||||
* 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
|
||||
* Free Software Foundation, either version 3 of the License, or (at your
|
||||
* option) any later version. Please see LICENSE.txt at the top level of
|
||||
* the source code distribution for details.
|
||||
*/
|
||||
|
||||
$component = new LibreNMS\Component();
|
||||
$options = array();
|
||||
$options['filter']['type'] = array('=','f5-ltm-vs');
|
||||
$components = $component->getComponents($device['device_id'], $options);
|
||||
|
||||
// We only care about our device id.
|
||||
$components = $components[$device['device_id']];
|
||||
|
||||
// Is the ID we are looking for a valid LTM VS
|
||||
if (isset($components[$vars['id']])) {
|
||||
$label = $components[$vars['id']]['label'];
|
||||
$hash = $components[$vars['id']]['hash'];
|
||||
|
||||
$rrd_filename = rrd_name($device['hostname'], array('f5-ltm-vs', $label, $hash));
|
||||
if (file_exists($rrd_filename)) {
|
||||
$ds_in = 'pktsin';
|
||||
$ds_out = 'pktsout';
|
||||
|
||||
$colour_area_in = 'AA66AA';
|
||||
$colour_line_in = '330033';
|
||||
$colour_area_out = 'FFDD88';
|
||||
$colour_line_out = 'FF6600';
|
||||
|
||||
$in_text = 'Packets in';
|
||||
$out_text = 'Packets out';
|
||||
|
||||
$colour_area_in_max = 'cc88cc';
|
||||
$colour_area_out_max = 'FFefaa';
|
||||
|
||||
$graph_max = 1;
|
||||
$unit_text = 'Packets';
|
||||
|
||||
require 'includes/graphs/generic_duplex.inc.php';
|
||||
}
|
||||
}
|
||||
@@ -32,9 +32,6 @@ if (device_permitted($vars['device']) || $check_device == $vars['device']) {
|
||||
$device['os_group'] = $config['os'][$device['os']]['group'];
|
||||
}
|
||||
|
||||
$component = new LibreNMS\Component();
|
||||
$component_count = $component->getComponentCount($device['device_id']);
|
||||
|
||||
echo '<div class="panel panel-default">';
|
||||
echo '<table class="device-header-table" style="margin: 0px 7px 7px 7px;" cellspacing="0" class="devicetable" width="99%">';
|
||||
require 'includes/device-header.inc.php';
|
||||
@@ -173,16 +170,6 @@ if (device_permitted($vars['device']) || $check_device == $vars['device']) {
|
||||
}
|
||||
}
|
||||
|
||||
// F5 LTM
|
||||
if (isset($component_count['f5-ltm-vs'])) {
|
||||
$device_loadbalancer_count['ltm_vs'] = $component_count['f5-ltm-vs'];
|
||||
$loadbalancer_tabs[] = 'ltm_vs';
|
||||
}
|
||||
if (isset($component_count['f5-ltm-pool'])) {
|
||||
$device_loadbalancer_count['ltm_pool'] = $component_count['f5-ltm-pool'];
|
||||
$loadbalancer_tabs[] = 'ltm_pool';
|
||||
}
|
||||
|
||||
if (is_array($loadbalancer_tabs)) {
|
||||
echo '<li class="'.$select['loadbalancer'].'">
|
||||
<a href="'.generate_device_url($device, array('tab' => 'loadbalancer')).'">
|
||||
@@ -222,7 +209,11 @@ if (device_permitted($vars['device']) || $check_device == $vars['device']) {
|
||||
$routing_tabs[] = 'vrf';
|
||||
}
|
||||
|
||||
$device_routing_count['cisco-otv'] = $component_count['Cisco-OTV'];
|
||||
$component = new LibreNMS\Component();
|
||||
$options['type'] = 'Cisco-OTV';
|
||||
$options['filter']['device_id'] = array('=',$device['device_id']);
|
||||
$otv = $component->getComponents(null, $options);
|
||||
$device_routing_count['cisco-otv'] = count($otv);
|
||||
if ($device_routing_count['cisco-otv'] > 0) {
|
||||
$routing_tabs[] = 'cisco-otv';
|
||||
}
|
||||
|
||||
@@ -6,11 +6,12 @@ $link_array = array(
|
||||
'tab' => 'loadbalancer',
|
||||
);
|
||||
|
||||
$type_text['loadbalancer_rservers'] = 'Rservers'; // Cisco ACE
|
||||
$type_text['loadbalancer_vservers'] = 'Serverfarms'; // Cisco ACE
|
||||
$type_text['netscaler_vsvr'] = 'VServers'; // Citrix Netscaler
|
||||
$type_text['ltm_vs'] = 'LTM Virtual Servers'; // F5 BigIP
|
||||
$type_text['ltm_pool'] = 'LTM Pools'; // F5 BigIP
|
||||
// Cisco ACE
|
||||
$type_text['loadbalancer_rservers'] = 'Rservers';
|
||||
$type_text['loadbalancer_vservers'] = 'Serverfarms';
|
||||
|
||||
// Citrix Netscaler
|
||||
$type_text['netscaler_vsvr'] = 'VServers';
|
||||
|
||||
print_optionbar_start();
|
||||
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* LibreNMS module to Display data from F5 BigIP LTM Devices
|
||||
*
|
||||
* Copyright (c) 2016 Aaron Daniels <aaron@daniels.id.au>
|
||||
*
|
||||
* 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
|
||||
* Free Software Foundation, either version 3 of the License, or (at your
|
||||
* option) any later version. Please see LICENSE.txt at the top level of
|
||||
* the source code distribution for details.
|
||||
*/
|
||||
|
||||
$component = new LibreNMS\Component();
|
||||
$components = $component->getComponents($device['device_id'], array('filter' => array('ignore' => array('=', 0))));
|
||||
|
||||
// We only care about our device id.
|
||||
$components = $components[$device['device_id']];
|
||||
|
||||
// We extracted all the components for this device, now lets only get the LTM ones.
|
||||
$keep = array();
|
||||
$types = array($module, 'f5-ltm-pool', 'f5-ltm-poolmember');
|
||||
foreach ($components as $k => $v) {
|
||||
foreach ($types as $type) {
|
||||
if ($v['type'] == $type) {
|
||||
$keep[$k] = $v;
|
||||
}
|
||||
}
|
||||
}
|
||||
$components = $keep;
|
||||
|
||||
global $config;
|
||||
|
||||
if (is_file('pages/device/loadbalancer/'.mres($vars['subtype']).'.inc.php')) {
|
||||
include 'pages/device/loadbalancer/'.mres($vars['subtype']).'.inc.php';
|
||||
} else {
|
||||
include 'pages/device/loadbalancer/ltm_pool_all.inc.php';
|
||||
}//end if
|
||||
@@ -1,63 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* LibreNMS module to Display data from F5 BigIP LTM Devices
|
||||
*
|
||||
* Copyright (c) 2016 Aaron Daniels <aaron@daniels.id.au>
|
||||
*
|
||||
* 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
|
||||
* Free Software Foundation, either version 3 of the License, or (at your
|
||||
* option) any later version. Please see LICENSE.txt at the top level of
|
||||
* the source code distribution for details.
|
||||
*/
|
||||
|
||||
?>
|
||||
<table id='grid' data-toggle='bootgrid' class='table table-condensed table-responsive table-striped'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-column-id="poolid" data-type="numeric" data-visible="false">poolid</th>
|
||||
<th data-column-id="name">Name</th>
|
||||
<th data-column-id="minup">Minimum Members</th>
|
||||
<th data-column-id="currentup">Current Members</th>
|
||||
<th data-column-id="status" data-visible="false">Status</th>
|
||||
<th data-column-id="message">Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
foreach ($components as $pool_id => $array) {
|
||||
if ($array['type'] != 'f5-ltm-pool') {
|
||||
continue;
|
||||
}
|
||||
if ($array['status'] != 0) {
|
||||
$message = $array['error'];
|
||||
$status = 2;
|
||||
} else {
|
||||
$message = 'Ok';
|
||||
$status = '';
|
||||
}
|
||||
?>
|
||||
<tr <?php echo $error; ?>>
|
||||
<td><?php echo $pool_id; ?></td>
|
||||
<td><?php echo $array['label']; ?></td>
|
||||
<td><?php echo $array['minup']; ?></td>
|
||||
<td><?php echo $array['currentup']; ?></td>
|
||||
<td><?php echo $status; ?></td>
|
||||
<td><?php echo $message; ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
<script type="text/javascript">
|
||||
$("#grid").bootgrid({
|
||||
caseSensitive: false,
|
||||
statusMappings: {
|
||||
2: "danger"
|
||||
},
|
||||
}).on("click.rs.jquery.bootgrid", function (e, columns, row) {
|
||||
var link = '<?php echo generate_url($vars, array('type' => 'ltm_pool', 'subtype' => 'ltm_pool_details')); ?>poolid='+row['poolid'];
|
||||
window.location.href = link;
|
||||
});
|
||||
</script>
|
||||
@@ -1,216 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* LibreNMS module to Display data from F5 BigIP LTM Devices
|
||||
*
|
||||
* Copyright (c) 2016 Aaron Daniels <aaron@daniels.id.au>
|
||||
*
|
||||
* 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
|
||||
* Free Software Foundation, either version 3 of the License, or (at your
|
||||
* option) any later version. Please see LICENSE.txt at the top level of
|
||||
* the source code distribution for details.
|
||||
*/
|
||||
|
||||
// Determine a pool to show.
|
||||
if (!isset($vars['poolid'])) {
|
||||
foreach ($components as $id => $array) {
|
||||
if ($array['type'] != 'f5-ltm-pool') {
|
||||
continue;
|
||||
}
|
||||
$vars['poolid'] = $id;
|
||||
}
|
||||
}
|
||||
|
||||
if ($components[$vars['poolid']]['type'] == 'f5-ltm-pool') {
|
||||
$array = $components[$vars['poolid']];
|
||||
// Define some error messages
|
||||
$error_poolaction = array ();
|
||||
$error_poolaction[0] = "Unused";
|
||||
$error_poolaction[1] = "Reboot";
|
||||
$error_poolaction[2] = "Restart";
|
||||
$error_poolaction[3] = "Failover";
|
||||
$error_poolaction[4] = "Failover and Restart";
|
||||
$error_poolaction[5] = "Go Active";
|
||||
$error_poolaction[6] = "None";
|
||||
|
||||
$parent = $array['UID'];
|
||||
?>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="container-fluid">
|
||||
<div class='row'>
|
||||
<div class='panel panel-default panel-condensed'>
|
||||
<div class='panel-heading'>
|
||||
<strong>Pool: <?php echo $array['label']; ?></strong></div>
|
||||
<table class="table table-hover table-condensed table-striped">
|
||||
<tr>
|
||||
<td>Minimum Active Servers:</td>
|
||||
<td><?php echo $array['minup']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Current Active Servers:</td>
|
||||
<td><?php echo $array['currentup']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Pool Down Action:</td>
|
||||
<td><?php echo $error_poolaction[$array['minupaction']]; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Pool Monitor:</td>
|
||||
<td><?php echo $array['monitor']; ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="container-fluid">
|
||||
<div class='row'>
|
||||
<div class="panel panel-default panel-condensed">
|
||||
<div class="panel-heading">
|
||||
<strong>Pool Members</strong>
|
||||
</div>
|
||||
<table class="table table-hover table-condensed table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>IP : Port</th>
|
||||
<th>Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<?php
|
||||
foreach ($components as $comp) {
|
||||
if ($comp['category'] != 'LTMPoolMember') {
|
||||
continue;
|
||||
}
|
||||
if (!strstr($comp['UID'], $parent)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$string = $comp['IP'] . ":" . $comp['port'];
|
||||
if ($comp['status'] != 0) {
|
||||
$status = $comp['error'];
|
||||
$error = 'class="danger"';
|
||||
} else {
|
||||
$status = 'Ok';
|
||||
$error = '';
|
||||
}
|
||||
?>
|
||||
<tr <?php echo $error; ?>>
|
||||
<td><?php echo $comp['label']; ?></td>
|
||||
<td><?php echo $string; ?></td>
|
||||
<td><?php echo $status; ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="container-fluid">
|
||||
<div class='row'>
|
||||
<div class="panel panel-default" id="connections">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">Connections</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<?php
|
||||
$graph_array = array ();
|
||||
$graph_array['device'] = $device['device_id'];
|
||||
$graph_array['height'] = '100';
|
||||
$graph_array['width'] = '215';
|
||||
$graph_array['legend'] = 'no';
|
||||
$graph_array['to'] = $config['time']['now'];
|
||||
$graph_array['type'] = 'device_bigip_ltm_allpm_conns';
|
||||
$graph_array['id'] = $vars['poolid'];
|
||||
require 'includes/print-graphrow.inc.php';
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel panel-default" id="bytesin">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">Bytes In</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<?php
|
||||
$graph_array = array ();
|
||||
$graph_array['device'] = $device['device_id'];
|
||||
$graph_array['height'] = '100';
|
||||
$graph_array['width'] = '215';
|
||||
$graph_array['legend'] = 'no';
|
||||
$graph_array['to'] = $config['time']['now'];
|
||||
$graph_array['type'] = 'device_bigip_ltm_allpm_bytesin';
|
||||
$graph_array['id'] = $vars['poolid'];
|
||||
require 'includes/print-graphrow.inc.php';
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel panel-default" id="bytesout">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">Bytes Out</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<?php
|
||||
$graph_array = array ();
|
||||
$graph_array['device'] = $device['device_id'];
|
||||
$graph_array['height'] = '100';
|
||||
$graph_array['width'] = '215';
|
||||
$graph_array['legend'] = 'no';
|
||||
$graph_array['to'] = $config['time']['now'];
|
||||
$graph_array['type'] = 'device_bigip_ltm_allpm_bytesout';
|
||||
$graph_array['id'] = $vars['poolid'];
|
||||
require 'includes/print-graphrow.inc.php';
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel panel-default" id="pktsin">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">Packets In</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<?php
|
||||
$graph_array = array ();
|
||||
$graph_array['device'] = $device['device_id'];
|
||||
$graph_array['height'] = '100';
|
||||
$graph_array['width'] = '215';
|
||||
$graph_array['legend'] = 'no';
|
||||
$graph_array['to'] = $config['time']['now'];
|
||||
$graph_array['type'] = 'device_bigip_ltm_allpm_pktsin';
|
||||
$graph_array['id'] = $vars['poolid'];
|
||||
require 'includes/print-graphrow.inc.php';
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel panel-default" id="pktsout">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">Packets Out</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<?php
|
||||
$graph_array = array ();
|
||||
$graph_array['device'] = $device['device_id'];
|
||||
$graph_array['height'] = '100';
|
||||
$graph_array['width'] = '215';
|
||||
$graph_array['legend'] = 'no';
|
||||
$graph_array['to'] = $config['time']['now'];
|
||||
$graph_array['type'] = 'device_bigip_ltm_allpm_pktsout';
|
||||
$graph_array['id'] = $vars['poolid'];
|
||||
require 'includes/print-graphrow.inc.php';
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* LibreNMS module to Display data from F5 BigIP LTM Devices
|
||||
*
|
||||
* Copyright (c) 2016 Aaron Daniels <aaron@daniels.id.au>
|
||||
*
|
||||
* 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
|
||||
* Free Software Foundation, either version 3 of the License, or (at your
|
||||
* option) any later version. Please see LICENSE.txt at the top level of
|
||||
* the source code distribution for details.
|
||||
*/
|
||||
|
||||
$component = new LibreNMS\Component();
|
||||
$components = $component->getComponents($device['device_id'], array('filter' => array('ignore' => array('=', 0))));
|
||||
|
||||
// We only care about our device id.
|
||||
$components = $components[$device['device_id']];
|
||||
|
||||
// We extracted all the components for this device, now lets only get the LTM ones.
|
||||
$keep = array();
|
||||
$types = array($module, 'f5-ltm-vs', 'f5-ltm-pool', 'f5-ltm-poolmember');
|
||||
foreach ($components as $k => $v) {
|
||||
foreach ($types as $type) {
|
||||
if ($v['type'] == $type) {
|
||||
$keep[$k] = $v;
|
||||
}
|
||||
}
|
||||
}
|
||||
$components = $keep;
|
||||
|
||||
global $config;
|
||||
|
||||
if (is_file('pages/device/loadbalancer/'.mres($vars['subtype']).'.inc.php')) {
|
||||
include 'pages/device/loadbalancer/'.mres($vars['subtype']).'.inc.php';
|
||||
} else {
|
||||
include 'pages/device/loadbalancer/ltm_vs_all.inc.php';
|
||||
}//end if
|
||||
@@ -1,167 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* LibreNMS module to Display data from F5 BigIP LTM Devices
|
||||
*
|
||||
* Copyright (c) 2016 Aaron Daniels <aaron@daniels.id.au>
|
||||
*
|
||||
* 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
|
||||
* Free Software Foundation, either version 3 of the License, or (at your
|
||||
* option) any later version. Please see LICENSE.txt at the top level of
|
||||
* the source code distribution for details.
|
||||
*/
|
||||
|
||||
?>
|
||||
<table id='grid' data-toggle='bootgrid' class='table table-condensed table-responsive table-striped'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-column-id="vsid" data-type="numeric" data-visible="false">vsid</th>
|
||||
<th data-column-id="poolid" data-type="numeric" data-visible="false">poolid</th>
|
||||
<th data-column-id="name">Name</th>
|
||||
<th data-column-id="host">IP : Port</th>
|
||||
<th data-column-id="pool">Default Pool</th>
|
||||
<th data-column-id="status" data-visible="false">Status</th>
|
||||
<th data-column-id="message">Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
foreach ($components as $vs_id => $array) {
|
||||
if ($array['type'] != 'f5-ltm-vs') {
|
||||
continue;
|
||||
}
|
||||
$string = $array['IP'].":".$array['port'];
|
||||
if ($array['status'] != 0) {
|
||||
$message = $array['error'];
|
||||
$status = 2;
|
||||
} else {
|
||||
$message = 'Ok';
|
||||
$status = '';
|
||||
}
|
||||
|
||||
// Find the ID for this pool
|
||||
$id = 0;
|
||||
foreach ($components as $k => $v) {
|
||||
if ($v['type'] != 'f5-ltm-pool') {
|
||||
continue;
|
||||
}
|
||||
if ($v['label'] == $array['pool']) {
|
||||
$id = $k;
|
||||
}
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo $vs_id; ?></td>
|
||||
<td><?php echo $id; ?></td>
|
||||
<td><?php echo $array['label']; ?></td>
|
||||
<td><?php echo $string; ?></td>
|
||||
<td><?php echo $array['pool']; ?></td>
|
||||
<td><?php echo $status; ?></td>
|
||||
<td><?php echo $message; ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="panel panel-default" id="connections">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">Connections</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<?php
|
||||
$graph_array = array();
|
||||
$graph_array['device'] = $device['device_id'];
|
||||
$graph_array['height'] = '100';
|
||||
$graph_array['width'] = '215';
|
||||
$graph_array['legend'] = 'no';
|
||||
$graph_array['to'] = $config['time']['now'];
|
||||
$graph_array['type'] = 'device_bigip_ltm_allvs_conns';
|
||||
require 'includes/print-graphrow.inc.php';
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel panel-default" id="bytesin">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">Bytes In</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<?php
|
||||
$graph_array = array();
|
||||
$graph_array['device'] = $device['device_id'];
|
||||
$graph_array['height'] = '100';
|
||||
$graph_array['width'] = '215';
|
||||
$graph_array['legend'] = 'no';
|
||||
$graph_array['to'] = $config['time']['now'];
|
||||
$graph_array['type'] = 'device_bigip_ltm_allvs_bytesin';
|
||||
require 'includes/print-graphrow.inc.php';
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel panel-default" id="bytesout">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">Bytes Out</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<?php
|
||||
$graph_array = array();
|
||||
$graph_array['device'] = $device['device_id'];
|
||||
$graph_array['height'] = '100';
|
||||
$graph_array['width'] = '215';
|
||||
$graph_array['legend'] = 'no';
|
||||
$graph_array['to'] = $config['time']['now'];
|
||||
$graph_array['type'] = 'device_bigip_ltm_allvs_bytesout';
|
||||
require 'includes/print-graphrow.inc.php';
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel panel-default" id="pktsin">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">Packets In</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<?php
|
||||
$graph_array = array();
|
||||
$graph_array['device'] = $device['device_id'];
|
||||
$graph_array['height'] = '100';
|
||||
$graph_array['width'] = '215';
|
||||
$graph_array['legend'] = 'no';
|
||||
$graph_array['to'] = $config['time']['now'];
|
||||
$graph_array['type'] = 'device_bigip_ltm_allvs_pktsin';
|
||||
require 'includes/print-graphrow.inc.php';
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel panel-default" id="pktsout">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">Packets Out</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<?php
|
||||
$graph_array = array();
|
||||
$graph_array['device'] = $device['device_id'];
|
||||
$graph_array['height'] = '100';
|
||||
$graph_array['width'] = '215';
|
||||
$graph_array['legend'] = 'no';
|
||||
$graph_array['to'] = $config['time']['now'];
|
||||
$graph_array['type'] = 'device_bigip_ltm_allvs_pktsout';
|
||||
require 'includes/print-graphrow.inc.php';
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$("#grid").bootgrid({
|
||||
caseSensitive: false,
|
||||
statusMappings: {
|
||||
2: "danger"
|
||||
},
|
||||
}).on("click.rs.jquery.bootgrid", function (e, columns, row) {
|
||||
var link = '<?php echo generate_url($vars, array('type' => 'ltm_vs', 'subtype' => 'ltm_vs_det')); ?>vsid='+row['vsid']+'/poolid='+row['poolid'];
|
||||
window.location.href = link;
|
||||
});
|
||||
</script>
|
||||
@@ -1,68 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* LibreNMS module to Display data from F5 BigIP LTM Devices
|
||||
*
|
||||
* Copyright (c) 2016 Aaron Daniels <aaron@daniels.id.au>
|
||||
*
|
||||
* 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
|
||||
* Free Software Foundation, either version 3 of the License, or (at your
|
||||
* option) any later version. Please see LICENSE.txt at the top level of
|
||||
* the source code distribution for details.
|
||||
*/
|
||||
|
||||
// Pages
|
||||
$subtypes = array();
|
||||
$subtypes['ltm_vs_det'] = 'Virtual Server Details';
|
||||
// If we have a defautl pool, display the details.
|
||||
if ($vars['poolid'] != 0) {
|
||||
$subtypes['ltm_vs_pool'] = 'Default Pool Details';
|
||||
}
|
||||
|
||||
if (!$vars['subtype']) {
|
||||
$vars['subtype'] = 'ltm_vs_det';
|
||||
}
|
||||
|
||||
// Determine a policy to show.
|
||||
if (!isset($vars['vsid'])) {
|
||||
foreach ($components as $id => $array) {
|
||||
if ($array['type'] != 'f5-ltm-vs') {
|
||||
continue;
|
||||
}
|
||||
$vars['vsid'] = $id;
|
||||
}
|
||||
}
|
||||
|
||||
print_optionbar_start();
|
||||
?>
|
||||
<div class='row' style="margin-bottom: 10px;">
|
||||
<div class='col-md-12'>
|
||||
<span style="font-size: 20px;">Virtual Server - <?php echo $components[$vars['vsid']]['label']?></span><br />
|
||||
</div>
|
||||
</div>
|
||||
<div class='row'>
|
||||
<div class='col-md-12'>
|
||||
<?php
|
||||
|
||||
// Pages, on the left.
|
||||
$sep = '';
|
||||
foreach ($subtypes as $page => $text) {
|
||||
echo $sep;
|
||||
if ($vars['subtype'] == $page) {
|
||||
echo "<span class='pagemenu-selected'>";
|
||||
}
|
||||
|
||||
echo generate_link($text, $vars, array('subtype' => $page));
|
||||
if ($vars['subtype'] == $page) {
|
||||
echo '</span>';
|
||||
}
|
||||
|
||||
$sep = ' | ';
|
||||
}
|
||||
unset($sep);
|
||||
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
print_optionbar_end();
|
||||
@@ -1,82 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* LibreNMS module to Display data from F5 BigIP LTM Devices
|
||||
*
|
||||
* Copyright (c) 2016 Aaron Daniels <aaron@daniels.id.au>
|
||||
*
|
||||
* 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
|
||||
* Free Software Foundation, either version 3 of the License, or (at your
|
||||
* option) any later version. Please see LICENSE.txt at the top level of
|
||||
* the source code distribution for details.
|
||||
*/
|
||||
|
||||
include 'pages/device/loadbalancer/ltm_vs_common.inc.php';
|
||||
|
||||
if ($components[$vars['vsid']]['type'] == 'f5-ltm-vs') {
|
||||
?>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="container-fluid">
|
||||
<div class='row'>
|
||||
<div class="panel panel-default" id="connections">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">Connections</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<?php
|
||||
$graph_array = array ();
|
||||
$graph_array['device'] = $device['device_id'];
|
||||
$graph_array['height'] = '100';
|
||||
$graph_array['width'] = '215';
|
||||
$graph_array['legend'] = 'no';
|
||||
$graph_array['to'] = $config['time']['now'];
|
||||
$graph_array['type'] = 'device_bigip_ltm_vs_conns';
|
||||
$graph_array['id'] = $vars['vsid'];
|
||||
require 'includes/print-graphrow.inc.php';
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel panel-default" id="bytes">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">Bytes</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<?php
|
||||
$graph_array = array ();
|
||||
$graph_array['device'] = $device['device_id'];
|
||||
$graph_array['height'] = '100';
|
||||
$graph_array['width'] = '215';
|
||||
$graph_array['legend'] = 'no';
|
||||
$graph_array['to'] = $config['time']['now'];
|
||||
$graph_array['type'] = 'device_bigip_ltm_vs_bytes';
|
||||
$graph_array['id'] = $vars['vsid'];
|
||||
require 'includes/print-graphrow.inc.php';
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel panel-default" id="pkts">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">Packets</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<?php
|
||||
$graph_array = array ();
|
||||
$graph_array['device'] = $device['device_id'];
|
||||
$graph_array['height'] = '100';
|
||||
$graph_array['width'] = '215';
|
||||
$graph_array['legend'] = 'no';
|
||||
$graph_array['to'] = $config['time']['now'];
|
||||
$graph_array['type'] = 'device_bigip_ltm_vs_pkts';
|
||||
$graph_array['id'] = $vars['vsid'];
|
||||
require 'includes/print-graphrow.inc.php';
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
@@ -1,208 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* LibreNMS module to Display data from F5 BigIP LTM Devices
|
||||
*
|
||||
* Copyright (c) 2016 Aaron Daniels <aaron@daniels.id.au>
|
||||
*
|
||||
* 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
|
||||
* Free Software Foundation, either version 3 of the License, or (at your
|
||||
* option) any later version. Please see LICENSE.txt at the top level of
|
||||
* the source code distribution for details.
|
||||
*/
|
||||
|
||||
include 'pages/device/loadbalancer/ltm_vs_common.inc.php';
|
||||
|
||||
if ($components[$vars['poolid']]['type'] == 'f5-ltm-pool') {
|
||||
$array = $components[$vars['poolid']];
|
||||
// Define some error messages
|
||||
$error_poolaction = array ();
|
||||
$error_poolaction[0] = "Unused";
|
||||
$error_poolaction[1] = "Reboot";
|
||||
$error_poolaction[2] = "Restart";
|
||||
$error_poolaction[3] = "Failover";
|
||||
$error_poolaction[4] = "Failover and Restart";
|
||||
$error_poolaction[5] = "Go Active";
|
||||
$error_poolaction[6] = "None";
|
||||
|
||||
$parent = $array['UID'];
|
||||
?>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="container-fluid">
|
||||
<div class='row'>
|
||||
<div class='panel panel-default panel-condensed'>
|
||||
<div class='panel-heading'>
|
||||
<strong>Pool: <?php echo $array['label']; ?></strong></div>
|
||||
<table class="table table-hover table-condensed table-striped">
|
||||
<tr>
|
||||
<td>Minimum Active Servers:</td>
|
||||
<td><?php echo $array['minup']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Current Active Servers:</td>
|
||||
<td><?php echo $array['currentup']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Pool Down Action:</td>
|
||||
<td><?php echo $error_poolaction[$array['minupaction']]; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Pool Monitor:</td>
|
||||
<td><?php echo $array['monitor']; ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="container-fluid">
|
||||
<div class='row'>
|
||||
<div class="panel panel-default panel-condensed">
|
||||
<div class="panel-heading">
|
||||
<strong>Pool Members</strong>
|
||||
</div>
|
||||
<table class="table table-hover table-condensed table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>IP : Port</th>
|
||||
<th>Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<?php
|
||||
foreach ($components as $comp) {
|
||||
if ($comp['category'] != 'LTMPoolMember') {
|
||||
continue;
|
||||
}
|
||||
if (!strstr($comp['UID'], $parent)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$string = $comp['IP'] . ":" . $comp['port'];
|
||||
if ($comp['status'] != 0) {
|
||||
$status = $comp['error'];
|
||||
$error = 'class="danger"';
|
||||
} else {
|
||||
$status = 'Ok';
|
||||
$error = '';
|
||||
}
|
||||
?>
|
||||
<tr <?php echo $error; ?>>
|
||||
<td><?php echo $comp['label']; ?></td>
|
||||
<td><?php echo $string; ?></td>
|
||||
<td><?php echo $status; ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="container-fluid">
|
||||
<div class='row'>
|
||||
<div class="panel panel-default" id="connections">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">Connections</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<?php
|
||||
$graph_array = array ();
|
||||
$graph_array['device'] = $device['device_id'];
|
||||
$graph_array['height'] = '100';
|
||||
$graph_array['width'] = '215';
|
||||
$graph_array['legend'] = 'no';
|
||||
$graph_array['to'] = $config['time']['now'];
|
||||
$graph_array['type'] = 'device_bigip_ltm_allpm_conns';
|
||||
$graph_array['id'] = $vars['poolid'];
|
||||
require 'includes/print-graphrow.inc.php';
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel panel-default" id="bytesin">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">Bytes In</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<?php
|
||||
$graph_array = array ();
|
||||
$graph_array['device'] = $device['device_id'];
|
||||
$graph_array['height'] = '100';
|
||||
$graph_array['width'] = '215';
|
||||
$graph_array['legend'] = 'no';
|
||||
$graph_array['to'] = $config['time']['now'];
|
||||
$graph_array['type'] = 'device_bigip_ltm_allpm_bytesin';
|
||||
$graph_array['id'] = $vars['poolid'];
|
||||
require 'includes/print-graphrow.inc.php';
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel panel-default" id="bytesout">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">Bytes Out</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<?php
|
||||
$graph_array = array ();
|
||||
$graph_array['device'] = $device['device_id'];
|
||||
$graph_array['height'] = '100';
|
||||
$graph_array['width'] = '215';
|
||||
$graph_array['legend'] = 'no';
|
||||
$graph_array['to'] = $config['time']['now'];
|
||||
$graph_array['type'] = 'device_bigip_ltm_allpm_bytesout';
|
||||
$graph_array['id'] = $vars['poolid'];
|
||||
require 'includes/print-graphrow.inc.php';
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel panel-default" id="pktsin">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">Packets In</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<?php
|
||||
$graph_array = array ();
|
||||
$graph_array['device'] = $device['device_id'];
|
||||
$graph_array['height'] = '100';
|
||||
$graph_array['width'] = '215';
|
||||
$graph_array['legend'] = 'no';
|
||||
$graph_array['to'] = $config['time']['now'];
|
||||
$graph_array['type'] = 'device_bigip_ltm_allpm_pktsin';
|
||||
$graph_array['id'] = $vars['poolid'];
|
||||
require 'includes/print-graphrow.inc.php';
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel panel-default" id="pktsout">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">Packets Out</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<?php
|
||||
$graph_array = array ();
|
||||
$graph_array['device'] = $device['device_id'];
|
||||
$graph_array['height'] = '100';
|
||||
$graph_array['width'] = '215';
|
||||
$graph_array['legend'] = 'no';
|
||||
$graph_array['to'] = $config['time']['now'];
|
||||
$graph_array['type'] = 'device_bigip_ltm_allpm_pktsout';
|
||||
$graph_array['id'] = $vars['poolid'];
|
||||
require 'includes/print-graphrow.inc.php';
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
Reference in New Issue
Block a user