Files
librenms-librenms/html/includes/graphs/application/portactivity_from.inc.php
VVelox c5bb60907c add app for getting status of TCP connections for specified services (#8090)
* add the poller for portactivity

* add the ability to get monitor ports for portactivity

* add the graphs for displaying stuff for the portactivity app

* add the portactivity app page

* update the docs for Portactivity

* remove extra line

* minor doc update for Portactivity

* add update_application line

* convert to use json_app_get

* convert curly brackets to square

* style fix

* remote error, errorString, and version after they stop being important so they are not processed

* add alert rule examples

* add the poller for portactivity

* add the ability to get monitor ports for portactivity

* add the graphs for displaying stuff for the portactivity app

* add the portactivity app page

* update the docs for Portactivity

* remove extra line

* minor doc update for Portactivity

* add update_application line

* convert to use json_app_get

* convert curly brackets to square

* style fix

* remote error, errorString, and version after they stop being important so they are not processed

* add alert rule examples

* remove dump of get_portactivity_ports function added during rebase

* update to the current json_app_get

* add portactivity snmprec

* add the portactivity test data

* whoops bad merge when rebasing... fix

* minor formatting cleanup and add a missing comma

* fix some odditities with what one of the tests is doing

* whoops... include the use for the exception

* set the response to okay

* attempt to make snmpsim array check happy again

* the json now lints

* more making metric testing happy

* one more update to make travis-ci happy

* now flattens arrays also add array_flatten

* rename array_flatten to data_flatten as pre-commit chokes on it as laravel has something similarly named

* go through and properly add all the metrics

* tested with the newest one and it works

* whoops, clean up json and remove prototype that was used when putting it together

* doh! make it happy with laravel now

* see if a minor changing in formatting for the numbers makes the polling unit test happy

* order them properly

* remove a comma

* a few more minor fixes
2018-11-22 09:05:38 -06:00

81 lines
2.1 KiB
PHP

<?php
$name = 'portactivity';
$app_id = $app['app_id'];
$unit_text = 'Connections';
$colours = 'psychedelic';
$dostack = 0;
$printtotal = 0;
$addarea = 1;
$transparency = 15;
$rrd_filename = rrd_name($device['hostname'], array('app', $name, $app['app_id'], $vars['port']));
$rrd_list=array();
if (rrdtool_check_rrd_exists($rrd_filename)) {
$rrd_list[]=array(
'filename' => $rrd_filename,
'descr' => 'CLOSED',
'ds' => 'fromCLOSED',
);
$rrd_list[]=array(
'filename' => $rrd_filename,
'descr' => 'SYN_SENT',
'ds' => 'fromSYN_SENT',
);
$rrd_list[]=array(
'filename' => $rrd_filename,
'descr' => 'SYN_RECEIVED',
'ds' => 'fromSYN_RECEIVED',
);
$rrd_list[]=array(
'filename' => $rrd_filename,
'descr' => 'ESTABLISHED',
'ds' => 'fromESTABLISHED',
);
$rrd_list[]=array(
'filename' => $rrd_filename,
'descr' => 'CLOSE_WAIT',
'ds' => 'fromCLOSE_WAIT',
);
$rrd_list[]=array(
'filename' => $rrd_filename,
'descr' => 'FIN_WAIT_1',
'ds' => 'fromFIN_WAIT_1',
);
$rrd_list[]=array(
'filename' => $rrd_filename,
'descr' => 'CLOSING',
'ds' => 'fromCLOSING',
);
$rrd_list[]=array(
'filename' => $rrd_filename,
'descr' => 'LAST_ACK',
'ds' => 'fromLAST_ACK',
);
$rrd_list[]=array(
'filename' => $rrd_filename,
'descr' => 'FIN_WAIT_2',
'ds' => 'fromFIN_WAIT_2',
);
$rrd_list[]=array(
'filename' => $rrd_filename,
'descr' => 'TIME_WAIT',
'ds' => 'fromTIME_WAIT',
);
$rrd_list[]=array(
'filename' => $rrd_filename,
'descr' => 'UNKNOWN',
'ds' => 'fromUNKNOWN',
);
$rrd_list[]=array(
'filename' => $rrd_filename,
'descr' => 'other',
'ds' => 'fromother',
);
} else {
d_echo('RRD "'.$rrd_filename.'" not found');
}
require 'includes/graphs/generic_multi_line.inc.php';