1 | <?php |
||||
2 | /* |
||||
3 | * LibreNMS module to display F5 LTM Virtual Server Details |
||||
4 | * |
||||
5 | * Copyright (c) 2021 Martin Bergström <[email protected]> |
||||
6 | * |
||||
7 | * This program is free software: you can redistribute it and/or modify it |
||||
8 | * under the terms of the GNU General Public License as published by the |
||||
9 | * Free Software Foundation, either version 3 of the License, or (at your |
||||
10 | * option) any later version. Please see LICENSE.txt at the top level of |
||||
11 | * the source code distribution for details. |
||||
12 | */ |
||||
13 | |||||
14 | $component = new LibreNMS\Component(); |
||||
15 | $options = []; |
||||
16 | $options['filter']['type'] = ['=', 'f5-ltm-vs']; |
||||
17 | $components = $component->getComponents($device['device_id'], $options); |
||||
18 | |||||
19 | // We only care about our device id. |
||||
20 | $components = $components[$device['device_id']]; |
||||
21 | |||||
22 | // Is the ID we are looking for a valid LTM VS |
||||
23 | if (isset($components[$vars['id']])) { |
||||
24 | $label = $components[$vars['id']]['label']; |
||||
25 | $hash = $components[$vars['id']]['hash']; |
||||
26 | |||||
27 | $rrd_filename = Rrd::name($device['hostname'], ['f5-ltm-vs', $label, $hash, 'currconns']); |
||||
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||||
28 | if (Rrd::checkRrdExists($rrd_filename)) { |
||||
0 ignored issues
–
show
The method
checkRrdExists() does not exist on App\Facades\Rrd . Since you implemented __callStatic , consider adding a @method annotation.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
29 | require 'includes/html/graphs/common.inc.php'; |
||||
30 | $ds = 'currconns'; |
||||
31 | |||||
32 | $colour_area = '9999cc'; |
||||
33 | $colour_line = '0000cc'; |
||||
34 | |||||
35 | $colour_area_max = '9999cc'; |
||||
36 | |||||
37 | $graph_max = 1; |
||||
38 | $graph_min = 0; |
||||
39 | |||||
40 | $unit_text = 'Current Connections'; |
||||
41 | $line_text = 'Current Connections'; |
||||
42 | require 'includes/html/graphs/generic_simplex.inc.php'; |
||||
43 | } |
||||
44 | } |
||||
45 |