diff --git a/includes/functions.php b/includes/functions.php index 4e39206b..75dfa0e4 100644 --- a/includes/functions.php +++ b/includes/functions.php @@ -1120,21 +1120,16 @@ function flowview_show_summary(&$data): void { /** - * @return void + * The title of the report page's filter, and whether its Filter has a Report + * of its own, so that the page does not offer one. + * + * @return array{0: string, 1: bool} */ -function flowview_display_filter(): void { - global $stat_report_array, $stat_columns_array, $print_report_array, $print_columns_array; - - global $config, $graph_timeshifts, $graph_timespans, $graph_heights; - - global $cutoff_lines, $cutoff_octets; +function flowview_filter_heading(): array { + global $stat_report_array, $print_report_array; - require($config['base_path'] . '/plugins/flowview/includes/arrays.php'); - - $title = __esc('Undefined Filter [ Select Filter to get Details ]', 'flowview'); - - $report_fixed = false; - $report_printed = substr((string) get_nfilter_request_var('report'), 0, 1) == 'p'; + $title = __esc('Undefined Filter [ Select Filter to get Details ]', 'flowview'); + $report_fixed = false; if (get_filter_request_var('query') > 0) { $row = flowview_db_fetch_row_prepared('SELECT name, statistics, printed @@ -1152,8 +1147,134 @@ function flowview_display_filter(): void { } } + return [$title, $report_fixed]; +} + +/** + * The Report select's options. It is only on the page for a Filter, so + * there is always one selected. + * + * @return array + */ +function flowview_filter_report_options(): array { + global $stat_report_array, $print_report_array; + + $reports = []; + + $reports[0] = __('Select a Report', 'flowview'); + foreach($stat_report_array as $key => $value) { + if ($key > 0) { + $reports['s' . $key] = __('Statistical: %s', $value, 'flowview'); + } + } + + foreach($print_report_array as $key => $value) { + if ($key > 0) { + $reports['p' . $key] = __('Printed: %s', $value, 'flowview'); + } + } + + return $reports; +} + +/** + * The Sort Field select's options for the Report on the page, or for the + * Filter's own when the page has none. The sort field request variable is + * set to what the Report sorts by when it has none, or names a column by + * number, and to the Filter's sort field when the Report is the Filter's. + * + * @return mixed + */ +function flowview_filter_sort_columns() { + global $stat_columns_array, $print_columns_array; + + $columns[0] = __('Select a Filter First', 'flowview'); + + if (trim(get_request_var('report'), 'sp') != '0') { + if (substr(get_request_var('report'), 0, 1) == 's') { + $report = trim(get_request_var('report'), 's'); + + if (isset($stat_columns_array[$report])) { + $columns = $stat_columns_array[$report]; + } + } else { + $report = trim(get_request_var('report'), 'p'); + + if (isset($print_columns_array[$report])) { + $columns = $print_columns_array[$report]; + } + } + + $sortfield = get_request_var('sortfield'); + if (empty($sortfield) || (is_numeric($sortfield) && $sortfield > 0)) { + set_request_var('sortfield', 'bytes'); + } + } elseif (get_request_var('query') > 0) { + $report = flowview_db_fetch_row_prepared('SELECT printed, statistics, sortfield + FROM plugin_flowview_queries + WHERE id = ?', + array(get_request_var('query'))); + + if (cacti_sizeof($report)) { + if ($report['statistics'] > 0) { + $columns = $stat_columns_array[$report['statistics']]; + } elseif ($report['printed'] > 0) { + $columns = $print_columns_array[$report['printed']]; + } + + if (is_numeric($report['sortfield']) && $report['sortfield'] > 0) { + $report['sortfield'] = 'bytes'; + } + + set_request_var('sortfield', $report['sortfield']); + } + } + + return $columns; +} + +/** + * @return void + */ +function flowview_display_filter(): void { + /* includes/arrays.php fills these, and the functions below read them as globals */ + global $stat_report_array, $stat_columns_array, $print_report_array, $print_columns_array; + + global $config, $graph_timeshifts, $graph_timespans, $graph_heights; + + global $cutoff_lines, $cutoff_octets; + + require($config['base_path'] . '/plugins/flowview/includes/arrays.php'); + + [$title, $report_fixed] = flowview_filter_heading(); + + $report_printed = substr((string) get_nfilter_request_var('report'), 0, 1) == 'p'; + html_start_box($title . ' ', '100%', false, 3, 'center', ''); + flowview_print_filter_query_row(); + + /* the Report is part of the Filter and what is cached for it, so it is only on the page when the Filter has none */ + flowview_print_filter_report_row(get_request_var('query') > 0 && !$report_fixed); + + flowview_print_filter_timespan_row(); + + flowview_print_filter_graph_row($report_printed); + + flowview_print_filter_dialogs(); + + flowview_print_filter_script(); + + html_end_box(); +} + +/** + * The filter's first row: the Filter select and its buttons. + * + * @return void + */ +function flowview_print_filter_query_row(): void { + ?> @@ -1193,12 +1314,24 @@ function flowview_display_filter(): void { + 0 && !$report_fixed; - if ($report_shown) { ?>
@@ -1207,24 +1340,7 @@ function flowview_display_filter(): void {
+
@@ -1408,6 +1496,20 @@ function flowview_display_filter(): void {
+ + + 0) { - $sql_range = get_date_filter($sql_range, $sql_range_params, $start, $end, get_request_var('includeif')); - } elseif (isset($data['includeif']) && $data['includeif'] > 0) { - $sql_range = get_date_filter($sql_range, $sql_range_params, $start, $end, $data['includeif']); - } else { - $sql_range = get_date_filter($sql_range, $sql_range_params, $start, $end); - } - - /* limit override */ - if (isset_request_var('cutofflines') && get_request_var('cutofflines') != 999999) { - $lines = get_request_var('cutofflines'); - } elseif (isset_request_var('cutofflines') && get_request_var('cutofflines') == 999999) { - $lines = '9999999999'; - } elseif ($data['cutofflines'] != 999999) { - $lines = $data['cutofflines']; - } elseif ($data['cutofflines'] == 999999) { - $lines = '9999999999'; - } else { - $lines = 20; - } + $filter = flowview_query_filter($data, $start, $end); + $sql = flowview_query_report($data, $plan_only); - /* limits override */ - if (get_request_var('exclude') > 0) { - $sql_limit = 'LIMIT ' . get_filter_request_var('exclude') . ',' . $lines; - } else { - $sql_limit = 'LIMIT ' . $lines; + if ($sql === null) { + return false; } - /* octets override */ - if (isset_request_var('cutoffoctets') && get_filter_request_var('cutoffoctets') > 0) { - $sql_having = 'HAVING bytes > ' . get_filter_request_var('cutoffoctets'); - } elseif (isset($data['cutoffoctets']) && $data['cutoffoctets'] > 0) { - $sql_having = 'HAVING bytes < ' . $data['cutoffoctets']; - } else { - $sql_having = ''; - } + // use post-NAT data instead of the original src/dst values - issue#110 + $sql = $sql->forQuery($sql->order, $sql->printed, flowview_query_use_nat($data, $force_nat)); - /* the Listener is part of the Filter and what is materialized, so it is taken from the saved Filter, not the page */ - if (isset($data['device_id']) && $data['device_id'] > 0) { - $sql_where = get_numeric_filter($sql_where, $sql_params, $data['device_id'], 'listener_id'); + [$stru_inners, $stru_outer] = flowview_query_structures($sql, $filter, $start, $end); + + if ($plan_only) { + $plan = array_map('parallel_database_query_table_md5', $stru_inners); + + return true; } - /* the Stream is part of the Filter too, so it is also taken from the saved Filter */ - if (isset($data['ex_addr']) && $data['ex_addr'] != '-1' && $data['ex_addr'] != '' && $data['ex_addr'] != '0') { - $sql_where .= ($sql_where != '' ? ' AND ':'') . 'ex_addr = ?'; - $sql_params[] = $data['ex_addr']; - } - - /* report override, unless the filter has a report, as it is part of what is cached */ - $report = ''; - - if (isset_request_var('report')) { - if (flowview_filter_report_key($data) == '') { - $report = get_nfilter_request_var('report'); - $nreport = trim(get_nfilter_request_var('report'), 'sp'); - if (strpos($report, 's') !== false && is_numeric($nreport)) { - $data['statistics'] = $nreport; - $data['printed'] = 0; - } elseif (strpos($report, 'p') !== false && is_numeric($nreport)) { - $data['printed'] = $nreport; - $data['statistics'] = 0; - } - } - } elseif (!sizeof($data)) { + $results = flowview_query_results($sql, $filter, $stru_inners, $stru_outer, $data['statistics'], $start, $end); + + if (!cacti_sizeof($results)) { return false; } - /* sort field override */ - if (isset_request_var('sortfield')) { - $data['sortfield'] = get_request_var('sortfield'); - } + $output = $data; + $output['data'] = $results; + $output['table'] = flowview_query_table($data, $results); + $output['title'] = $title; - /*-------------------------------------------------------------*/ - /* Non-Overrides - These variables can not be overridden */ - /* in the user interface. */ - /*-------------------------------------------------------------*/ + return $output; +} - /* template id filter */ - if (isset($data['template_id']) && $data['template_id'] >= 0) { - $sql_where = get_numeric_filter($sql_where, $sql_params, $data['template_id'], 'template_id'); +/** + * Apply the report and sort field the page asked for to a saved Filter. + * + * The Report is part of what is cached for a Filter, so the page's is only + * used for a Filter that has none. 'sN' asks for statistical report N and + * 'pN' for printed report N. + * + * @param array $data The Filter, changed in place. + * + * @return void + */ +function flowview_query_apply_overrides(array &$data): void { + if (isset_request_var('report') && flowview_filter_report_key($data) == '') { + $report = get_nfilter_request_var('report'); + $nreport = trim(get_nfilter_request_var('report'), 'sp'); + if (strpos($report, 's') !== false && is_numeric($nreport)) { + $data['statistics'] = $nreport; + $data['printed'] = 0; + } elseif (strpos($report, 'p') !== false && is_numeric($nreport)) { + $data['printed'] = $nreport; + $data['statistics'] = 0; + } } - /* source ip filter */ - if (isset($data['sourceip']) && $data['sourceip'] != '') { - $sql_where = get_ip_filter($sql_where, $sql_params, $data['sourceip'], 'src_addr'); + /* sort field override */ + if (isset_request_var('sortfield')) { + $data['sortfield'] = get_request_var('sortfield'); } +} - /* source interface filter */ - if (isset($data['sourceinterface']) && $data['sourceinterface'] != '') { - $sql_where = get_numeric_filter($sql_where, $sql_params, $data['sourceinterface'], 'src_if'); - } +/** + * The SQL conditions and limits of a Filter: its WHERE and time range, each + * with its parameters, and the LIMIT and HAVING, which the page can change. + * + * @param array $data + * @param mixed $start + * @param mixed $end + * + * @return array{where: string, params: array, range: string, range_params: array, limit: string, having: string} + */ +function flowview_query_filter(array $data, $start, $end): array { + $range_params = []; + $params = []; - /* source port filter */ - if (isset($data['sourceport']) && $data['sourceport'] != '') { - $sql_where = get_numeric_filter($sql_where, $sql_params, $data['sourceport'], 'src_port'); - } + $range = get_date_filter('', $range_params, $start, $end, flowview_query_range_type($data)); + $where = flowview_query_where($data, $params); - /* source as filter */ - if (isset($data['sourceas']) && $data['sourceas'] != '') { - $sql_where = get_numeric_filter($sql_where, $sql_params, $data['sourceas'], 'src_as'); + // limits override + if (get_request_var('exclude') > 0) { + $limit = 'LIMIT ' . get_filter_request_var('exclude') . ',' . flowview_query_lines($data); + } else { + $limit = 'LIMIT ' . flowview_query_lines($data); } - /* destination ip filter */ - if (isset($data['destip']) && $data['destip'] != '') { - $sql_where = get_ip_filter($sql_where, $sql_params, $data['destip'], 'dst_addr'); + // octets override + if (isset_request_var('cutoffoctets') && get_filter_request_var('cutoffoctets') > 0) { + $having = 'HAVING bytes > ' . get_filter_request_var('cutoffoctets'); + } elseif (isset($data['cutoffoctets']) && $data['cutoffoctets'] > 0) { + $having = 'HAVING bytes < ' . $data['cutoffoctets']; + } else { + $having = ''; } - /* destination interface filter */ - if (isset($data['destinterface']) && $data['destinterface'] != '') { - $sql_where = get_numeric_filter($sql_where, $sql_params, $data['destinterface'], 'dst_if'); - } + return [ + 'where' => $where, + 'params' => $params, + 'range' => $range, + 'range_params' => $range_params, + 'limit' => $limit, + 'having' => $having, + ]; +} - /* destination port filter */ - if (isset($data['destport']) && $data['destport'] != '') { - $sql_where = get_numeric_filter($sql_where, $sql_params, $data['destport'], 'dst_port'); +/** + * Which part of a flow must be in the time range: the page's choice, else + * the Filter's, else any part. See get_date_filter(). + * + * @param array $data + * + * @return mixed + */ +function flowview_query_range_type(array $data) { + if (isset_request_var('includeif') && get_request_var('includeif') > 0) { + return get_request_var('includeif'); } - /* destination as filter */ - if (isset($data['destas']) && $data['destas'] != '') { - $sql_where = get_numeric_filter($sql_where, $sql_params, $data['destas'], 'dst_as'); + if (isset($data['includeif']) && $data['includeif'] > 0) { + return $data['includeif']; } - /* post-nat source ip filter */ - if (isset($data['postnatsourceip']) && $data['postnatsourceip'] != '') { - $sql_where = get_ip_filter($sql_where, $sql_params, $data['postnatsourceip'], 'post_nat_src_addr'); - } + return 1; +} - /* post-nat source port filter */ - if (isset($data['postnatsourceport']) && $data['postnatsourceport'] != '') { - $sql_where = get_numeric_filter($sql_where, $sql_params, $data['postnatsourceport'], 'post_nat_src_port'); +/** + * How many lines the report returns: the page's choice, else the Filter's, + * where 999999 means all of them. + * + * @param array $data + * + * @return mixed + */ +function flowview_query_lines(array $data) { + if (isset_request_var('cutofflines')) { + return get_request_var('cutofflines') != 999999 ? get_request_var('cutofflines') : '9999999999'; } - /* post-nat destination ip filter */ - if (isset($data['postnatdestip']) && $data['postnatdestip'] != '') { - $sql_where = get_ip_filter($sql_where, $sql_params, $data['postnatdestip'], 'post_nat_dst_addr'); - } + return $data['cutofflines'] != 999999 ? $data['cutofflines'] : '9999999999'; +} - /* post-nat destination port filter */ - if (isset($data['postnatdestport']) && $data['postnatdestport'] != '') { - $sql_where = get_numeric_filter($sql_where, $sql_params, $data['postnatdestport'], 'post_nat_dst_port'); - } +/** + * The WHERE of a Filter's columns, in the order they are tested. + * + * The Listener and the Stream are part of the Filter and what is + * materialized, so they are taken from the saved Filter, not the page. + * + * @param array $data + * @param array $params The WHERE's parameters, added to. + * + * @return string + */ +function flowview_query_where(array $data, array &$params): string { + $where = ''; - /* protocols filter */ - if (isset($data['protocols']) && $data['protocols'] != '' && $data['protocols'] != '0') { - $sql_where = get_numeric_filter($sql_where, $sql_params, $data['protocols'], 'protocol'); + if (isset($data['device_id']) && $data['device_id'] > 0) { + $where = get_numeric_filter($where, $params, $data['device_id'], 'listener_id'); } - /* tcp flags filter */ - if (isset($data['tcpflags']) && $data['tcpflags'] != '') { - $sql_where = get_numeric_filter($sql_where, $sql_params, $data['tcpflags'], 'flags'); + if (isset($data['ex_addr']) && $data['ex_addr'] != '-1' && $data['ex_addr'] != '' && $data['ex_addr'] != '0') { + $where .= ($where != '' ? ' AND ' : '') . 'ex_addr = ?'; + $params[] = $data['ex_addr']; } - /* tos filter */ - if (isset($data['tosfields']) && $data['tosfields'] != '') { - $sql_where = get_numeric_filter($sql_where, $sql_params, $data['tosfields'], 'tos'); + if (isset($data['template_id']) && $data['template_id'] >= 0) { + $where = get_numeric_filter($where, $params, $data['template_id'], 'template_id'); } - /*-------------------------------------------------------------*/ - /* Query construction phase. For each report, construct the */ - /* inner query (map phase) and the outer query (reduce phase) */ - /* the will pull the results from the database, either in */ - /* parallel (the new default), or as a single union query */ - /*-------------------------------------------------------------*/ - - $sql = ''; - $sql_outer = ''; - $sql_inner = ''; - - $sql_inner1 = ''; - $sql_inner2 = ''; - $sql_groupby = ''; - $sql_inner_groupby = ''; - $sql_inner_groupby1 = ''; - $sql_inner_groupby2 = ''; - $sql_order = ''; - - if (cacti_sizeof($data)) { - if ($data['statistics'] > 0) { - $request_type = 'statistics'; - - if ($data['statistics'] == 99) { - $data['sortfield'] = '-1'; - } elseif (!isset($stat_columns_array[$data['statistics']][$data['sortfield']])) { - $data['sortfield'] = 'bytes'; - } - - switch($data['statistics']) { - case 99: - $sql_array = array( - array('name' => 'p0To32', 'min' => 0, 'max' => 32, 'title' => __('%d - %d Bytes', 0, 32, 'flowview')), - array('name' => 'p32To64', 'min' => 32, 'max' => 64, 'title' => __('%d - %d Bytes', 32, 64, 'flowview')), - array('name' => 'p64To96', 'min' => 64, 'max' => 96, 'title' => __('%d - %d Bytes', 64, 96, 'flowview')), - array('name' => 'p96To128', 'min' => 96, 'max' => 128, 'title' => __('%d - %d Bytes', 96, 128, 'flowview')), - array('name' => 'p128To160', 'min' => 128, 'max' => 160, 'title' => __('%d - %d Bytes', 128, 160, 'flowview')), - array('name' => 'p160To192', 'min' => 160, 'max' => 192, 'title' => __('%d - %d Bytes', 160, 192, 'flowview')), - array('name' => 'p192To224', 'min' => 192, 'max' => 224, 'title' => __('%d - %d Bytes', 192, 224, 'flowview')), - array('name' => 'p224To256', 'min' => 224, 'max' => 256, 'title' => __('%d - %d Bytes', 224, 256, 'flowview')), - array('name' => 'p256To288', 'min' => 256, 'max' => 288, 'title' => __('%d - %d Bytes', 256, 288, 'flowview')), - array('name' => 'p288To320', 'min' => 288, 'max' => 320, 'title' => __('%d - %d Bytes', 288, 320, 'flowview')), - array('name' => 'p320To352', 'min' => 320, 'max' => 352, 'title' => __('%d - %d Bytes', 320, 352, 'flowview')), - array('name' => 'p352To384', 'min' => 352, 'max' => 384, 'title' => __('%d - %d Bytes', 352, 384, 'flowview')), - array('name' => 'p384To416', 'min' => 384, 'max' => 416, 'title' => __('%d - %d Bytes', 384, 416, 'flowview')), - array('name' => 'p416To448', 'min' => 416, 'max' => 448, 'title' => __('%d - %d Bytes', 416, 448, 'flowview')), - array('name' => 'p448To480', 'min' => 448, 'max' => 480, 'title' => __('%d - %d Bytes', 448, 480, 'flowview')), - array('name' => 'p480To512', 'min' => 480, 'max' => 512, 'title' => __('%d - %d Bytes', 480, 512, 'flowview')), - array('name' => 'p512To544', 'min' => 512, 'max' => 544, 'title' => __('%d - %d Bytes', 512, 544, 'flowview')), - array('name' => 'p544To576', 'min' => 544, 'max' => 576, 'title' => __('%d - %d Bytes', 544, 576, 'flowview')), - array('name' => 'p576To1024', 'min' => 576, 'max' => 1024, 'title' => __('%d - %d Bytes', 576, 1024, 'flowview')), - array('name' => 'p1024To1536', 'min' => 1024, 'max' => 1536, 'title' => __('%d - %d Bytes', 1024, 1536, 'flowview')), - array('name' => 'p1536To2048', 'min' => 1536, 'max' => 2048, 'title' => __('%d - %d Bytes', 1536, 2048, 'flowview')), - array('name' => 'p2048To2560', 'min' => 2048, 'max' => 2560, 'title' => __('%d - %d Bytes', 2048, 2560, 'flowview')), - array('name' => 'p2560To3072', 'min' => 2560, 'max' => 3072, 'title' => __('%d - %d Bytes', 2560, 3072, 'flowview')), - array('name' => 'p3072To3568', 'min' => 3072, 'max' => 3568, 'title' => __('%d - %d Bytes', 3072, 3568, 'flowview')), - array('name' => 'p3568To4096', 'min' => 3568, 'max' => 4096, 'title' => __('%d - %d Bytes', 3568, 4096, 'flowview')), - array('name' => 'p4096To4608', 'min' => 4096, 'max' => 4608, 'title' => __('%d - %d Bytes', 4096, 4680, 'flowview')), - array('name' => 'p4608ToInfin', 'min' => 4680, 'max' => -1, 'title' => __esc('> %d Bytes', 4680, 'flowview')) - ); - - $sql_outer = $sql_inner = ''; - - foreach($sql_array as $el) { - $sql_outer .= ($sql_outer != '' ? ', ':'SELECT ') . 'SUM(' . $el['name'] . ') AS ' . $el['name']; - $sql_inner .= ($sql_inner != '' ? ', ':'SELECT ') . - 'SUM(CASE WHEN bytes_ppacket BETWEEN ' . - $el['min'] . ' AND ' . $el['max'] . ' THEN bytes_ppacket ELSE 0 END) AS ' . $el['name']; - } - - $sql_groupby = ''; - $sql_inner_groupby = ''; - $sql_order = ''; - - break; - case 2: - $sql_outer = 'SELECT src_rdomain, - SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets'; - - $sql_inner = 'SELECT src_rdomain, - SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets'; - - $sql_groupby = 'GROUP BY src_rdomain'; - $sql_inner_groupby = 'GROUP BY src_rdomain'; - - break; - case 3: - $sql_outer = 'SELECT dst_rdomain, - SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets'; - - $sql_inner = 'SELECT dst_rdomain, - SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets'; - - $sql_groupby = 'GROUP BY dst_rdomain'; - $sql_inner_groupby = 'GROUP BY dst_rdomain'; - - break; - case 4: - $sql_outer = 'SELECT src_rdomain, dst_rdomain, - SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets'; - - $sql_inner = 'SELECT src_rdomain, dst_rdomain, - SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets'; - - $sql_groupby = 'GROUP BY src_rdomain, dst_rdomain'; - $sql_inner_groupby = 'GROUP BY src_rdomain, dst_rdomain'; - - break; - case 5: - $sql_outer = 'SELECT dst_port, protocol, - SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets'; - - $sql_inner = 'SELECT dst_port, protocol, - SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets'; - - $sql_groupby = 'GROUP BY dst_port, protocol'; - $sql_inner_groupby = 'GROUP BY dst_port, protocol'; - - break; - case 6: - $sql_outer = 'SELECT src_port, protocol, - SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets'; - - $sql_inner = 'SELECT src_port, protocol, - SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets'; - - $sql_groupby = 'GROUP BY src_port, protocol'; - $sql_inner_groupby = 'GROUP BY src_port, protocol'; - - break; - case 7: - $sql_outer = 'SELECT src_port, dst_port, protocol, - SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets'; - - $sql_inner = 'SELECT src_port, dst_port, protocol, - SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets'; - - $sql_groupby = 'GROUP BY src_port, dst_port, protocol'; - $sql_inner_groupby = 'GROUP BY src_port, dst_port, protocol'; - - break; - case 8: - $sql_outer = 'SELECT INET6_NTOA(dst_addr) AS dst_addr, dst_domain, dst_rdomain, - SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets'; - - $sql_inner = 'SELECT dst_addr, dst_domain, dst_rdomain, - SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets'; - - $sql_groupby = 'GROUP BY INET6_NTOA(dst_addr)'; - $sql_inner_groupby = 'GROUP BY dst_addr'; - - break; - case 9: - $sql_outer = 'SELECT INET6_NTOA(src_addr) AS src_addr, src_domain, src_rdomain, - SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets'; - - $sql_inner = 'SELECT src_addr, src_domain, src_rdomain, - SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets'; - - $sql_groupby = 'GROUP BY INET6_NTOA(src_addr)'; - $sql_inner_groupby = 'GROUP BY src_addr'; - - break; - case 10: - $sql_outer = 'SELECT INET6_NTOA(src_addr) AS src_addr, INET6_NTOA(dst_addr) AS dst_addr, - SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain'; - - $sql_inner = 'SELECT src_addr, dst_addr, - SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain'; - - $sql_groupby = 'GROUP BY INET6_NTOA(src_addr), INET6_NTOA(dst_addr)'; - $sql_inner_groupby = 'GROUP BY src_addr, dst_addr'; - - break; - case 11: - $sql_outer = 'SELECT INET6_NTOA(src_addr) AS src_addr, src_domain, src_rdomain, - SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets'; - - $sql_inner1 = 'SELECT src_addr, src_domain AS src_domain, src_rdomain AS src_rdomain, - SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets'; - - $sql_inner2 = 'SELECT dst_addr AS src_addr, dst_domain AS src_domain, dst_rdomain AS src_rdomain, - SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets'; - - $sql_groupby = 'GROUP BY INET6_NTOA(src_addr)'; - $sql_inner_groupby1 = 'GROUP BY src_addr'; - $sql_inner_groupby2 = 'GROUP BY dst_addr'; - - break; - case 12: - $sql_outer = 'SELECT protocol, - SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets'; - - $sql_inner = 'SELECT protocol, - SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets'; - - $sql_groupby = 'GROUP BY protocol'; - $sql_inner_groupby = 'GROUP BY protocol'; - - break; - case 17: - $sql_outer = 'SELECT src_if, - SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets'; - - $sql_inner = 'SELECT src_if, - SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets'; - - $sql_groupby = 'GROUP BY src_if'; - $sql_inner_groupby = 'GROUP BY src_if'; - - break; - case 18: - $sql_outer = 'SELECT dst_if, - SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets'; - - $sql_inner = 'SELECT dst_if, - SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets'; - - $sql_groupby = 'GROUP BY dst_if'; - $sql_inner_groupby = 'GROUP BY dst_if'; - - break; - case 23: - $sql_outer = 'SELECT src_if, dst_if, - SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets'; - - $sql_inner = 'SELECT src_if, dst_if, - SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets'; - - $sql_groupby = 'GROUP BY src_if, dst_if'; - $sql_inner_groupby = 'GROUP BY src_if, dst_if'; - - break; - case 19: - $sql_outer = 'SELECT src_as, - SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets'; - - $sql_inner = 'SELECT src_as, - SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets'; - - $sql_groupby = 'GROUP BY src_as'; - $sql_inner_groupby = 'GROUP BY src_as'; - - break; - case 20: - $sql_outer = 'SELECT dst_as, - SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets'; - - $sql_inner = 'SELECT dst_as, - SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets'; - - $sql_groupby = 'GROUP BY dst_as'; - $sql_inner_groupby = 'GROUP BY dst_as'; - - break; - case 21: - $sql_outer = 'SELECT src_as, dst_as, - SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets'; - - $sql_inner = 'SELECT src_as, dst_as, - SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets'; - - $sql_groupby = 'GROUP BY src_as, dst_as'; - $sql_inner_groupby = 'GROUP BY src_as, dst_as'; - - break; - case 22: - $sql_outer = 'SELECT tos, - SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets'; - - $sql_inner = 'SELECT tos, - SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets'; - - $sql_groupby = 'GROUP BY tos'; - $sql_inner_groupby = 'GROUP BY tos'; - - break; - case 24: - $sql_outer = 'SELECT src_prefix, - SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets'; - - $sql_inner = 'SELECT src_prefix, - SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets'; - - $sql_groupby = 'GROUP BY src_prefix'; - $sql_inner_groupby = 'GROUP BY src_prefix'; - - break; - case 25: - $sql_outer = 'SELECT dst_prefix, - SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets'; - - $sql_inner = 'SELECT dst_prefix, - SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets'; - - $sql_groupby = 'GROUP BY dst_prefix'; - $sql_inner_groupby = 'GROUP BY dst_prefix'; - - break; - case 26: - $sql_outer = 'SELECT src_prefix, dst_prefix, - SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets'; - - $sql_inner = 'SELECT src_prefix, dst_prefix, - SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets'; - - $sql_groupby = 'GROUP BY src_prefix, dst_prefix'; - $sql_inner_groupby = 'GROUP BY src_prefix, dst_prefix'; - - break; - } - - if ($data['statistics'] != 99) { - if ($data['sortfield'] == 'src_addr' || $data['sortfield'] == 'dst_addr') { - $sql_order = 'ORDER BY INET6_NTOA(' . $data['sortfield'] . ')'; - } else { - $sql_order = 'ORDER BY ' . $data['sortfield'] . - (preg_match('/^(bytes|packets|flows)$/i', $data['sortfield']) ? ' DESC':' ASC'); - } - } - } elseif ($data['printed'] > 0) { - $request_type = 'printed'; - - /** - * For printed reports, we have to be careful as they return several million rows. So, to - * to work around this, we will only return the top X matching to reduce the load on the - * main database and to reduce the call time. We will limit to the first 100 which accommodates - * the top and lower clip levels. - * - * Also, since the sort becomes relevant we have to change the table md5sum to include the sort - * direction. So, as a result we will have to include that into the request so that the - * caching is enhanced to take into account that attribute. - * - * So, to do this, we set the $sql_limit and the $sql_order on the $stru_inner attributes - * that way we can include that in the table md5sum in order for caching to continue - * to work as expected without crashing the server. - */ - switch($data['printed']) { - case '1': - $sql_outer = 'SELECT src_if, INET6_NTOA(src_addr) AS src_addr, dst_if, INET6_NTOA(dst_addr) AS dst_addr, - protocol, src_port, dst_port, tos, flags, - SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain'; - - $sql_inner = 'SELECT src_if, src_addr, dst_if, dst_addr, - protocol, src_port, dst_port, tos, flags, - SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain'; - - $sql_groupby = 'GROUP BY src_if, INET6_NTOA(src_addr), dst_if, - INET6_NTOA(dst_addr), protocol, src_port, dst_port, tos, flags'; - - $sql_inner_groupby = 'GROUP BY src_if, src_addr, dst_if, - dst_addr, protocol, src_port, dst_port, tos, flags'; - - break; - case '4': - $sql_outer = 'SELECT INET6_NTOA(src_addr) AS src_addr, INET6_NTOA(dst_addr) AS dst_addr, - protocol, src_as, dst_as, - SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain'; - - $sql_inner = 'SELECT src_addr, dst_addr, - protocol, src_as, dst_as, - SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain'; - - $sql_groupby = 'GROUP BY INET6_NTOA(src_addr), INET6_NTOA(dst_addr), protocol, src_as, dst_as'; - $sql_inner_groupby = 'GROUP BY src_addr, dst_addr, protocol, src_as, dst_as'; - - break; - case '5': - $sql_outer = 'SELECT start_time, end_time, - src_if, INET6_NTOA(src_addr) AS src_addr, src_port, - dst_if, INET6_NTOA(dst_addr) AS dst_addr, dst_port, - protocol, flags, - SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain'; - - $sql_inner = 'SELECT start_time, end_time, - src_if, src_addr, src_port, - dst_if, dst_addr, dst_port, - protocol, flags, - SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain'; - - $sql_groupby = 'GROUP BY start_time, end_time, - src_if, INET6_NTOA(src_addr), src_port, - dst_if, INET6_NTOA(dst_addr), dst_port, protocol, flags'; - - $sql_inner_groupby = 'GROUP BY start_time, end_time, - src_if, src_addr, src_port, - dst_if, dst_addr, dst_port, protocol, flags'; - - break; - case '6': - $sql_outer = 'SELECT INET6_NTOA(src_addr) AS src_addr, INET6_NTOA(dst_addr) AS dst_addr, - SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain'; - - $sql_inner = 'SELECT src_addr, dst_addr, - SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain'; - - $sql_groupby = 'GROUP BY INET6_NTOA(src_addr), INET6_NTOA(dst_addr)'; - $sql_inner_groupby = 'GROUP BY src_addr, dst_addr'; - - break; - case '7': - $sql_outer = 'SELECT INET6_NTOA(src_addr) AS src_addr, src_port, - protocol, INET6_NTOA(dst_addr) AS dst_addr, dst_port, - SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain'; - - $sql_inner = 'SELECT src_addr, src_port, - protocol, dst_addr, dst_port, - SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain'; - - $sql_groupby = 'GROUP BY INET6_NTOA(src_addr), src_port, protocol, INET6_NTOA(dst_addr), dst_port'; - $sql_inner_groupby = 'GROUP BY src_addr, src_port, protocol, dst_addr, dst_port'; - - break; - } - - if ($data['sortfield'] == 'src_addr' || $data['sortfield'] == 'dst_addr') { - $sql_order = 'ORDER BY INET6_NTOA(' . $data['sortfield'] . ')'; - } else { - $sql_order = 'ORDER BY ' . $data['sortfield'] . - (preg_match('/^(bytes|packets|flows)$/i', $data['sortfield']) ? ' DESC':' ASC'); - } - } else { - if (!$plan_only) { - cacti_log(sprintf('WARNING: The Flowview Query %s [%s] does not include either a Statistical or Printed Report.', $data['name'], $data['id']), false, 'FLOWVIEW'); - } - - return false; - } - - if ($sql_outer == '' || ($sql_inner == '' && $sql_inner1 == '')) { - if ($plan_only) { - return false; - } - - if ($data['statistics'] > 0) { - $message = __('The Statistical Report %s is not known. Please open a bug on GitHub', $data['statistics'], 'flowview'); - } else { - $message = __('The Printed Report %s is not known. Please open a bug on GitHub', $data['printed'], 'flowview'); - } - - raise_message('bad_report', $message, MESSAGE_LEVEL_ERROR); - - cacti_log(sprintf('WARNING: The Flowview Query %s [%s] contains an invalid Statistical or Printed Report.', $data['name'], $data['id']), false, 'FLOWVIEW'); - - return false; - } - - /* use post-NAT data instead of the original src/dst values - issue#110 */ - if ($force_nat !== null) { - $use_nat = $force_nat; - } elseif (isset_request_var('usenat')) { - $use_nat = (get_request_var('usenat') == 'true'); - } else { - $use_nat = (isset($data['usenat']) && $data['usenat'] == 'on'); - } - - /* clean up sql formatting */ - if ($sql_inner != '') { - $sql_outer = str_replace(["\n", "\t"], [' ', ''], $sql_outer); - $sql_inner = str_replace(["\n", "\t"], [' ', ''], $sql_inner); - - $sql_groupby = str_replace(["\n", "\t"], [' ', ''], $sql_groupby); - $sql_inner_groupby = str_replace(["\n", "\t"], [' ', ''], $sql_inner_groupby); - - /** - * Only the innermost (per-table) SELECT/GROUP BY need to change - * for the NAT toggle - it's aliased back to the original column - * name (e.g. 'post_nat_src_addr AS src_addr'), so everything - * downstream (the outer query, its GROUP BY/ORDER BY, and the - * report table renderer) keeps working unmodified against the - * usual 'src_addr'/'dst_addr'/etc. names, just backed by NAT - * data instead - issue#110. - */ - $sql_inner = flowview_apply_nat_toggle($sql_inner, $use_nat, true); - $sql_inner_groupby = flowview_apply_nat_toggle($sql_inner_groupby, $use_nat, false); - } else { - $sql_outer = str_replace(["\n", "\t"], [' ', ''], $sql_outer); - $sql_inner1 = str_replace(["\n", "\t"], [' ', ''], $sql_inner1); - $sql_inner2 = str_replace(["\n", "\t"], [' ', ''], $sql_inner2); - - $sql_groupby = str_replace(["\n", "\t"], [' ', ''], $sql_groupby); - $sql_inner_groupby1 = str_replace(["\n", "\t"], [' ', ''], $sql_inner_groupby1); - $sql_inner_groupby2 = str_replace(["\n", "\t"], [' ', ''], $sql_inner_groupby2); + // each Filter column, its table column, and whether it holds addresses rather than numbers + $columns = [ + ['sourceip', 'src_addr', true], + ['sourceinterface', 'src_if', false], + ['sourceport', 'src_port', false], + ['sourceas', 'src_as', false], + ['destip', 'dst_addr', true], + ['destinterface', 'dst_if', false], + ['destport', 'dst_port', false], + ['destas', 'dst_as', false], + ['postnatsourceip', 'post_nat_src_addr', true], + ['postnatsourceport', 'post_nat_src_port', false], + ['postnatdestip', 'post_nat_dst_addr', true], + ['postnatdestport', 'post_nat_dst_port', false], + ['protocols', 'protocol', false], + ['tcpflags', 'flags', false], + ['tosfields', 'tos', false], + ]; - $sql_inner1 = flowview_apply_nat_toggle($sql_inner1, $use_nat, true); - $sql_inner2 = flowview_apply_nat_toggle($sql_inner2, $use_nat, true); - $sql_inner_groupby1 = flowview_apply_nat_toggle($sql_inner_groupby1, $use_nat, false); - $sql_inner_groupby2 = flowview_apply_nat_toggle($sql_inner_groupby2, $use_nat, false); + foreach ($columns as [$field, $column, $addresses]) { + // a protocol of 0 is any protocol + if (!isset($data[$field]) || $data[$field] == '' || ($field == 'protocols' && $data[$field] == '0')) { + continue; } - /** - * The map (inner) structures cache their shards by an md5 of the - * query without the time range, so they can be built before the - * tables are known. - */ - if ($sql_inner1 != '') { - $stru_outer = [ - 'sql_query' => $sql_outer, - 'sql_where' => '', - 'sql_groupby' => $sql_groupby, - 'sql_having' => $sql_having, - 'sql_order' => $sql_order, - 'sql_limit' => $sql_limit, - 'sql_params' => [] - ]; - - $stru_inners = []; - - foreach ([[$sql_inner1, $sql_inner_groupby1], [$sql_inner2, $sql_inner_groupby2]] as $inner) { - $stru_inner = [ - 'sql_query' => $inner[0], - 'sql_where' => $sql_where, - 'sql_range' => $sql_range, - 'sql_groupby' => $inner[1], - 'sql_having' => '', - 'sql_order' => '', - 'sql_limit' => '', - 'sql_params' => $sql_params, - 'sql_range_params' => $sql_range_params, - 'sql_start_time' => $start, - 'sql_end_time' => $end - ]; - - /* only statistical reports have two map queries, so there is no printed limit or order here */ - $stru_inners[] = $stru_inner; - } + if ($addresses) { + $where = get_ip_filter($where, $params, $data[$field], $column); } else { - $stru_inner = [ - 'sql_query' => $sql_inner, - 'sql_where' => $sql_where, - 'sql_range' => $sql_range, - 'sql_having' => '', - 'sql_order' => '', - 'sql_limit' => '', - 'sql_groupby' => $sql_inner_groupby, - 'sql_params' => $sql_params, - 'sql_range_params' => $sql_range_params, - 'sql_start_time' => $start, - 'sql_end_time' => $end - ]; - - if ($request_type == 'printed') { - $stru_inner['sql_limit'] = 'LIMIT 100'; - $stru_inner['sql_order'] = $sql_order; - } - - $stru_outer = [ - 'sql_query' => $sql_outer, - 'sql_where' => '', - 'sql_having' => $sql_having, - 'sql_groupby' => $sql_groupby, - 'sql_order' => $sql_order, - 'sql_limit' => $sql_limit, - 'sql_params' => [] - ]; - - $stru_inners = [$stru_inner]; - } - - if ($plan_only) { - $plan = array_map('parallel_database_query_table_md5', $stru_inners); - - return true; - } - - $tables = get_tables_for_query($start, $end); - $sql = ''; - $all_params = []; - $results = []; - $threads = read_config_option('flowview_parallel_threads'); - $requests = []; - - if (cacti_sizeof($tables)) { - if (empty($threads) || $threads == 1) { - foreach($tables as $table_name => $details) { - $start_time = strtotime($details['min_date']); - $end_time = strtotime($details['max_date']); - $fsql_where = ''; - $fsql_params = []; - - if ($start < $start_time && $end > $end_time) { - $full_scan = true; - } else { - $full_scan = false; - } - - if ($sql_inner1 != '') { - if (!$full_scan) { - $fsql_where .= ($sql_where != '' ? ' AND ':'WHERE ') . $sql_range; - $fsql_params = array_merge($sql_params, $sql_range_params); - } else { - $fsql_where = $sql_where; - $fsql_params = $sql_params; - } - - $safe_fsql_where = flowview_nat_safe_sql($fsql_where, $table_name); - $safe_sql_inner1 = flowview_nat_safe_sql($sql_inner1, $table_name); - $safe_sql_inner2 = flowview_nat_safe_sql($sql_inner2, $table_name); - $safe_sql_inner_groupby1 = flowview_nat_safe_sql($sql_inner_groupby1, $table_name); - $safe_sql_inner_groupby2 = flowview_nat_safe_sql($sql_inner_groupby2, $table_name); - - $sql .= ($sql != '' ? ' UNION ALL ':'') . "$safe_sql_inner1 FROM $table_name $safe_fsql_where $safe_sql_inner_groupby1"; - $all_params = array_merge($all_params, $fsql_params); - - $sql .= ($sql != '' ? ' UNION ALL ':'') . "$safe_sql_inner2 FROM $table_name $safe_fsql_where $safe_sql_inner_groupby2"; - $all_params = array_merge($all_params, $fsql_params); - } else { - $safe_fsql_where = flowview_nat_safe_sql($fsql_where, $table_name); - $safe_sql_inner = flowview_nat_safe_sql($sql_inner, $table_name); - $safe_sql_inner_groupby = flowview_nat_safe_sql($sql_inner_groupby, $table_name); - - $sql .= ($sql != '' ? ' UNION ALL ':'') . "$safe_sql_inner FROM $table_name $safe_fsql_where $safe_sql_inner_groupby"; - $all_params = array_merge($all_params, $fsql_params); - } - } - - $sql = "$sql_outer FROM ($sql) AS rs $sql_groupby $sql_having $sql_order $sql_limit"; - - $start = microtime(true); - $threads = 1; - $shards = cacti_sizeof($tables); - - if ($data['statistics'] == 99) { - $results = flowview_db_fetch_row_prepared($sql, $all_params); - } else { - $results = flowview_db_fetch_assoc_prepared($sql, $all_params); - } - - $end = microtime(true); - - cacti_log(sprintf('PARALLEL STATS: Time:%0.3f Threads:%d Shards:%d', $end - $start, $threads, $shards), false, 'FLOWVIEW'); - } else { - foreach ($stru_inners as $stru_inner) { - $requests[] = parallel_database_query_request($tables, $stru_inner, $stru_outer); - } - - $results = parallel_database_query_run($requests); - } + $where = get_numeric_filter($where, $params, $data[$field], $column); } + } - $output = $data; - $output['data'] = $results; - - $i = 0; - $table = ''; - if (cacti_sizeof($results)) { - if ($data['statistics'] != 99) { - $table .= '
@@ -1469,6 +1571,16 @@ function flowview_display_filter(): void {
'; - - foreach($results as $r) { - if ($i == 0) { - $table .= ''; - - if (isset($r['start_time'])) { - $table .= ''; - } - - if (isset($r['end_time'])) { - $table .= ''; - } - - if (isset($r['src_domain'])) { - $table .= ''; - } - - if (isset($r['src_rdomain'])) { - $table .= ''; - } - - if (isset($r['dst_domain'])) { - $table .= ''; - } - - if (isset($r['dst_rdomain'])) { - $table .= ''; - } - - if (isset($r['domain'])) { - $table .= ''; - } - - if (isset($r['rdomain'])) { - $table .= ''; - } - - if (isset($r['src_addr'])) { - if ($report == '11') { - $table .= ''; - } else { - $table .= ''; - } - } - - if (isset($r['dst_addr'])) { - $table .= ''; - } - - if (isset($r['src_port'])) { - $table .= ''; - } - - if (isset($r['dst_port'])) { - $table .= ''; - } - - if (isset($r['src_if'])) { - $table .= ''; - } - - if (isset($r['dst_if'])) { - $table .= ''; - } - - if (isset($r['src_as'])) { - $table .= ''; - } - - if (isset($r['dst_as'])) { - $table .= ''; - } - - if (isset($r['src_prefix'])) { - $table .= ''; - } - - if (isset($r['dst_prefix'])) { - $table .= ''; - } - - if (isset($r['protocol'])) { - $table .= ''; - } - - if (isset($r['tos'])) { - $table .= ''; - } - - if (isset($r['flags'])) { - $table .= ''; - } - - if (isset($r['flows'])) { - $table .= ''; - } - - if (isset($r['bytes'])) { - $table .= ''; - } - - if (isset($r['packets'])) { - $table .= ''; - } + return $where; +} - $table .= ''; +/** + * Load the report SQL and table classes. + * + * Only the report pages use them, so they load when a report is built + * rather than with every page that includes this file. + * + * @return void + */ +function flowview_require_report_classes(): void { + require_once(__DIR__ . '/../lib/ReportSql.php'); + require_once(__DIR__ . '/../lib/ReportCatalog.php'); + require_once(__DIR__ . '/../lib/ReportTable.php'); + require_once(__DIR__ . '/../lib/PacketSizeTable.php'); +} - $table .= ''; - } +/** + * The SQL of the Filter's report, or null when it has none or one that is + * not known, which is logged and, outside a plan, shown. + * + * The summary report has no sort. Another statistical report sorts by + * bytes when the sort field is not one of its columns. + * + * @param array $data The Filter; its sort field may change. + * @param bool $plan_only + * + * @return \Cacti\Flowview\ReportSql|null + */ +function flowview_query_report(array &$data, bool $plan_only): ?Cacti\Flowview\ReportSql { + global $stat_columns_array; - $table .= ''; + flowview_require_report_classes(); - if (isset($r['start_time'])) { - $table .= ''; - } + if ($data['statistics'] > 0) { + if ($data['statistics'] == 99) { + $data['sortfield'] = '-1'; + } elseif (!isset($stat_columns_array[$data['statistics']][$data['sortfield']])) { + $data['sortfield'] = 'bytes'; + } - if (isset($r['end_time'])) { - $table .= ''; - } + $sql = Cacti\Flowview\ReportCatalog::statistical($data['statistics']); + $order = $data['statistics'] != 99 ? flowview_query_order($data['sortfield']) : ''; + } elseif ($data['printed'] > 0) { + /** + * Printed reports can return several million rows, so each map query + * returns only its first 100, in the report's order. The order is + * then part of the map query, and so of the md5sum its shards are + * cached under. See flowview_query_structures(). + */ + $sql = Cacti\Flowview\ReportCatalog::printed($data['printed']); + $order = flowview_query_order($data['sortfield']); + } else { + if (!$plan_only) { + cacti_log(sprintf('WARNING: The Flowview Query %s [%s] does not include either a Statistical or Printed Report.', $data['name'], $data['id']), false, 'FLOWVIEW'); + } - if (isset($r['src_domain'])) { - $table .= ''; - } + return null; + } - if (isset($r['src_rdomain'])) { - $table .= ''; - } + if ($sql === null) { + if (!$plan_only) { + flowview_query_report_unknown($data); + } - if (isset($r['dst_domain'])) { - $table .= ''; - } + return null; + } - if (isset($r['dst_rdomain'])) { - $table .= ''; - } + return $sql->forQuery($order, !($data['statistics'] > 0), false); +} - if (isset($r['domain'])) { - $table .= ''; - } +/** + * Show and log that the Filter's report is not known. + * + * @param array $data + * + * @return void + */ +function flowview_query_report_unknown(array $data): void { + if ($data['statistics'] > 0) { + $message = __('The Statistical Report %s is not known. Please open a bug on GitHub', $data['statistics'], 'flowview'); + } else { + $message = __('The Printed Report %s is not known. Please open a bug on GitHub', $data['printed'], 'flowview'); + } - if (isset($r['rdomain'])) { - $table .= ''; - } + raise_message('bad_report', $message, MESSAGE_LEVEL_ERROR); - if (isset($r['src_addr'])) { - $table .= ''; - } + cacti_log(sprintf('WARNING: The Flowview Query %s [%s] contains an invalid Statistical or Printed Report.', $data['name'], $data['id']), false, 'FLOWVIEW'); +} - if (isset($r['dst_addr'])) { - $table .= ''; - } +/** + * The ORDER BY of a sort field. Addresses sort as text, and counts from + * the largest down. + * + * @param mixed $sortfield + * + * @return string + */ +function flowview_query_order($sortfield): string { + if ($sortfield == 'src_addr' || $sortfield == 'dst_addr') { + return 'ORDER BY INET6_NTOA(' . $sortfield . ')'; + } - if (isset($r['src_port'])) { - if (isset($r['protocol'])) { - $table .= ''; - } else { - $table .= ''; - } - } + return 'ORDER BY ' . $sortfield . + (preg_match('/^(bytes|packets|flows)$/i', $sortfield) ? ' DESC' : ' ASC'); +} - if (isset($r['dst_port'])) { - if (isset($r['protocol'])) { - $table .= ''; - } else { - $table .= ''; - } - } +/** + * Whether the report reads the post-NAT columns: as forced, else as the page + * asks, else as the Filter is saved (issue#110). + * + * @param array $data + * @param bool|null $force_nat + * + * @return bool + */ +function flowview_query_use_nat(array $data, ?bool $force_nat): bool { + if ($force_nat !== null) { + return $force_nat; + } - if (isset($r['src_if'])) { - $table .= ''; - } + if (isset_request_var('usenat')) { + return get_request_var('usenat') == 'true'; + } - if (isset($r['dst_if'])) { - $table .= ''; - } + return isset($data['usenat']) && $data['usenat'] == 'on'; +} - if (isset($r['src_as'])) { - $table .= ''; - } +/** + * The map (inner) structures of a report, one for each of its map + * queries, and its reduce (outer) structure, as the parallel query takes + * them. + * + * The map structures cache their shards by an md5 of the query without the + * time range, so they can be built before the tables are known. That md5 + * is of the JSON of the structure, so the order of each structure's keys is + * part of the cache key and must not change. + * + * @param \Cacti\Flowview\ReportSql $sql + * @param array $filter From flowview_query_filter(). + * @param mixed $start + * @param mixed $end + * + * @return array{0: array>, 1: array} + */ +function flowview_query_structures(Cacti\Flowview\ReportSql $sql, array $filter, $start, $end): array { + if ($sql->hasTwoMaps()) { + $stru_outer = [ + 'sql_query' => $sql->outer, + 'sql_where' => '', + 'sql_groupby' => $sql->groupby, + 'sql_having' => $filter['having'], + 'sql_order' => $sql->order, + 'sql_limit' => $filter['limit'], + 'sql_params' => [] + ]; - if (isset($r['dst_as'])) { - $table .= ''; - } + $stru_inners = []; - if (isset($r['src_prefix'])) { - $table .= ''; - } + // only statistical reports have two map queries, so there is no printed limit or order here + foreach ([[$sql->inner1, $sql->innerGroupby1], [$sql->inner2, $sql->innerGroupby2]] as $inner) { + $stru_inners[] = [ + 'sql_query' => $inner[0], + 'sql_where' => $filter['where'], + 'sql_range' => $filter['range'], + 'sql_groupby' => $inner[1], + 'sql_having' => '', + 'sql_order' => '', + 'sql_limit' => '', + 'sql_params' => $filter['params'], + 'sql_range_params' => $filter['range_params'], + 'sql_start_time' => $start, + 'sql_end_time' => $end + ]; + } - if (isset($r['dst_prefix'])) { - $table .= ''; - } + return [$stru_inners, $stru_outer]; + } - if (isset($r['protocol'])) { - $table .= ''; - } + $stru_inner = [ + 'sql_query' => $sql->inner, + 'sql_where' => $filter['where'], + 'sql_range' => $filter['range'], + 'sql_having' => '', + 'sql_order' => '', + 'sql_limit' => '', + 'sql_groupby' => $sql->innerGroupby, + 'sql_params' => $filter['params'], + 'sql_range_params' => $filter['range_params'], + 'sql_start_time' => $start, + 'sql_end_time' => $end + ]; - if (isset($r['tos'])) { - $table .= parse_type_of_service($r['tos']); - } + if ($sql->printed) { + $stru_inner['sql_limit'] = 'LIMIT 100'; + $stru_inner['sql_order'] = $sql->order; + } - if (isset($r['flags'])) { - $table .= ''; - } + $stru_outer = [ + 'sql_query' => $sql->outer, + 'sql_where' => '', + 'sql_having' => $filter['having'], + 'sql_groupby' => $sql->groupby, + 'sql_order' => $sql->order, + 'sql_limit' => $filter['limit'], + 'sql_params' => [] + ]; - if (isset($r['flows'])) { - $table .= ''; - } + return [[$stru_inner], $stru_outer]; +} - if (isset($r['bytes'])) { - $table .= ''; - } +/** + * Run a report over the raw partitions in its time range: as one union + * query when the parallel query has one thread, else through the parallel + * query. + * + * @param \Cacti\Flowview\ReportSql $sql + * @param array $filter From flowview_query_filter(). + * @param array> $stru_inners + * @param array $stru_outer + * @param mixed $statistics The statistical report. + * @param mixed $start + * @param mixed $end + * + * @return mixed + */ +function flowview_query_results(Cacti\Flowview\ReportSql $sql, array $filter, array $stru_inners, array $stru_outer, $statistics, $start, $end) { + $tables = get_tables_for_query($start, $end); + $threads = read_config_option('flowview_parallel_threads'); - if (isset($r['packets'])) { - $table .= ''; - } + if (!cacti_sizeof($tables)) { + return []; + } - if ($r['packets'] > 0) { - $table .= ''; - } else { - $table .= ''; - } + if (empty($threads) || $threads == 1) { + return flowview_query_run_serial($tables, $sql, $filter, $statistics, $start, $end); + } - $table .= ''; + $requests = []; - $i++; - } + foreach ($stru_inners as $stru_inner) { + $requests[] = parallel_database_query_request($tables, $stru_inner, $stru_outer); + } - $table .= '
' . __('Start Time', 'flowview') . '' . __('End Time', 'flowview') . '' . __('Source DNS', 'flowview') . '' . __('Source Root DNS', 'flowview') . '' . __('Dest DNS', 'flowview') . '' . __('Dest Root DNS', 'flowview') . '' . __('DNS', 'flowview') . '' . __('Root DNS', 'flowview') . '' . __('Source/Destination IP', 'flowview') . '' . __('Source IP', 'flowview') . '' . __('Dest IP', 'flowview') . '' . __('Source Port', 'flowview') . '' . __('Dest Port', 'flowview') . '' . __('Source IF', 'flowview') . '' . __('Dest IF', 'flowview') . '' . __('Source AS', 'flowview') . '' . __('Dest AS', 'flowview') . '' . __('Source Prefix', 'flowview') . '' . __('Dest Prefix', 'flowview') . '' . __('Protocol', 'flowview') . '' . __('Type of Service', 'flowview') . '' . __('Flags', 'flowview') . '' . __('Flows', 'flowview') . '' . __('Bytes', 'flowview') . '' . __('Packets', 'flowview') . '' . __('Bytes/Packet', 'flowview') . '
' . substr($r['start_time'], 0, 19) . '' . substr($r['end_time'], 0, 19) . '' . display_domain($r['src_domain']) . '' . display_domain($r['src_rdomain']) . '' . display_domain($r['dst_domain']) . '' . display_domain($r['dst_rdomain']) . '' . display_domain($r['domain']) . '' . display_domain($r['rdomain']) . '' . html_escape($r['src_addr']) . '' . html_escape($r['dst_addr']) . '' . get_port_name($r['src_port'], $r['protocol']) . '' . get_port_name($r['src_port'], 6) . '' . get_port_name($r['dst_port'], $r['protocol']) . '' . get_port_name($r['dst_port'], 6) . '' . html_escape($r['src_if']) . '' . html_escape($r['dst_if']) . '' . html_escape($r['src_as']) . '' . html_escape($r['dst_as']) . '' . html_escape($r['src_prefix']) . '' . html_escape($r['dst_prefix']) . '' . plugin_flowview_get_protocol($r['protocol'], false) . '' . html_escape($r['flags']) . '' . number_format_i18n($r['flows'], 0) . '' . number_format_i18n($r['bytes'], 0) . '' . number_format_i18n($r['packets'], 0) . '' . number_format_i18n($r['bytes']/$r['packets'], 0) . '0
'; - } elseif ($data['statistics'] == 99) { - $total = 0; - $i = 0; + return parallel_database_query_run($requests); +} - /** - * the parallel query function returns an associative - * array, convert it to a row. - */ - $results = $results[0]; +/** + * Run a report as one query: the union of its map queries over each + * partition, reduced. A partition wholly inside the time range is read + * without it. + * + * @param array> $tables From get_tables_for_query(). + * @param \Cacti\Flowview\ReportSql $sql + * @param array $filter From flowview_query_filter(). + * @param mixed $statistics The statistical report. + * @param mixed $start + * @param mixed $end + * + * @return mixed + */ +function flowview_query_run_serial(array $tables, Cacti\Flowview\ReportSql $sql, array $filter, $statistics, $start, $end) { + $union = ''; + $all_params = []; - /** @var array $sql_array */ - foreach($sql_array as $c) { - $total += $results[$c['name']]; - } + foreach ($tables as $table_name => $details) { + $full_scan = $start < strtotime($details['min_date']) && $end > strtotime($details['max_date']); - $table .= ''; - $table .= ''; + foreach (flowview_query_serial_maps($table_name, $sql, $filter, $full_scan) as [$map, $map_params]) { + $union .= ($union != '' ? ' UNION ALL ' : '') . $map; + $all_params = array_merge($all_params, $map_params); + } + } - for ($i = 0; $i < 14; $i++) { - $table .= ''; - } + $query = "{$sql->outer} FROM ($union) AS rs {$sql->groupby} {$filter['having']} {$sql->order} {$filter['limit']}"; - $table .= ''; - $table .= ''; + $started = microtime(true); - for ($i = 0; $i < 14; $i++) { - $name = $sql_array[$i]['name']; + if ($statistics == 99) { + // the summary report is one row; return it as the parallel query does, in a list + $row = flowview_db_fetch_row_prepared($query, $all_params); + $results = cacti_sizeof($row) ? [$row] : []; + } else { + $results = flowview_db_fetch_assoc_prepared($query, $all_params); + } - if ($total > 0) { - $table .= ''; - } else { - $table .= ''; - } - } + cacti_log(sprintf('PARALLEL STATS: Time:%0.3f Threads:%d Shards:%d', microtime(true) - $started, 1, cacti_sizeof($tables)), false, 'FLOWVIEW'); - $table .= '
' . $sql_array[$i]['title'] . '
' . number_format_i18n(($results[$name] / $total) * 100, 2) . ' %' . __('N/A', 'flowview') . '
'; + return $results; +} - $table .= ''; - $table .= '
'; - $table .= ''; +/** + * The map queries of a report over one partition, each with its parameters. + * Columns the partition is too old to have read as NULL. + * + * @param string $table_name + * @param \Cacti\Flowview\ReportSql $sql + * @param array $filter From flowview_query_filter(). + * @param bool $full_scan Whether the partition is wholly in the time range. + * + * @return array}> + */ +function flowview_query_serial_maps(string $table_name, Cacti\Flowview\ReportSql $sql, array $filter, bool $full_scan): array { + if (!$full_scan) { + $where = $filter['where'] . ($filter['where'] != '' ? ' AND ' : 'WHERE ') . $filter['range']; + $params = array_merge($filter['params'], $filter['range_params']); + } else { + $where = $filter['where']; + $params = $filter['params']; + } - for ($i = 14; $i < 27; $i++) { - $table .= ''; - } + if (!$sql->hasTwoMaps()) { + return [[flowview_query_serial_map($table_name, $sql->inner, $where, $sql->innerGroupby), $params]]; + } - $table .= ''; - $table .= ''; + return [ + [flowview_query_serial_map($table_name, $sql->inner1, $where, $sql->innerGroupby1), $params], + [flowview_query_serial_map($table_name, $sql->inner2, $where, $sql->innerGroupby2), $params], + ]; +} - $table .= ''; +/** + * @param string $table_name + * @param string $select + * @param string $where + * @param string $groupby + * + * @return string + */ +function flowview_query_serial_map(string $table_name, string $select, string $where, string $groupby): string { + $safe_where = flowview_nat_safe_sql($where, $table_name); + $safe_select = flowview_nat_safe_sql($select, $table_name); + $safe_groupby = flowview_nat_safe_sql($groupby, $table_name); - for ($i = 14; $i < 27; $i++) { - $name = $sql_array[$i]['name']; - if ($total > 0) { - $table .= ''; - } else { - $table .= ''; - } - } + return "$safe_select FROM $table_name $safe_where $safe_groupby"; +} - $table .= ''; - $table .= '
' . $sql_array[$i]['title'] . '
' . number_format_i18n(($results[$name] / $total) * 100, 2) . ' %' . __('N/A', 'flowview') . '
'; - } +/** + * The HTML table of a report's results. + * + * @param array $data The Filter. + * @param array $results + * + * @return string + */ +function flowview_query_table(array $data, array $results): string { + flowview_require_report_classes(); - $output['table'] = $table; - $output['title'] = $title; + if ($data['statistics'] != 99) { + $table = new Cacti\Flowview\ReportTable($data['statistics'] > 0, $data['statistics'] == 11); - return $output; - } + return $table->render($results); } - return false; + // the summary report has one row + $table = new Cacti\Flowview\PacketSizeTable(Cacti\Flowview\ReportCatalog::packetSizeBuckets()); + + return $table->render($results[0]); } /** @@ -7611,13 +7181,36 @@ function flowview_translate_port($port, $is_hex, bool $detail = true) { } /** - * @return mixed + * Validate the report request variables of the old report form. + * + * Returns the message for the first one that is not valid, in the order the + * form shows them, or null when they all are. + * + * @return string|null */ function flowview_check_fields() { global $config, $graph_timespans; require($config['base_path'] . '/plugins/flowview/includes/arrays.php'); + return flowview_check_report_fields() + ?? flowview_check_address_field(get_request_var('sourceip'), + __('Invalid IP for the Source Address!
(Must be in the form of \'192.168.0.1\')', 'flowview'), + __('Invalid subnet for the Source Address!
(Must be in the form of \'192.168.0.1/255.255.255.0\' or \'192.168.0.1/24\')', 'flowview')) + ?? flowview_check_address_field(get_request_var('destip'), + __('Invalid IP for the Destination Address!
(Must be in the form of \'192.168.0.1\')', 'flowview'), + __('Invalid subnet for the Destination Address!
(Must be in the form of \'192.168.0.1/255.255.255.0\' or \'192.168.0.1/24\')', 'flowview')) + ?? flowview_check_number_fields() + ?? flowview_check_tcp_flags_field(get_request_var('tcpflags')) + ?? flowview_check_cutoff_fields(); +} + +/** + * The report choice and the date range. + * + * @return string|null + */ +function flowview_check_report_fields(): ?string { if (get_request_var('statistics') == 0 && get_request_var('printed') == 0) { return __('You must select a Statistics Report or Printed Report!', 'flowview'); } @@ -7630,199 +7223,150 @@ function flowview_check_fields() { return __('Invalid dates, End Date/Time is earlier than Start Date/Time!', 'flowview'); } - if (get_request_var('sourceip') != '') { - $a = explode(',', get_request_var('sourceip')); - - foreach ($a as $source_a) { - $s = explode('/', $source_a); - $source_ip = $s[0]; - - if (!preg_match('/^[-]{0,1}[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$/', $source_ip)) { - return __('Invalid IP for the Source Address!
(Must be in the form of \'192.168.0.1\')', 'flowview'); - } - - $subs = explode('.', $source_ip); - if (($subs[0] > 255) || (!isset($subs[1]) || $subs[1] > 255) || (!isset($subs[2]) || $subs[2] > 255) || (!isset($subs[3]) || $subs[3] > 255)) { - return __('Invalid IP for the Source Address!
(Must be in the form of \'192.168.0.1\')', 'flowview'); - } - - if (isset($s[1])) { - $subnet = $s[1]; - if (!preg_match('/^[0-9]{1,3}$/', $subnet)) { - if (!preg_match('/^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$/', $subnet)) { - return __('Invalid subnet for the Source Address!
(Must be in the form of \'192.168.0.1/255.255.255.0\' or \'192.168.0.1/24\')', 'flowview'); - } - - $subs = explode('.', $subnet); + return null; +} - if (($subs[0] > 255) || (!isset($subs[1]) || $subs[1] > 255) || (!isset($subs[2]) || $subs[2] > 255) || (!isset($subs[3]) || $subs[3] > 255)) { - return __('Invalid subnet for the Source Address!
(Must be in the form of \'192.168.0.1/255.255.255.0\' or \'192.168.0.1/24\')', 'flowview'); - } - } else { - if ($subnet < 0 || $subnet > 32) { - return __('Invalid subnet for the Source Address!
(Must be in the form of \'192.168.0.1/255.255.255.0\' or \'192.168.0.1/24\')', 'flowview'); - } - } - } - } +/** + * A comma separated list of IPv4 addresses, each optionally negated with a + * leading '-' and optionally followed by a subnet as a bit count or a mask. + * + * @param mixed $value The request variable. + * @param string $ip_error Returned for an address that is not valid. + * @param string $subnet_error Returned for a subnet that is not valid. + * + * @return string|null + */ +function flowview_check_address_field(mixed $value, string $ip_error, string $subnet_error): ?string { + if ($value == '') { + return null; } - if (get_request_var('destip') != '') { - $a = explode(',', get_request_var('destip')); + foreach (explode(',', $value) as $entry) { + $parts = explode('/', $entry); - foreach ($a as $dest_a) { - $s = explode('/',$dest_a); - $dest_ip = $s[0]; - if (!preg_match('/^[-]{0,1}[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$/', $dest_ip)) { - return __('Invalid IP for the Destination Address!
(Must be in the form of \'192.168.0.1\')', 'flowview'); - } - $subs = explode('.', $dest_ip); - if (($subs[0] > 255) || (!isset($subs[1]) || $subs[1] > 255) || (!isset($subs[2]) || $subs[2] > 255) || (!isset($subs[3]) || $subs[3] > 255)) { - return __('Invalid IP for the Destination Address!
(Must be in the form of \'192.168.0.1\')', 'flowview'); - } - if (isset($s[1])) { - $subnet = $s[1]; - if (!preg_match('/^[0-9]{1,3}$/', $subnet)) { - if (!preg_match('/^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$/', $subnet)) { - return __('Invalid subnet for the Destination Address!
(Must be in the form of \'192.168.0.1/255.255.255.0\' or \'192.168.0.1/24\')', 'flowview'); - } - $subs = explode('.', $subnet); - if (($subs[0] > 255) || (!isset($subs[1]) || $subs[1] > 255) || (!isset($subs[2]) || $subs[2] > 255) || (!isset($subs[3]) || $subs[3] > 255)) { - return __('Invalid subnet for the Destination Address!
(Must be in the form of \'192.168.0.1/255.255.255.0\' or \'192.168.0.1/24\')', 'flowview'); - } - } else { - if ($subnet < 0 || $subnet > 32) { - return __('Invalid subnet for the Destination Address!
(Must be in the form of \'192.168.0.1/255.255.255.0\' or \'192.168.0.1/24\')', 'flowview'); - } - } - } + if (!preg_match('/^[-]{0,1}[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$/', $parts[0]) || flowview_octet_out_of_range($parts[0])) { + return $ip_error; } - } - - if (get_request_var('sourceinterface') != '') { - $sourceinterface = str_replace(' ', '', get_request_var('sourceinterface')); - $s_if = explode(',',$sourceinterface); - - foreach ($s_if as $s) { - if (substr($s, 0,1) == '-') { - $s = substr($s, 1); - } - - if ($s > 999 || !is_numeric($s)) { - return __('Invalid value for Source Interface!', 'flowview'); - } + if (isset($parts[1]) && !flowview_subnet_is_valid($parts[1])) { + return $subnet_error; } } - if (get_request_var('sourceport') != '') { - $sourceport = str_replace(' ', '', get_request_var('sourceport')); - - $s_port = explode(',',$sourceport); - - foreach ($s_port as $s) { - if (substr($s, 0,1) == '-') { - $s = substr($s, 1); - } + return null; +} - if ($s > 65535 || $s < 0 || !is_numeric($s)) { - return __('Invalid value for Source Port! (0 - 65535)', 'flowview'); - } - } +/** + * A subnet given as a bit count from 0 to 32, or as a dotted mask. + * + * @param string $subnet + * + * @return bool + */ +function flowview_subnet_is_valid(string $subnet): bool { + if (preg_match('/^[0-9]{1,3}$/', $subnet)) { + return !($subnet < 0 || $subnet > 32); } - if (get_request_var('sourceas') != '') { - $sourceas = str_replace(' ', '', get_request_var('sourceas')); - - $s_as = explode(',',$sourceas); - - foreach ($s_as as $s) { - if (substr($s, 0,1) == '-') { - $s = substr($s, 1); - } + return preg_match('/^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$/', $subnet) && !flowview_octet_out_of_range($subnet); +} - if ($s > 65535 || $s < 0 || !is_numeric($s)) { - return __('Invalid value for Source AS! (0 - 65535)', 'flowview'); - } - } - } +/** + * Whether a dotted address has an octet above 255 or fewer than four. + * + * @param string $address + * + * @return bool + */ +function flowview_octet_out_of_range(string $address): bool { + $subs = explode('.', $address); - if (get_request_var('destinterface') != '') { - $destinterface = str_replace(' ', '', get_request_var('destinterface')); + return ($subs[0] > 255) || (!isset($subs[1]) || $subs[1] > 255) || (!isset($subs[2]) || $subs[2] > 255) || (!isset($subs[3]) || $subs[3] > 255); +} - $s_if = explode(',', $destinterface); +/** + * The interface, port, AS and protocol lists. + * + * Interfaces have no lower bound: only one leading '-', the negation, is + * removed before the bounds are checked, so the others reject '--1' and the + * interfaces accept it. + * + * @return string|null + */ +function flowview_check_number_fields(): ?string { + $fields = [ + ['sourceinterface', 999, false, __('Invalid value for Source Interface!', 'flowview')], + ['sourceport', 65535, true, __('Invalid value for Source Port! (0 - 65535)', 'flowview')], + ['sourceas', 65535, true, __('Invalid value for Source AS! (0 - 65535)', 'flowview')], + ['destinterface', 999, false, __('Invalid value for Destination Interface!', 'flowview')], + ['destport', 65535, true, __('Invalid value for Destination Port! (0 - 65535)', 'flowview')], + ['destas', 65535, true, __('Invalid value for Destination AS! (0 - 65535)', 'flowview')], + ['protocols', 255, true, __('Invalid value for Protocol! (1 - 255)', 'flowview')], + ]; - foreach ($s_if as $s) { - if (substr($s, 0,1) == '-') { - $s = substr($s, 1); - } + foreach ($fields as [$name, $max, $bounded_below, $error]) { + $value = get_request_var($name); - if ($s > 999 || !is_numeric($s)) { - return __('Invalid value for Destination Interface!', 'flowview'); - } + if ($value != '' && !flowview_number_list_is_valid($value, $max, $bounded_below)) { + return $error; } } - if (get_request_var('destport') != '') { - $destport = str_replace(' ', '', get_request_var('destport')); - - $s_port = explode(',', $destport); - - foreach ($s_port as $s) { - if (substr($s, 0,1) == '-') { - $s = substr($s, 1); - } + return null; +} - if ($s > 65535 || $s < 0 || !is_numeric($s)) { - return __('Invalid value for Destination Port! (0 - 65535)', 'flowview'); - } +/** + * Whether every entry of a comma separated list, spaces ignored and one + * leading '-' removed, is a number no larger than $max. + * + * @param mixed $value + * @param int $max + * @param bool $bounded_below Whether a number below zero is rejected too. + * + * @return bool + */ +function flowview_number_list_is_valid(mixed $value, int $max, bool $bounded_below): bool { + foreach (explode(',', str_replace(' ', '', $value)) as $entry) { + if (substr($entry, 0, 1) == '-') { + $entry = substr($entry, 1); } - } - - if (get_request_var('destas') != '') { - $destas = str_replace(' ', '', get_request_var('destas')); - - $s_as = explode(',', $destas); - - foreach ($s_as as $s) { - if (substr($s, 0,1) == '-') { - $s = substr($s, 1); - } - if ($s > 65535 || $s < 0 || !is_numeric($s)) { - return __('Invalid value for Destination AS! (0 - 65535)', 'flowview'); - } + if ($entry > $max || ($bounded_below && $entry < 0) || !is_numeric($entry)) { + return false; } } - if (get_request_var('protocols') != '') { - $protocols = str_replace(' ', '', get_request_var('protocols')); - - $s_port = explode(',', $protocols); - - foreach ($s_port as $s) { - if (substr($s, 0,1) == '-') { - $s = substr($s, 1); - } + return true; +} - if ($s > 255 || $s < 0 || !is_numeric($s)) { - return __('Invalid value for Protocol! (1 - 255)', 'flowview'); - } - } +/** + * A comma separated list of TCP flags, as hex or as letters, each with an + * optional mask. + * + * @param mixed $value + * + * @return string|null + */ +function flowview_check_tcp_flags_field(mixed $value): ?string { + if ($value == '') { + return null; } - if (get_request_var('tcpflags') != '') { - $tcpflags = str_replace(' ', '', get_request_var('tcpflags')); - - $tcp_flag = explode(',', $tcpflags); - - foreach ($tcp_flag as $t) { - if (!preg_match("/^[-]{0,1}((0x[0-9a-zA-Z]{1,3})|([0-9a-zA-Z]{1,3}))(\/[0-9a-zA-Z]{1,3}){0,1} {0,1}$/", $t)) { - return __('Invalid value for TCP Flag! (ex: 0x1b or 0x1b/SA or SA/SA)', 'flowview'); - } + foreach (explode(',', str_replace(' ', '', $value)) as $flag) { + if (!preg_match("/^[-]{0,1}((0x[0-9a-zA-Z]{1,3})|([0-9a-zA-Z]{1,3}))(\/[0-9a-zA-Z]{1,3}){0,1} {0,1}$/", $flag)) { + return __('Invalid value for TCP Flag! (ex: 0x1b or 0x1b/SA or SA/SA)', 'flowview'); } } + return null; +} + +/** + * The octet and line cut-offs. + * + * @return string|null + */ +function flowview_check_cutoff_fields(): ?string { if (get_request_var('cutoffoctets') != '' && (get_request_var('cutoffoctets') < 0 || get_request_var('cutoffoctets') > 99999999999999999 || @@ -7836,6 +7380,8 @@ function flowview_check_fields() { !is_numeric(get_request_var('cutofflines')))) { return __('Invalid value for Cutoff Lines!', 'flowview'); } + + return null; } /** diff --git a/lib/PacketSizeTable.php b/lib/PacketSizeTable.php new file mode 100644 index 00000000..9f19fbbf --- /dev/null +++ b/lib/PacketSizeTable.php @@ -0,0 +1,114 @@ + $buckets + */ + public function __construct( + private readonly array $buckets, + ) { + } + + /** + * @param array|null $row The bytes seen in each range, by its name. + * + * @return string + */ + public function render(?array $row): string { + $total = 0; + + foreach ($this->buckets as $c) { + $total += $row[$c['name']]; + } + + $table = ''; + $table .= ''; + $table .= $this->titles(0, 14); + $table .= ''; + $table .= ''; + $table .= $this->shares($row, $total, 0, 14); + $table .= '
'; + + $table .= ''; + $table .= '
'; + $table .= ''; + $table .= $this->titles(14, 27); + $table .= ''; + $table .= ''; + + $table .= ''; + $table .= $this->shares($row, $total, 14, 27); + $table .= ''; + $table .= '
'; + + return $table; + } + + /** + * @param int $from + * @param int $to + * + * @return string + */ + private function titles(int $from, int $to): string { + $html = ''; + + for ($i = $from; $i < $to; $i++) { + $html .= '' . $this->buckets[$i]['title'] . ''; + } + + return $html; + } + + /** + * @param array|null $row + * @param int|float $total + * @param int $from + * @param int $to + * + * @return string + */ + private function shares(?array $row, int|float $total, int $from, int $to): string { + $html = ''; + + for ($i = $from; $i < $to; $i++) { + $name = $this->buckets[$i]['name']; + + if ($total > 0) { + $html .= '' . number_format_i18n(($row[$name] / $total) * 100, 2) . ' %'; + } else { + $html .= '' . __('N/A', 'flowview') . ''; + } + } + + return $html; + } +} diff --git a/lib/ReportCatalog.php b/lib/ReportCatalog.php new file mode 100644 index 00000000..53d876c6 --- /dev/null +++ b/lib/ReportCatalog.php @@ -0,0 +1,235 @@ + + */ + public static function packetSizeBuckets(): array { + return [ + ['name' => 'p0To32', 'min' => 0, 'max' => 32, 'title' => __('%d - %d Bytes', 0, 32, 'flowview')], + ['name' => 'p32To64', 'min' => 32, 'max' => 64, 'title' => __('%d - %d Bytes', 32, 64, 'flowview')], + ['name' => 'p64To96', 'min' => 64, 'max' => 96, 'title' => __('%d - %d Bytes', 64, 96, 'flowview')], + ['name' => 'p96To128', 'min' => 96, 'max' => 128, 'title' => __('%d - %d Bytes', 96, 128, 'flowview')], + ['name' => 'p128To160', 'min' => 128, 'max' => 160, 'title' => __('%d - %d Bytes', 128, 160, 'flowview')], + ['name' => 'p160To192', 'min' => 160, 'max' => 192, 'title' => __('%d - %d Bytes', 160, 192, 'flowview')], + ['name' => 'p192To224', 'min' => 192, 'max' => 224, 'title' => __('%d - %d Bytes', 192, 224, 'flowview')], + ['name' => 'p224To256', 'min' => 224, 'max' => 256, 'title' => __('%d - %d Bytes', 224, 256, 'flowview')], + ['name' => 'p256To288', 'min' => 256, 'max' => 288, 'title' => __('%d - %d Bytes', 256, 288, 'flowview')], + ['name' => 'p288To320', 'min' => 288, 'max' => 320, 'title' => __('%d - %d Bytes', 288, 320, 'flowview')], + ['name' => 'p320To352', 'min' => 320, 'max' => 352, 'title' => __('%d - %d Bytes', 320, 352, 'flowview')], + ['name' => 'p352To384', 'min' => 352, 'max' => 384, 'title' => __('%d - %d Bytes', 352, 384, 'flowview')], + ['name' => 'p384To416', 'min' => 384, 'max' => 416, 'title' => __('%d - %d Bytes', 384, 416, 'flowview')], + ['name' => 'p416To448', 'min' => 416, 'max' => 448, 'title' => __('%d - %d Bytes', 416, 448, 'flowview')], + ['name' => 'p448To480', 'min' => 448, 'max' => 480, 'title' => __('%d - %d Bytes', 448, 480, 'flowview')], + ['name' => 'p480To512', 'min' => 480, 'max' => 512, 'title' => __('%d - %d Bytes', 480, 512, 'flowview')], + ['name' => 'p512To544', 'min' => 512, 'max' => 544, 'title' => __('%d - %d Bytes', 512, 544, 'flowview')], + ['name' => 'p544To576', 'min' => 544, 'max' => 576, 'title' => __('%d - %d Bytes', 544, 576, 'flowview')], + ['name' => 'p576To1024', 'min' => 576, 'max' => 1024, 'title' => __('%d - %d Bytes', 576, 1024, 'flowview')], + ['name' => 'p1024To1536', 'min' => 1024, 'max' => 1536, 'title' => __('%d - %d Bytes', 1024, 1536, 'flowview')], + ['name' => 'p1536To2048', 'min' => 1536, 'max' => 2048, 'title' => __('%d - %d Bytes', 1536, 2048, 'flowview')], + ['name' => 'p2048To2560', 'min' => 2048, 'max' => 2560, 'title' => __('%d - %d Bytes', 2048, 2560, 'flowview')], + ['name' => 'p2560To3072', 'min' => 2560, 'max' => 3072, 'title' => __('%d - %d Bytes', 2560, 3072, 'flowview')], + ['name' => 'p3072To3568', 'min' => 3072, 'max' => 3568, 'title' => __('%d - %d Bytes', 3072, 3568, 'flowview')], + ['name' => 'p3568To4096', 'min' => 3568, 'max' => 4096, 'title' => __('%d - %d Bytes', 3568, 4096, 'flowview')], + ['name' => 'p4096To4608', 'min' => 4096, 'max' => 4608, 'title' => __('%d - %d Bytes', 4096, 4680, 'flowview')], + ['name' => 'p4608ToInfin', 'min' => 4680, 'max' => -1, 'title' => __esc('> %d Bytes', 4680, 'flowview')], + ]; + } + + /** + * The summary report sums the bytes of each packet size range, and has + * no GROUP BY. + * + * @return ReportSql + */ + private static function packetSizes(): ReportSql { + $outer = ''; + $inner = ''; + + foreach (self::packetSizeBuckets() as $el) { + $outer .= ($outer != '' ? ', ' : 'SELECT ') . 'SUM(' . $el['name'] . ') AS ' . $el['name']; + $inner .= ($inner != '' ? ', ' : 'SELECT ') . + 'SUM(CASE WHEN bytes_ppacket BETWEEN ' . + $el['min'] . ' AND ' . $el['max'] . ' THEN bytes_ppacket ELSE 0 END) AS ' . $el['name']; + } + + return new ReportSql(outer: $outer, inner: $inner); + } + + /** + * @param array $reports + * @param mixed $number + * + * @return ReportSql|null + */ + private static function find(array $reports, mixed $number): ?ReportSql { + foreach ($reports as [$key, $report]) { + if ($number == $key) { + return $report; + } + } + + return null; + } + + private static function totalsBy(string $columns): ReportSql { + $select = "SELECT $columns, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets"; + $group = "GROUP BY $columns"; + + return new ReportSql(outer: $select, inner: $select, groupby: $group, innerGroupby: $group); + } + + /** + * Each statistical report other than the summary, by number, in the + * order the switch this replaced tested them. + * + * @return array + */ + private static function statisticalReports(): array { + return [ + [2, self::totalsBy('src_rdomain')], + [3, self::totalsBy('dst_rdomain')], + [4, self::totalsBy('src_rdomain, dst_rdomain')], + [5, self::totalsBy('dst_port, protocol')], + [6, self::totalsBy('src_port, protocol')], + [7, self::totalsBy('src_port, dst_port, protocol')], + [8, new ReportSql( + outer: 'SELECT INET6_NTOA(dst_addr) AS dst_addr, dst_domain, dst_rdomain, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets', + inner: 'SELECT dst_addr, dst_domain, dst_rdomain, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets', + groupby: 'GROUP BY INET6_NTOA(dst_addr)', + innerGroupby: 'GROUP BY dst_addr', + )], + [9, new ReportSql( + outer: 'SELECT INET6_NTOA(src_addr) AS src_addr, src_domain, src_rdomain, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets', + inner: 'SELECT src_addr, src_domain, src_rdomain, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets', + groupby: 'GROUP BY INET6_NTOA(src_addr)', + innerGroupby: 'GROUP BY src_addr', + )], + [10, new ReportSql( + outer: 'SELECT INET6_NTOA(src_addr) AS src_addr, INET6_NTOA(dst_addr) AS dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain', + inner: 'SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain', + groupby: 'GROUP BY INET6_NTOA(src_addr), INET6_NTOA(dst_addr)', + innerGroupby: 'GROUP BY src_addr, dst_addr', + )], + [11, new ReportSql( + outer: 'SELECT INET6_NTOA(src_addr) AS src_addr, src_domain, src_rdomain, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets', + groupby: 'GROUP BY INET6_NTOA(src_addr)', + inner1: 'SELECT src_addr, src_domain AS src_domain, src_rdomain AS src_rdomain, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets', + inner2: 'SELECT dst_addr AS src_addr, dst_domain AS src_domain, dst_rdomain AS src_rdomain, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets', + innerGroupby1: 'GROUP BY src_addr', + innerGroupby2: 'GROUP BY dst_addr', + )], + [12, self::totalsBy('protocol')], + [17, self::totalsBy('src_if')], + [18, self::totalsBy('dst_if')], + [23, self::totalsBy('src_if, dst_if')], + [19, self::totalsBy('src_as')], + [20, self::totalsBy('dst_as')], + [21, self::totalsBy('src_as, dst_as')], + [22, self::totalsBy('tos')], + [24, self::totalsBy('src_prefix')], + [25, self::totalsBy('dst_prefix')], + [26, self::totalsBy('src_prefix, dst_prefix')], + ]; + } + + /** + * Each printed report, by number. The numbers are strings, as they were + * in the switch this replaced. + * + * @return array + */ + private static function printedReports(): array { + return [ + ['1', new ReportSql( + outer: 'SELECT src_if, INET6_NTOA(src_addr) AS src_addr, dst_if, INET6_NTOA(dst_addr) AS dst_addr, protocol, src_port, dst_port, tos, flags, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain', + inner: 'SELECT src_if, src_addr, dst_if, dst_addr, protocol, src_port, dst_port, tos, flags, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain', + groupby: 'GROUP BY src_if, INET6_NTOA(src_addr), dst_if, INET6_NTOA(dst_addr), protocol, src_port, dst_port, tos, flags', + innerGroupby: 'GROUP BY src_if, src_addr, dst_if, dst_addr, protocol, src_port, dst_port, tos, flags', + )], + ['4', new ReportSql( + outer: 'SELECT INET6_NTOA(src_addr) AS src_addr, INET6_NTOA(dst_addr) AS dst_addr, protocol, src_as, dst_as, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain', + inner: 'SELECT src_addr, dst_addr, protocol, src_as, dst_as, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain', + groupby: 'GROUP BY INET6_NTOA(src_addr), INET6_NTOA(dst_addr), protocol, src_as, dst_as', + innerGroupby: 'GROUP BY src_addr, dst_addr, protocol, src_as, dst_as', + )], + ['5', new ReportSql( + outer: 'SELECT start_time, end_time, src_if, INET6_NTOA(src_addr) AS src_addr, src_port, dst_if, INET6_NTOA(dst_addr) AS dst_addr, dst_port, protocol, flags, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain', + inner: 'SELECT start_time, end_time, src_if, src_addr, src_port, dst_if, dst_addr, dst_port, protocol, flags, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain', + groupby: 'GROUP BY start_time, end_time, src_if, INET6_NTOA(src_addr), src_port, dst_if, INET6_NTOA(dst_addr), dst_port, protocol, flags', + innerGroupby: 'GROUP BY start_time, end_time, src_if, src_addr, src_port, dst_if, dst_addr, dst_port, protocol, flags', + )], + ['6', new ReportSql( + outer: 'SELECT INET6_NTOA(src_addr) AS src_addr, INET6_NTOA(dst_addr) AS dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain', + inner: 'SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain', + groupby: 'GROUP BY INET6_NTOA(src_addr), INET6_NTOA(dst_addr)', + innerGroupby: 'GROUP BY src_addr, dst_addr', + )], + ['7', new ReportSql( + outer: 'SELECT INET6_NTOA(src_addr) AS src_addr, src_port, protocol, INET6_NTOA(dst_addr) AS dst_addr, dst_port, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain', + inner: 'SELECT src_addr, src_port, protocol, dst_addr, dst_port, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain', + groupby: 'GROUP BY INET6_NTOA(src_addr), src_port, protocol, INET6_NTOA(dst_addr), dst_port', + innerGroupby: 'GROUP BY src_addr, src_port, protocol, dst_addr, dst_port', + )], + ]; + } +} diff --git a/lib/ReportSql.php b/lib/ReportSql.php new file mode 100644 index 00000000..57820193 --- /dev/null +++ b/lib/ReportSql.php @@ -0,0 +1,101 @@ +inner1 != ''; + } + + /** + * This report as it is run: printed or not, sorted, and reading the + * post-NAT columns when $use_nat is set (issue#110). + * + * Only the map queries change for NAT. Each swapped column is aliased + * back to its own name, so the reduce query, its GROUP BY and ORDER BY, + * and the report table keep working on the usual names. + * + * @param string $order + * @param bool $printed + * @param bool $use_nat + * + * @return self + */ + public function forQuery(string $order, bool $printed, bool $use_nat): self { + return new self( + outer: $this->outer, + inner: flowview_apply_nat_toggle($this->inner, $use_nat, true), + groupby: $this->groupby, + innerGroupby: flowview_apply_nat_toggle($this->innerGroupby, $use_nat, false), + inner1: flowview_apply_nat_toggle($this->inner1, $use_nat, true), + inner2: flowview_apply_nat_toggle($this->inner2, $use_nat, true), + innerGroupby1: flowview_apply_nat_toggle($this->innerGroupby1, $use_nat, false), + innerGroupby2: flowview_apply_nat_toggle($this->innerGroupby2, $use_nat, false), + order: $order, + printed: $printed, + ); + } +} diff --git a/lib/ReportTable.php b/lib/ReportTable.php new file mode 100644 index 00000000..bcb78df8 --- /dev/null +++ b/lib/ReportTable.php @@ -0,0 +1,173 @@ +> $results + * + * @return string + */ + public function render(array $results): string { + $table = ''; + $first = true; + + foreach ($results as $row) { + if ($first) { + $table .= $this->header($row); + $first = false; + } + + $table .= $this->row($row); + } + + return $table . '
'; + } + + /** + * Each column: its CSS class and its heading. + * + * @return array + */ + private function columns(): array { + $aligned = $this->statistical ? 'left' : 'right'; + + return [ + 'start_time' => ['left', __('Start Time', 'flowview')], + 'end_time' => ['left', __('End Time', 'flowview')], + 'src_domain' => ['left', __('Source DNS', 'flowview')], + 'src_rdomain' => ['left', __('Source Root DNS', 'flowview')], + 'dst_domain' => ['left', __('Dest DNS', 'flowview')], + 'dst_rdomain' => ['left', __('Dest Root DNS', 'flowview')], + 'domain' => ['left', __('DNS', 'flowview')], + 'rdomain' => ['left', __('Root DNS', 'flowview')], + 'src_addr' => ['left', $this->mergedAddresses ? __('Source/Destination IP', 'flowview') : __('Source IP', 'flowview')], + 'dst_addr' => ['left', __('Dest IP', 'flowview')], + 'src_port' => ['left nowrap', __('Source Port', 'flowview')], + 'dst_port' => ['left nowrap', __('Dest Port', 'flowview')], + 'src_if' => [$aligned, __('Source IF', 'flowview')], + 'dst_if' => [$aligned, __('Dest IF', 'flowview')], + 'src_as' => [$aligned, __('Source AS', 'flowview')], + 'dst_as' => [$aligned, __('Dest AS', 'flowview')], + 'src_prefix' => [$aligned, __('Source Prefix', 'flowview')], + 'dst_prefix' => [$aligned, __('Dest Prefix', 'flowview')], + 'protocol' => [$aligned, __('Protocol', 'flowview')], + 'tos' => [$aligned, __('Type of Service', 'flowview')], + 'flags' => [$aligned, __('Flags', 'flowview')], + 'flows' => ['right', __('Flows', 'flowview')], + 'bytes' => ['right', __('Bytes', 'flowview')], + 'packets' => ['right', __('Packets', 'flowview')], + ]; + } + + /** + * @param array $row + * + * @return string + */ + private function header(array $row): string { + $html = ''; + + foreach ($this->columns() as $column => [$class, $title]) { + if (isset($row[$column])) { + $html .= '' . $title . ''; + } + } + + $html .= '' . __('Bytes/Packet', 'flowview') . ''; + + return $html . ''; + } + + /** + * @param array $row + * + * @return string + */ + private function row(array $row): string { + $html = ''; + + foreach ($this->columns() as $column => [$class]) { + if (isset($row[$column])) { + $html .= $this->cell($column, $class, $row); + } + } + + if ($row['packets'] > 0) { + $html .= '' . number_format_i18n($row['bytes'] / $row['packets'], 0) . ''; + } else { + $html .= '0'; + } + + return $html . ''; + } + + /** + * One column of a row. Times are cut to the second, names that are not + * resolved say so, ports are named for their protocol, or TCP when the + * report has none, and counts are formatted. + * + * @param string $column + * @param string $class + * @param array $row + * + * @return string + */ + private function cell(string $column, string $class, array $row): string { + $value = $row[$column]; + + // the source and destination names and root domains, and the name and root domain + if (str_contains($column, 'domain')) { + return '' . display_domain($value) . ''; + } + + return match ($column) { + 'start_time', 'end_time' => '' . substr($value, 0, 19) . '', + 'src_port', 'dst_port' => '' . get_port_name($value, $row['protocol'] ?? 6) . '', + 'protocol' => '' . plugin_flowview_get_protocol($value, false) . '', + 'tos' => parse_type_of_service($value), + 'flows', 'bytes', 'packets' => '' . number_format_i18n($value, 0) . '', + default => '' . html_escape($value) . '', + }; + } +} diff --git a/locales/po/cacti.pot b/locales/po/cacti.pot index 6ffcacde..2b0e4573 100644 --- a/locales/po/cacti.pot +++ b/locales/po/cacti.pot @@ -713,7 +713,7 @@ msgstr "" msgid "Port this collector will listen on." msgstr "" -#: flowview_devices.php includes/arrays.php includes/functions.php +#: flowview_devices.php includes/arrays.php lib/ReportTable.php msgid "Protocol" msgstr "" @@ -908,6 +908,7 @@ msgid "No Connections" msgstr "" #: flowview_devices.php includes/arrays.php includes/functions.php +#: lib/PacketSizeTable.php msgid "N/A" msgstr "" @@ -1372,7 +1373,7 @@ msgstr "" msgid "UDP/TCP Port" msgstr "" -#: includes/arrays.php includes/functions.php +#: includes/arrays.php lib/ReportTable.php msgid "Source IP" msgstr "" @@ -1380,7 +1381,7 @@ msgstr "" msgid "Destination IP" msgstr "" -#: includes/arrays.php includes/functions.php +#: includes/arrays.php lib/ReportTable.php msgid "Source/Destination IP" msgstr "" @@ -1404,7 +1405,7 @@ msgstr "" msgid "Input/Output Interface" msgstr "" -#: includes/arrays.php includes/functions.php +#: includes/arrays.php lib/ReportTable.php msgid "Source AS" msgstr "" @@ -1420,7 +1421,7 @@ msgstr "" msgid "IP ToS" msgstr "" -#: includes/arrays.php includes/functions.php +#: includes/arrays.php lib/ReportTable.php msgid "Source Prefix" msgstr "" @@ -1490,15 +1491,15 @@ msgstr "" msgid "Source Domain" msgstr "" -#: includes/arrays.php includes/functions.php +#: includes/arrays.php includes/functions.php lib/ReportTable.php msgid "Flows" msgstr "" -#: includes/arrays.php includes/functions.php +#: includes/arrays.php includes/functions.php lib/ReportTable.php msgid "Bytes" msgstr "" -#: includes/arrays.php includes/functions.php +#: includes/arrays.php includes/functions.php lib/ReportTable.php msgid "Packets" msgstr "" @@ -1506,7 +1507,7 @@ msgstr "" msgid "Destination Domain" msgstr "" -#: includes/arrays.php includes/functions.php +#: includes/arrays.php lib/ReportTable.php msgid "Source Port" msgstr "" @@ -1514,11 +1515,11 @@ msgstr "" msgid "Destination Port" msgstr "" -#: includes/arrays.php includes/functions.php +#: includes/arrays.php lib/ReportTable.php msgid "Dest IP" msgstr "" -#: includes/arrays.php includes/functions.php +#: includes/arrays.php lib/ReportTable.php msgid "Source IF" msgstr "" @@ -1534,11 +1535,11 @@ msgstr "" msgid "Destingation Prefix" msgstr "" -#: includes/arrays.php includes/functions.php +#: includes/arrays.php lib/ReportTable.php msgid "Start Time" msgstr "" -#: includes/arrays.php includes/functions.php +#: includes/arrays.php lib/ReportTable.php msgid "End Time" msgstr "" @@ -1558,7 +1559,7 @@ msgstr "" msgid "Fl" msgstr "" -#: includes/arrays.php includes/functions.php +#: includes/arrays.php lib/ReportTable.php msgid "Flags" msgstr "" @@ -1827,7 +1828,7 @@ msgstr "" msgid "Filter on the select Destination Interface for in the Filter. This can be a comma delimited list of Destimation Interfaces." msgstr "" -#: includes/arrays.php includes/functions.php +#: includes/arrays.php lib/ReportTable.php msgid "Dest AS" msgstr "" @@ -1993,6 +1994,20 @@ msgstr "" msgid "Printed Report: %s [ Including overrides as specified below ]" msgstr "" +#: includes/functions.php +#, php-format +msgid "Statistical: %s" +msgstr "" + +#: includes/functions.php +#, php-format +msgid "Printed: %s" +msgstr "" + +#: includes/functions.php +msgid "Select a Filter First" +msgstr "" + #: includes/functions.php msgid "Select a Filter" msgstr "" @@ -2053,20 +2068,6 @@ msgstr "" msgid "Report" msgstr "" -#: includes/functions.php -#, php-format -msgid "Statistical: %s" -msgstr "" - -#: includes/functions.php -#, php-format -msgid "Printed: %s" -msgstr "" - -#: includes/functions.php -msgid "Select a Filter First" -msgstr "" - #: includes/functions.php msgid "Lines" msgstr "" @@ -2278,16 +2279,6 @@ msgstr "" msgid "unresolved" msgstr "" -#: includes/functions.php -#, php-format -msgid "%d - %d Bytes" -msgstr "" - -#: includes/functions.php -#, php-format -msgid "> %d Bytes" -msgstr "" - #: includes/functions.php #, php-format msgid "The Statistical Report %s is not known. Please open a bug on GitHub" @@ -2298,50 +2289,6 @@ msgstr "" msgid "The Printed Report %s is not known. Please open a bug on GitHub" msgstr "" -#: includes/functions.php -msgid "Source DNS" -msgstr "" - -#: includes/functions.php -msgid "Source Root DNS" -msgstr "" - -#: includes/functions.php -msgid "Dest DNS" -msgstr "" - -#: includes/functions.php -msgid "Dest Root DNS" -msgstr "" - -#: includes/functions.php -msgid "DNS" -msgstr "" - -#: includes/functions.php -msgid "Root DNS" -msgstr "" - -#: includes/functions.php -msgid "Dest Port" -msgstr "" - -#: includes/functions.php -msgid "Dest IF" -msgstr "" - -#: includes/functions.php -msgid "Dest Prefix" -msgstr "" - -#: includes/functions.php -msgid "Type of Service" -msgstr "" - -#: includes/functions.php -msgid "Bytes/Packet" -msgstr "" - #: includes/functions.php #, php-format msgid "Not materialized yet, with NAT: %s, without NAT: %s." @@ -2460,31 +2407,31 @@ msgid "Flow Time Distribution (%%)" msgstr "" #: includes/functions.php -msgid "You must select a Statistics Report or Printed Report!" +msgid "Invalid IP for the Source Address!
(Must be in the form of '192.168.0.1')" msgstr "" #: includes/functions.php -msgid "You must select only a Statistics Report or a Printed Report (not both)!" +msgid "Invalid subnet for the Source Address!
(Must be in the form of '192.168.0.1/255.255.255.0' or '192.168.0.1/24')" msgstr "" #: includes/functions.php -msgid "Invalid dates, End Date/Time is earlier than Start Date/Time!" +msgid "Invalid IP for the Destination Address!
(Must be in the form of '192.168.0.1')" msgstr "" #: includes/functions.php -msgid "Invalid IP for the Source Address!
(Must be in the form of '192.168.0.1')" +msgid "Invalid subnet for the Destination Address!
(Must be in the form of '192.168.0.1/255.255.255.0' or '192.168.0.1/24')" msgstr "" #: includes/functions.php -msgid "Invalid subnet for the Source Address!
(Must be in the form of '192.168.0.1/255.255.255.0' or '192.168.0.1/24')" +msgid "You must select a Statistics Report or Printed Report!" msgstr "" #: includes/functions.php -msgid "Invalid IP for the Destination Address!
(Must be in the form of '192.168.0.1')" +msgid "You must select only a Statistics Report or a Printed Report (not both)!" msgstr "" #: includes/functions.php -msgid "Invalid subnet for the Destination Address!
(Must be in the form of '192.168.0.1/255.255.255.0' or '192.168.0.1/24')" +msgid "Invalid dates, End Date/Time is earlier than Start Date/Time!" msgstr "" #: includes/functions.php @@ -2552,6 +2499,60 @@ msgstr "" msgid "InnoDB (Slow, High Concurrency)" msgstr "" +#: lib/ReportCatalog.php +#, php-format +msgid "%d - %d Bytes" +msgstr "" + +#: lib/ReportCatalog.php +#, php-format +msgid "> %d Bytes" +msgstr "" + +#: lib/ReportTable.php +msgid "Source DNS" +msgstr "" + +#: lib/ReportTable.php +msgid "Source Root DNS" +msgstr "" + +#: lib/ReportTable.php +msgid "Dest DNS" +msgstr "" + +#: lib/ReportTable.php +msgid "Dest Root DNS" +msgstr "" + +#: lib/ReportTable.php +msgid "DNS" +msgstr "" + +#: lib/ReportTable.php +msgid "Root DNS" +msgstr "" + +#: lib/ReportTable.php +msgid "Dest Port" +msgstr "" + +#: lib/ReportTable.php +msgid "Dest IF" +msgstr "" + +#: lib/ReportTable.php +msgid "Dest Prefix" +msgstr "" + +#: lib/ReportTable.php +msgid "Type of Service" +msgstr "" + +#: lib/ReportTable.php +msgid "Bytes/Packet" +msgstr "" + #: setup.php msgid "NetFlow User" msgstr "" diff --git a/manifest.json b/manifest.json index ad98f926..afcc153e 100644 --- a/manifest.json +++ b/manifest.json @@ -36,6 +36,7 @@ "includes/", "index.php", "irr_tables.php", + "lib/", "locales/", "manifest.json", "maxscale/", diff --git a/phpunit.xml b/phpunit.xml index ca15b0c5..d1567d15 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -40,6 +40,10 @@ includes/functions.php includes/database.php includes/arrays.php + lib/PacketSizeTable.php + lib/ReportCatalog.php + lib/ReportSql.php + lib/ReportTable.php diff --git a/tests/Unit/GoldenCheckFieldsTest.php b/tests/Unit/GoldenCheckFieldsTest.php new file mode 100644 index 00000000..2afd2eb3 --- /dev/null +++ b/tests/Unit/GoldenCheckFieldsTest.php @@ -0,0 +1,113 @@ +> + */ +function fv_golden_check_fields_cases(): array { + $ok = array('statistics' => '10', 'printed' => '0', 'date1' => '2024-01-01 00:00', 'date2' => '2024-01-02 00:00'); + + $cases = array( + 'no report' => array('statistics' => '0', 'printed' => '0'), + 'both reports' => array('statistics' => '10', 'printed' => '1'), + 'dates the wrong way round' => array('statistics' => '10', 'printed' => '0', 'date1' => '2024-01-02 00:00', 'date2' => '2024-01-01 00:00'), + 'a valid request' => $ok, + 'a printed report' => array('statistics' => '0', 'printed' => '1') + $ok, + 'an unparseable date' => array('date1' => 'never') + $ok, + 'cut-offs at their limits' => array('cutoffoctets' => '99999999999999999', 'cutofflines' => '999999') + $ok, + 'every list valid' => array( + 'sourceip' => '10.0.0.1,-10.0.0.0/8,192.168.1.0/255.255.255.0', + 'destip' => '10.0.0.2/32,-172.16.0.0/12', + 'sourceinterface' => '1, -2,999', + 'sourceport' => '0,-80,65535', + 'sourceas' => '64512, -1', + 'destinterface' => '3', + 'destport' => '443', + 'destas' => '0', + 'protocols' => '6, 17,-1', + 'tcpflags' => '0x1b,0x1b/SA,SA/SA,-SA ', + 'cutoffoctets' => '1024', + 'cutofflines' => '20', + ) + $ok, + ); + + foreach (array('sourceip' => 'source', 'destip' => 'destination') as $field => $name) { + $cases["a $name address that is not one"] = array($field => '10.0.0') + $ok; + $cases["a $name address with a word"] = array($field => 'host.example') + $ok; + $cases["a $name address out of range"] = array($field => '10.0.0.256') + $ok; + $cases["a $name address first octet out of range"] = array($field => '300.0.0.1') + $ok; + $cases["a $name address, the second one bad"] = array($field => '10.0.0.1,10.0.0') + $ok; + $cases["a $name subnet bit count too large"] = array($field => '10.0.0.0/33') + $ok; + $cases["a $name subnet of zero bits"] = array($field => '10.0.0.0/0') + $ok; + $cases["a $name subnet mask that is not one"] = array($field => '10.0.0.0/255.255.0') + $ok; + $cases["a $name subnet mask out of range"] = array($field => '10.0.0.0/255.255.256.0') + $ok; + $cases["a $name subnet mask first octet too large"] = array($field => '10.0.0.0/256.0.0.0') + $ok; + $cases["a $name subnet that is a word"] = array($field => '10.0.0.0/abc') + $ok; + $cases["a $name address with a second slash"] = array($field => '10.0.0.0/8/9') + $ok; + } + + $lists = array( + 'sourceinterface' => array('1000', '-1000', 'a', '1.5', ''), + 'destinterface' => array('1000', 'x'), + 'sourceport' => array('65536', '--1', '1e3', 'abc'), + 'destport' => array('65536', ' 5 , y'), + 'sourceas' => array('65536', 'z'), + 'destas' => array('70000', 'q'), + 'protocols' => array('256', '-256', 'tcp'), + ); + + foreach ($lists as $field => $values) { + foreach ($values as $value) { + $cases["$field of '$value'"] = array($field => $value) + $ok; + } + } + + foreach (array('0x1bb/SA', 'SAFE', '0x1b/', '-', ',') as $value) { + $cases["tcpflags of '$value'"] = array('tcpflags' => $value) + $ok; + } + + foreach (array('-1', '100000000000000000', 'lots') as $value) { + $cases["cutoffoctets of '$value'"] = array('cutoffoctets' => $value) + $ok; + } + + foreach (array('-1', '1000000', 'lots') as $value) { + $cases["cutofflines of '$value'"] = array('cutofflines' => $value) + $ok; + } + + return $cases; +} + +it('does what it did before the refactor', function (string $case) { + $cases = fv_golden_check_fields_cases(); + + plugin_test_reset(); + + $_REQUEST = $cases[$case]; + + flowview_golden_assert('flowview_check_fields', $case, flowview_golden_capture(function () { + return flowview_check_fields(); + })); +})->with(array_keys(fv_golden_check_fields_cases())); diff --git a/tests/Unit/GoldenDisplayFilterTest.php b/tests/Unit/GoldenDisplayFilterTest.php new file mode 100644 index 00000000..e62da892 --- /dev/null +++ b/tests/Unit/GoldenDisplayFilterTest.php @@ -0,0 +1,144 @@ + $o request, rows (db_fetch_row_prepared results), timespans, timeshifts + * + * @return array + */ +function fv_golden_display(array $o): array { + plugin_test_reset(); + + $_REQUEST = $o['request'] ?? array(); + + $GLOBALS['graph_timespans'] = $o['timespans'] ?? array(1 => 'Last Half Hour', 2 => 'Last Hour', 7 => 'Last Day'); + $GLOBALS['graph_timeshifts'] = $o['timeshifts'] ?? array(1 => '30 Min', 2 => '1 Hour', 3 => '2 Hours'); + + /* includes/arrays.php (devices, templates, streams), then the Filters */ + foreach (range(1, 3) as $unused) { + plugin_test_queue_db_result('db_fetch_assoc', array()); + } + + plugin_test_queue_db_result('db_fetch_assoc', $o['queries'] ?? array( + array('id' => '4', 'name' => 'Top '), + array('id' => '5', 'name' => 'Other'), + )); + + foreach ($o['rows'] ?? array() as $row) { + plugin_test_queue_db_result('db_fetch_row_prepared', $row); + } + + return flowview_golden_capture(function () { + flowview_display_filter(); + + return null; + }); +} + +/** + * @return array> + */ +function fv_golden_display_cases(): array { + $stat = array('name' => 'Top Talkers', 'statistics' => '10', 'printed' => '0'); + $print = array('name' => 'Flow Times', 'statistics' => '0', 'printed' => '1'); + $none = array('name' => 'Empty', 'statistics' => '0', 'printed' => '0'); + + return array( + 'an empty request' => array(), + 'no Filter selected' => array('request' => array('query' => '-1', 'report' => '0')), + 'no Filter selected, a report asked for' => array('request' => array('query' => '-1', 'report' => 's10')), + 'a statistical Filter' => array('request' => array('query' => '4'), 'rows' => array($stat)), + 'a printed Filter' => array('request' => array('query' => '4', 'report' => 'p1'), 'rows' => array($print)), + 'a Filter with an unknown report' => array('request' => array('query' => '4'), 'rows' => array(array('name' => 'Odd', 'statistics' => '13', 'printed' => '0'))), + 'a Filter that is gone' => array('request' => array('query' => '4', 'report' => '0'), 'rows' => array(array(), array())), + 'a statistical report asked for' => array('request' => array('query' => '4', 'report' => 's10', 'sortfield' => 'src_addr'), 'rows' => array($none)), + 'a printed report asked for' => array('request' => array('query' => '4', 'report' => 'p7', 'sortfield' => 'dst_port'), 'rows' => array($none)), + 'the summary report asked for' => array('request' => array('query' => '4', 'report' => 's99', 'cutofflines' => '50'), 'rows' => array($none)), + 'an unknown report asked for' => array('request' => array('query' => '4', 'report' => 's55'), 'rows' => array($none)), + 'an unknown printed report asked for'=> array('request' => array('query' => '4', 'report' => 'p55'), 'rows' => array($none)), + 'a numeric sort field' => array('request' => array('query' => '4', 'report' => 's10', 'sortfield' => '5'), 'rows' => array($none)), + 'a zero sort field' => array('request' => array('query' => '4', 'report' => 's10', 'sortfield' => '0'), 'rows' => array($none)), + 'no report, a statistical Filter' => array('request' => array('query' => '4', 'report' => '0'), 'rows' => array($none, array('statistics' => '10', 'printed' => '0', 'sortfield' => '3'))), + 'no report, a printed Filter' => array('request' => array('query' => '4', 'report' => 'p0'), 'rows' => array($none, array('statistics' => '0', 'printed' => '1', 'sortfield' => 'start_time'))), + 'no report, a Filter without one' => array('request' => array('query' => '4', 'report' => 's0'), 'rows' => array($none, array('statistics' => '0', 'printed' => '0', 'sortfield' => 'bytes'))), + 'no report, the Filter is gone' => array('request' => array('query' => '4', 'report' => '0'), 'rows' => array($none, array())), + 'every option chosen' => array('request' => array( + 'query' => '5', + 'report' => 's10', + 'sortfield' => 'flows', + 'cutofflines' => '50', + 'cutoffoctets' => '1024', + 'exclude' => '3', + 'domains' => 'true', + 'usenat' => 'true', + 'predefined_timespan' => '0', + 'predefined_timeshift' => '2', + 'graph_type' => 'pie', + 'graph_height' => '500', + 'table' => 'true', + 'bytes' => 'true', + 'packets' => 'true', + 'flows' => 'true', + 'statistics' => '99', + 'date1' => "2024-01-01 00:00'\"", + 'date2' => '2024-01-02 00:00', + ), 'rows' => array($none)), + 'the top sample excluded' => array('request' => array('query' => '-1', 'exclude' => '1', 'statistics' => '10', 'graph_type' => 'treemap', 'predefined_timespan' => '7')), + 'no timespans or time shifts' => array('request' => array('query' => '-1'), 'timespans' => array(), 'timeshifts' => array()), + 'no Filters' => array('request' => array('query' => '-1'), 'queries' => array()), + 'a graph type with a quote' => array('request' => array('query' => '-1', 'graph_type' => "bar';x='")), + ); +} + +it('does what it did before the refactor', function (string $case) { + $cases = fv_golden_display_cases(); + + flowview_golden_assert('flowview_display_filter', $case, fv_golden_display($cases[$case])); +})->with(array_keys(fv_golden_display_cases())); + +it('labels the save and rename dialog buttons with their text only', function () { + $output = fv_golden_display(array('request' => array('query' => '-1')))['output']; + + foreach (array('ssave' => 'Save', 'scancel' => 'Cancel', 'dsave' => 'Continue', 'dcancel' => 'Cancel') as $id => $label) { + expect($output)->toMatch("/\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\n\t\n\t\n\t\n\t", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT name, statistics, printed\n\t\t\tFROM plugin_flowview_queries\n\t\t\tWHERE id = ?", + "params": [ + "4" + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\t\t\t\t\t\t\tFROM plugin_flowview_queries\n\t\t\t\t\t\t\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT printed, statistics, sortfield\n\t\t\t\t\t\t\t\t\tFROM plugin_flowview_queries\n\t\t\t\t\t\t\t\t\tWHERE id = ?", + "params": [ + "4" + ] + } + ], + "log": [], + "messages": [], + "html": [ + [ + "html_start_box", + [ + "Undefined Filter [ Select Filter to get Details ] ", + "100%", + false, + 3, + "center", + "" + ] + ], + [ + "html_end_box", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": { + "query": "4", + "report": "0" + }, + "session": [] + }, + "a Filter with an unknown report": { + "return": null, + "output": "\t\n\t\t\n\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tFilter\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tSort Field\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tLines\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tExclude\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tOctets\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tTimespan\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tFrom\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tTo\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tGraph\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tHeight\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tShow/Hide\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t
\n\t\t\n\t\n \n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\n\t\n\t\n\t\n\t", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT name, statistics, printed\n\t\t\tFROM plugin_flowview_queries\n\t\t\tWHERE id = ?", + "params": [ + "4" + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\t\t\t\t\t\t\tFROM plugin_flowview_queries\n\t\t\t\t\t\t\t\tORDER BY name", + "params": [] + } + ], + "log": [], + "messages": [], + "html": [ + [ + "html_start_box", + [ + "Statistical Report: [ Including overrides as specified below ] ", + "100%", + false, + 3, + "center", + "" + ] + ], + [ + "html_end_box", + [] + ] + ], + "exec": [], + "js": [], + "notices": [ + [ + 2, + "Undefined array key 13" + ] + ], + "request": { + "query": "4", + "sortfield": "bytes" + }, + "session": [] + }, + "a graph type with a quote": { + "return": null, + "output": "\t\n\t\t\n\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tFilter\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tSort Field\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tLines\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tExclude\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tOctets\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tTimespan\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tFrom\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tTo\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tGraph\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tHeight\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tShow/Hide\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t
\n\t\t\n\t\n \n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\n\t\n\t\n\t\n\t", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\t\t\t\t\t\t\tFROM plugin_flowview_queries\n\t\t\t\t\t\t\t\tORDER BY name", + "params": [] + } + ], + "log": [], + "messages": [], + "html": [ + [ + "html_start_box", + [ + "Undefined Filter [ Select Filter to get Details ] ", + "100%", + false, + 3, + "center", + "" + ] + ], + [ + "html_end_box", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": { + "query": "-1", + "graph_type": "bar';x='", + "sortfield": "bytes" + }, + "session": [] + }, + "a numeric sort field": { + "return": null, + "output": "\t\n\t\t\n\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tFilter\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tReport\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tSort Field\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tLines\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tExclude\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tOctets\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tTimespan\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tFrom\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tTo\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tGraph\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tHeight\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tShow/Hide\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t
\n\t\t\n\t\n \n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\n\t\n\t\n\t\n\t", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT name, statistics, printed\n\t\t\tFROM plugin_flowview_queries\n\t\t\tWHERE id = ?", + "params": [ + "4" + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\t\t\t\t\t\t\tFROM plugin_flowview_queries\n\t\t\t\t\t\t\t\tORDER BY name", + "params": [] + } + ], + "log": [], + "messages": [], + "html": [ + [ + "html_start_box", + [ + "Undefined Filter [ Select Filter to get Details ] ", + "100%", + false, + 3, + "center", + "" + ] + ], + [ + "html_end_box", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": { + "query": "4", + "report": "s10", + "sortfield": "bytes" + }, + "session": [] + }, + "a printed Filter": { + "return": null, + "output": "\t\n\t\t\n\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tFilter\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tSort Field\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tLines\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tExclude\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tOctets\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tTimespan\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tFrom\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tTo\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tGraph\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tHeight\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tShow/Hide\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t
\n\t\t\n\t\n \n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\n\t\n\t\n\t\n\t", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT name, statistics, printed\n\t\t\tFROM plugin_flowview_queries\n\t\t\tWHERE id = ?", + "params": [ + "4" + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\t\t\t\t\t\t\tFROM plugin_flowview_queries\n\t\t\t\t\t\t\t\tORDER BY name", + "params": [] + } + ], + "log": [], + "messages": [], + "html": [ + [ + "html_start_box", + [ + "Printed Report: Flow Times [ Including overrides as specified below ] ", + "100%", + false, + 3, + "center", + "" + ] + ], + [ + "html_end_box", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": { + "query": "4", + "report": "p1", + "sortfield": "bytes" + }, + "session": [] + }, + "a printed report asked for": { + "return": null, + "output": "\t\n\t\t\n\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tFilter\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tReport\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tSort Field\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tLines\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tExclude\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tOctets\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tTimespan\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tFrom\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tTo\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tGraph\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tHeight\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tShow/Hide\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t
\n\t\t\n\t\n \n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\n\t\n\t\n\t\n\t", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT name, statistics, printed\n\t\t\tFROM plugin_flowview_queries\n\t\t\tWHERE id = ?", + "params": [ + "4" + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\t\t\t\t\t\t\tFROM plugin_flowview_queries\n\t\t\t\t\t\t\t\tORDER BY name", + "params": [] + } + ], + "log": [], + "messages": [], + "html": [ + [ + "html_start_box", + [ + "Undefined Filter [ Select Filter to get Details ] ", + "100%", + false, + 3, + "center", + "" + ] + ], + [ + "html_end_box", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": { + "query": "4", + "report": "p7", + "sortfield": "dst_port" + }, + "session": [] + }, + "a statistical Filter": { + "return": null, + "output": "\t\n\t\t\n\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tFilter\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tSort Field\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tLines\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tExclude\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tOctets\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tTimespan\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tFrom\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tTo\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tGraph\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tHeight\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tShow/Hide\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t
\n\t\t\n\t\n \n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\n\t\n\t\n\t\n\t", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT name, statistics, printed\n\t\t\tFROM plugin_flowview_queries\n\t\t\tWHERE id = ?", + "params": [ + "4" + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\t\t\t\t\t\t\tFROM plugin_flowview_queries\n\t\t\t\t\t\t\t\tORDER BY name", + "params": [] + } + ], + "log": [], + "messages": [], + "html": [ + [ + "html_start_box", + [ + "Statistical Report: Source/Destination IP [ Including overrides as specified below ] ", + "100%", + false, + 3, + "center", + "" + ] + ], + [ + "html_end_box", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": { + "query": "4", + "sortfield": "bytes" + }, + "session": [] + }, + "a statistical report asked for": { + "return": null, + "output": "\t\n\t\t\n\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tFilter\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tReport\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tSort Field\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tLines\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tExclude\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tOctets\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tTimespan\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tFrom\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tTo\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tGraph\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tHeight\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tShow/Hide\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t
\n\t\t\n\t\n \n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\n\t\n\t\n\t\n\t", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT name, statistics, printed\n\t\t\tFROM plugin_flowview_queries\n\t\t\tWHERE id = ?", + "params": [ + "4" + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\t\t\t\t\t\t\tFROM plugin_flowview_queries\n\t\t\t\t\t\t\t\tORDER BY name", + "params": [] + } + ], + "log": [], + "messages": [], + "html": [ + [ + "html_start_box", + [ + "Undefined Filter [ Select Filter to get Details ] ", + "100%", + false, + 3, + "center", + "" + ] + ], + [ + "html_end_box", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": { + "query": "4", + "report": "s10", + "sortfield": "src_addr" + }, + "session": [] + }, + "a zero sort field": { + "return": null, + "output": "\t\n\t\t\n\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tFilter\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tReport\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tSort Field\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tLines\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tExclude\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tOctets\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tTimespan\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tFrom\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tTo\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tGraph\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tHeight\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tShow/Hide\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t
\n\t\t\n\t\n \n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\n\t\n\t\n\t\n\t", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT name, statistics, printed\n\t\t\tFROM plugin_flowview_queries\n\t\t\tWHERE id = ?", + "params": [ + "4" + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\t\t\t\t\t\t\tFROM plugin_flowview_queries\n\t\t\t\t\t\t\t\tORDER BY name", + "params": [] + } + ], + "log": [], + "messages": [], + "html": [ + [ + "html_start_box", + [ + "Undefined Filter [ Select Filter to get Details ] ", + "100%", + false, + 3, + "center", + "" + ] + ], + [ + "html_end_box", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": { + "query": "4", + "report": "s10", + "sortfield": "bytes" + }, + "session": [] + }, + "an empty request": { + "return": null, + "output": "\t\n\t\t\n\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tFilter\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tSort Field\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tLines\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tExclude\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tOctets\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tTimespan\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tFrom\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tTo\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tGraph\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tHeight\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tShow/Hide\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t
\n\t\t\n\t\n \n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\n\t\n\t\n\t\n\t", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\t\t\t\t\t\t\tFROM plugin_flowview_queries\n\t\t\t\t\t\t\t\tORDER BY name", + "params": [] + } + ], + "log": [], + "messages": [], + "html": [ + [ + "html_start_box", + [ + "Undefined Filter [ Select Filter to get Details ] ", + "100%", + false, + 3, + "center", + "" + ] + ], + [ + "html_end_box", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": { + "sortfield": "bytes" + }, + "session": [] + }, + "an unknown printed report asked for": { + "return": null, + "output": "\t\n\t\t\n\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tFilter\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tReport\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tSort Field\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tLines\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tExclude\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tOctets\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tTimespan\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tFrom\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tTo\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tGraph\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tHeight\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tShow/Hide\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t
\n\t\t\n\t\n \n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\n\t\n\t\n\t\n\t", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT name, statistics, printed\n\t\t\tFROM plugin_flowview_queries\n\t\t\tWHERE id = ?", + "params": [ + "4" + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\t\t\t\t\t\t\tFROM plugin_flowview_queries\n\t\t\t\t\t\t\t\tORDER BY name", + "params": [] + } + ], + "log": [], + "messages": [], + "html": [ + [ + "html_start_box", + [ + "Undefined Filter [ Select Filter to get Details ] ", + "100%", + false, + 3, + "center", + "" + ] + ], + [ + "html_end_box", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": { + "query": "4", + "report": "p55", + "sortfield": "bytes" + }, + "session": [] + }, + "an unknown report asked for": { + "return": null, + "output": "\t\n\t\t\n\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tFilter\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tReport\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tSort Field\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tLines\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tExclude\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tOctets\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tTimespan\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tFrom\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tTo\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tGraph\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tHeight\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tShow/Hide\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t
\n\t\t\n\t\n \n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\n\t\n\t\n\t\n\t", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT name, statistics, printed\n\t\t\tFROM plugin_flowview_queries\n\t\t\tWHERE id = ?", + "params": [ + "4" + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\t\t\t\t\t\t\tFROM plugin_flowview_queries\n\t\t\t\t\t\t\t\tORDER BY name", + "params": [] + } + ], + "log": [], + "messages": [], + "html": [ + [ + "html_start_box", + [ + "Undefined Filter [ Select Filter to get Details ] ", + "100%", + false, + 3, + "center", + "" + ] + ], + [ + "html_end_box", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": { + "query": "4", + "report": "s55", + "sortfield": "bytes" + }, + "session": [] + }, + "every option chosen": { + "return": null, + "output": "\t\n\t\t\n\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tFilter\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tReport\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tSort Field\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tLines\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tExclude\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tOctets\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tTimespan\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tFrom\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tTo\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tGraph\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tHeight\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tShow/Hide\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t
\n\t\t\n\t\n \n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\n\t\n\t\n\t\n\t", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT name, statistics, printed\n\t\t\tFROM plugin_flowview_queries\n\t\t\tWHERE id = ?", + "params": [ + "5" + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\t\t\t\t\t\t\tFROM plugin_flowview_queries\n\t\t\t\t\t\t\t\tORDER BY name", + "params": [] + } + ], + "log": [], + "messages": [], + "html": [ + [ + "html_start_box", + [ + "Undefined Filter [ Select Filter to get Details ] ", + "100%", + false, + 3, + "center", + "" + ] + ], + [ + "html_end_box", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": { + "query": "5", + "report": "s10", + "sortfield": "flows", + "cutofflines": "50", + "cutoffoctets": "1024", + "exclude": "3", + "domains": "true", + "usenat": "true", + "predefined_timespan": "0", + "predefined_timeshift": "2", + "graph_type": "pie", + "graph_height": "500", + "table": "true", + "bytes": "true", + "packets": "true", + "flows": "true", + "statistics": "99", + "date1": "2024-01-01 00:00'\"", + "date2": "2024-01-02 00:00" + }, + "session": [] + }, + "no Filter selected": { + "return": null, + "output": "\t\n\t\t\n\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tFilter\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tSort Field\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tLines\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tExclude\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tOctets\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tTimespan\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tFrom\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tTo\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tGraph\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tHeight\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tShow/Hide\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t
\n\t\t\n\t\n \n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\n\t\n\t\n\t\n\t", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\t\t\t\t\t\t\tFROM plugin_flowview_queries\n\t\t\t\t\t\t\t\tORDER BY name", + "params": [] + } + ], + "log": [], + "messages": [], + "html": [ + [ + "html_start_box", + [ + "Undefined Filter [ Select Filter to get Details ] ", + "100%", + false, + 3, + "center", + "" + ] + ], + [ + "html_end_box", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": { + "query": "-1", + "report": "0" + }, + "session": [] + }, + "no Filter selected, a report asked for": { + "return": null, + "output": "\t\n\t\t\n\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tFilter\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tSort Field\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tLines\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tExclude\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tOctets\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tTimespan\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tFrom\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tTo\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tGraph\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tHeight\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tShow/Hide\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t
\n\t\t\n\t\n \n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\n\t\n\t\n\t\n\t", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\t\t\t\t\t\t\tFROM plugin_flowview_queries\n\t\t\t\t\t\t\t\tORDER BY name", + "params": [] + } + ], + "log": [], + "messages": [], + "html": [ + [ + "html_start_box", + [ + "Undefined Filter [ Select Filter to get Details ] ", + "100%", + false, + 3, + "center", + "" + ] + ], + [ + "html_end_box", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": { + "query": "-1", + "report": "s10", + "sortfield": "bytes" + }, + "session": [] + }, + "no Filters": { + "return": null, + "output": "\t\n\t\t\n\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tFilter\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tSort Field\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tLines\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tExclude\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tOctets\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tTimespan\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tFrom\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tTo\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tGraph\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tHeight\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tShow/Hide\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t
\n\t\t\n\t\n \n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\n\t\n\t\n\t\n\t", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\t\t\t\t\t\t\tFROM plugin_flowview_queries\n\t\t\t\t\t\t\t\tORDER BY name", + "params": [] + } + ], + "log": [], + "messages": [], + "html": [ + [ + "html_start_box", + [ + "Undefined Filter [ Select Filter to get Details ] ", + "100%", + false, + 3, + "center", + "" + ] + ], + [ + "html_end_box", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": { + "query": "-1", + "sortfield": "bytes" + }, + "session": [] + }, + "no report, a Filter without one": { + "return": null, + "output": "\t\n\t\t\n\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tFilter\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tReport\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tSort Field\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tLines\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tExclude\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tOctets\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tTimespan\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tFrom\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tTo\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tGraph\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tHeight\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tShow/Hide\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t
\n\t\t\n\t\n \n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\n\t\n\t\n\t\n\t", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT name, statistics, printed\n\t\t\tFROM plugin_flowview_queries\n\t\t\tWHERE id = ?", + "params": [ + "4" + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\t\t\t\t\t\t\tFROM plugin_flowview_queries\n\t\t\t\t\t\t\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT printed, statistics, sortfield\n\t\t\t\t\t\t\t\t\tFROM plugin_flowview_queries\n\t\t\t\t\t\t\t\t\tWHERE id = ?", + "params": [ + "4" + ] + } + ], + "log": [], + "messages": [], + "html": [ + [ + "html_start_box", + [ + "Undefined Filter [ Select Filter to get Details ] ", + "100%", + false, + 3, + "center", + "" + ] + ], + [ + "html_end_box", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": { + "query": "4", + "report": "s0", + "sortfield": "bytes" + }, + "session": [] + }, + "no report, a printed Filter": { + "return": null, + "output": "\t\n\t\t\n\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tFilter\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tReport\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tSort Field\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tLines\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tExclude\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tOctets\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tTimespan\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tFrom\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tTo\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tGraph\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tHeight\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tShow/Hide\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t
\n\t\t\n\t\n \n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\n\t\n\t\n\t\n\t", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT name, statistics, printed\n\t\t\tFROM plugin_flowview_queries\n\t\t\tWHERE id = ?", + "params": [ + "4" + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\t\t\t\t\t\t\tFROM plugin_flowview_queries\n\t\t\t\t\t\t\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT printed, statistics, sortfield\n\t\t\t\t\t\t\t\t\tFROM plugin_flowview_queries\n\t\t\t\t\t\t\t\t\tWHERE id = ?", + "params": [ + "4" + ] + } + ], + "log": [], + "messages": [], + "html": [ + [ + "html_start_box", + [ + "Undefined Filter [ Select Filter to get Details ] ", + "100%", + false, + 3, + "center", + "" + ] + ], + [ + "html_end_box", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": { + "query": "4", + "report": "p0", + "sortfield": "start_time" + }, + "session": [] + }, + "no report, a statistical Filter": { + "return": null, + "output": "\t\n\t\t\n\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tFilter\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tReport\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tSort Field\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tLines\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tExclude\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tOctets\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tTimespan\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tFrom\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tTo\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tGraph\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tHeight\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tShow/Hide\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t
\n\t\t\n\t\n \n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\n\t\n\t\n\t\n\t", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT name, statistics, printed\n\t\t\tFROM plugin_flowview_queries\n\t\t\tWHERE id = ?", + "params": [ + "4" + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\t\t\t\t\t\t\tFROM plugin_flowview_queries\n\t\t\t\t\t\t\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT printed, statistics, sortfield\n\t\t\t\t\t\t\t\t\tFROM plugin_flowview_queries\n\t\t\t\t\t\t\t\t\tWHERE id = ?", + "params": [ + "4" + ] + } + ], + "log": [], + "messages": [], + "html": [ + [ + "html_start_box", + [ + "Undefined Filter [ Select Filter to get Details ] ", + "100%", + false, + 3, + "center", + "" + ] + ], + [ + "html_end_box", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": { + "query": "4", + "report": "0", + "sortfield": "bytes" + }, + "session": [] + }, + "no report, the Filter is gone": { + "return": null, + "output": "\t\n\t\t\n\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tFilter\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tReport\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tSort Field\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tLines\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tExclude\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tOctets\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tTimespan\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tFrom\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tTo\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tGraph\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tHeight\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tShow/Hide\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t
\n\t\t\n\t\n \n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\n\t\n\t\n\t\n\t", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT name, statistics, printed\n\t\t\tFROM plugin_flowview_queries\n\t\t\tWHERE id = ?", + "params": [ + "4" + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\t\t\t\t\t\t\tFROM plugin_flowview_queries\n\t\t\t\t\t\t\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT printed, statistics, sortfield\n\t\t\t\t\t\t\t\t\tFROM plugin_flowview_queries\n\t\t\t\t\t\t\t\t\tWHERE id = ?", + "params": [ + "4" + ] + } + ], + "log": [], + "messages": [], + "html": [ + [ + "html_start_box", + [ + "Undefined Filter [ Select Filter to get Details ] ", + "100%", + false, + 3, + "center", + "" + ] + ], + [ + "html_end_box", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": { + "query": "4", + "report": "0" + }, + "session": [] + }, + "no timespans or time shifts": { + "return": null, + "output": "\t\n\t\t\n\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tFilter\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tSort Field\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tLines\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tExclude\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tOctets\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tTimespan\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tFrom\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tTo\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tGraph\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tHeight\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tShow/Hide\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t
\n\t\t\n\t\n \n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\n\t\n\t\n\t\n\t", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\t\t\t\t\t\t\tFROM plugin_flowview_queries\n\t\t\t\t\t\t\t\tORDER BY name", + "params": [] + } + ], + "log": [], + "messages": [], + "html": [ + [ + "html_start_box", + [ + "Undefined Filter [ Select Filter to get Details ] ", + "100%", + false, + 3, + "center", + "" + ] + ], + [ + "html_end_box", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": { + "query": "-1", + "sortfield": "bytes" + }, + "session": [] + }, + "the summary report asked for": { + "return": null, + "output": "\t\n\t\t\n\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tFilter\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tReport\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tSort Field\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tLines\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tExclude\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tOctets\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tTimespan\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tFrom\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tTo\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tGraph\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tHeight\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tShow/Hide\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t
\n\t\t\n\t\n \n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\n\t\n\t\n\t\n\t", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT name, statistics, printed\n\t\t\tFROM plugin_flowview_queries\n\t\t\tWHERE id = ?", + "params": [ + "4" + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\t\t\t\t\t\t\tFROM plugin_flowview_queries\n\t\t\t\t\t\t\t\tORDER BY name", + "params": [] + } + ], + "log": [], + "messages": [], + "html": [ + [ + "html_start_box", + [ + "Undefined Filter [ Select Filter to get Details ] ", + "100%", + false, + 3, + "center", + "" + ] + ], + [ + "html_end_box", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": { + "query": "4", + "report": "s99", + "cutofflines": "50", + "sortfield": "bytes" + }, + "session": [] + }, + "the top sample excluded": { + "return": null, + "output": "\t\n\t\t\n\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tFilter\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tSort Field\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tLines\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tExclude\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tOctets\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tTimespan\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tFrom\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tTo\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tGraph\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tHeight\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tShow/Hide\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t
\n\t\t\n\t\n \n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\n\t\n\t\n\t\n\t", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\t\t\t\t\t\t\tFROM plugin_flowview_queries\n\t\t\t\t\t\t\t\tORDER BY name", + "params": [] + } + ], + "log": [], + "messages": [], + "html": [ + [ + "html_start_box", + [ + "Undefined Filter [ Select Filter to get Details ] ", + "100%", + false, + 3, + "center", + "" + ] + ], + [ + "html_end_box", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": { + "query": "-1", + "exclude": "1", + "statistics": "10", + "graph_type": "treemap", + "predefined_timespan": "7", + "sortfield": "bytes" + }, + "session": [] + } +} diff --git a/tests/fixtures/golden/run_flow_query.json b/tests/fixtures/golden/run_flow_query.json new file mode 100644 index 00000000..bb5d8e07 --- /dev/null +++ b/tests/fixtures/golden/run_flow_query.json @@ -0,0 +1,12530 @@ +{ + "NAT from the Filter": { + "return": { + "id": "4", + "name": "Top Talkers", + "device_id": "0", + "ex_addr": "", + "template_id": "-1", + "statistics": "10", + "printed": "0", + "sortfield": "bytes", + "cutofflines": "20", + "cutoffoctets": "0", + "includeif": "0", + "usenat": "on", + "sourceip": "", + "sourceinterface": "", + "sourceport": "", + "sourceas": "", + "destip": "", + "destinterface": "", + "destport": "", + "destas": "", + "postnatsourceip": "", + "postnatsourceport": "", + "postnatdestip": "", + "postnatdestport": "", + "protocols": "", + "tcpflags": "", + "tosfields": "", + "data": [ + { + "src_addr": "10.0.0.1", + "dst_addr": "10.0.0.2", + "src_domain": "a.example", + "dst_domain": "", + "flows": "3", + "bytes": "3000", + "packets": "30" + }, + { + "src_addr": "10.0.0.3", + "dst_addr": "10.0.0.4", + "src_domain": "", + "dst_domain": "b.example", + "flows": "1", + "bytes": "64", + "packets": "1" + } + ], + "table": "
Source DNSDest DNSSource IPDest IPFlowsBytesPacketsBytes/Packet
a.exampleunresolved10.0.0.110.0.0.233,00030100
unresolvedb.example10.0.0.310.0.0.4164164
", + "title": "Top Talkers" + }, + "output": "", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT *\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT name\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT TABLE_NAME AS `table`\n\t\tFROM information_schema.TABLES\n\t\tWHERE TABLE_NAME LIKE \"plugin_flowview_raw_%\"", + "params": [] + }, + { + "fn": "db_fetch_assoc_prepared", + "sql": "SELECT INET6_NTOA(src_addr) AS src_addr, INET6_NTOA(dst_addr) AS dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM (SELECT NULL AS src_addr, NULL AS dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, NULL AS src_domain, NULL AS dst_domain FROM plugin_flowview_raw_2024001 GROUP BY NULL, NULL UNION ALL SELECT NULL AS src_addr, NULL AS dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, NULL AS src_domain, NULL AS dst_domain FROM plugin_flowview_raw_2024002 GROUP BY NULL, NULL UNION ALL SELECT NULL AS src_addr, NULL AS dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, NULL AS src_domain, NULL AS dst_domain FROM plugin_flowview_raw_2024003 GROUP BY NULL, NULL) AS rs GROUP BY INET6_NTOA(src_addr), INET6_NTOA(dst_addr) ORDER BY bytes DESC LIMIT 20", + "params": [] + } + ], + "log": [ + "PARALLEL STATS: Time: Threads:1 Shards:3" + ], + "messages": [], + "html": [ + [ + "cacti_session_close", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": [], + "session": { + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + } + } + }, + "plan": null + }, + "NAT from the request": { + "return": { + "id": "4", + "name": "Top Talkers", + "device_id": "0", + "ex_addr": "", + "template_id": "-1", + "statistics": "10", + "printed": "0", + "sortfield": "bytes", + "cutofflines": "20", + "cutoffoctets": "0", + "includeif": "0", + "usenat": "", + "sourceip": "", + "sourceinterface": "", + "sourceport": "", + "sourceas": "", + "destip": "", + "destinterface": "", + "destport": "", + "destas": "", + "postnatsourceip": "", + "postnatsourceport": "", + "postnatdestip": "", + "postnatdestport": "", + "protocols": "", + "tcpflags": "", + "tosfields": "", + "data": [ + { + "src_addr": "10.0.0.1", + "dst_addr": "10.0.0.2", + "src_domain": "a.example", + "dst_domain": "", + "flows": "3", + "bytes": "3000", + "packets": "30" + }, + { + "src_addr": "10.0.0.3", + "dst_addr": "10.0.0.4", + "src_domain": "", + "dst_domain": "b.example", + "flows": "1", + "bytes": "64", + "packets": "1" + } + ], + "table": "
Source DNSDest DNSSource IPDest IPFlowsBytesPacketsBytes/Packet
a.exampleunresolved10.0.0.110.0.0.233,00030100
unresolvedb.example10.0.0.310.0.0.4164164
", + "title": "Top Talkers" + }, + "output": "", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT *\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT name\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT TABLE_NAME AS `table`\n\t\tFROM information_schema.TABLES\n\t\tWHERE TABLE_NAME LIKE \"plugin_flowview_raw_%\"", + "params": [] + }, + { + "fn": "db_fetch_assoc_prepared", + "sql": "SELECT INET6_NTOA(src_addr) AS src_addr, INET6_NTOA(dst_addr) AS dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM (SELECT NULL AS src_addr, NULL AS dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, NULL AS src_domain, NULL AS dst_domain FROM plugin_flowview_raw_2024001 GROUP BY NULL, NULL UNION ALL SELECT NULL AS src_addr, NULL AS dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, NULL AS src_domain, NULL AS dst_domain FROM plugin_flowview_raw_2024002 GROUP BY NULL, NULL UNION ALL SELECT NULL AS src_addr, NULL AS dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, NULL AS src_domain, NULL AS dst_domain FROM plugin_flowview_raw_2024003 GROUP BY NULL, NULL) AS rs GROUP BY INET6_NTOA(src_addr), INET6_NTOA(dst_addr) ORDER BY bytes DESC LIMIT 20", + "params": [] + } + ], + "log": [ + "PARALLEL STATS: Time: Threads:1 Shards:3" + ], + "messages": [], + "html": [ + [ + "cacti_session_close", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": { + "usenat": "true" + }, + "session": { + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + } + } + }, + "plan": null + }, + "NAT on a printed report": { + "return": { + "id": "4", + "name": "Top Talkers", + "device_id": "0", + "ex_addr": "", + "template_id": "-1", + "statistics": "0", + "printed": "7", + "sortfield": "src_port", + "cutofflines": "20", + "cutoffoctets": "0", + "includeif": "0", + "usenat": "on", + "sourceip": "", + "sourceinterface": "", + "sourceport": "", + "sourceas": "", + "destip": "", + "destinterface": "", + "destport": "", + "destas": "", + "postnatsourceip": "", + "postnatsourceport": "", + "postnatdestip": "", + "postnatdestport": "", + "protocols": "", + "tcpflags": "", + "tosfields": "", + "data": [ + { + "start_time": "2024-01-02 01:02:03.000000", + "end_time": "2024-01-02 01:02:09.000000", + "src_domain": "a.example.com", + "src_rdomain": "example.com", + "dst_domain": "", + "dst_rdomain": "example.org", + "domain": "d", + "rdomain": "r.example", + "src_addr": "10.0.0.1", + "dst_addr": "2001:db8::1", + "src_port": "50000", + "dst_port": "80", + "src_if": "1", + "dst_if": "2", + "src_as": "64512", + "dst_as": "64513", + "src_prefix": "24", + "dst_prefix": "16", + "protocol": "6", + "tos": "16", + "flags": "0x1b", + "flows": "12", + "bytes": "123456", + "packets": "100" + } + ], + "table": "
Start TimeEnd TimeSource DNSSource Root DNSDest DNSDest Root DNSDNSRoot DNSSource IPDest IPSource PortDest PortSource IFDest IFSource ASDest ASSource PrefixDest PrefixProtocolType of ServiceFlagsFlowsBytesPacketsBytes/Packet
2024-01-02 01:02:032024-01-02 01:02:09a.example.comexample.comunresolvedexample.org<b>d</b>r.example10.0.0.12001:db8::1Client/Private (50000)Unknown (80)1264512645132416TCP (6)Low Delay, Routine0x1b12123,4561001,235
", + "title": "Top Talkers" + }, + "output": "", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT *\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT name\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT TABLE_NAME AS `table`\n\t\tFROM information_schema.TABLES\n\t\tWHERE TABLE_NAME LIKE \"plugin_flowview_raw_%\"", + "params": [] + }, + { + "fn": "db_fetch_assoc_prepared", + "sql": "SELECT INET6_NTOA(src_addr) AS src_addr, src_port, protocol, INET6_NTOA(dst_addr) AS dst_addr, dst_port, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM (SELECT NULL AS src_addr, NULL AS src_port, protocol, NULL AS dst_addr, NULL AS dst_port, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, NULL AS src_domain, NULL AS dst_domain FROM plugin_flowview_raw_2024001 GROUP BY NULL, NULL, protocol, NULL, NULL UNION ALL SELECT NULL AS src_addr, NULL AS src_port, protocol, NULL AS dst_addr, NULL AS dst_port, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, NULL AS src_domain, NULL AS dst_domain FROM plugin_flowview_raw_2024002 GROUP BY NULL, NULL, protocol, NULL, NULL UNION ALL SELECT NULL AS src_addr, NULL AS src_port, protocol, NULL AS dst_addr, NULL AS dst_port, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, NULL AS src_domain, NULL AS dst_domain FROM plugin_flowview_raw_2024003 GROUP BY NULL, NULL, protocol, NULL, NULL) AS rs GROUP BY INET6_NTOA(src_addr), src_port, protocol, INET6_NTOA(dst_addr), dst_port ORDER BY src_port ASC LIMIT 20", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT service\n\t\t\tFROM plugin_flowview_ports\n\t\t\tWHERE port = ?\n\t\t\tAND proto = ?", + "params": [ + "80", + "tcp" + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + } + ], + "log": [ + "PARALLEL STATS: Time: Threads:1 Shards:3" + ], + "messages": [], + "html": [ + [ + "cacti_session_close", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": [], + "session": { + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + } + } + }, + "plan": null + }, + "NAT on a two map report": { + "return": { + "id": "4", + "name": "Top Talkers", + "device_id": "0", + "ex_addr": "", + "template_id": "-1", + "statistics": "11", + "printed": "0", + "sortfield": "bytes", + "cutofflines": "20", + "cutoffoctets": "0", + "includeif": "0", + "usenat": "on", + "sourceip": "", + "sourceinterface": "", + "sourceport": "", + "sourceas": "", + "destip": "", + "destinterface": "", + "destport": "", + "destas": "", + "postnatsourceip": "", + "postnatsourceport": "", + "postnatdestip": "", + "postnatdestport": "", + "protocols": "", + "tcpflags": "", + "tosfields": "", + "data": [ + { + "src_addr": "10.0.0.1", + "dst_addr": "10.0.0.2", + "src_domain": "a.example", + "dst_domain": "", + "flows": "3", + "bytes": "3000", + "packets": "30" + }, + { + "src_addr": "10.0.0.3", + "dst_addr": "10.0.0.4", + "src_domain": "", + "dst_domain": "b.example", + "flows": "1", + "bytes": "64", + "packets": "1" + } + ], + "table": "
Source DNSDest DNSSource/Destination IPDest IPFlowsBytesPacketsBytes/Packet
a.exampleunresolved10.0.0.110.0.0.233,00030100
unresolvedb.example10.0.0.310.0.0.4164164
", + "title": "Top Talkers" + }, + "output": "", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT *\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT name\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT TABLE_NAME AS `table`\n\t\tFROM information_schema.TABLES\n\t\tWHERE TABLE_NAME LIKE \"plugin_flowview_raw_%\"", + "params": [] + }, + { + "fn": "db_fetch_assoc_prepared", + "sql": "SELECT INET6_NTOA(src_addr) AS src_addr, src_domain, src_rdomain, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM (SELECT NULL AS src_addr, NULL AS src_domain, NULL AS src_rdomain, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024001 GROUP BY NULL UNION ALL SELECT NULL AS src_addr, NULL AS src_domain, NULL AS src_rdomain, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024001 GROUP BY NULL UNION ALL SELECT NULL AS src_addr, NULL AS src_domain, NULL AS src_rdomain, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024002 GROUP BY NULL UNION ALL SELECT NULL AS src_addr, NULL AS src_domain, NULL AS src_rdomain, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024002 GROUP BY NULL UNION ALL SELECT NULL AS src_addr, NULL AS src_domain, NULL AS src_rdomain, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024003 GROUP BY NULL UNION ALL SELECT NULL AS src_addr, NULL AS src_domain, NULL AS src_rdomain, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024003 GROUP BY NULL) AS rs GROUP BY INET6_NTOA(src_addr) ORDER BY bytes DESC LIMIT 20", + "params": [] + } + ], + "log": [ + "PARALLEL STATS: Time: Threads:1 Shards:3" + ], + "messages": [], + "html": [ + [ + "cacti_session_close", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": [], + "session": { + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + } + } + }, + "plan": null + }, + "NAT turned off by the request": { + "return": { + "id": "4", + "name": "Top Talkers", + "device_id": "0", + "ex_addr": "", + "template_id": "-1", + "statistics": "10", + "printed": "0", + "sortfield": "bytes", + "cutofflines": "20", + "cutoffoctets": "0", + "includeif": "0", + "usenat": "on", + "sourceip": "", + "sourceinterface": "", + "sourceport": "", + "sourceas": "", + "destip": "", + "destinterface": "", + "destport": "", + "destas": "", + "postnatsourceip": "", + "postnatsourceport": "", + "postnatdestip": "", + "postnatdestport": "", + "protocols": "", + "tcpflags": "", + "tosfields": "", + "data": [ + { + "src_addr": "10.0.0.1", + "dst_addr": "10.0.0.2", + "src_domain": "a.example", + "dst_domain": "", + "flows": "3", + "bytes": "3000", + "packets": "30" + }, + { + "src_addr": "10.0.0.3", + "dst_addr": "10.0.0.4", + "src_domain": "", + "dst_domain": "b.example", + "flows": "1", + "bytes": "64", + "packets": "1" + } + ], + "table": "
Source DNSDest DNSSource IPDest IPFlowsBytesPacketsBytes/Packet
a.exampleunresolved10.0.0.110.0.0.233,00030100
unresolvedb.example10.0.0.310.0.0.4164164
", + "title": "Top Talkers" + }, + "output": "", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT *\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT name\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT TABLE_NAME AS `table`\n\t\tFROM information_schema.TABLES\n\t\tWHERE TABLE_NAME LIKE \"plugin_flowview_raw_%\"", + "params": [] + }, + { + "fn": "db_fetch_assoc_prepared", + "sql": "SELECT INET6_NTOA(src_addr) AS src_addr, INET6_NTOA(dst_addr) AS dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM (SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024001 GROUP BY src_addr, dst_addr UNION ALL SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024002 GROUP BY src_addr, dst_addr UNION ALL SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024003 GROUP BY src_addr, dst_addr) AS rs GROUP BY INET6_NTOA(src_addr), INET6_NTOA(dst_addr) ORDER BY bytes DESC LIMIT 20", + "params": [] + } + ], + "log": [ + "PARALLEL STATS: Time: Threads:1 Shards:3" + ], + "messages": [], + "html": [ + [ + "cacti_session_close", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": { + "usenat": "false" + }, + "session": { + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + } + } + }, + "plan": null + }, + "a Filter that is gone": { + "return": false, + "output": "", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT *\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + } + ], + "log": [], + "messages": [], + "html": [ + [ + "cacti_session_close", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": [], + "session": { + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + } + } + }, + "plan": null + }, + "a Filter with no report": { + "return": false, + "output": "", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT *\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT name\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + } + ], + "log": [ + "WARNING: The Flowview Query Top Talkers [4] does not include either a Statistical or Printed Report." + ], + "messages": [], + "html": [ + [ + "cacti_session_close", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": [], + "session": { + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + } + } + }, + "plan": null + }, + "a Filter with no report, planned": { + "return": false, + "output": "", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT *\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT name\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + } + ], + "log": [], + "messages": [], + "html": [], + "exec": [], + "js": [], + "notices": [], + "request": [], + "session": { + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + } + } + }, + "plan": null + }, + "a Listener and a Stream": { + "return": { + "id": "4", + "name": "Top Talkers", + "device_id": "3", + "ex_addr": "192.0.2.9", + "template_id": "-1", + "statistics": "10", + "printed": "0", + "sortfield": "bytes", + "cutofflines": "20", + "cutoffoctets": "0", + "includeif": "0", + "usenat": "", + "sourceip": "", + "sourceinterface": "", + "sourceport": "", + "sourceas": "", + "destip": "", + "destinterface": "", + "destport": "", + "destas": "", + "postnatsourceip": "", + "postnatsourceport": "", + "postnatdestip": "", + "postnatdestport": "", + "protocols": "", + "tcpflags": "", + "tosfields": "", + "data": [ + { + "src_addr": "10.0.0.1", + "dst_addr": "10.0.0.2", + "src_domain": "a.example", + "dst_domain": "", + "flows": "3", + "bytes": "3000", + "packets": "30" + }, + { + "src_addr": "10.0.0.3", + "dst_addr": "10.0.0.4", + "src_domain": "", + "dst_domain": "b.example", + "flows": "1", + "bytes": "64", + "packets": "1" + } + ], + "table": "
Source DNSDest DNSSource IPDest IPFlowsBytesPacketsBytes/Packet
a.exampleunresolved10.0.0.110.0.0.233,00030100
unresolvedb.example10.0.0.310.0.0.4164164
", + "title": "Top Talkers" + }, + "output": "", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT *\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT name\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT TABLE_NAME AS `table`\n\t\tFROM information_schema.TABLES\n\t\tWHERE TABLE_NAME LIKE \"plugin_flowview_raw_%\"", + "params": [] + }, + { + "fn": "db_fetch_assoc_prepared", + "sql": "SELECT INET6_NTOA(src_addr) AS src_addr, INET6_NTOA(dst_addr) AS dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM (SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024001 WHERE `listener_id` IN (?) AND ex_addr = ? GROUP BY src_addr, dst_addr UNION ALL SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024002 WHERE `listener_id` IN (?) AND ex_addr = ? GROUP BY src_addr, dst_addr UNION ALL SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024003 WHERE `listener_id` IN (?) AND ex_addr = ? GROUP BY src_addr, dst_addr) AS rs GROUP BY INET6_NTOA(src_addr), INET6_NTOA(dst_addr) ORDER BY bytes DESC LIMIT 20", + "params": [ + "3", + "192.0.2.9", + "3", + "192.0.2.9", + "3", + "192.0.2.9" + ] + } + ], + "log": [ + "PARALLEL STATS: Time: Threads:1 Shards:3" + ], + "messages": [], + "html": [ + [ + "cacti_session_close", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": [], + "session": { + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + } + } + }, + "plan": null + }, + "a Stream of all": { + "return": { + "id": "4", + "name": "Top Talkers", + "device_id": "0", + "ex_addr": "-1", + "template_id": "-1", + "statistics": "10", + "printed": "0", + "sortfield": "bytes", + "cutofflines": "20", + "cutoffoctets": "0", + "includeif": "0", + "usenat": "", + "sourceip": "", + "sourceinterface": "", + "sourceport": "", + "sourceas": "", + "destip": "", + "destinterface": "", + "destport": "", + "destas": "", + "postnatsourceip": "", + "postnatsourceport": "", + "postnatdestip": "", + "postnatdestport": "", + "protocols": "", + "tcpflags": "", + "tosfields": "", + "data": [ + { + "src_addr": "10.0.0.1", + "dst_addr": "10.0.0.2", + "src_domain": "a.example", + "dst_domain": "", + "flows": "3", + "bytes": "3000", + "packets": "30" + }, + { + "src_addr": "10.0.0.3", + "dst_addr": "10.0.0.4", + "src_domain": "", + "dst_domain": "b.example", + "flows": "1", + "bytes": "64", + "packets": "1" + } + ], + "table": "
Source DNSDest DNSSource IPDest IPFlowsBytesPacketsBytes/Packet
a.exampleunresolved10.0.0.110.0.0.233,00030100
unresolvedb.example10.0.0.310.0.0.4164164
", + "title": "Top Talkers" + }, + "output": "", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT *\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT name\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT TABLE_NAME AS `table`\n\t\tFROM information_schema.TABLES\n\t\tWHERE TABLE_NAME LIKE \"plugin_flowview_raw_%\"", + "params": [] + }, + { + "fn": "db_fetch_assoc_prepared", + "sql": "SELECT INET6_NTOA(src_addr) AS src_addr, INET6_NTOA(dst_addr) AS dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM (SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024001 GROUP BY src_addr, dst_addr UNION ALL SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024002 GROUP BY src_addr, dst_addr UNION ALL SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024003 GROUP BY src_addr, dst_addr) AS rs GROUP BY INET6_NTOA(src_addr), INET6_NTOA(dst_addr) ORDER BY bytes DESC LIMIT 20", + "params": [] + } + ], + "log": [ + "PARALLEL STATS: Time: Threads:1 Shards:3" + ], + "messages": [], + "html": [ + [ + "cacti_session_close", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": [], + "session": { + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + } + } + }, + "plan": null + }, + "a Stream of zero": { + "return": { + "id": "4", + "name": "Top Talkers", + "device_id": "0", + "ex_addr": "0", + "template_id": "-1", + "statistics": "10", + "printed": "0", + "sortfield": "bytes", + "cutofflines": "20", + "cutoffoctets": "0", + "includeif": "0", + "usenat": "", + "sourceip": "", + "sourceinterface": "", + "sourceport": "", + "sourceas": "", + "destip": "", + "destinterface": "", + "destport": "", + "destas": "", + "postnatsourceip": "", + "postnatsourceport": "", + "postnatdestip": "", + "postnatdestport": "", + "protocols": "", + "tcpflags": "", + "tosfields": "", + "data": [ + { + "src_addr": "10.0.0.1", + "dst_addr": "10.0.0.2", + "src_domain": "a.example", + "dst_domain": "", + "flows": "3", + "bytes": "3000", + "packets": "30" + }, + { + "src_addr": "10.0.0.3", + "dst_addr": "10.0.0.4", + "src_domain": "", + "dst_domain": "b.example", + "flows": "1", + "bytes": "64", + "packets": "1" + } + ], + "table": "
Source DNSDest DNSSource IPDest IPFlowsBytesPacketsBytes/Packet
a.exampleunresolved10.0.0.110.0.0.233,00030100
unresolvedb.example10.0.0.310.0.0.4164164
", + "title": "Top Talkers" + }, + "output": "", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT *\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT name\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT TABLE_NAME AS `table`\n\t\tFROM information_schema.TABLES\n\t\tWHERE TABLE_NAME LIKE \"plugin_flowview_raw_%\"", + "params": [] + }, + { + "fn": "db_fetch_assoc_prepared", + "sql": "SELECT INET6_NTOA(src_addr) AS src_addr, INET6_NTOA(dst_addr) AS dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM (SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024001 GROUP BY src_addr, dst_addr UNION ALL SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024002 GROUP BY src_addr, dst_addr UNION ALL SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024003 GROUP BY src_addr, dst_addr) AS rs GROUP BY INET6_NTOA(src_addr), INET6_NTOA(dst_addr) ORDER BY bytes DESC LIMIT 20", + "params": [] + } + ], + "log": [ + "PARALLEL STATS: Time: Threads:1 Shards:3" + ], + "messages": [], + "html": [ + [ + "cacti_session_close", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": [], + "session": { + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + } + } + }, + "plan": null + }, + "a cached report": { + "return": { + "from": "the session" + }, + "output": "", + "exception": null, + "db": [], + "log": [], + "messages": [], + "html": [], + "exec": [], + "js": [], + "notices": [], + "request": [], + "session": { + "sess_flowdata": { + "4_2bd33a9527ded56cb20b16e339a04d3d": { + "data": { + "from": "the session" + } + } + }, + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + } + } + }, + "plan": null + }, + "a column sort field": { + "return": { + "id": "4", + "name": "Top Talkers", + "device_id": "0", + "ex_addr": "", + "template_id": "-1", + "statistics": "7", + "printed": "0", + "sortfield": "dst_port", + "cutofflines": "20", + "cutoffoctets": "0", + "includeif": "0", + "usenat": "", + "sourceip": "", + "sourceinterface": "", + "sourceport": "", + "sourceas": "", + "destip": "", + "destinterface": "", + "destport": "", + "destas": "", + "postnatsourceip": "", + "postnatsourceport": "", + "postnatdestip": "", + "postnatdestport": "", + "protocols": "", + "tcpflags": "", + "tosfields": "", + "data": [ + { + "src_port": "1", + "dst_port": "2", + "protocol": "6", + "flows": "1", + "bytes": "2", + "packets": "1" + } + ], + "table": "
Source PortDest PortProtocolFlowsBytesPacketsBytes/Packet
Unknown (1)Unknown (2)TCP (6)1212
", + "title": "Top Talkers" + }, + "output": "", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT *\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT name\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT TABLE_NAME AS `table`\n\t\tFROM information_schema.TABLES\n\t\tWHERE TABLE_NAME LIKE \"plugin_flowview_raw_%\"", + "params": [] + }, + { + "fn": "db_fetch_assoc_prepared", + "sql": "SELECT src_port, dst_port, protocol, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM (SELECT src_port, dst_port, protocol, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024001 GROUP BY src_port, dst_port, protocol UNION ALL SELECT src_port, dst_port, protocol, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024002 GROUP BY src_port, dst_port, protocol UNION ALL SELECT src_port, dst_port, protocol, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024003 GROUP BY src_port, dst_port, protocol) AS rs GROUP BY src_port, dst_port, protocol ORDER BY dst_port ASC LIMIT 20", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT service\n\t\t\tFROM plugin_flowview_ports\n\t\t\tWHERE port = ?\n\t\t\tAND proto = ?", + "params": [ + "1", + "tcp" + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT service\n\t\t\tFROM plugin_flowview_ports\n\t\t\tWHERE port = ?\n\t\t\tAND proto = ?", + "params": [ + "2", + "tcp" + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + } + ], + "log": [ + "PARALLEL STATS: Time: Threads:1 Shards:3" + ], + "messages": [], + "html": [ + [ + "cacti_session_close", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": [], + "session": { + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + } + } + }, + "plan": null + }, + "a full scan of a two map report with a filter": { + "return": { + "id": "4", + "name": "Top Talkers", + "device_id": "0", + "ex_addr": "", + "template_id": "-1", + "statistics": "11", + "printed": "0", + "sortfield": "bytes", + "cutofflines": "20", + "cutoffoctets": "0", + "includeif": "0", + "usenat": "", + "sourceip": "", + "sourceinterface": "", + "sourceport": "", + "sourceas": "", + "destip": "", + "destinterface": "", + "destport": "", + "destas": "", + "postnatsourceip": "", + "postnatsourceport": "", + "postnatdestip": "", + "postnatdestport": "", + "protocols": "6", + "tcpflags": "", + "tosfields": "", + "data": [ + { + "src_addr": "10.0.0.1", + "dst_addr": "10.0.0.2", + "src_domain": "a.example", + "dst_domain": "", + "flows": "3", + "bytes": "3000", + "packets": "30" + }, + { + "src_addr": "10.0.0.3", + "dst_addr": "10.0.0.4", + "src_domain": "", + "dst_domain": "b.example", + "flows": "1", + "bytes": "64", + "packets": "1" + } + ], + "table": "
Source DNSDest DNSSource/Destination IPDest IPFlowsBytesPacketsBytes/Packet
a.exampleunresolved10.0.0.110.0.0.233,00030100
unresolvedb.example10.0.0.310.0.0.4164164
", + "title": "Top Talkers" + }, + "output": "", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT *\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT name\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT TABLE_NAME AS `table`\n\t\tFROM information_schema.TABLES\n\t\tWHERE TABLE_NAME LIKE \"plugin_flowview_raw_%\"", + "params": [] + }, + { + "fn": "db_fetch_assoc_prepared", + "sql": "SELECT INET6_NTOA(src_addr) AS src_addr, src_domain, src_rdomain, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM (SELECT src_addr, src_domain AS src_domain, src_rdomain AS src_rdomain, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024001 WHERE `protocol` IN (?) GROUP BY src_addr UNION ALL SELECT dst_addr AS src_addr, dst_domain AS src_domain, dst_rdomain AS src_rdomain, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024001 WHERE `protocol` IN (?) GROUP BY dst_addr UNION ALL SELECT src_addr, src_domain AS src_domain, src_rdomain AS src_rdomain, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024002 WHERE `protocol` IN (?) GROUP BY src_addr UNION ALL SELECT dst_addr AS src_addr, dst_domain AS src_domain, dst_rdomain AS src_rdomain, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024002 WHERE `protocol` IN (?) GROUP BY dst_addr UNION ALL SELECT src_addr, src_domain AS src_domain, src_rdomain AS src_rdomain, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024003 WHERE `protocol` IN (?) GROUP BY src_addr UNION ALL SELECT dst_addr AS src_addr, dst_domain AS src_domain, dst_rdomain AS src_rdomain, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024003 WHERE `protocol` IN (?) GROUP BY dst_addr) AS rs GROUP BY INET6_NTOA(src_addr) ORDER BY bytes DESC LIMIT 20", + "params": [ + "6", + "6", + "6", + "6", + "6", + "6" + ] + } + ], + "log": [ + "PARALLEL STATS: Time: Threads:1 Shards:3" + ], + "messages": [], + "html": [ + [ + "cacti_session_close", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": [], + "session": { + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + } + } + }, + "plan": null + }, + "a partial scan": { + "return": { + "id": "4", + "name": "Top Talkers", + "device_id": "0", + "ex_addr": "", + "template_id": "-1", + "statistics": "10", + "printed": "0", + "sortfield": "bytes", + "cutofflines": "20", + "cutoffoctets": "0", + "includeif": "0", + "usenat": "", + "sourceip": "", + "sourceinterface": "", + "sourceport": "", + "sourceas": "", + "destip": "", + "destinterface": "", + "destport": "", + "destas": "", + "postnatsourceip": "", + "postnatsourceport": "", + "postnatdestip": "", + "postnatdestport": "", + "protocols": "", + "tcpflags": "", + "tosfields": "", + "data": [ + { + "src_addr": "10.0.0.1", + "dst_addr": "10.0.0.2", + "src_domain": "a.example", + "dst_domain": "", + "flows": "3", + "bytes": "3000", + "packets": "30" + }, + { + "src_addr": "10.0.0.3", + "dst_addr": "10.0.0.4", + "src_domain": "", + "dst_domain": "b.example", + "flows": "1", + "bytes": "64", + "packets": "1" + } + ], + "table": "
Source DNSDest DNSSource IPDest IPFlowsBytesPacketsBytes/Packet
a.exampleunresolved10.0.0.110.0.0.233,00030100
unresolvedb.example10.0.0.310.0.0.4164164
", + "title": "Top Talkers" + }, + "output": "", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT *\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT name\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT TABLE_NAME AS `table`\n\t\tFROM information_schema.TABLES\n\t\tWHERE TABLE_NAME LIKE \"plugin_flowview_raw_%\"", + "params": [] + }, + { + "fn": "db_fetch_assoc_prepared", + "sql": "SELECT INET6_NTOA(src_addr) AS src_addr, INET6_NTOA(dst_addr) AS dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM (SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024002 WHERE (`end_time` >= ? AND `start_time` <= ?) GROUP BY src_addr, dst_addr UNION ALL SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024003 WHERE (`end_time` >= ? AND `start_time` <= ?) GROUP BY src_addr, dst_addr) AS rs GROUP BY INET6_NTOA(src_addr), INET6_NTOA(dst_addr) ORDER BY bytes DESC LIMIT 20", + "params": [ + "2024-01-02 12:00:00", + "2024-01-05 00:00:00", + "2024-01-02 12:00:00", + "2024-01-05 00:00:00" + ] + } + ], + "log": [ + "PARALLEL STATS: Time: Threads:1 Shards:2" + ], + "messages": [], + "html": [ + [ + "cacti_session_close", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": [], + "session": { + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + } + } + }, + "plan": null + }, + "a partial scan of a two map report": { + "return": { + "id": "4", + "name": "Top Talkers", + "device_id": "0", + "ex_addr": "", + "template_id": "-1", + "statistics": "11", + "printed": "0", + "sortfield": "bytes", + "cutofflines": "20", + "cutoffoctets": "0", + "includeif": "0", + "usenat": "", + "sourceip": "", + "sourceinterface": "", + "sourceport": "", + "sourceas": "", + "destip": "", + "destinterface": "", + "destport": "", + "destas": "", + "postnatsourceip": "", + "postnatsourceport": "", + "postnatdestip": "", + "postnatdestport": "", + "protocols": "", + "tcpflags": "", + "tosfields": "", + "data": [ + { + "src_addr": "10.0.0.1", + "dst_addr": "10.0.0.2", + "src_domain": "a.example", + "dst_domain": "", + "flows": "3", + "bytes": "3000", + "packets": "30" + }, + { + "src_addr": "10.0.0.3", + "dst_addr": "10.0.0.4", + "src_domain": "", + "dst_domain": "b.example", + "flows": "1", + "bytes": "64", + "packets": "1" + } + ], + "table": "
Source DNSDest DNSSource/Destination IPDest IPFlowsBytesPacketsBytes/Packet
a.exampleunresolved10.0.0.110.0.0.233,00030100
unresolvedb.example10.0.0.310.0.0.4164164
", + "title": "Top Talkers" + }, + "output": "", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT *\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT name\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT TABLE_NAME AS `table`\n\t\tFROM information_schema.TABLES\n\t\tWHERE TABLE_NAME LIKE \"plugin_flowview_raw_%\"", + "params": [] + }, + { + "fn": "db_fetch_assoc_prepared", + "sql": "SELECT INET6_NTOA(src_addr) AS src_addr, src_domain, src_rdomain, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM (SELECT src_addr, src_domain AS src_domain, src_rdomain AS src_rdomain, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024002 WHERE (`end_time` >= ? AND `start_time` <= ?) GROUP BY src_addr UNION ALL SELECT dst_addr AS src_addr, dst_domain AS src_domain, dst_rdomain AS src_rdomain, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024002 WHERE (`end_time` >= ? AND `start_time` <= ?) GROUP BY dst_addr UNION ALL SELECT src_addr, src_domain AS src_domain, src_rdomain AS src_rdomain, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024003 WHERE (`end_time` >= ? AND `start_time` <= ?) GROUP BY src_addr UNION ALL SELECT dst_addr AS src_addr, dst_domain AS src_domain, dst_rdomain AS src_rdomain, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024003 WHERE (`end_time` >= ? AND `start_time` <= ?) GROUP BY dst_addr) AS rs GROUP BY INET6_NTOA(src_addr) ORDER BY bytes DESC LIMIT 20", + "params": [ + "2024-01-02 12:00:00", + "2024-01-05 00:00:00", + "2024-01-02 12:00:00", + "2024-01-05 00:00:00", + "2024-01-02 12:00:00", + "2024-01-05 00:00:00", + "2024-01-02 12:00:00", + "2024-01-05 00:00:00" + ] + } + ], + "log": [ + "PARALLEL STATS: Time: Threads:1 Shards:2" + ], + "messages": [], + "html": [ + [ + "cacti_session_close", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": [], + "session": { + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + } + } + }, + "plan": null + }, + "a partial scan of a two map report with a filter": { + "return": { + "id": "4", + "name": "Top Talkers", + "device_id": "0", + "ex_addr": "", + "template_id": "-1", + "statistics": "11", + "printed": "0", + "sortfield": "bytes", + "cutofflines": "20", + "cutoffoctets": "0", + "includeif": "0", + "usenat": "", + "sourceip": "", + "sourceinterface": "", + "sourceport": "", + "sourceas": "", + "destip": "", + "destinterface": "", + "destport": "", + "destas": "", + "postnatsourceip": "", + "postnatsourceport": "", + "postnatdestip": "", + "postnatdestport": "", + "protocols": "6", + "tcpflags": "", + "tosfields": "", + "data": [ + { + "src_addr": "10.0.0.1", + "dst_addr": "10.0.0.2", + "src_domain": "a.example", + "dst_domain": "", + "flows": "3", + "bytes": "3000", + "packets": "30" + }, + { + "src_addr": "10.0.0.3", + "dst_addr": "10.0.0.4", + "src_domain": "", + "dst_domain": "b.example", + "flows": "1", + "bytes": "64", + "packets": "1" + } + ], + "table": "
Source DNSDest DNSSource/Destination IPDest IPFlowsBytesPacketsBytes/Packet
a.exampleunresolved10.0.0.110.0.0.233,00030100
unresolvedb.example10.0.0.310.0.0.4164164
", + "title": "Top Talkers" + }, + "output": "", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT *\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT name\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT TABLE_NAME AS `table`\n\t\tFROM information_schema.TABLES\n\t\tWHERE TABLE_NAME LIKE \"plugin_flowview_raw_%\"", + "params": [] + }, + { + "fn": "db_fetch_assoc_prepared", + "sql": "SELECT INET6_NTOA(src_addr) AS src_addr, src_domain, src_rdomain, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM (SELECT src_addr, src_domain AS src_domain, src_rdomain AS src_rdomain, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024002 WHERE `protocol` IN (?) AND (`end_time` >= ? AND `start_time` <= ?) GROUP BY src_addr UNION ALL SELECT dst_addr AS src_addr, dst_domain AS src_domain, dst_rdomain AS src_rdomain, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024002 WHERE `protocol` IN (?) AND (`end_time` >= ? AND `start_time` <= ?) GROUP BY dst_addr UNION ALL SELECT src_addr, src_domain AS src_domain, src_rdomain AS src_rdomain, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024003 WHERE `protocol` IN (?) AND (`end_time` >= ? AND `start_time` <= ?) GROUP BY src_addr UNION ALL SELECT dst_addr AS src_addr, dst_domain AS src_domain, dst_rdomain AS src_rdomain, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024003 WHERE `protocol` IN (?) AND (`end_time` >= ? AND `start_time` <= ?) GROUP BY dst_addr) AS rs GROUP BY INET6_NTOA(src_addr) ORDER BY bytes DESC LIMIT 20", + "params": [ + "6", + "2024-01-02 12:00:00", + "2024-01-05 00:00:00", + "6", + "2024-01-02 12:00:00", + "2024-01-05 00:00:00", + "6", + "2024-01-02 12:00:00", + "2024-01-05 00:00:00", + "6", + "2024-01-02 12:00:00", + "2024-01-05 00:00:00" + ] + } + ], + "log": [ + "PARALLEL STATS: Time: Threads:1 Shards:2" + ], + "messages": [], + "html": [ + [ + "cacti_session_close", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": [], + "session": { + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + } + } + }, + "plan": null + }, + "a partial scan with a filter": { + "return": { + "id": "4", + "name": "Top Talkers", + "device_id": "0", + "ex_addr": "", + "template_id": "-1", + "statistics": "10", + "printed": "0", + "sortfield": "bytes", + "cutofflines": "20", + "cutoffoctets": "0", + "includeif": "0", + "usenat": "", + "sourceip": "", + "sourceinterface": "", + "sourceport": "", + "sourceas": "", + "destip": "", + "destinterface": "", + "destport": "", + "destas": "", + "postnatsourceip": "", + "postnatsourceport": "", + "postnatdestip": "", + "postnatdestport": "", + "protocols": "6", + "tcpflags": "", + "tosfields": "", + "data": [ + { + "src_addr": "10.0.0.1", + "dst_addr": "10.0.0.2", + "src_domain": "a.example", + "dst_domain": "", + "flows": "3", + "bytes": "3000", + "packets": "30" + }, + { + "src_addr": "10.0.0.3", + "dst_addr": "10.0.0.4", + "src_domain": "", + "dst_domain": "b.example", + "flows": "1", + "bytes": "64", + "packets": "1" + } + ], + "table": "
Source DNSDest DNSSource IPDest IPFlowsBytesPacketsBytes/Packet
a.exampleunresolved10.0.0.110.0.0.233,00030100
unresolvedb.example10.0.0.310.0.0.4164164
", + "title": "Top Talkers" + }, + "output": "", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT *\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT name\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT TABLE_NAME AS `table`\n\t\tFROM information_schema.TABLES\n\t\tWHERE TABLE_NAME LIKE \"plugin_flowview_raw_%\"", + "params": [] + }, + { + "fn": "db_fetch_assoc_prepared", + "sql": "SELECT INET6_NTOA(src_addr) AS src_addr, INET6_NTOA(dst_addr) AS dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM (SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024002 WHERE `protocol` IN (?) AND (`end_time` >= ? AND `start_time` <= ?) GROUP BY src_addr, dst_addr UNION ALL SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024003 WHERE `protocol` IN (?) AND (`end_time` >= ? AND `start_time` <= ?) GROUP BY src_addr, dst_addr) AS rs GROUP BY INET6_NTOA(src_addr), INET6_NTOA(dst_addr) ORDER BY bytes DESC LIMIT 20", + "params": [ + "6", + "2024-01-02 12:00:00", + "2024-01-05 00:00:00", + "6", + "2024-01-02 12:00:00", + "2024-01-05 00:00:00" + ] + } + ], + "log": [ + "PARALLEL STATS: Time: Threads:1 Shards:2" + ], + "messages": [], + "html": [ + [ + "cacti_session_close", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": [], + "session": { + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + } + } + }, + "plan": null + }, + "a planned printed report": { + "return": true, + "output": "", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT *\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT name\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + } + ], + "log": [], + "messages": [], + "html": [], + "exec": [], + "js": [], + "notices": [], + "request": [], + "session": { + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + } + } + }, + "plan": [ + "af8b830fd1124426ba01f9101a5e3c18" + ] + }, + "a planned report forced off NAT": { + "return": true, + "output": "", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT *\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT name\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + } + ], + "log": [], + "messages": [], + "html": [], + "exec": [], + "js": [], + "notices": [], + "request": [], + "session": { + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + } + } + }, + "plan": [ + "9ad00e5be38f5af9da786b24a8747777" + ] + }, + "a planned report forced to NAT": { + "return": true, + "output": "", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT *\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT name\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + } + ], + "log": [], + "messages": [], + "html": [], + "exec": [], + "js": [], + "notices": [], + "request": { + "usenat": "false" + }, + "session": { + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + } + } + }, + "plan": [ + "eeaed2a4ee53aa0bd41cb48749f0f400" + ] + }, + "a planned statistical report": { + "return": true, + "output": "", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT *\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT name\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + } + ], + "log": [], + "messages": [], + "html": [], + "exec": [], + "js": [], + "notices": [], + "request": [], + "session": { + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + } + } + }, + "plan": [ + "9ad00e5be38f5af9da786b24a8747777" + ] + }, + "a planned two map report": { + "return": true, + "output": "", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT *\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT name\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + } + ], + "log": [], + "messages": [], + "html": [], + "exec": [], + "js": [], + "notices": [], + "request": [], + "session": { + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + } + } + }, + "plan": [ + "8bdd857e74e961a367117c975a7661ab", + "6284f29f4974e33df5e6ac3936ef6756" + ] + }, + "a printed report from the request": { + "return": { + "id": "4", + "name": "Top Talkers", + "device_id": "0", + "ex_addr": "", + "template_id": "-1", + "statistics": 0, + "printed": "6", + "sortfield": "bytes", + "cutofflines": "20", + "cutoffoctets": "0", + "includeif": "0", + "usenat": "", + "sourceip": "", + "sourceinterface": "", + "sourceport": "", + "sourceas": "", + "destip": "", + "destinterface": "", + "destport": "", + "destas": "", + "postnatsourceip": "", + "postnatsourceport": "", + "postnatdestip": "", + "postnatdestport": "", + "protocols": "", + "tcpflags": "", + "tosfields": "", + "data": [ + { + "src_addr": "10.0.0.1", + "dst_addr": "10.0.0.2", + "src_domain": "a.example", + "dst_domain": "", + "flows": "3", + "bytes": "3000", + "packets": "30" + }, + { + "src_addr": "10.0.0.3", + "dst_addr": "10.0.0.4", + "src_domain": "", + "dst_domain": "b.example", + "flows": "1", + "bytes": "64", + "packets": "1" + } + ], + "table": "
Source DNSDest DNSSource IPDest IPFlowsBytesPacketsBytes/Packet
a.exampleunresolved10.0.0.110.0.0.233,00030100
unresolvedb.example10.0.0.310.0.0.4164164
", + "title": "Top Talkers" + }, + "output": "", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT *\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT name\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT TABLE_NAME AS `table`\n\t\tFROM information_schema.TABLES\n\t\tWHERE TABLE_NAME LIKE \"plugin_flowview_raw_%\"", + "params": [] + }, + { + "fn": "db_fetch_assoc_prepared", + "sql": "SELECT INET6_NTOA(src_addr) AS src_addr, INET6_NTOA(dst_addr) AS dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM (SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024001 GROUP BY src_addr, dst_addr UNION ALL SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024002 GROUP BY src_addr, dst_addr UNION ALL SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024003 GROUP BY src_addr, dst_addr) AS rs GROUP BY INET6_NTOA(src_addr), INET6_NTOA(dst_addr) ORDER BY bytes DESC LIMIT 20", + "params": [] + } + ], + "log": [ + "PARALLEL STATS: Time: Threads:1 Shards:3" + ], + "messages": [], + "html": [ + [ + "cacti_session_close", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": { + "report": "p6" + }, + "session": { + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + } + } + }, + "plan": null + }, + "a printed report sorted by address": { + "return": { + "id": "4", + "name": "Top Talkers", + "device_id": "0", + "ex_addr": "", + "template_id": "-1", + "statistics": "0", + "printed": "1", + "sortfield": "dst_addr", + "cutofflines": "20", + "cutoffoctets": "0", + "includeif": "0", + "usenat": "", + "sourceip": "", + "sourceinterface": "", + "sourceport": "", + "sourceas": "", + "destip": "", + "destinterface": "", + "destport": "", + "destas": "", + "postnatsourceip": "", + "postnatsourceport": "", + "postnatdestip": "", + "postnatdestport": "", + "protocols": "", + "tcpflags": "", + "tosfields": "", + "data": [ + { + "start_time": "2024-01-02 01:02:03.000000", + "end_time": "2024-01-02 01:02:09.000000", + "src_domain": "a.example.com", + "src_rdomain": "example.com", + "dst_domain": "", + "dst_rdomain": "example.org", + "domain": "d", + "rdomain": "r.example", + "src_addr": "10.0.0.1", + "dst_addr": "2001:db8::1", + "src_port": "50000", + "dst_port": "80", + "src_if": "1", + "dst_if": "2", + "src_as": "64512", + "dst_as": "64513", + "src_prefix": "24", + "dst_prefix": "16", + "protocol": "6", + "tos": "16", + "flags": "0x1b", + "flows": "12", + "bytes": "123456", + "packets": "100" + } + ], + "table": "
Start TimeEnd TimeSource DNSSource Root DNSDest DNSDest Root DNSDNSRoot DNSSource IPDest IPSource PortDest PortSource IFDest IFSource ASDest ASSource PrefixDest PrefixProtocolType of ServiceFlagsFlowsBytesPacketsBytes/Packet
2024-01-02 01:02:032024-01-02 01:02:09a.example.comexample.comunresolvedexample.org<b>d</b>r.example10.0.0.12001:db8::1Client/Private (50000)Unknown (80)1264512645132416TCP (6)Low Delay, Routine0x1b12123,4561001,235
", + "title": "Top Talkers" + }, + "output": "", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT *\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT name\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT TABLE_NAME AS `table`\n\t\tFROM information_schema.TABLES\n\t\tWHERE TABLE_NAME LIKE \"plugin_flowview_raw_%\"", + "params": [] + }, + { + "fn": "db_fetch_assoc_prepared", + "sql": "SELECT src_if, INET6_NTOA(src_addr) AS src_addr, dst_if, INET6_NTOA(dst_addr) AS dst_addr, protocol, src_port, dst_port, tos, flags, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM (SELECT src_if, src_addr, dst_if, dst_addr, protocol, src_port, dst_port, tos, flags, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024001 GROUP BY src_if, src_addr, dst_if, dst_addr, protocol, src_port, dst_port, tos, flags UNION ALL SELECT src_if, src_addr, dst_if, dst_addr, protocol, src_port, dst_port, tos, flags, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024002 GROUP BY src_if, src_addr, dst_if, dst_addr, protocol, src_port, dst_port, tos, flags UNION ALL SELECT src_if, src_addr, dst_if, dst_addr, protocol, src_port, dst_port, tos, flags, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024003 GROUP BY src_if, src_addr, dst_if, dst_addr, protocol, src_port, dst_port, tos, flags) AS rs GROUP BY src_if, INET6_NTOA(src_addr), dst_if, INET6_NTOA(dst_addr), protocol, src_port, dst_port, tos, flags ORDER BY INET6_NTOA(dst_addr) LIMIT 20", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT service\n\t\t\tFROM plugin_flowview_ports\n\t\t\tWHERE port = ?\n\t\t\tAND proto = ?", + "params": [ + "80", + "tcp" + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + } + ], + "log": [ + "PARALLEL STATS: Time: Threads:1 Shards:3" + ], + "messages": [], + "html": [ + [ + "cacti_session_close", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": [], + "session": { + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + } + } + }, + "plan": null + }, + "a printed report sorted by bytes": { + "return": { + "id": "4", + "name": "Top Talkers", + "device_id": "0", + "ex_addr": "", + "template_id": "-1", + "statistics": "0", + "printed": "4", + "sortfield": "bytes", + "cutofflines": "20", + "cutoffoctets": "0", + "includeif": "0", + "usenat": "", + "sourceip": "", + "sourceinterface": "", + "sourceport": "", + "sourceas": "", + "destip": "", + "destinterface": "", + "destport": "", + "destas": "", + "postnatsourceip": "", + "postnatsourceport": "", + "postnatdestip": "", + "postnatdestport": "", + "protocols": "", + "tcpflags": "", + "tosfields": "", + "data": [ + { + "start_time": "2024-01-02 01:02:03.000000", + "end_time": "2024-01-02 01:02:09.000000", + "src_domain": "a.example.com", + "src_rdomain": "example.com", + "dst_domain": "", + "dst_rdomain": "example.org", + "domain": "d", + "rdomain": "r.example", + "src_addr": "10.0.0.1", + "dst_addr": "2001:db8::1", + "src_port": "50000", + "dst_port": "80", + "src_if": "1", + "dst_if": "2", + "src_as": "64512", + "dst_as": "64513", + "src_prefix": "24", + "dst_prefix": "16", + "protocol": "6", + "tos": "16", + "flags": "0x1b", + "flows": "12", + "bytes": "123456", + "packets": "100" + } + ], + "table": "
Start TimeEnd TimeSource DNSSource Root DNSDest DNSDest Root DNSDNSRoot DNSSource IPDest IPSource PortDest PortSource IFDest IFSource ASDest ASSource PrefixDest PrefixProtocolType of ServiceFlagsFlowsBytesPacketsBytes/Packet
2024-01-02 01:02:032024-01-02 01:02:09a.example.comexample.comunresolvedexample.org<b>d</b>r.example10.0.0.12001:db8::1Client/Private (50000)Unknown (80)1264512645132416TCP (6)Low Delay, Routine0x1b12123,4561001,235
", + "title": "Top Talkers" + }, + "output": "", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT *\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT name\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT TABLE_NAME AS `table`\n\t\tFROM information_schema.TABLES\n\t\tWHERE TABLE_NAME LIKE \"plugin_flowview_raw_%\"", + "params": [] + }, + { + "fn": "db_fetch_assoc_prepared", + "sql": "SELECT INET6_NTOA(src_addr) AS src_addr, INET6_NTOA(dst_addr) AS dst_addr, protocol, src_as, dst_as, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM (SELECT src_addr, dst_addr, protocol, src_as, dst_as, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024001 GROUP BY src_addr, dst_addr, protocol, src_as, dst_as UNION ALL SELECT src_addr, dst_addr, protocol, src_as, dst_as, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024002 GROUP BY src_addr, dst_addr, protocol, src_as, dst_as UNION ALL SELECT src_addr, dst_addr, protocol, src_as, dst_as, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024003 GROUP BY src_addr, dst_addr, protocol, src_as, dst_as) AS rs GROUP BY INET6_NTOA(src_addr), INET6_NTOA(dst_addr), protocol, src_as, dst_as ORDER BY bytes DESC LIMIT 20", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT service\n\t\t\tFROM plugin_flowview_ports\n\t\t\tWHERE port = ?\n\t\t\tAND proto = ?", + "params": [ + "80", + "tcp" + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + } + ], + "log": [ + "PARALLEL STATS: Time: Threads:1 Shards:3" + ], + "messages": [], + "html": [ + [ + "cacti_session_close", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": [], + "session": { + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + } + } + }, + "plan": null + }, + "a protocol of zero": { + "return": { + "id": "4", + "name": "Top Talkers", + "device_id": "0", + "ex_addr": "", + "template_id": "-1", + "statistics": "10", + "printed": "0", + "sortfield": "bytes", + "cutofflines": "20", + "cutoffoctets": "0", + "includeif": "0", + "usenat": "", + "sourceip": "", + "sourceinterface": "", + "sourceport": "", + "sourceas": "", + "destip": "", + "destinterface": "", + "destport": "", + "destas": "", + "postnatsourceip": "", + "postnatsourceport": "", + "postnatdestip": "", + "postnatdestport": "", + "protocols": "0", + "tcpflags": "", + "tosfields": "", + "data": [ + { + "src_addr": "10.0.0.1", + "dst_addr": "10.0.0.2", + "src_domain": "a.example", + "dst_domain": "", + "flows": "3", + "bytes": "3000", + "packets": "30" + }, + { + "src_addr": "10.0.0.3", + "dst_addr": "10.0.0.4", + "src_domain": "", + "dst_domain": "b.example", + "flows": "1", + "bytes": "64", + "packets": "1" + } + ], + "table": "
Source DNSDest DNSSource IPDest IPFlowsBytesPacketsBytes/Packet
a.exampleunresolved10.0.0.110.0.0.233,00030100
unresolvedb.example10.0.0.310.0.0.4164164
", + "title": "Top Talkers" + }, + "output": "", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT *\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT name\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT TABLE_NAME AS `table`\n\t\tFROM information_schema.TABLES\n\t\tWHERE TABLE_NAME LIKE \"plugin_flowview_raw_%\"", + "params": [] + }, + { + "fn": "db_fetch_assoc_prepared", + "sql": "SELECT INET6_NTOA(src_addr) AS src_addr, INET6_NTOA(dst_addr) AS dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM (SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024001 GROUP BY src_addr, dst_addr UNION ALL SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024002 GROUP BY src_addr, dst_addr UNION ALL SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024003 GROUP BY src_addr, dst_addr) AS rs GROUP BY INET6_NTOA(src_addr), INET6_NTOA(dst_addr) ORDER BY bytes DESC LIMIT 20", + "params": [] + } + ], + "log": [ + "PARALLEL STATS: Time: Threads:1 Shards:3" + ], + "messages": [], + "html": [ + [ + "cacti_session_close", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": [], + "session": { + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + } + } + }, + "plan": null + }, + "a report from the request that is not a number": { + "return": false, + "output": "", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT *\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT name\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + } + ], + "log": [ + "WARNING: The Flowview Query Top Talkers [4] does not include either a Statistical or Printed Report." + ], + "messages": [], + "html": [ + [ + "cacti_session_close", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": { + "report": "sx" + }, + "session": { + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + } + } + }, + "plan": null + }, + "a report from the request the Filter overrides": { + "return": { + "id": "4", + "name": "Top Talkers", + "device_id": "0", + "ex_addr": "", + "template_id": "-1", + "statistics": "10", + "printed": "0", + "sortfield": "bytes", + "cutofflines": "20", + "cutoffoctets": "0", + "includeif": "0", + "usenat": "", + "sourceip": "", + "sourceinterface": "", + "sourceport": "", + "sourceas": "", + "destip": "", + "destinterface": "", + "destport": "", + "destas": "", + "postnatsourceip": "", + "postnatsourceport": "", + "postnatdestip": "", + "postnatdestport": "", + "protocols": "", + "tcpflags": "", + "tosfields": "", + "data": [ + { + "src_addr": "10.0.0.1", + "dst_addr": "10.0.0.2", + "src_domain": "a.example", + "dst_domain": "", + "flows": "3", + "bytes": "3000", + "packets": "30" + }, + { + "src_addr": "10.0.0.3", + "dst_addr": "10.0.0.4", + "src_domain": "", + "dst_domain": "b.example", + "flows": "1", + "bytes": "64", + "packets": "1" + } + ], + "table": "
Source DNSDest DNSSource IPDest IPFlowsBytesPacketsBytes/Packet
a.exampleunresolved10.0.0.110.0.0.233,00030100
unresolvedb.example10.0.0.310.0.0.4164164
", + "title": "Top Talkers" + }, + "output": "", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT *\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT name\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT TABLE_NAME AS `table`\n\t\tFROM information_schema.TABLES\n\t\tWHERE TABLE_NAME LIKE \"plugin_flowview_raw_%\"", + "params": [] + }, + { + "fn": "db_fetch_assoc_prepared", + "sql": "SELECT INET6_NTOA(src_addr) AS src_addr, INET6_NTOA(dst_addr) AS dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM (SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024001 GROUP BY src_addr, dst_addr UNION ALL SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024002 GROUP BY src_addr, dst_addr UNION ALL SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024003 GROUP BY src_addr, dst_addr) AS rs GROUP BY INET6_NTOA(src_addr), INET6_NTOA(dst_addr) ORDER BY bytes DESC LIMIT 20", + "params": [] + } + ], + "log": [ + "PARALLEL STATS: Time: Threads:1 Shards:3" + ], + "messages": [], + "html": [ + [ + "cacti_session_close", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": { + "report": "p1" + }, + "session": { + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + } + } + }, + "plan": null + }, + "a report from the request with no kind": { + "return": false, + "output": "", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT *\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT name\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + } + ], + "log": [ + "WARNING: The Flowview Query Top Talkers [4] does not include either a Statistical or Printed Report." + ], + "messages": [], + "html": [ + [ + "cacti_session_close", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": { + "report": "11" + }, + "session": { + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + } + } + }, + "plan": null + }, + "a sort field from the request": { + "return": { + "id": "4", + "name": "Top Talkers", + "device_id": "0", + "ex_addr": "", + "template_id": "-1", + "statistics": "10", + "printed": "0", + "sortfield": "packets", + "cutofflines": "20", + "cutoffoctets": "0", + "includeif": "0", + "usenat": "", + "sourceip": "", + "sourceinterface": "", + "sourceport": "", + "sourceas": "", + "destip": "", + "destinterface": "", + "destport": "", + "destas": "", + "postnatsourceip": "", + "postnatsourceport": "", + "postnatdestip": "", + "postnatdestport": "", + "protocols": "", + "tcpflags": "", + "tosfields": "", + "data": [ + { + "src_addr": "10.0.0.1", + "dst_addr": "10.0.0.2", + "src_domain": "a.example", + "dst_domain": "", + "flows": "3", + "bytes": "3000", + "packets": "30" + }, + { + "src_addr": "10.0.0.3", + "dst_addr": "10.0.0.4", + "src_domain": "", + "dst_domain": "b.example", + "flows": "1", + "bytes": "64", + "packets": "1" + } + ], + "table": "
Source DNSDest DNSSource IPDest IPFlowsBytesPacketsBytes/Packet
a.exampleunresolved10.0.0.110.0.0.233,00030100
unresolvedb.example10.0.0.310.0.0.4164164
", + "title": "Top Talkers" + }, + "output": "", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT *\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT name\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT TABLE_NAME AS `table`\n\t\tFROM information_schema.TABLES\n\t\tWHERE TABLE_NAME LIKE \"plugin_flowview_raw_%\"", + "params": [] + }, + { + "fn": "db_fetch_assoc_prepared", + "sql": "SELECT INET6_NTOA(src_addr) AS src_addr, INET6_NTOA(dst_addr) AS dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM (SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024001 GROUP BY src_addr, dst_addr UNION ALL SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024002 GROUP BY src_addr, dst_addr UNION ALL SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024003 GROUP BY src_addr, dst_addr) AS rs GROUP BY INET6_NTOA(src_addr), INET6_NTOA(dst_addr) ORDER BY packets DESC LIMIT 20", + "params": [] + } + ], + "log": [ + "PARALLEL STATS: Time: Threads:1 Shards:3" + ], + "messages": [], + "html": [ + [ + "cacti_session_close", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": { + "sortfield": "packets" + }, + "session": { + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + } + } + }, + "plan": null + }, + "a sort field the report does not have": { + "return": { + "id": "4", + "name": "Top Talkers", + "device_id": "0", + "ex_addr": "", + "template_id": "-1", + "statistics": "10", + "printed": "0", + "sortfield": "bytes", + "cutofflines": "20", + "cutoffoctets": "0", + "includeif": "0", + "usenat": "", + "sourceip": "", + "sourceinterface": "", + "sourceport": "", + "sourceas": "", + "destip": "", + "destinterface": "", + "destport": "", + "destas": "", + "postnatsourceip": "", + "postnatsourceport": "", + "postnatdestip": "", + "postnatdestport": "", + "protocols": "", + "tcpflags": "", + "tosfields": "", + "data": [ + { + "src_addr": "10.0.0.1", + "dst_addr": "10.0.0.2", + "src_domain": "a.example", + "dst_domain": "", + "flows": "3", + "bytes": "3000", + "packets": "30" + }, + { + "src_addr": "10.0.0.3", + "dst_addr": "10.0.0.4", + "src_domain": "", + "dst_domain": "b.example", + "flows": "1", + "bytes": "64", + "packets": "1" + } + ], + "table": "
Source DNSDest DNSSource IPDest IPFlowsBytesPacketsBytes/Packet
a.exampleunresolved10.0.0.110.0.0.233,00030100
unresolvedb.example10.0.0.310.0.0.4164164
", + "title": "Top Talkers" + }, + "output": "", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT *\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT name\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT TABLE_NAME AS `table`\n\t\tFROM information_schema.TABLES\n\t\tWHERE TABLE_NAME LIKE \"plugin_flowview_raw_%\"", + "params": [] + }, + { + "fn": "db_fetch_assoc_prepared", + "sql": "SELECT INET6_NTOA(src_addr) AS src_addr, INET6_NTOA(dst_addr) AS dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM (SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024001 GROUP BY src_addr, dst_addr UNION ALL SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024002 GROUP BY src_addr, dst_addr UNION ALL SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024003 GROUP BY src_addr, dst_addr) AS rs GROUP BY INET6_NTOA(src_addr), INET6_NTOA(dst_addr) ORDER BY bytes DESC LIMIT 20", + "params": [] + } + ], + "log": [ + "PARALLEL STATS: Time: Threads:1 Shards:3" + ], + "messages": [], + "html": [ + [ + "cacti_session_close", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": { + "sortfield": "tos" + }, + "session": { + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + } + } + }, + "plan": null + }, + "a statistical report from the request": { + "return": { + "id": "4", + "name": "Top Talkers", + "device_id": "0", + "ex_addr": "", + "template_id": "-1", + "statistics": "12", + "printed": 0, + "sortfield": "bytes", + "cutofflines": "20", + "cutoffoctets": "0", + "includeif": "0", + "usenat": "", + "sourceip": "", + "sourceinterface": "", + "sourceport": "", + "sourceas": "", + "destip": "", + "destinterface": "", + "destport": "", + "destas": "", + "postnatsourceip": "", + "postnatsourceport": "", + "postnatdestip": "", + "postnatdestport": "", + "protocols": "", + "tcpflags": "", + "tosfields": "", + "data": [ + { + "protocol": "17", + "flows": "1", + "bytes": "10", + "packets": "1" + } + ], + "table": "
ProtocolFlowsBytesPacketsBytes/Packet
UDP (17)110110
", + "title": "Top Talkers" + }, + "output": "", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT *\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT name\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT TABLE_NAME AS `table`\n\t\tFROM information_schema.TABLES\n\t\tWHERE TABLE_NAME LIKE \"plugin_flowview_raw_%\"", + "params": [] + }, + { + "fn": "db_fetch_assoc_prepared", + "sql": "SELECT protocol, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM (SELECT protocol, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024001 GROUP BY protocol UNION ALL SELECT protocol, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024002 GROUP BY protocol UNION ALL SELECT protocol, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024003 GROUP BY protocol) AS rs GROUP BY protocol ORDER BY bytes DESC LIMIT 20", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + } + ], + "log": [ + "PARALLEL STATS: Time: Threads:1 Shards:3" + ], + "messages": [], + "html": [ + [ + "cacti_session_close", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": { + "report": "s12" + }, + "session": { + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + } + } + }, + "plan": null + }, + "a statistical report, parallel": { + "return": { + "id": "4", + "name": "Top Talkers", + "device_id": "0", + "ex_addr": "", + "template_id": "-1", + "statistics": "10", + "printed": "0", + "sortfield": "bytes", + "cutofflines": "20", + "cutoffoctets": "0", + "includeif": "0", + "usenat": "", + "sourceip": "", + "sourceinterface": "", + "sourceport": "", + "sourceas": "", + "destip": "", + "destinterface": "", + "destport": "", + "destas": "", + "postnatsourceip": "", + "postnatsourceport": "", + "postnatdestip": "", + "postnatdestport": "", + "protocols": "", + "tcpflags": "", + "tosfields": "", + "data": [ + { + "src_addr": "10.0.0.1", + "dst_addr": "10.0.0.2", + "src_domain": "a.example", + "dst_domain": "", + "flows": "3", + "bytes": "3000", + "packets": "30" + }, + { + "src_addr": "10.0.0.3", + "dst_addr": "10.0.0.4", + "src_domain": "", + "dst_domain": "b.example", + "flows": "1", + "bytes": "64", + "packets": "1" + } + ], + "table": "
Source DNSDest DNSSource IPDest IPFlowsBytesPacketsBytes/Packet
a.exampleunresolved10.0.0.110.0.0.233,00030100
unresolvedb.example10.0.0.310.0.0.4164164
", + "title": "Top Talkers" + }, + "output": "", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT *\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT name\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT TABLE_NAME AS `table`\n\t\tFROM information_schema.TABLES\n\t\tWHERE TABLE_NAME LIKE \"plugin_flowview_raw_%\"", + "params": [] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT id\n\t\tFROM parallel_database_query\n\t\tWHERE md5sum = ?\n\t\tAND user_id = ?", + "params": [ + "5816c0a54e1843e5c134ef31b8910231", + 0 + ] + }, + { + "fn": "db_fetch_assoc_prepared", + "sql": "SELECT *\n\t\t\tFROM INFORMATION_SCHEMA.COLUMNS\n\t\t\tWHERE table_name = ?", + "params": [ + "plugin_flowview_raw_2024001" + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT ENGINE\n\t\t\tFROM information_schema.ENGINES\n\t\t\tWHERE ENGINE IN ('MyISAM', 'Aria', 'InnoDB')\n\t\t\tAND SUPPORT IN ('YES','DEFAULT')", + "params": [] + }, + { + "fn": "db_execute", + "sql": "CREATE TABLE IF NOT EXISTS parallel_database_query_map_0 (`src_addr` bigint unsigned NOT NULL default \"0\", `dst_addr` bigint unsigned NOT NULL default \"0\", `flows` bigint unsigned NOT NULL default \"0\", `bytes` bigint unsigned NOT NULL default \"0\", `packets` bigint unsigned NOT NULL default \"0\", `src_domain` bigint unsigned NOT NULL default \"0\", `dst_domain` bigint unsigned NOT NULL default \"0\") ENGINE=MyISAM ROW_FORMAT=Dynamic COMMENT='Holds Parallel Query Results'", + "params": [] + }, + { + "fn": "db_execute_prepared", + "sql": "UPDATE parallel_database_query\n\t\tSET map_create = ?\n\t\tWHERE id = ?", + "params": [ + "CREATE TABLE IF NOT EXISTS parallel_database_query_map_0 (`src_addr` bigint unsigned NOT NULL default \"0\", `dst_addr` bigint unsigned NOT NULL default \"0\", `flows` bigint unsigned NOT NULL default \"0\", `bytes` bigint unsigned NOT NULL default \"0\", `packets` bigint unsigned NOT NULL default \"0\", `src_domain` bigint unsigned NOT NULL default \"0\", `dst_domain` bigint unsigned NOT NULL default \"0\") ENGINE=MyISAM ROW_FORMAT=Dynamic COMMENT='Holds Parallel Query Results'", + 0 + ] + }, + { + "fn": "db_execute_prepared", + "sql": "UPDATE parallel_database_query\n\t\t\tSET map_table = ?\n\t\t\tWHERE id = ?", + "params": [ + "parallel_database_query_map_0", + 0 + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT TABLE_NAME AS `table`\n\t\tFROM information_schema.TABLES\n\t\tWHERE TABLE_NAME LIKE \"plugin_flowview_raw_%\"", + "params": [] + }, + { + "fn": "db_execute_prepared", + "sql": "INSERT INTO parallel_database_query_shard\n\t\t\t\t(query_id, shard_id, full_scan, map_table, map_partition, map_query, map_params)\n\t\t\t\tVALUES (?, ?, ?, ?, ?, ?, ?)", + "params": [ + 0, + 0, + "1", + "plugin_flowview_raw_2024001", + "", + "SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024001 GROUP BY src_addr, dst_addr ", + "[]" + ] + }, + { + "fn": "db_execute_prepared", + "sql": "INSERT INTO parallel_database_query_shard\n\t\t\t\t(query_id, shard_id, full_scan, map_table, map_partition, map_query, map_params)\n\t\t\t\tVALUES (?, ?, ?, ?, ?, ?, ?)", + "params": [ + 0, + 1, + "1", + "plugin_flowview_raw_2024002", + "", + "SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024002 GROUP BY src_addr, dst_addr ", + "[]" + ] + }, + { + "fn": "db_execute_prepared", + "sql": "INSERT INTO parallel_database_query_shard\n\t\t\t\t(query_id, shard_id, full_scan, map_table, map_partition, map_query, map_params)\n\t\t\t\tVALUES (?, ?, ?, ?, ?, ?, ?)", + "params": [ + 0, + 2, + "0", + "plugin_flowview_raw_2024003", + "live", + "SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024003 WHERE (`end_time` >= ? AND `start_time` <= ?) GROUP BY src_addr, dst_addr ", + "[\"2024-01-01 00:00:00\",\"2024-01-05 00:00:00\"]" + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT COUNT(*)\n\t\t\tFROM parallel_database_query\n\t\t\tWHERE id = ?\n\t\t\tAND status = ?", + "params": [ + 0, + "pending" + ] + }, + { + "fn": "db_fetch_cell", + "sql": "SELECT COUNT(*)\n\t\t\tFROM parallel_database_query\n\t\t\tWHERE ID IN(0)\n\t\t\tAND status != \"complete\"", + "params": [] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT results\n\t\t\tFROM parallel_database_query\n\t\t\tWHERE id = ?", + "params": [ + 0 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT map_table\n\t\tFROM parallel_database_query\n\t\tWHERE id = ?", + "params": [ + 0 + ] + }, + { + "fn": "db_fetch_assoc_prepared", + "sql": "SELECT *\n\t\tFROM parallel_database_query_shard\n\t\tWHERE query_id = ?", + "params": [ + 0 + ] + }, + { + "fn": "db_execute_prepared", + "sql": "DELETE FROM parallel_database_query_shard\n\t\tWHERE query_id = ?", + "params": [ + 0 + ] + }, + { + "fn": "db_fetch_assoc_prepared", + "sql": "SELECT *\n\t\tFROM processes WHERE tasktype = ?\n\t\tAND taskname IN (?, ?)", + "params": [ + "flowview", + "db_query_0", + "db_shard_0" + ] + } + ], + "log": [], + "messages": [], + "html": [ + [ + "cacti_session_close", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": [], + "session": { + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + } + } + }, + "plan": null + }, + "a two map report, parallel": { + "return": false, + "output": "", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT *\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT name\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT TABLE_NAME AS `table`\n\t\tFROM information_schema.TABLES\n\t\tWHERE TABLE_NAME LIKE \"plugin_flowview_raw_%\"", + "params": [] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT id\n\t\tFROM parallel_database_query\n\t\tWHERE md5sum = ?\n\t\tAND user_id = ?", + "params": [ + "65ebc57d35f69d831745022902992ffe", + 0 + ] + }, + { + "fn": "db_fetch_assoc_prepared", + "sql": "SELECT *\n\t\t\tFROM INFORMATION_SCHEMA.COLUMNS\n\t\t\tWHERE table_name = ?", + "params": [ + "plugin_flowview_raw_2024001" + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT ENGINE\n\t\t\tFROM information_schema.ENGINES\n\t\t\tWHERE ENGINE IN ('MyISAM', 'Aria', 'InnoDB')\n\t\t\tAND SUPPORT IN ('YES','DEFAULT')", + "params": [] + }, + { + "fn": "db_execute", + "sql": "CREATE TABLE IF NOT EXISTS parallel_database_query_map_0 (`src_addr` bigint unsigned NOT NULL default \"0\", `src_domain` bigint unsigned NOT NULL default \"0\", `src_rdomain` bigint unsigned NOT NULL default \"0\", `flows` bigint unsigned NOT NULL default \"0\", `bytes` bigint unsigned NOT NULL default \"0\", `packets` bigint unsigned NOT NULL default \"0\") ENGINE=MyISAM ROW_FORMAT=Dynamic COMMENT='Holds Parallel Query Results'", + "params": [] + }, + { + "fn": "db_execute_prepared", + "sql": "UPDATE parallel_database_query\n\t\tSET map_create = ?\n\t\tWHERE id = ?", + "params": [ + "CREATE TABLE IF NOT EXISTS parallel_database_query_map_0 (`src_addr` bigint unsigned NOT NULL default \"0\", `src_domain` bigint unsigned NOT NULL default \"0\", `src_rdomain` bigint unsigned NOT NULL default \"0\", `flows` bigint unsigned NOT NULL default \"0\", `bytes` bigint unsigned NOT NULL default \"0\", `packets` bigint unsigned NOT NULL default \"0\") ENGINE=MyISAM ROW_FORMAT=Dynamic COMMENT='Holds Parallel Query Results'", + 0 + ] + }, + { + "fn": "db_execute_prepared", + "sql": "UPDATE parallel_database_query\n\t\t\tSET map_table = ?\n\t\t\tWHERE id = ?", + "params": [ + "parallel_database_query_map_0", + 0 + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT TABLE_NAME AS `table`\n\t\tFROM information_schema.TABLES\n\t\tWHERE TABLE_NAME LIKE \"plugin_flowview_raw_%\"", + "params": [] + }, + { + "fn": "db_execute_prepared", + "sql": "INSERT INTO parallel_database_query_shard\n\t\t\t\t(query_id, shard_id, full_scan, map_table, map_partition, map_query, map_params)\n\t\t\t\tVALUES (?, ?, ?, ?, ?, ?, ?)", + "params": [ + 0, + 0, + "1", + "plugin_flowview_raw_2024001", + "", + "SELECT src_addr, src_domain AS src_domain, src_rdomain AS src_rdomain, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024001 GROUP BY src_addr ", + "[]" + ] + }, + { + "fn": "db_execute_prepared", + "sql": "INSERT INTO parallel_database_query_shard\n\t\t\t\t(query_id, shard_id, full_scan, map_table, map_partition, map_query, map_params)\n\t\t\t\tVALUES (?, ?, ?, ?, ?, ?, ?)", + "params": [ + 0, + 1, + "1", + "plugin_flowview_raw_2024002", + "", + "SELECT src_addr, src_domain AS src_domain, src_rdomain AS src_rdomain, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024002 GROUP BY src_addr ", + "[]" + ] + }, + { + "fn": "db_execute_prepared", + "sql": "INSERT INTO parallel_database_query_shard\n\t\t\t\t(query_id, shard_id, full_scan, map_table, map_partition, map_query, map_params)\n\t\t\t\tVALUES (?, ?, ?, ?, ?, ?, ?)", + "params": [ + 0, + 2, + "0", + "plugin_flowview_raw_2024003", + "live", + "SELECT src_addr, src_domain AS src_domain, src_rdomain AS src_rdomain, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024003 WHERE (`end_time` >= ? AND `start_time` <= ?) GROUP BY src_addr ", + "[\"2024-01-01 00:00:00\",\"2024-01-05 00:00:00\"]" + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT id\n\t\tFROM parallel_database_query\n\t\tWHERE md5sum = ?\n\t\tAND user_id = ?", + "params": [ + "6545a7b52e3d183b2fc7c7b296b7a6b4", + 0 + ] + }, + { + "fn": "db_fetch_assoc_prepared", + "sql": "SELECT *\n\t\t\tFROM INFORMATION_SCHEMA.COLUMNS\n\t\t\tWHERE table_name = ?", + "params": [ + "plugin_flowview_raw_2024001" + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT ENGINE\n\t\t\tFROM information_schema.ENGINES\n\t\t\tWHERE ENGINE IN ('MyISAM', 'Aria', 'InnoDB')\n\t\t\tAND SUPPORT IN ('YES','DEFAULT')", + "params": [] + }, + { + "fn": "db_execute", + "sql": "CREATE TABLE IF NOT EXISTS parallel_database_query_map_0 (`src_addr` bigint unsigned NOT NULL default \"0\", `src_domain` bigint unsigned NOT NULL default \"0\", `src_rdomain` bigint unsigned NOT NULL default \"0\", `flows` bigint unsigned NOT NULL default \"0\", `bytes` bigint unsigned NOT NULL default \"0\", `packets` bigint unsigned NOT NULL default \"0\") ENGINE=MyISAM ROW_FORMAT=Dynamic COMMENT='Holds Parallel Query Results'", + "params": [] + }, + { + "fn": "db_execute_prepared", + "sql": "UPDATE parallel_database_query\n\t\tSET map_create = ?\n\t\tWHERE id = ?", + "params": [ + "CREATE TABLE IF NOT EXISTS parallel_database_query_map_0 (`src_addr` bigint unsigned NOT NULL default \"0\", `src_domain` bigint unsigned NOT NULL default \"0\", `src_rdomain` bigint unsigned NOT NULL default \"0\", `flows` bigint unsigned NOT NULL default \"0\", `bytes` bigint unsigned NOT NULL default \"0\", `packets` bigint unsigned NOT NULL default \"0\") ENGINE=MyISAM ROW_FORMAT=Dynamic COMMENT='Holds Parallel Query Results'", + 0 + ] + }, + { + "fn": "db_execute_prepared", + "sql": "UPDATE parallel_database_query\n\t\t\tSET map_table = ?\n\t\t\tWHERE id = ?", + "params": [ + "parallel_database_query_map_0", + 0 + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT TABLE_NAME AS `table`\n\t\tFROM information_schema.TABLES\n\t\tWHERE TABLE_NAME LIKE \"plugin_flowview_raw_%\"", + "params": [] + }, + { + "fn": "db_execute_prepared", + "sql": "INSERT INTO parallel_database_query_shard\n\t\t\t\t(query_id, shard_id, full_scan, map_table, map_partition, map_query, map_params)\n\t\t\t\tVALUES (?, ?, ?, ?, ?, ?, ?)", + "params": [ + 0, + 0, + "1", + "plugin_flowview_raw_2024001", + "", + "SELECT dst_addr AS src_addr, dst_domain AS src_domain, dst_rdomain AS src_rdomain, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024001 GROUP BY dst_addr ", + "[]" + ] + }, + { + "fn": "db_execute_prepared", + "sql": "INSERT INTO parallel_database_query_shard\n\t\t\t\t(query_id, shard_id, full_scan, map_table, map_partition, map_query, map_params)\n\t\t\t\tVALUES (?, ?, ?, ?, ?, ?, ?)", + "params": [ + 0, + 1, + "1", + "plugin_flowview_raw_2024002", + "", + "SELECT dst_addr AS src_addr, dst_domain AS src_domain, dst_rdomain AS src_rdomain, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024002 GROUP BY dst_addr ", + "[]" + ] + }, + { + "fn": "db_execute_prepared", + "sql": "INSERT INTO parallel_database_query_shard\n\t\t\t\t(query_id, shard_id, full_scan, map_table, map_partition, map_query, map_params)\n\t\t\t\tVALUES (?, ?, ?, ?, ?, ?, ?)", + "params": [ + 0, + 2, + "1", + "plugin_flowview_raw_2024003", + "", + "SELECT dst_addr AS src_addr, dst_domain AS src_domain, dst_rdomain AS src_rdomain, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024003 GROUP BY dst_addr ", + "[]" + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT COUNT(*)\n\t\t\tFROM parallel_database_query\n\t\t\tWHERE id = ?\n\t\t\tAND status = ?", + "params": [ + 0, + "pending" + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT COUNT(*)\n\t\t\tFROM parallel_database_query\n\t\t\tWHERE id = ?\n\t\t\tAND status = ?", + "params": [ + 0, + "pending" + ] + }, + { + "fn": "db_fetch_cell", + "sql": "SELECT COUNT(*)\n\t\t\tFROM parallel_database_query\n\t\t\tWHERE ID IN(0, 0)\n\t\t\tAND status != \"complete\"", + "params": [] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT reduce_query\n\t\t\tFROM parallel_database_query\n\t\t\tWHERE id = ?", + "params": [ + 0 + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT map_table, map_create, results\n\t\t\t\tFROM parallel_database_query\n\t\t\t\tWHERE id IN(0, 0)", + "params": [] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT map_table\n\t\tFROM parallel_database_query\n\t\tWHERE id = ?", + "params": [ + 0 + ] + }, + { + "fn": "db_fetch_assoc_prepared", + "sql": "SELECT *\n\t\tFROM parallel_database_query_shard\n\t\tWHERE query_id = ?", + "params": [ + 0 + ] + }, + { + "fn": "db_execute_prepared", + "sql": "DELETE FROM parallel_database_query_shard\n\t\tWHERE query_id = ?", + "params": [ + 0 + ] + }, + { + "fn": "db_fetch_assoc_prepared", + "sql": "SELECT *\n\t\tFROM processes WHERE tasktype = ?\n\t\tAND taskname IN (?, ?)", + "params": [ + "flowview", + "db_query_0", + "db_shard_0" + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT map_table\n\t\tFROM parallel_database_query\n\t\tWHERE id = ?", + "params": [ + 0 + ] + }, + { + "fn": "db_fetch_assoc_prepared", + "sql": "SELECT *\n\t\tFROM parallel_database_query_shard\n\t\tWHERE query_id = ?", + "params": [ + 0 + ] + }, + { + "fn": "db_execute_prepared", + "sql": "DELETE FROM parallel_database_query_shard\n\t\tWHERE query_id = ?", + "params": [ + 0 + ] + }, + { + "fn": "db_fetch_assoc_prepared", + "sql": "SELECT *\n\t\tFROM processes WHERE tasktype = ?\n\t\tAND taskname IN (?, ?)", + "params": [ + "flowview", + "db_query_0", + "db_shard_0" + ] + } + ], + "log": [], + "messages": [], + "html": [ + [ + "cacti_session_close", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": [], + "session": { + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + } + } + }, + "plan": null + }, + "a zero range in the request": { + "return": { + "id": "4", + "name": "Top Talkers", + "device_id": "0", + "ex_addr": "", + "template_id": "-1", + "statistics": "10", + "printed": "0", + "sortfield": "bytes", + "cutofflines": "20", + "cutoffoctets": "0", + "includeif": "3", + "usenat": "", + "sourceip": "", + "sourceinterface": "", + "sourceport": "", + "sourceas": "", + "destip": "", + "destinterface": "", + "destport": "", + "destas": "", + "postnatsourceip": "", + "postnatsourceport": "", + "postnatdestip": "", + "postnatdestport": "", + "protocols": "", + "tcpflags": "", + "tosfields": "", + "data": [ + { + "src_addr": "10.0.0.1", + "dst_addr": "10.0.0.2", + "src_domain": "a.example", + "dst_domain": "", + "flows": "3", + "bytes": "3000", + "packets": "30" + }, + { + "src_addr": "10.0.0.3", + "dst_addr": "10.0.0.4", + "src_domain": "", + "dst_domain": "b.example", + "flows": "1", + "bytes": "64", + "packets": "1" + } + ], + "table": "
Source DNSDest DNSSource IPDest IPFlowsBytesPacketsBytes/Packet
a.exampleunresolved10.0.0.110.0.0.233,00030100
unresolvedb.example10.0.0.310.0.0.4164164
", + "title": "Top Talkers" + }, + "output": "", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT *\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT name\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT TABLE_NAME AS `table`\n\t\tFROM information_schema.TABLES\n\t\tWHERE TABLE_NAME LIKE \"plugin_flowview_raw_%\"", + "params": [] + }, + { + "fn": "db_fetch_assoc_prepared", + "sql": "SELECT INET6_NTOA(src_addr) AS src_addr, INET6_NTOA(dst_addr) AS dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM (SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024001 GROUP BY src_addr, dst_addr UNION ALL SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024002 GROUP BY src_addr, dst_addr UNION ALL SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024003 GROUP BY src_addr, dst_addr) AS rs GROUP BY INET6_NTOA(src_addr), INET6_NTOA(dst_addr) ORDER BY bytes DESC LIMIT 20", + "params": [] + } + ], + "log": [ + "PARALLEL STATS: Time: Threads:1 Shards:3" + ], + "messages": [], + "html": [ + [ + "cacti_session_close", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": { + "includeif": "0" + }, + "session": { + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + } + } + }, + "plan": null + }, + "all lines from the Filter": { + "return": { + "id": "4", + "name": "Top Talkers", + "device_id": "0", + "ex_addr": "", + "template_id": "-1", + "statistics": "10", + "printed": "0", + "sortfield": "bytes", + "cutofflines": "999999", + "cutoffoctets": "0", + "includeif": "0", + "usenat": "", + "sourceip": "", + "sourceinterface": "", + "sourceport": "", + "sourceas": "", + "destip": "", + "destinterface": "", + "destport": "", + "destas": "", + "postnatsourceip": "", + "postnatsourceport": "", + "postnatdestip": "", + "postnatdestport": "", + "protocols": "", + "tcpflags": "", + "tosfields": "", + "data": [ + { + "src_addr": "10.0.0.1", + "dst_addr": "10.0.0.2", + "src_domain": "a.example", + "dst_domain": "", + "flows": "3", + "bytes": "3000", + "packets": "30" + }, + { + "src_addr": "10.0.0.3", + "dst_addr": "10.0.0.4", + "src_domain": "", + "dst_domain": "b.example", + "flows": "1", + "bytes": "64", + "packets": "1" + } + ], + "table": "
Source DNSDest DNSSource IPDest IPFlowsBytesPacketsBytes/Packet
a.exampleunresolved10.0.0.110.0.0.233,00030100
unresolvedb.example10.0.0.310.0.0.4164164
", + "title": "Top Talkers" + }, + "output": "", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT *\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT name\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT TABLE_NAME AS `table`\n\t\tFROM information_schema.TABLES\n\t\tWHERE TABLE_NAME LIKE \"plugin_flowview_raw_%\"", + "params": [] + }, + { + "fn": "db_fetch_assoc_prepared", + "sql": "SELECT INET6_NTOA(src_addr) AS src_addr, INET6_NTOA(dst_addr) AS dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM (SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024001 GROUP BY src_addr, dst_addr UNION ALL SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024002 GROUP BY src_addr, dst_addr UNION ALL SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024003 GROUP BY src_addr, dst_addr) AS rs GROUP BY INET6_NTOA(src_addr), INET6_NTOA(dst_addr) ORDER BY bytes DESC LIMIT 9999999999", + "params": [] + } + ], + "log": [ + "PARALLEL STATS: Time: Threads:1 Shards:3" + ], + "messages": [], + "html": [ + [ + "cacti_session_close", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": [], + "session": { + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + } + } + }, + "plan": null + }, + "all lines from the request": { + "return": { + "id": "4", + "name": "Top Talkers", + "device_id": "0", + "ex_addr": "", + "template_id": "-1", + "statistics": "10", + "printed": "0", + "sortfield": "bytes", + "cutofflines": "20", + "cutoffoctets": "0", + "includeif": "0", + "usenat": "", + "sourceip": "", + "sourceinterface": "", + "sourceport": "", + "sourceas": "", + "destip": "", + "destinterface": "", + "destport": "", + "destas": "", + "postnatsourceip": "", + "postnatsourceport": "", + "postnatdestip": "", + "postnatdestport": "", + "protocols": "", + "tcpflags": "", + "tosfields": "", + "data": [ + { + "src_addr": "10.0.0.1", + "dst_addr": "10.0.0.2", + "src_domain": "a.example", + "dst_domain": "", + "flows": "3", + "bytes": "3000", + "packets": "30" + }, + { + "src_addr": "10.0.0.3", + "dst_addr": "10.0.0.4", + "src_domain": "", + "dst_domain": "b.example", + "flows": "1", + "bytes": "64", + "packets": "1" + } + ], + "table": "
Source DNSDest DNSSource IPDest IPFlowsBytesPacketsBytes/Packet
a.exampleunresolved10.0.0.110.0.0.233,00030100
unresolvedb.example10.0.0.310.0.0.4164164
", + "title": "Top Talkers" + }, + "output": "", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT *\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT name\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT TABLE_NAME AS `table`\n\t\tFROM information_schema.TABLES\n\t\tWHERE TABLE_NAME LIKE \"plugin_flowview_raw_%\"", + "params": [] + }, + { + "fn": "db_fetch_assoc_prepared", + "sql": "SELECT INET6_NTOA(src_addr) AS src_addr, INET6_NTOA(dst_addr) AS dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM (SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024001 GROUP BY src_addr, dst_addr UNION ALL SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024002 GROUP BY src_addr, dst_addr UNION ALL SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024003 GROUP BY src_addr, dst_addr) AS rs GROUP BY INET6_NTOA(src_addr), INET6_NTOA(dst_addr) ORDER BY bytes DESC LIMIT 9999999999", + "params": [] + } + ], + "log": [ + "PARALLEL STATS: Time: Threads:1 Shards:3" + ], + "messages": [], + "html": [ + [ + "cacti_session_close", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": { + "cutofflines": "999999" + }, + "session": { + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + } + } + }, + "plan": null + }, + "an address sort field": { + "return": { + "id": "4", + "name": "Top Talkers", + "device_id": "0", + "ex_addr": "", + "template_id": "-1", + "statistics": "10", + "printed": "0", + "sortfield": "src_addr", + "cutofflines": "20", + "cutoffoctets": "0", + "includeif": "0", + "usenat": "", + "sourceip": "", + "sourceinterface": "", + "sourceport": "", + "sourceas": "", + "destip": "", + "destinterface": "", + "destport": "", + "destas": "", + "postnatsourceip": "", + "postnatsourceport": "", + "postnatdestip": "", + "postnatdestport": "", + "protocols": "", + "tcpflags": "", + "tosfields": "", + "data": [ + { + "src_addr": "10.0.0.1", + "dst_addr": "10.0.0.2", + "src_domain": "a.example", + "dst_domain": "", + "flows": "3", + "bytes": "3000", + "packets": "30" + }, + { + "src_addr": "10.0.0.3", + "dst_addr": "10.0.0.4", + "src_domain": "", + "dst_domain": "b.example", + "flows": "1", + "bytes": "64", + "packets": "1" + } + ], + "table": "
Source DNSDest DNSSource IPDest IPFlowsBytesPacketsBytes/Packet
a.exampleunresolved10.0.0.110.0.0.233,00030100
unresolvedb.example10.0.0.310.0.0.4164164
", + "title": "Top Talkers" + }, + "output": "", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT *\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT name\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT TABLE_NAME AS `table`\n\t\tFROM information_schema.TABLES\n\t\tWHERE TABLE_NAME LIKE \"plugin_flowview_raw_%\"", + "params": [] + }, + { + "fn": "db_fetch_assoc_prepared", + "sql": "SELECT INET6_NTOA(src_addr) AS src_addr, INET6_NTOA(dst_addr) AS dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM (SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024001 GROUP BY src_addr, dst_addr UNION ALL SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024002 GROUP BY src_addr, dst_addr UNION ALL SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024003 GROUP BY src_addr, dst_addr) AS rs GROUP BY INET6_NTOA(src_addr), INET6_NTOA(dst_addr) ORDER BY INET6_NTOA(src_addr) LIMIT 20", + "params": [] + } + ], + "log": [ + "PARALLEL STATS: Time: Threads:1 Shards:3" + ], + "messages": [], + "html": [ + [ + "cacti_session_close", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": { + "sortfield": "src_addr" + }, + "session": { + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + } + } + }, + "plan": null + }, + "an unknown printed report": { + "return": false, + "output": "", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT *\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT name\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + } + ], + "log": [ + "WARNING: The Flowview Query Top Talkers [4] contains an invalid Statistical or Printed Report." + ], + "messages": [ + [ + "bad_report", + "The Printed Report 3 is not known. Please open a bug on GitHub", + 1 + ] + ], + "html": [ + [ + "cacti_session_close", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": [], + "session": { + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + } + } + }, + "plan": null + }, + "an unknown range": { + "return": { + "id": "4", + "name": "Top Talkers", + "device_id": "0", + "ex_addr": "", + "template_id": "-1", + "statistics": "10", + "printed": "0", + "sortfield": "bytes", + "cutofflines": "20", + "cutoffoctets": "0", + "includeif": "9", + "usenat": "", + "sourceip": "", + "sourceinterface": "", + "sourceport": "", + "sourceas": "", + "destip": "", + "destinterface": "", + "destport": "", + "destas": "", + "postnatsourceip": "", + "postnatsourceport": "", + "postnatdestip": "", + "postnatdestport": "", + "protocols": "", + "tcpflags": "", + "tosfields": "", + "data": [ + { + "src_addr": "10.0.0.1", + "dst_addr": "10.0.0.2", + "src_domain": "a.example", + "dst_domain": "", + "flows": "3", + "bytes": "3000", + "packets": "30" + }, + { + "src_addr": "10.0.0.3", + "dst_addr": "10.0.0.4", + "src_domain": "", + "dst_domain": "b.example", + "flows": "1", + "bytes": "64", + "packets": "1" + } + ], + "table": "
Source DNSDest DNSSource IPDest IPFlowsBytesPacketsBytes/Packet
a.exampleunresolved10.0.0.110.0.0.233,00030100
unresolvedb.example10.0.0.310.0.0.4164164
", + "title": "Top Talkers" + }, + "output": "", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT *\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT name\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT TABLE_NAME AS `table`\n\t\tFROM information_schema.TABLES\n\t\tWHERE TABLE_NAME LIKE \"plugin_flowview_raw_%\"", + "params": [] + }, + { + "fn": "db_fetch_assoc_prepared", + "sql": "SELECT INET6_NTOA(src_addr) AS src_addr, INET6_NTOA(dst_addr) AS dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM (SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024001 GROUP BY src_addr, dst_addr UNION ALL SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024002 GROUP BY src_addr, dst_addr UNION ALL SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024003 GROUP BY src_addr, dst_addr) AS rs GROUP BY INET6_NTOA(src_addr), INET6_NTOA(dst_addr) ORDER BY bytes DESC LIMIT 20", + "params": [] + } + ], + "log": [ + "PARALLEL STATS: Time: Threads:1 Shards:3" + ], + "messages": [], + "html": [ + [ + "cacti_session_close", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": [], + "session": { + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + } + } + }, + "plan": null + }, + "an unknown statistical report": { + "return": false, + "output": "", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT *\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT name\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + } + ], + "log": [ + "WARNING: The Flowview Query Top Talkers [4] contains an invalid Statistical or Printed Report." + ], + "messages": [ + [ + "bad_report", + "The Statistical Report 13 is not known. Please open a bug on GitHub", + 1 + ] + ], + "html": [ + [ + "cacti_session_close", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": [], + "session": { + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + } + } + }, + "plan": null + }, + "an unknown statistical report, planned": { + "return": false, + "output": "", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT *\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT name\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + } + ], + "log": [], + "messages": [], + "html": [], + "exec": [], + "js": [], + "notices": [], + "request": [], + "session": { + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + } + } + }, + "plan": null + }, + "every column, printed": { + "return": { + "id": "4", + "name": "Top Talkers", + "device_id": "0", + "ex_addr": "", + "template_id": "-1", + "statistics": "0", + "printed": "5", + "sortfield": "start_time", + "cutofflines": "20", + "cutoffoctets": "0", + "includeif": "0", + "usenat": "", + "sourceip": "", + "sourceinterface": "", + "sourceport": "", + "sourceas": "", + "destip": "", + "destinterface": "", + "destport": "", + "destas": "", + "postnatsourceip": "", + "postnatsourceport": "", + "postnatdestip": "", + "postnatdestport": "", + "protocols": "", + "tcpflags": "", + "tosfields": "", + "data": [ + { + "start_time": "2024-01-02 01:02:03.000000", + "end_time": "2024-01-02 01:02:09.000000", + "src_domain": "a.example.com", + "src_rdomain": "example.com", + "dst_domain": "", + "dst_rdomain": "example.org", + "domain": "d", + "rdomain": "r.example", + "src_addr": "10.0.0.1", + "dst_addr": "2001:db8::1", + "src_port": "50000", + "dst_port": "80", + "src_if": "1", + "dst_if": "2", + "src_as": "64512", + "dst_as": "64513", + "src_prefix": "24", + "dst_prefix": "16", + "protocol": "6", + "tos": "16", + "flags": "0x1b", + "flows": "12", + "bytes": "123456", + "packets": "100" + } + ], + "table": "
Start TimeEnd TimeSource DNSSource Root DNSDest DNSDest Root DNSDNSRoot DNSSource IPDest IPSource PortDest PortSource IFDest IFSource ASDest ASSource PrefixDest PrefixProtocolType of ServiceFlagsFlowsBytesPacketsBytes/Packet
2024-01-02 01:02:032024-01-02 01:02:09a.example.comexample.comunresolvedexample.org<b>d</b>r.example10.0.0.12001:db8::1Client/Private (50000)Unknown (80)1264512645132416TCP (6)Low Delay, Routine0x1b12123,4561001,235
", + "title": "Top Talkers" + }, + "output": "", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT *\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT name\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT TABLE_NAME AS `table`\n\t\tFROM information_schema.TABLES\n\t\tWHERE TABLE_NAME LIKE \"plugin_flowview_raw_%\"", + "params": [] + }, + { + "fn": "db_fetch_assoc_prepared", + "sql": "SELECT start_time, end_time, src_if, INET6_NTOA(src_addr) AS src_addr, src_port, dst_if, INET6_NTOA(dst_addr) AS dst_addr, dst_port, protocol, flags, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM (SELECT start_time, end_time, src_if, src_addr, src_port, dst_if, dst_addr, dst_port, protocol, flags, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024001 GROUP BY start_time, end_time, src_if, src_addr, src_port, dst_if, dst_addr, dst_port, protocol, flags UNION ALL SELECT start_time, end_time, src_if, src_addr, src_port, dst_if, dst_addr, dst_port, protocol, flags, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024002 GROUP BY start_time, end_time, src_if, src_addr, src_port, dst_if, dst_addr, dst_port, protocol, flags UNION ALL SELECT start_time, end_time, src_if, src_addr, src_port, dst_if, dst_addr, dst_port, protocol, flags, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024003 GROUP BY start_time, end_time, src_if, src_addr, src_port, dst_if, dst_addr, dst_port, protocol, flags) AS rs GROUP BY start_time, end_time, src_if, INET6_NTOA(src_addr), src_port, dst_if, INET6_NTOA(dst_addr), dst_port, protocol, flags ORDER BY start_time ASC LIMIT 20", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT service\n\t\t\tFROM plugin_flowview_ports\n\t\t\tWHERE port = ?\n\t\t\tAND proto = ?", + "params": [ + "80", + "tcp" + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + } + ], + "log": [ + "PARALLEL STATS: Time: Threads:1 Shards:3" + ], + "messages": [], + "html": [ + [ + "cacti_session_close", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": [], + "session": { + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + } + } + }, + "plan": null + }, + "every column, statistical": { + "return": { + "id": "4", + "name": "Top Talkers", + "device_id": "0", + "ex_addr": "", + "template_id": "-1", + "statistics": "10", + "printed": "0", + "sortfield": "bytes", + "cutofflines": "20", + "cutoffoctets": "0", + "includeif": "0", + "usenat": "", + "sourceip": "", + "sourceinterface": "", + "sourceport": "", + "sourceas": "", + "destip": "", + "destinterface": "", + "destport": "", + "destas": "", + "postnatsourceip": "", + "postnatsourceport": "", + "postnatdestip": "", + "postnatdestport": "", + "protocols": "", + "tcpflags": "", + "tosfields": "", + "data": [ + { + "start_time": "2024-01-02 01:02:03.000000", + "end_time": "2024-01-02 01:02:09.000000", + "src_domain": "a.example.com", + "src_rdomain": "example.com", + "dst_domain": "", + "dst_rdomain": "example.org", + "domain": "d", + "rdomain": "r.example", + "src_addr": "10.0.0.1", + "dst_addr": "2001:db8::1", + "src_port": "50000", + "dst_port": "80", + "src_if": "1", + "dst_if": "2", + "src_as": "64512", + "dst_as": "64513", + "src_prefix": "24", + "dst_prefix": "16", + "protocol": "6", + "tos": "16", + "flags": "0x1b", + "flows": "12", + "bytes": "123456", + "packets": "100" + }, + { + "src_port": "443", + "dst_port": "0", + "flows": "1", + "bytes": "10", + "packets": "0" + } + ], + "table": "
Start TimeEnd TimeSource DNSSource Root DNSDest DNSDest Root DNSDNSRoot DNSSource IPDest IPSource PortDest PortSource IFDest IFSource ASDest ASSource PrefixDest PrefixProtocolType of ServiceFlagsFlowsBytesPacketsBytes/Packet
2024-01-02 01:02:032024-01-02 01:02:09a.example.comexample.comunresolvedexample.org<b>d</b>r.example10.0.0.12001:db8::1Client/Private (50000)Unknown (80)1264512645132416TCP (6)Low Delay, Routine0x1b12123,4561001,235
Unknown (443)icmp (0)11000
", + "title": "Top Talkers" + }, + "output": "", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT *\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT name\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT TABLE_NAME AS `table`\n\t\tFROM information_schema.TABLES\n\t\tWHERE TABLE_NAME LIKE \"plugin_flowview_raw_%\"", + "params": [] + }, + { + "fn": "db_fetch_assoc_prepared", + "sql": "SELECT INET6_NTOA(src_addr) AS src_addr, INET6_NTOA(dst_addr) AS dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM (SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024001 GROUP BY src_addr, dst_addr UNION ALL SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024002 GROUP BY src_addr, dst_addr UNION ALL SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024003 GROUP BY src_addr, dst_addr) AS rs GROUP BY INET6_NTOA(src_addr), INET6_NTOA(dst_addr) ORDER BY bytes DESC LIMIT 20", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT service\n\t\t\tFROM plugin_flowview_ports\n\t\t\tWHERE port = ?\n\t\t\tAND proto = ?", + "params": [ + "80", + "tcp" + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT service\n\t\t\tFROM plugin_flowview_ports\n\t\t\tWHERE port = ?\n\t\t\tAND proto = ?", + "params": [ + "443", + "tcp" + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + } + ], + "log": [ + "PARALLEL STATS: Time: Threads:1 Shards:3" + ], + "messages": [], + "html": [ + [ + "cacti_session_close", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": [], + "session": { + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + } + } + }, + "plan": null + }, + "every filter column": { + "return": { + "id": "4", + "name": "Top Talkers", + "device_id": "0", + "ex_addr": "", + "template_id": "0", + "statistics": "10", + "printed": "0", + "sortfield": "bytes", + "cutofflines": "20", + "cutoffoctets": "0", + "includeif": "0", + "usenat": "", + "sourceip": "10.0.0.0/8, 192.168.1.1, 10.0.0.300/40, nope", + "sourceinterface": "1,2", + "sourceport": "80, 443", + "sourceas": "64512", + "destip": "2001:db8::/32", + "destinterface": "3", + "destport": "x", + "destas": "64513", + "postnatsourceip": "198.51.100.1", + "postnatsourceport": "8080", + "postnatdestip": "203.0.113.0/24", + "postnatdestport": "53", + "protocols": "6,17", + "tcpflags": "2", + "tosfields": "16", + "data": [ + { + "src_addr": "10.0.0.1", + "dst_addr": "10.0.0.2", + "src_domain": "a.example", + "dst_domain": "", + "flows": "3", + "bytes": "3000", + "packets": "30" + }, + { + "src_addr": "10.0.0.3", + "dst_addr": "10.0.0.4", + "src_domain": "", + "dst_domain": "b.example", + "flows": "1", + "bytes": "64", + "packets": "1" + } + ], + "table": "
Source DNSDest DNSSource IPDest IPFlowsBytesPacketsBytes/Packet
a.exampleunresolved10.0.0.110.0.0.233,00030100
unresolvedb.example10.0.0.310.0.0.4164164
", + "title": "Top Talkers" + }, + "output": "", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT *\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT name\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT TABLE_NAME AS `table`\n\t\tFROM information_schema.TABLES\n\t\tWHERE TABLE_NAME LIKE \"plugin_flowview_raw_%\"", + "params": [] + }, + { + "fn": "db_fetch_assoc_prepared", + "sql": "SELECT INET6_NTOA(src_addr) AS src_addr, INET6_NTOA(dst_addr) AS dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM (SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024001 WHERE `template_id` IN (?) AND ((LENGTH(`src_addr`) = ? AND `src_addr` BETWEEN INET6_ATON(?) AND INET6_ATON(?)) OR (`src_addr` = INET6_ATON(?))) AND `src_if` IN (?, ?) AND `src_port` IN (?, ?) AND `src_as` IN (?) AND ((LENGTH(`dst_addr`) = ? AND `dst_addr` BETWEEN INET6_ATON(?) AND INET6_ATON(?))) AND `dst_if` IN (?) AND 1 = 0 AND `dst_as` IN (?) AND ((NULL = INET6_ATON(?))) AND NULL IN (?) AND ((LENGTH(NULL) = ? AND NULL BETWEEN INET6_ATON(?) AND INET6_ATON(?))) AND NULL IN (?) AND `protocol` IN (?, ?) AND `flags` IN (?) AND `tos` IN (?) GROUP BY src_addr, dst_addr UNION ALL SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024002 WHERE `template_id` IN (?) AND ((LENGTH(`src_addr`) = ? AND `src_addr` BETWEEN INET6_ATON(?) AND INET6_ATON(?)) OR (`src_addr` = INET6_ATON(?))) AND `src_if` IN (?, ?) AND `src_port` IN (?, ?) AND `src_as` IN (?) AND ((LENGTH(`dst_addr`) = ? AND `dst_addr` BETWEEN INET6_ATON(?) AND INET6_ATON(?))) AND `dst_if` IN (?) AND 1 = 0 AND `dst_as` IN (?) AND ((NULL = INET6_ATON(?))) AND NULL IN (?) AND ((LENGTH(NULL) = ? AND NULL BETWEEN INET6_ATON(?) AND INET6_ATON(?))) AND NULL IN (?) AND `protocol` IN (?, ?) AND `flags` IN (?) AND `tos` IN (?) GROUP BY src_addr, dst_addr UNION ALL SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024003 WHERE `template_id` IN (?) AND ((LENGTH(`src_addr`) = ? AND `src_addr` BETWEEN INET6_ATON(?) AND INET6_ATON(?)) OR (`src_addr` = INET6_ATON(?))) AND `src_if` IN (?, ?) AND `src_port` IN (?, ?) AND `src_as` IN (?) AND ((LENGTH(`dst_addr`) = ? AND `dst_addr` BETWEEN INET6_ATON(?) AND INET6_ATON(?))) AND `dst_if` IN (?) AND 1 = 0 AND `dst_as` IN (?) AND ((NULL = INET6_ATON(?))) AND NULL IN (?) AND ((LENGTH(NULL) = ? AND NULL BETWEEN INET6_ATON(?) AND INET6_ATON(?))) AND NULL IN (?) AND `protocol` IN (?, ?) AND `flags` IN (?) AND `tos` IN (?) GROUP BY src_addr, dst_addr) AS rs GROUP BY INET6_NTOA(src_addr), INET6_NTOA(dst_addr) ORDER BY bytes DESC LIMIT 20", + "params": [ + "0", + 4, + "10.0.0.0", + "10.255.255.255", + "192.168.1.1", + "1", + "2", + "80", + "443", + "64512", + 16, + "2001:db8::", + "2001:db8:ffff:ffff:ffff:ffff:ffff:ffff", + "3", + "64513", + "198.51.100.1", + "8080", + 4, + "203.0.113.0", + "203.0.113.255", + "53", + "6", + "17", + "2", + "16", + "0", + 4, + "10.0.0.0", + "10.255.255.255", + "192.168.1.1", + "1", + "2", + "80", + "443", + "64512", + 16, + "2001:db8::", + "2001:db8:ffff:ffff:ffff:ffff:ffff:ffff", + "3", + "64513", + "198.51.100.1", + "8080", + 4, + "203.0.113.0", + "203.0.113.255", + "53", + "6", + "17", + "2", + "16", + "0", + 4, + "10.0.0.0", + "10.255.255.255", + "192.168.1.1", + "1", + "2", + "80", + "443", + "64512", + 16, + "2001:db8::", + "2001:db8:ffff:ffff:ffff:ffff:ffff:ffff", + "3", + "64513", + "198.51.100.1", + "8080", + 4, + "203.0.113.0", + "203.0.113.255", + "53", + "6", + "17", + "2", + "16" + ] + } + ], + "log": [ + "PARALLEL STATS: Time: Threads:1 Shards:3" + ], + "messages": [ + [ + "subnet_filter", + "Subnet Filter: 10.0.0.300/40 is not a value CIDR format", + 1 + ], + [ + "ip_filter", + "IP Filter: nope is not a valid IP address", + 1 + ] + ], + "html": [ + [ + "cacti_session_close", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": [], + "session": { + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + } + } + }, + "plan": null + }, + "excluded samples": { + "return": { + "id": "4", + "name": "Top Talkers", + "device_id": "0", + "ex_addr": "", + "template_id": "-1", + "statistics": "10", + "printed": "0", + "sortfield": "bytes", + "cutofflines": "20", + "cutoffoctets": "0", + "includeif": "0", + "usenat": "", + "sourceip": "", + "sourceinterface": "", + "sourceport": "", + "sourceas": "", + "destip": "", + "destinterface": "", + "destport": "", + "destas": "", + "postnatsourceip": "", + "postnatsourceport": "", + "postnatdestip": "", + "postnatdestport": "", + "protocols": "", + "tcpflags": "", + "tosfields": "", + "data": [ + { + "src_addr": "10.0.0.1", + "dst_addr": "10.0.0.2", + "src_domain": "a.example", + "dst_domain": "", + "flows": "3", + "bytes": "3000", + "packets": "30" + }, + { + "src_addr": "10.0.0.3", + "dst_addr": "10.0.0.4", + "src_domain": "", + "dst_domain": "b.example", + "flows": "1", + "bytes": "64", + "packets": "1" + } + ], + "table": "
Source DNSDest DNSSource IPDest IPFlowsBytesPacketsBytes/Packet
a.exampleunresolved10.0.0.110.0.0.233,00030100
unresolvedb.example10.0.0.310.0.0.4164164
", + "title": "Top Talkers" + }, + "output": "", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT *\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT name\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT TABLE_NAME AS `table`\n\t\tFROM information_schema.TABLES\n\t\tWHERE TABLE_NAME LIKE \"plugin_flowview_raw_%\"", + "params": [] + }, + { + "fn": "db_fetch_assoc_prepared", + "sql": "SELECT INET6_NTOA(src_addr) AS src_addr, INET6_NTOA(dst_addr) AS dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM (SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024001 GROUP BY src_addr, dst_addr UNION ALL SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024002 GROUP BY src_addr, dst_addr UNION ALL SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024003 GROUP BY src_addr, dst_addr) AS rs GROUP BY INET6_NTOA(src_addr), INET6_NTOA(dst_addr) ORDER BY bytes DESC LIMIT 2,20", + "params": [] + } + ], + "log": [ + "PARALLEL STATS: Time: Threads:1 Shards:3" + ], + "messages": [], + "html": [ + [ + "cacti_session_close", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": { + "exclude": "2" + }, + "session": { + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + } + } + }, + "plan": null + }, + "lines from the request": { + "return": { + "id": "4", + "name": "Top Talkers", + "device_id": "0", + "ex_addr": "", + "template_id": "-1", + "statistics": "10", + "printed": "0", + "sortfield": "bytes", + "cutofflines": "20", + "cutoffoctets": "0", + "includeif": "0", + "usenat": "", + "sourceip": "", + "sourceinterface": "", + "sourceport": "", + "sourceas": "", + "destip": "", + "destinterface": "", + "destport": "", + "destas": "", + "postnatsourceip": "", + "postnatsourceport": "", + "postnatdestip": "", + "postnatdestport": "", + "protocols": "", + "tcpflags": "", + "tosfields": "", + "data": [ + { + "src_addr": "10.0.0.1", + "dst_addr": "10.0.0.2", + "src_domain": "a.example", + "dst_domain": "", + "flows": "3", + "bytes": "3000", + "packets": "30" + }, + { + "src_addr": "10.0.0.3", + "dst_addr": "10.0.0.4", + "src_domain": "", + "dst_domain": "b.example", + "flows": "1", + "bytes": "64", + "packets": "1" + } + ], + "table": "
Source DNSDest DNSSource IPDest IPFlowsBytesPacketsBytes/Packet
a.exampleunresolved10.0.0.110.0.0.233,00030100
unresolvedb.example10.0.0.310.0.0.4164164
", + "title": "Top Talkers" + }, + "output": "", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT *\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT name\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT TABLE_NAME AS `table`\n\t\tFROM information_schema.TABLES\n\t\tWHERE TABLE_NAME LIKE \"plugin_flowview_raw_%\"", + "params": [] + }, + { + "fn": "db_fetch_assoc_prepared", + "sql": "SELECT INET6_NTOA(src_addr) AS src_addr, INET6_NTOA(dst_addr) AS dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM (SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024001 GROUP BY src_addr, dst_addr UNION ALL SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024002 GROUP BY src_addr, dst_addr UNION ALL SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024003 GROUP BY src_addr, dst_addr) AS rs GROUP BY INET6_NTOA(src_addr), INET6_NTOA(dst_addr) ORDER BY bytes DESC LIMIT 50", + "params": [] + } + ], + "log": [ + "PARALLEL STATS: Time: Threads:1 Shards:3" + ], + "messages": [], + "html": [ + [ + "cacti_session_close", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": { + "cutofflines": "50" + }, + "session": { + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + } + } + }, + "plan": null + }, + "no partitions": { + "return": false, + "output": "", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT *\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT name\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT TABLE_NAME AS `table`\n\t\tFROM information_schema.TABLES\n\t\tWHERE TABLE_NAME LIKE \"plugin_flowview_raw_%\"", + "params": [] + } + ], + "log": [], + "messages": [], + "html": [ + [ + "cacti_session_close", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": [], + "session": [], + "plan": null + }, + "no query id": { + "return": false, + "output": "", + "exception": null, + "db": [], + "log": [], + "messages": [], + "html": [], + "exec": [], + "js": [], + "notices": [], + "request": [], + "session": { + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + } + } + }, + "plan": null + }, + "octets from the Filter": { + "return": { + "id": "4", + "name": "Top Talkers", + "device_id": "0", + "ex_addr": "", + "template_id": "-1", + "statistics": "10", + "printed": "0", + "sortfield": "bytes", + "cutofflines": "20", + "cutoffoctets": "2048", + "includeif": "0", + "usenat": "", + "sourceip": "", + "sourceinterface": "", + "sourceport": "", + "sourceas": "", + "destip": "", + "destinterface": "", + "destport": "", + "destas": "", + "postnatsourceip": "", + "postnatsourceport": "", + "postnatdestip": "", + "postnatdestport": "", + "protocols": "", + "tcpflags": "", + "tosfields": "", + "data": [ + { + "src_addr": "10.0.0.1", + "dst_addr": "10.0.0.2", + "src_domain": "a.example", + "dst_domain": "", + "flows": "3", + "bytes": "3000", + "packets": "30" + }, + { + "src_addr": "10.0.0.3", + "dst_addr": "10.0.0.4", + "src_domain": "", + "dst_domain": "b.example", + "flows": "1", + "bytes": "64", + "packets": "1" + } + ], + "table": "
Source DNSDest DNSSource IPDest IPFlowsBytesPacketsBytes/Packet
a.exampleunresolved10.0.0.110.0.0.233,00030100
unresolvedb.example10.0.0.310.0.0.4164164
", + "title": "Top Talkers" + }, + "output": "", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT *\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT name\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT TABLE_NAME AS `table`\n\t\tFROM information_schema.TABLES\n\t\tWHERE TABLE_NAME LIKE \"plugin_flowview_raw_%\"", + "params": [] + }, + { + "fn": "db_fetch_assoc_prepared", + "sql": "SELECT INET6_NTOA(src_addr) AS src_addr, INET6_NTOA(dst_addr) AS dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM (SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024001 GROUP BY src_addr, dst_addr UNION ALL SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024002 GROUP BY src_addr, dst_addr UNION ALL SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024003 GROUP BY src_addr, dst_addr) AS rs GROUP BY INET6_NTOA(src_addr), INET6_NTOA(dst_addr) HAVING bytes < 2048 ORDER BY bytes DESC LIMIT 20", + "params": [] + } + ], + "log": [ + "PARALLEL STATS: Time: Threads:1 Shards:3" + ], + "messages": [], + "html": [ + [ + "cacti_session_close", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": [], + "session": { + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + } + } + }, + "plan": null + }, + "octets from the request": { + "return": { + "id": "4", + "name": "Top Talkers", + "device_id": "0", + "ex_addr": "", + "template_id": "-1", + "statistics": "10", + "printed": "0", + "sortfield": "bytes", + "cutofflines": "20", + "cutoffoctets": "0", + "includeif": "0", + "usenat": "", + "sourceip": "", + "sourceinterface": "", + "sourceport": "", + "sourceas": "", + "destip": "", + "destinterface": "", + "destport": "", + "destas": "", + "postnatsourceip": "", + "postnatsourceport": "", + "postnatdestip": "", + "postnatdestport": "", + "protocols": "", + "tcpflags": "", + "tosfields": "", + "data": [ + { + "src_addr": "10.0.0.1", + "dst_addr": "10.0.0.2", + "src_domain": "a.example", + "dst_domain": "", + "flows": "3", + "bytes": "3000", + "packets": "30" + }, + { + "src_addr": "10.0.0.3", + "dst_addr": "10.0.0.4", + "src_domain": "", + "dst_domain": "b.example", + "flows": "1", + "bytes": "64", + "packets": "1" + } + ], + "table": "
Source DNSDest DNSSource IPDest IPFlowsBytesPacketsBytes/Packet
a.exampleunresolved10.0.0.110.0.0.233,00030100
unresolvedb.example10.0.0.310.0.0.4164164
", + "title": "Top Talkers" + }, + "output": "", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT *\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT name\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT TABLE_NAME AS `table`\n\t\tFROM information_schema.TABLES\n\t\tWHERE TABLE_NAME LIKE \"plugin_flowview_raw_%\"", + "params": [] + }, + { + "fn": "db_fetch_assoc_prepared", + "sql": "SELECT INET6_NTOA(src_addr) AS src_addr, INET6_NTOA(dst_addr) AS dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM (SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024001 GROUP BY src_addr, dst_addr UNION ALL SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024002 GROUP BY src_addr, dst_addr UNION ALL SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024003 GROUP BY src_addr, dst_addr) AS rs GROUP BY INET6_NTOA(src_addr), INET6_NTOA(dst_addr) HAVING bytes > 1024 ORDER BY bytes DESC LIMIT 20", + "params": [] + } + ], + "log": [ + "PARALLEL STATS: Time: Threads:1 Shards:3" + ], + "messages": [], + "html": [ + [ + "cacti_session_close", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": { + "cutoffoctets": "1024" + }, + "session": { + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + } + } + }, + "plan": null + }, + "partition ranges read from the database": { + "return": { + "id": "4", + "name": "Top Talkers", + "device_id": "0", + "ex_addr": "", + "template_id": "-1", + "statistics": "10", + "printed": "0", + "sortfield": "bytes", + "cutofflines": "20", + "cutoffoctets": "0", + "includeif": "0", + "usenat": "", + "sourceip": "", + "sourceinterface": "", + "sourceport": "", + "sourceas": "", + "destip": "", + "destinterface": "", + "destport": "", + "destas": "", + "postnatsourceip": "", + "postnatsourceport": "", + "postnatdestip": "", + "postnatdestport": "", + "protocols": "", + "tcpflags": "", + "tosfields": "", + "data": [ + { + "src_addr": "10.0.0.1", + "dst_addr": "10.0.0.2", + "src_domain": "a.example", + "dst_domain": "", + "flows": "3", + "bytes": "3000", + "packets": "30" + }, + { + "src_addr": "10.0.0.3", + "dst_addr": "10.0.0.4", + "src_domain": "", + "dst_domain": "b.example", + "flows": "1", + "bytes": "64", + "packets": "1" + } + ], + "table": "
Source DNSDest DNSSource IPDest IPFlowsBytesPacketsBytes/Packet
a.exampleunresolved10.0.0.110.0.0.233,00030100
unresolvedb.example10.0.0.310.0.0.4164164
", + "title": "Top Talkers" + }, + "output": "", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT *\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT name\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT TABLE_NAME AS `table`\n\t\tFROM information_schema.TABLES\n\t\tWHERE TABLE_NAME LIKE \"plugin_flowview_raw_%\"", + "params": [] + }, + { + "fn": "db_fetch_row", + "sql": "SELECT MIN(start_time) AS min_date, MAX(end_time) AS max_date, '' AS table_partition FROM plugin_flowview_raw_2024001", + "params": [] + }, + { + "fn": "db_fetch_row", + "sql": "SELECT MIN(start_time) AS min_date, MAX(end_time) AS max_date, '' AS table_partition FROM plugin_flowview_raw_2024002", + "params": [] + }, + { + "fn": "db_fetch_row", + "sql": "SELECT MIN(start_time) AS min_date, MAX(end_time) AS max_date, '' AS table_partition FROM plugin_flowview_raw_2024003", + "params": [] + }, + { + "fn": "db_fetch_assoc_prepared", + "sql": "SELECT INET6_NTOA(src_addr) AS src_addr, INET6_NTOA(dst_addr) AS dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM (SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024001 GROUP BY src_addr, dst_addr UNION ALL SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024002 GROUP BY src_addr, dst_addr UNION ALL SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024003 GROUP BY src_addr, dst_addr) AS rs GROUP BY INET6_NTOA(src_addr), INET6_NTOA(dst_addr) ORDER BY bytes DESC LIMIT 20", + "params": [] + } + ], + "log": [ + "PARALLEL STATS: Time: Threads:1 Shards:3" + ], + "messages": [], + "html": [ + [ + "cacti_session_close", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": [], + "session": { + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-03 00:00:00", + "max_date": "2024-01-03 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-03 00:00:00", + "max_date": "2024-01-03 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-03 00:00:00", + "max_date": "2024-01-03 23:00:00", + "table_partition": "" + } + } + }, + "plan": null + }, + "printed report 1": { + "return": { + "id": "4", + "name": "Top Talkers", + "device_id": "0", + "ex_addr": "", + "template_id": "-1", + "statistics": "0", + "printed": "1", + "sortfield": "flows", + "cutofflines": "20", + "cutoffoctets": "0", + "includeif": "0", + "usenat": "", + "sourceip": "", + "sourceinterface": "", + "sourceport": "", + "sourceas": "", + "destip": "", + "destinterface": "", + "destport": "", + "destas": "", + "postnatsourceip": "", + "postnatsourceport": "", + "postnatdestip": "", + "postnatdestport": "", + "protocols": "", + "tcpflags": "", + "tosfields": "", + "data": [ + { + "src_addr": "10.0.0.1", + "dst_addr": "10.0.0.2", + "src_domain": "a.example", + "dst_domain": "", + "flows": "3", + "bytes": "3000", + "packets": "30" + }, + { + "src_addr": "10.0.0.3", + "dst_addr": "10.0.0.4", + "src_domain": "", + "dst_domain": "b.example", + "flows": "1", + "bytes": "64", + "packets": "1" + } + ], + "table": "
Source DNSDest DNSSource IPDest IPFlowsBytesPacketsBytes/Packet
a.exampleunresolved10.0.0.110.0.0.233,00030100
unresolvedb.example10.0.0.310.0.0.4164164
", + "title": "Top Talkers" + }, + "output": "", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT *\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT name\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT TABLE_NAME AS `table`\n\t\tFROM information_schema.TABLES\n\t\tWHERE TABLE_NAME LIKE \"plugin_flowview_raw_%\"", + "params": [] + }, + { + "fn": "db_fetch_assoc_prepared", + "sql": "SELECT src_if, INET6_NTOA(src_addr) AS src_addr, dst_if, INET6_NTOA(dst_addr) AS dst_addr, protocol, src_port, dst_port, tos, flags, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM (SELECT src_if, src_addr, dst_if, dst_addr, protocol, src_port, dst_port, tos, flags, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024001 GROUP BY src_if, src_addr, dst_if, dst_addr, protocol, src_port, dst_port, tos, flags UNION ALL SELECT src_if, src_addr, dst_if, dst_addr, protocol, src_port, dst_port, tos, flags, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024002 GROUP BY src_if, src_addr, dst_if, dst_addr, protocol, src_port, dst_port, tos, flags UNION ALL SELECT src_if, src_addr, dst_if, dst_addr, protocol, src_port, dst_port, tos, flags, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024003 GROUP BY src_if, src_addr, dst_if, dst_addr, protocol, src_port, dst_port, tos, flags) AS rs GROUP BY src_if, INET6_NTOA(src_addr), dst_if, INET6_NTOA(dst_addr), protocol, src_port, dst_port, tos, flags ORDER BY flows DESC LIMIT 20", + "params": [] + } + ], + "log": [ + "PARALLEL STATS: Time: Threads:1 Shards:3" + ], + "messages": [], + "html": [ + [ + "cacti_session_close", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": [], + "session": { + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + } + } + }, + "plan": null + }, + "printed report 4": { + "return": { + "id": "4", + "name": "Top Talkers", + "device_id": "0", + "ex_addr": "", + "template_id": "-1", + "statistics": "0", + "printed": "4", + "sortfield": "flows", + "cutofflines": "20", + "cutoffoctets": "0", + "includeif": "0", + "usenat": "", + "sourceip": "", + "sourceinterface": "", + "sourceport": "", + "sourceas": "", + "destip": "", + "destinterface": "", + "destport": "", + "destas": "", + "postnatsourceip": "", + "postnatsourceport": "", + "postnatdestip": "", + "postnatdestport": "", + "protocols": "", + "tcpflags": "", + "tosfields": "", + "data": [ + { + "src_addr": "10.0.0.1", + "dst_addr": "10.0.0.2", + "src_domain": "a.example", + "dst_domain": "", + "flows": "3", + "bytes": "3000", + "packets": "30" + }, + { + "src_addr": "10.0.0.3", + "dst_addr": "10.0.0.4", + "src_domain": "", + "dst_domain": "b.example", + "flows": "1", + "bytes": "64", + "packets": "1" + } + ], + "table": "
Source DNSDest DNSSource IPDest IPFlowsBytesPacketsBytes/Packet
a.exampleunresolved10.0.0.110.0.0.233,00030100
unresolvedb.example10.0.0.310.0.0.4164164
", + "title": "Top Talkers" + }, + "output": "", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT *\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT name\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT TABLE_NAME AS `table`\n\t\tFROM information_schema.TABLES\n\t\tWHERE TABLE_NAME LIKE \"plugin_flowview_raw_%\"", + "params": [] + }, + { + "fn": "db_fetch_assoc_prepared", + "sql": "SELECT INET6_NTOA(src_addr) AS src_addr, INET6_NTOA(dst_addr) AS dst_addr, protocol, src_as, dst_as, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM (SELECT src_addr, dst_addr, protocol, src_as, dst_as, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024001 GROUP BY src_addr, dst_addr, protocol, src_as, dst_as UNION ALL SELECT src_addr, dst_addr, protocol, src_as, dst_as, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024002 GROUP BY src_addr, dst_addr, protocol, src_as, dst_as UNION ALL SELECT src_addr, dst_addr, protocol, src_as, dst_as, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024003 GROUP BY src_addr, dst_addr, protocol, src_as, dst_as) AS rs GROUP BY INET6_NTOA(src_addr), INET6_NTOA(dst_addr), protocol, src_as, dst_as ORDER BY flows DESC LIMIT 20", + "params": [] + } + ], + "log": [ + "PARALLEL STATS: Time: Threads:1 Shards:3" + ], + "messages": [], + "html": [ + [ + "cacti_session_close", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": [], + "session": { + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + } + } + }, + "plan": null + }, + "printed report 5": { + "return": { + "id": "4", + "name": "Top Talkers", + "device_id": "0", + "ex_addr": "", + "template_id": "-1", + "statistics": "0", + "printed": "5", + "sortfield": "flows", + "cutofflines": "20", + "cutoffoctets": "0", + "includeif": "0", + "usenat": "", + "sourceip": "", + "sourceinterface": "", + "sourceport": "", + "sourceas": "", + "destip": "", + "destinterface": "", + "destport": "", + "destas": "", + "postnatsourceip": "", + "postnatsourceport": "", + "postnatdestip": "", + "postnatdestport": "", + "protocols": "", + "tcpflags": "", + "tosfields": "", + "data": [ + { + "src_addr": "10.0.0.1", + "dst_addr": "10.0.0.2", + "src_domain": "a.example", + "dst_domain": "", + "flows": "3", + "bytes": "3000", + "packets": "30" + }, + { + "src_addr": "10.0.0.3", + "dst_addr": "10.0.0.4", + "src_domain": "", + "dst_domain": "b.example", + "flows": "1", + "bytes": "64", + "packets": "1" + } + ], + "table": "
Source DNSDest DNSSource IPDest IPFlowsBytesPacketsBytes/Packet
a.exampleunresolved10.0.0.110.0.0.233,00030100
unresolvedb.example10.0.0.310.0.0.4164164
", + "title": "Top Talkers" + }, + "output": "", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT *\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT name\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT TABLE_NAME AS `table`\n\t\tFROM information_schema.TABLES\n\t\tWHERE TABLE_NAME LIKE \"plugin_flowview_raw_%\"", + "params": [] + }, + { + "fn": "db_fetch_assoc_prepared", + "sql": "SELECT start_time, end_time, src_if, INET6_NTOA(src_addr) AS src_addr, src_port, dst_if, INET6_NTOA(dst_addr) AS dst_addr, dst_port, protocol, flags, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM (SELECT start_time, end_time, src_if, src_addr, src_port, dst_if, dst_addr, dst_port, protocol, flags, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024001 GROUP BY start_time, end_time, src_if, src_addr, src_port, dst_if, dst_addr, dst_port, protocol, flags UNION ALL SELECT start_time, end_time, src_if, src_addr, src_port, dst_if, dst_addr, dst_port, protocol, flags, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024002 GROUP BY start_time, end_time, src_if, src_addr, src_port, dst_if, dst_addr, dst_port, protocol, flags UNION ALL SELECT start_time, end_time, src_if, src_addr, src_port, dst_if, dst_addr, dst_port, protocol, flags, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024003 GROUP BY start_time, end_time, src_if, src_addr, src_port, dst_if, dst_addr, dst_port, protocol, flags) AS rs GROUP BY start_time, end_time, src_if, INET6_NTOA(src_addr), src_port, dst_if, INET6_NTOA(dst_addr), dst_port, protocol, flags ORDER BY flows DESC LIMIT 20", + "params": [] + } + ], + "log": [ + "PARALLEL STATS: Time: Threads:1 Shards:3" + ], + "messages": [], + "html": [ + [ + "cacti_session_close", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": [], + "session": { + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + } + } + }, + "plan": null + }, + "printed report 6": { + "return": { + "id": "4", + "name": "Top Talkers", + "device_id": "0", + "ex_addr": "", + "template_id": "-1", + "statistics": "0", + "printed": "6", + "sortfield": "flows", + "cutofflines": "20", + "cutoffoctets": "0", + "includeif": "0", + "usenat": "", + "sourceip": "", + "sourceinterface": "", + "sourceport": "", + "sourceas": "", + "destip": "", + "destinterface": "", + "destport": "", + "destas": "", + "postnatsourceip": "", + "postnatsourceport": "", + "postnatdestip": "", + "postnatdestport": "", + "protocols": "", + "tcpflags": "", + "tosfields": "", + "data": [ + { + "src_addr": "10.0.0.1", + "dst_addr": "10.0.0.2", + "src_domain": "a.example", + "dst_domain": "", + "flows": "3", + "bytes": "3000", + "packets": "30" + }, + { + "src_addr": "10.0.0.3", + "dst_addr": "10.0.0.4", + "src_domain": "", + "dst_domain": "b.example", + "flows": "1", + "bytes": "64", + "packets": "1" + } + ], + "table": "
Source DNSDest DNSSource IPDest IPFlowsBytesPacketsBytes/Packet
a.exampleunresolved10.0.0.110.0.0.233,00030100
unresolvedb.example10.0.0.310.0.0.4164164
", + "title": "Top Talkers" + }, + "output": "", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT *\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT name\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT TABLE_NAME AS `table`\n\t\tFROM information_schema.TABLES\n\t\tWHERE TABLE_NAME LIKE \"plugin_flowview_raw_%\"", + "params": [] + }, + { + "fn": "db_fetch_assoc_prepared", + "sql": "SELECT INET6_NTOA(src_addr) AS src_addr, INET6_NTOA(dst_addr) AS dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM (SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024001 GROUP BY src_addr, dst_addr UNION ALL SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024002 GROUP BY src_addr, dst_addr UNION ALL SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024003 GROUP BY src_addr, dst_addr) AS rs GROUP BY INET6_NTOA(src_addr), INET6_NTOA(dst_addr) ORDER BY flows DESC LIMIT 20", + "params": [] + } + ], + "log": [ + "PARALLEL STATS: Time: Threads:1 Shards:3" + ], + "messages": [], + "html": [ + [ + "cacti_session_close", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": [], + "session": { + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + } + } + }, + "plan": null + }, + "printed report 7": { + "return": { + "id": "4", + "name": "Top Talkers", + "device_id": "0", + "ex_addr": "", + "template_id": "-1", + "statistics": "0", + "printed": "7", + "sortfield": "flows", + "cutofflines": "20", + "cutoffoctets": "0", + "includeif": "0", + "usenat": "", + "sourceip": "", + "sourceinterface": "", + "sourceport": "", + "sourceas": "", + "destip": "", + "destinterface": "", + "destport": "", + "destas": "", + "postnatsourceip": "", + "postnatsourceport": "", + "postnatdestip": "", + "postnatdestport": "", + "protocols": "", + "tcpflags": "", + "tosfields": "", + "data": [ + { + "src_addr": "10.0.0.1", + "dst_addr": "10.0.0.2", + "src_domain": "a.example", + "dst_domain": "", + "flows": "3", + "bytes": "3000", + "packets": "30" + }, + { + "src_addr": "10.0.0.3", + "dst_addr": "10.0.0.4", + "src_domain": "", + "dst_domain": "b.example", + "flows": "1", + "bytes": "64", + "packets": "1" + } + ], + "table": "
Source DNSDest DNSSource IPDest IPFlowsBytesPacketsBytes/Packet
a.exampleunresolved10.0.0.110.0.0.233,00030100
unresolvedb.example10.0.0.310.0.0.4164164
", + "title": "Top Talkers" + }, + "output": "", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT *\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT name\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT TABLE_NAME AS `table`\n\t\tFROM information_schema.TABLES\n\t\tWHERE TABLE_NAME LIKE \"plugin_flowview_raw_%\"", + "params": [] + }, + { + "fn": "db_fetch_assoc_prepared", + "sql": "SELECT INET6_NTOA(src_addr) AS src_addr, src_port, protocol, INET6_NTOA(dst_addr) AS dst_addr, dst_port, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM (SELECT src_addr, src_port, protocol, dst_addr, dst_port, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024001 GROUP BY src_addr, src_port, protocol, dst_addr, dst_port UNION ALL SELECT src_addr, src_port, protocol, dst_addr, dst_port, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024002 GROUP BY src_addr, src_port, protocol, dst_addr, dst_port UNION ALL SELECT src_addr, src_port, protocol, dst_addr, dst_port, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024003 GROUP BY src_addr, src_port, protocol, dst_addr, dst_port) AS rs GROUP BY INET6_NTOA(src_addr), src_port, protocol, INET6_NTOA(dst_addr), dst_port ORDER BY flows DESC LIMIT 20", + "params": [] + } + ], + "log": [ + "PARALLEL STATS: Time: Threads:1 Shards:3" + ], + "messages": [], + "html": [ + [ + "cacti_session_close", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": [], + "session": { + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + } + } + }, + "plan": null + }, + "statistical report 10": { + "return": { + "id": "4", + "name": "Top Talkers", + "device_id": "0", + "ex_addr": "", + "template_id": "-1", + "statistics": "10", + "printed": "0", + "sortfield": "bytes", + "cutofflines": "20", + "cutoffoctets": "0", + "includeif": "0", + "usenat": "", + "sourceip": "", + "sourceinterface": "", + "sourceport": "", + "sourceas": "", + "destip": "", + "destinterface": "", + "destport": "", + "destas": "", + "postnatsourceip": "", + "postnatsourceport": "", + "postnatdestip": "", + "postnatdestport": "", + "protocols": "", + "tcpflags": "", + "tosfields": "", + "data": [ + { + "src_addr": "10.0.0.1", + "dst_addr": "10.0.0.2", + "src_domain": "a.example", + "dst_domain": "", + "flows": "3", + "bytes": "3000", + "packets": "30" + }, + { + "src_addr": "10.0.0.3", + "dst_addr": "10.0.0.4", + "src_domain": "", + "dst_domain": "b.example", + "flows": "1", + "bytes": "64", + "packets": "1" + } + ], + "table": "
Source DNSDest DNSSource IPDest IPFlowsBytesPacketsBytes/Packet
a.exampleunresolved10.0.0.110.0.0.233,00030100
unresolvedb.example10.0.0.310.0.0.4164164
", + "title": "Top Talkers" + }, + "output": "", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT *\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT name\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT TABLE_NAME AS `table`\n\t\tFROM information_schema.TABLES\n\t\tWHERE TABLE_NAME LIKE \"plugin_flowview_raw_%\"", + "params": [] + }, + { + "fn": "db_fetch_assoc_prepared", + "sql": "SELECT INET6_NTOA(src_addr) AS src_addr, INET6_NTOA(dst_addr) AS dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM (SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024001 GROUP BY src_addr, dst_addr UNION ALL SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024002 GROUP BY src_addr, dst_addr UNION ALL SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024003 GROUP BY src_addr, dst_addr) AS rs GROUP BY INET6_NTOA(src_addr), INET6_NTOA(dst_addr) ORDER BY bytes DESC LIMIT 20", + "params": [] + } + ], + "log": [ + "PARALLEL STATS: Time: Threads:1 Shards:3" + ], + "messages": [], + "html": [ + [ + "cacti_session_close", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": [], + "session": { + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + } + } + }, + "plan": null + }, + "statistical report 11": { + "return": { + "id": "4", + "name": "Top Talkers", + "device_id": "0", + "ex_addr": "", + "template_id": "-1", + "statistics": "11", + "printed": "0", + "sortfield": "bytes", + "cutofflines": "20", + "cutoffoctets": "0", + "includeif": "0", + "usenat": "", + "sourceip": "", + "sourceinterface": "", + "sourceport": "", + "sourceas": "", + "destip": "", + "destinterface": "", + "destport": "", + "destas": "", + "postnatsourceip": "", + "postnatsourceport": "", + "postnatdestip": "", + "postnatdestport": "", + "protocols": "", + "tcpflags": "", + "tosfields": "", + "data": [ + { + "src_addr": "10.0.0.1", + "dst_addr": "10.0.0.2", + "src_domain": "a.example", + "dst_domain": "", + "flows": "3", + "bytes": "3000", + "packets": "30" + }, + { + "src_addr": "10.0.0.3", + "dst_addr": "10.0.0.4", + "src_domain": "", + "dst_domain": "b.example", + "flows": "1", + "bytes": "64", + "packets": "1" + } + ], + "table": "
Source DNSDest DNSSource/Destination IPDest IPFlowsBytesPacketsBytes/Packet
a.exampleunresolved10.0.0.110.0.0.233,00030100
unresolvedb.example10.0.0.310.0.0.4164164
", + "title": "Top Talkers" + }, + "output": "", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT *\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT name\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT TABLE_NAME AS `table`\n\t\tFROM information_schema.TABLES\n\t\tWHERE TABLE_NAME LIKE \"plugin_flowview_raw_%\"", + "params": [] + }, + { + "fn": "db_fetch_assoc_prepared", + "sql": "SELECT INET6_NTOA(src_addr) AS src_addr, src_domain, src_rdomain, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM (SELECT src_addr, src_domain AS src_domain, src_rdomain AS src_rdomain, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024001 GROUP BY src_addr UNION ALL SELECT dst_addr AS src_addr, dst_domain AS src_domain, dst_rdomain AS src_rdomain, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024001 GROUP BY dst_addr UNION ALL SELECT src_addr, src_domain AS src_domain, src_rdomain AS src_rdomain, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024002 GROUP BY src_addr UNION ALL SELECT dst_addr AS src_addr, dst_domain AS src_domain, dst_rdomain AS src_rdomain, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024002 GROUP BY dst_addr UNION ALL SELECT src_addr, src_domain AS src_domain, src_rdomain AS src_rdomain, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024003 GROUP BY src_addr UNION ALL SELECT dst_addr AS src_addr, dst_domain AS src_domain, dst_rdomain AS src_rdomain, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024003 GROUP BY dst_addr) AS rs GROUP BY INET6_NTOA(src_addr) ORDER BY bytes DESC LIMIT 20", + "params": [] + } + ], + "log": [ + "PARALLEL STATS: Time: Threads:1 Shards:3" + ], + "messages": [], + "html": [ + [ + "cacti_session_close", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": [], + "session": { + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + } + } + }, + "plan": null + }, + "statistical report 12": { + "return": { + "id": "4", + "name": "Top Talkers", + "device_id": "0", + "ex_addr": "", + "template_id": "-1", + "statistics": "12", + "printed": "0", + "sortfield": "bytes", + "cutofflines": "20", + "cutoffoctets": "0", + "includeif": "0", + "usenat": "", + "sourceip": "", + "sourceinterface": "", + "sourceport": "", + "sourceas": "", + "destip": "", + "destinterface": "", + "destport": "", + "destas": "", + "postnatsourceip": "", + "postnatsourceport": "", + "postnatdestip": "", + "postnatdestport": "", + "protocols": "", + "tcpflags": "", + "tosfields": "", + "data": [ + { + "src_addr": "10.0.0.1", + "dst_addr": "10.0.0.2", + "src_domain": "a.example", + "dst_domain": "", + "flows": "3", + "bytes": "3000", + "packets": "30" + }, + { + "src_addr": "10.0.0.3", + "dst_addr": "10.0.0.4", + "src_domain": "", + "dst_domain": "b.example", + "flows": "1", + "bytes": "64", + "packets": "1" + } + ], + "table": "
Source DNSDest DNSSource IPDest IPFlowsBytesPacketsBytes/Packet
a.exampleunresolved10.0.0.110.0.0.233,00030100
unresolvedb.example10.0.0.310.0.0.4164164
", + "title": "Top Talkers" + }, + "output": "", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT *\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT name\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT TABLE_NAME AS `table`\n\t\tFROM information_schema.TABLES\n\t\tWHERE TABLE_NAME LIKE \"plugin_flowview_raw_%\"", + "params": [] + }, + { + "fn": "db_fetch_assoc_prepared", + "sql": "SELECT protocol, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM (SELECT protocol, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024001 GROUP BY protocol UNION ALL SELECT protocol, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024002 GROUP BY protocol UNION ALL SELECT protocol, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024003 GROUP BY protocol) AS rs GROUP BY protocol ORDER BY bytes DESC LIMIT 20", + "params": [] + } + ], + "log": [ + "PARALLEL STATS: Time: Threads:1 Shards:3" + ], + "messages": [], + "html": [ + [ + "cacti_session_close", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": [], + "session": { + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + } + } + }, + "plan": null + }, + "statistical report 17": { + "return": { + "id": "4", + "name": "Top Talkers", + "device_id": "0", + "ex_addr": "", + "template_id": "-1", + "statistics": "17", + "printed": "0", + "sortfield": "bytes", + "cutofflines": "20", + "cutoffoctets": "0", + "includeif": "0", + "usenat": "", + "sourceip": "", + "sourceinterface": "", + "sourceport": "", + "sourceas": "", + "destip": "", + "destinterface": "", + "destport": "", + "destas": "", + "postnatsourceip": "", + "postnatsourceport": "", + "postnatdestip": "", + "postnatdestport": "", + "protocols": "", + "tcpflags": "", + "tosfields": "", + "data": [ + { + "src_addr": "10.0.0.1", + "dst_addr": "10.0.0.2", + "src_domain": "a.example", + "dst_domain": "", + "flows": "3", + "bytes": "3000", + "packets": "30" + }, + { + "src_addr": "10.0.0.3", + "dst_addr": "10.0.0.4", + "src_domain": "", + "dst_domain": "b.example", + "flows": "1", + "bytes": "64", + "packets": "1" + } + ], + "table": "
Source DNSDest DNSSource IPDest IPFlowsBytesPacketsBytes/Packet
a.exampleunresolved10.0.0.110.0.0.233,00030100
unresolvedb.example10.0.0.310.0.0.4164164
", + "title": "Top Talkers" + }, + "output": "", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT *\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT name\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT TABLE_NAME AS `table`\n\t\tFROM information_schema.TABLES\n\t\tWHERE TABLE_NAME LIKE \"plugin_flowview_raw_%\"", + "params": [] + }, + { + "fn": "db_fetch_assoc_prepared", + "sql": "SELECT src_if, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM (SELECT src_if, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024001 GROUP BY src_if UNION ALL SELECT src_if, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024002 GROUP BY src_if UNION ALL SELECT src_if, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024003 GROUP BY src_if) AS rs GROUP BY src_if ORDER BY bytes DESC LIMIT 20", + "params": [] + } + ], + "log": [ + "PARALLEL STATS: Time: Threads:1 Shards:3" + ], + "messages": [], + "html": [ + [ + "cacti_session_close", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": [], + "session": { + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + } + } + }, + "plan": null + }, + "statistical report 18": { + "return": { + "id": "4", + "name": "Top Talkers", + "device_id": "0", + "ex_addr": "", + "template_id": "-1", + "statistics": "18", + "printed": "0", + "sortfield": "bytes", + "cutofflines": "20", + "cutoffoctets": "0", + "includeif": "0", + "usenat": "", + "sourceip": "", + "sourceinterface": "", + "sourceport": "", + "sourceas": "", + "destip": "", + "destinterface": "", + "destport": "", + "destas": "", + "postnatsourceip": "", + "postnatsourceport": "", + "postnatdestip": "", + "postnatdestport": "", + "protocols": "", + "tcpflags": "", + "tosfields": "", + "data": [ + { + "src_addr": "10.0.0.1", + "dst_addr": "10.0.0.2", + "src_domain": "a.example", + "dst_domain": "", + "flows": "3", + "bytes": "3000", + "packets": "30" + }, + { + "src_addr": "10.0.0.3", + "dst_addr": "10.0.0.4", + "src_domain": "", + "dst_domain": "b.example", + "flows": "1", + "bytes": "64", + "packets": "1" + } + ], + "table": "
Source DNSDest DNSSource IPDest IPFlowsBytesPacketsBytes/Packet
a.exampleunresolved10.0.0.110.0.0.233,00030100
unresolvedb.example10.0.0.310.0.0.4164164
", + "title": "Top Talkers" + }, + "output": "", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT *\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT name\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT TABLE_NAME AS `table`\n\t\tFROM information_schema.TABLES\n\t\tWHERE TABLE_NAME LIKE \"plugin_flowview_raw_%\"", + "params": [] + }, + { + "fn": "db_fetch_assoc_prepared", + "sql": "SELECT dst_if, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM (SELECT dst_if, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024001 GROUP BY dst_if UNION ALL SELECT dst_if, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024002 GROUP BY dst_if UNION ALL SELECT dst_if, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024003 GROUP BY dst_if) AS rs GROUP BY dst_if ORDER BY bytes DESC LIMIT 20", + "params": [] + } + ], + "log": [ + "PARALLEL STATS: Time: Threads:1 Shards:3" + ], + "messages": [], + "html": [ + [ + "cacti_session_close", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": [], + "session": { + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + } + } + }, + "plan": null + }, + "statistical report 19": { + "return": { + "id": "4", + "name": "Top Talkers", + "device_id": "0", + "ex_addr": "", + "template_id": "-1", + "statistics": "19", + "printed": "0", + "sortfield": "bytes", + "cutofflines": "20", + "cutoffoctets": "0", + "includeif": "0", + "usenat": "", + "sourceip": "", + "sourceinterface": "", + "sourceport": "", + "sourceas": "", + "destip": "", + "destinterface": "", + "destport": "", + "destas": "", + "postnatsourceip": "", + "postnatsourceport": "", + "postnatdestip": "", + "postnatdestport": "", + "protocols": "", + "tcpflags": "", + "tosfields": "", + "data": [ + { + "src_addr": "10.0.0.1", + "dst_addr": "10.0.0.2", + "src_domain": "a.example", + "dst_domain": "", + "flows": "3", + "bytes": "3000", + "packets": "30" + }, + { + "src_addr": "10.0.0.3", + "dst_addr": "10.0.0.4", + "src_domain": "", + "dst_domain": "b.example", + "flows": "1", + "bytes": "64", + "packets": "1" + } + ], + "table": "
Source DNSDest DNSSource IPDest IPFlowsBytesPacketsBytes/Packet
a.exampleunresolved10.0.0.110.0.0.233,00030100
unresolvedb.example10.0.0.310.0.0.4164164
", + "title": "Top Talkers" + }, + "output": "", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT *\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT name\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT TABLE_NAME AS `table`\n\t\tFROM information_schema.TABLES\n\t\tWHERE TABLE_NAME LIKE \"plugin_flowview_raw_%\"", + "params": [] + }, + { + "fn": "db_fetch_assoc_prepared", + "sql": "SELECT src_as, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM (SELECT src_as, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024001 GROUP BY src_as UNION ALL SELECT src_as, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024002 GROUP BY src_as UNION ALL SELECT src_as, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024003 GROUP BY src_as) AS rs GROUP BY src_as ORDER BY bytes DESC LIMIT 20", + "params": [] + } + ], + "log": [ + "PARALLEL STATS: Time: Threads:1 Shards:3" + ], + "messages": [], + "html": [ + [ + "cacti_session_close", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": [], + "session": { + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + } + } + }, + "plan": null + }, + "statistical report 2": { + "return": { + "id": "4", + "name": "Top Talkers", + "device_id": "0", + "ex_addr": "", + "template_id": "-1", + "statistics": "2", + "printed": "0", + "sortfield": "bytes", + "cutofflines": "20", + "cutoffoctets": "0", + "includeif": "0", + "usenat": "", + "sourceip": "", + "sourceinterface": "", + "sourceport": "", + "sourceas": "", + "destip": "", + "destinterface": "", + "destport": "", + "destas": "", + "postnatsourceip": "", + "postnatsourceport": "", + "postnatdestip": "", + "postnatdestport": "", + "protocols": "", + "tcpflags": "", + "tosfields": "", + "data": [ + { + "src_addr": "10.0.0.1", + "dst_addr": "10.0.0.2", + "src_domain": "a.example", + "dst_domain": "", + "flows": "3", + "bytes": "3000", + "packets": "30" + }, + { + "src_addr": "10.0.0.3", + "dst_addr": "10.0.0.4", + "src_domain": "", + "dst_domain": "b.example", + "flows": "1", + "bytes": "64", + "packets": "1" + } + ], + "table": "
Source DNSDest DNSSource IPDest IPFlowsBytesPacketsBytes/Packet
a.exampleunresolved10.0.0.110.0.0.233,00030100
unresolvedb.example10.0.0.310.0.0.4164164
", + "title": "Top Talkers" + }, + "output": "", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT *\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT name\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT TABLE_NAME AS `table`\n\t\tFROM information_schema.TABLES\n\t\tWHERE TABLE_NAME LIKE \"plugin_flowview_raw_%\"", + "params": [] + }, + { + "fn": "db_fetch_assoc_prepared", + "sql": "SELECT src_rdomain, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM (SELECT src_rdomain, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024001 GROUP BY src_rdomain UNION ALL SELECT src_rdomain, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024002 GROUP BY src_rdomain UNION ALL SELECT src_rdomain, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024003 GROUP BY src_rdomain) AS rs GROUP BY src_rdomain ORDER BY bytes DESC LIMIT 20", + "params": [] + } + ], + "log": [ + "PARALLEL STATS: Time: Threads:1 Shards:3" + ], + "messages": [], + "html": [ + [ + "cacti_session_close", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": [], + "session": { + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + } + } + }, + "plan": null + }, + "statistical report 20": { + "return": { + "id": "4", + "name": "Top Talkers", + "device_id": "0", + "ex_addr": "", + "template_id": "-1", + "statistics": "20", + "printed": "0", + "sortfield": "bytes", + "cutofflines": "20", + "cutoffoctets": "0", + "includeif": "0", + "usenat": "", + "sourceip": "", + "sourceinterface": "", + "sourceport": "", + "sourceas": "", + "destip": "", + "destinterface": "", + "destport": "", + "destas": "", + "postnatsourceip": "", + "postnatsourceport": "", + "postnatdestip": "", + "postnatdestport": "", + "protocols": "", + "tcpflags": "", + "tosfields": "", + "data": [ + { + "src_addr": "10.0.0.1", + "dst_addr": "10.0.0.2", + "src_domain": "a.example", + "dst_domain": "", + "flows": "3", + "bytes": "3000", + "packets": "30" + }, + { + "src_addr": "10.0.0.3", + "dst_addr": "10.0.0.4", + "src_domain": "", + "dst_domain": "b.example", + "flows": "1", + "bytes": "64", + "packets": "1" + } + ], + "table": "
Source DNSDest DNSSource IPDest IPFlowsBytesPacketsBytes/Packet
a.exampleunresolved10.0.0.110.0.0.233,00030100
unresolvedb.example10.0.0.310.0.0.4164164
", + "title": "Top Talkers" + }, + "output": "", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT *\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT name\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT TABLE_NAME AS `table`\n\t\tFROM information_schema.TABLES\n\t\tWHERE TABLE_NAME LIKE \"plugin_flowview_raw_%\"", + "params": [] + }, + { + "fn": "db_fetch_assoc_prepared", + "sql": "SELECT dst_as, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM (SELECT dst_as, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024001 GROUP BY dst_as UNION ALL SELECT dst_as, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024002 GROUP BY dst_as UNION ALL SELECT dst_as, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024003 GROUP BY dst_as) AS rs GROUP BY dst_as ORDER BY bytes DESC LIMIT 20", + "params": [] + } + ], + "log": [ + "PARALLEL STATS: Time: Threads:1 Shards:3" + ], + "messages": [], + "html": [ + [ + "cacti_session_close", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": [], + "session": { + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + } + } + }, + "plan": null + }, + "statistical report 21": { + "return": { + "id": "4", + "name": "Top Talkers", + "device_id": "0", + "ex_addr": "", + "template_id": "-1", + "statistics": "21", + "printed": "0", + "sortfield": "bytes", + "cutofflines": "20", + "cutoffoctets": "0", + "includeif": "0", + "usenat": "", + "sourceip": "", + "sourceinterface": "", + "sourceport": "", + "sourceas": "", + "destip": "", + "destinterface": "", + "destport": "", + "destas": "", + "postnatsourceip": "", + "postnatsourceport": "", + "postnatdestip": "", + "postnatdestport": "", + "protocols": "", + "tcpflags": "", + "tosfields": "", + "data": [ + { + "src_addr": "10.0.0.1", + "dst_addr": "10.0.0.2", + "src_domain": "a.example", + "dst_domain": "", + "flows": "3", + "bytes": "3000", + "packets": "30" + }, + { + "src_addr": "10.0.0.3", + "dst_addr": "10.0.0.4", + "src_domain": "", + "dst_domain": "b.example", + "flows": "1", + "bytes": "64", + "packets": "1" + } + ], + "table": "
Source DNSDest DNSSource IPDest IPFlowsBytesPacketsBytes/Packet
a.exampleunresolved10.0.0.110.0.0.233,00030100
unresolvedb.example10.0.0.310.0.0.4164164
", + "title": "Top Talkers" + }, + "output": "", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT *\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT name\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT TABLE_NAME AS `table`\n\t\tFROM information_schema.TABLES\n\t\tWHERE TABLE_NAME LIKE \"plugin_flowview_raw_%\"", + "params": [] + }, + { + "fn": "db_fetch_assoc_prepared", + "sql": "SELECT src_as, dst_as, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM (SELECT src_as, dst_as, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024001 GROUP BY src_as, dst_as UNION ALL SELECT src_as, dst_as, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024002 GROUP BY src_as, dst_as UNION ALL SELECT src_as, dst_as, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024003 GROUP BY src_as, dst_as) AS rs GROUP BY src_as, dst_as ORDER BY bytes DESC LIMIT 20", + "params": [] + } + ], + "log": [ + "PARALLEL STATS: Time: Threads:1 Shards:3" + ], + "messages": [], + "html": [ + [ + "cacti_session_close", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": [], + "session": { + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + } + } + }, + "plan": null + }, + "statistical report 22": { + "return": { + "id": "4", + "name": "Top Talkers", + "device_id": "0", + "ex_addr": "", + "template_id": "-1", + "statistics": "22", + "printed": "0", + "sortfield": "bytes", + "cutofflines": "20", + "cutoffoctets": "0", + "includeif": "0", + "usenat": "", + "sourceip": "", + "sourceinterface": "", + "sourceport": "", + "sourceas": "", + "destip": "", + "destinterface": "", + "destport": "", + "destas": "", + "postnatsourceip": "", + "postnatsourceport": "", + "postnatdestip": "", + "postnatdestport": "", + "protocols": "", + "tcpflags": "", + "tosfields": "", + "data": [ + { + "src_addr": "10.0.0.1", + "dst_addr": "10.0.0.2", + "src_domain": "a.example", + "dst_domain": "", + "flows": "3", + "bytes": "3000", + "packets": "30" + }, + { + "src_addr": "10.0.0.3", + "dst_addr": "10.0.0.4", + "src_domain": "", + "dst_domain": "b.example", + "flows": "1", + "bytes": "64", + "packets": "1" + } + ], + "table": "
Source DNSDest DNSSource IPDest IPFlowsBytesPacketsBytes/Packet
a.exampleunresolved10.0.0.110.0.0.233,00030100
unresolvedb.example10.0.0.310.0.0.4164164
", + "title": "Top Talkers" + }, + "output": "", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT *\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT name\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT TABLE_NAME AS `table`\n\t\tFROM information_schema.TABLES\n\t\tWHERE TABLE_NAME LIKE \"plugin_flowview_raw_%\"", + "params": [] + }, + { + "fn": "db_fetch_assoc_prepared", + "sql": "SELECT tos, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM (SELECT tos, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024001 GROUP BY tos UNION ALL SELECT tos, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024002 GROUP BY tos UNION ALL SELECT tos, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024003 GROUP BY tos) AS rs GROUP BY tos ORDER BY bytes DESC LIMIT 20", + "params": [] + } + ], + "log": [ + "PARALLEL STATS: Time: Threads:1 Shards:3" + ], + "messages": [], + "html": [ + [ + "cacti_session_close", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": [], + "session": { + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + } + } + }, + "plan": null + }, + "statistical report 23": { + "return": { + "id": "4", + "name": "Top Talkers", + "device_id": "0", + "ex_addr": "", + "template_id": "-1", + "statistics": "23", + "printed": "0", + "sortfield": "bytes", + "cutofflines": "20", + "cutoffoctets": "0", + "includeif": "0", + "usenat": "", + "sourceip": "", + "sourceinterface": "", + "sourceport": "", + "sourceas": "", + "destip": "", + "destinterface": "", + "destport": "", + "destas": "", + "postnatsourceip": "", + "postnatsourceport": "", + "postnatdestip": "", + "postnatdestport": "", + "protocols": "", + "tcpflags": "", + "tosfields": "", + "data": [ + { + "src_addr": "10.0.0.1", + "dst_addr": "10.0.0.2", + "src_domain": "a.example", + "dst_domain": "", + "flows": "3", + "bytes": "3000", + "packets": "30" + }, + { + "src_addr": "10.0.0.3", + "dst_addr": "10.0.0.4", + "src_domain": "", + "dst_domain": "b.example", + "flows": "1", + "bytes": "64", + "packets": "1" + } + ], + "table": "
Source DNSDest DNSSource IPDest IPFlowsBytesPacketsBytes/Packet
a.exampleunresolved10.0.0.110.0.0.233,00030100
unresolvedb.example10.0.0.310.0.0.4164164
", + "title": "Top Talkers" + }, + "output": "", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT *\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT name\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT TABLE_NAME AS `table`\n\t\tFROM information_schema.TABLES\n\t\tWHERE TABLE_NAME LIKE \"plugin_flowview_raw_%\"", + "params": [] + }, + { + "fn": "db_fetch_assoc_prepared", + "sql": "SELECT src_if, dst_if, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM (SELECT src_if, dst_if, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024001 GROUP BY src_if, dst_if UNION ALL SELECT src_if, dst_if, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024002 GROUP BY src_if, dst_if UNION ALL SELECT src_if, dst_if, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024003 GROUP BY src_if, dst_if) AS rs GROUP BY src_if, dst_if ORDER BY bytes DESC LIMIT 20", + "params": [] + } + ], + "log": [ + "PARALLEL STATS: Time: Threads:1 Shards:3" + ], + "messages": [], + "html": [ + [ + "cacti_session_close", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": [], + "session": { + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + } + } + }, + "plan": null + }, + "statistical report 24": { + "return": { + "id": "4", + "name": "Top Talkers", + "device_id": "0", + "ex_addr": "", + "template_id": "-1", + "statistics": "24", + "printed": "0", + "sortfield": "bytes", + "cutofflines": "20", + "cutoffoctets": "0", + "includeif": "0", + "usenat": "", + "sourceip": "", + "sourceinterface": "", + "sourceport": "", + "sourceas": "", + "destip": "", + "destinterface": "", + "destport": "", + "destas": "", + "postnatsourceip": "", + "postnatsourceport": "", + "postnatdestip": "", + "postnatdestport": "", + "protocols": "", + "tcpflags": "", + "tosfields": "", + "data": [ + { + "src_addr": "10.0.0.1", + "dst_addr": "10.0.0.2", + "src_domain": "a.example", + "dst_domain": "", + "flows": "3", + "bytes": "3000", + "packets": "30" + }, + { + "src_addr": "10.0.0.3", + "dst_addr": "10.0.0.4", + "src_domain": "", + "dst_domain": "b.example", + "flows": "1", + "bytes": "64", + "packets": "1" + } + ], + "table": "
Source DNSDest DNSSource IPDest IPFlowsBytesPacketsBytes/Packet
a.exampleunresolved10.0.0.110.0.0.233,00030100
unresolvedb.example10.0.0.310.0.0.4164164
", + "title": "Top Talkers" + }, + "output": "", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT *\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT name\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT TABLE_NAME AS `table`\n\t\tFROM information_schema.TABLES\n\t\tWHERE TABLE_NAME LIKE \"plugin_flowview_raw_%\"", + "params": [] + }, + { + "fn": "db_fetch_assoc_prepared", + "sql": "SELECT src_prefix, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM (SELECT src_prefix, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024001 GROUP BY src_prefix UNION ALL SELECT src_prefix, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024002 GROUP BY src_prefix UNION ALL SELECT src_prefix, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024003 GROUP BY src_prefix) AS rs GROUP BY src_prefix ORDER BY bytes DESC LIMIT 20", + "params": [] + } + ], + "log": [ + "PARALLEL STATS: Time: Threads:1 Shards:3" + ], + "messages": [], + "html": [ + [ + "cacti_session_close", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": [], + "session": { + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + } + } + }, + "plan": null + }, + "statistical report 25": { + "return": { + "id": "4", + "name": "Top Talkers", + "device_id": "0", + "ex_addr": "", + "template_id": "-1", + "statistics": "25", + "printed": "0", + "sortfield": "bytes", + "cutofflines": "20", + "cutoffoctets": "0", + "includeif": "0", + "usenat": "", + "sourceip": "", + "sourceinterface": "", + "sourceport": "", + "sourceas": "", + "destip": "", + "destinterface": "", + "destport": "", + "destas": "", + "postnatsourceip": "", + "postnatsourceport": "", + "postnatdestip": "", + "postnatdestport": "", + "protocols": "", + "tcpflags": "", + "tosfields": "", + "data": [ + { + "src_addr": "10.0.0.1", + "dst_addr": "10.0.0.2", + "src_domain": "a.example", + "dst_domain": "", + "flows": "3", + "bytes": "3000", + "packets": "30" + }, + { + "src_addr": "10.0.0.3", + "dst_addr": "10.0.0.4", + "src_domain": "", + "dst_domain": "b.example", + "flows": "1", + "bytes": "64", + "packets": "1" + } + ], + "table": "
Source DNSDest DNSSource IPDest IPFlowsBytesPacketsBytes/Packet
a.exampleunresolved10.0.0.110.0.0.233,00030100
unresolvedb.example10.0.0.310.0.0.4164164
", + "title": "Top Talkers" + }, + "output": "", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT *\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT name\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT TABLE_NAME AS `table`\n\t\tFROM information_schema.TABLES\n\t\tWHERE TABLE_NAME LIKE \"plugin_flowview_raw_%\"", + "params": [] + }, + { + "fn": "db_fetch_assoc_prepared", + "sql": "SELECT dst_prefix, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM (SELECT dst_prefix, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024001 GROUP BY dst_prefix UNION ALL SELECT dst_prefix, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024002 GROUP BY dst_prefix UNION ALL SELECT dst_prefix, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024003 GROUP BY dst_prefix) AS rs GROUP BY dst_prefix ORDER BY bytes DESC LIMIT 20", + "params": [] + } + ], + "log": [ + "PARALLEL STATS: Time: Threads:1 Shards:3" + ], + "messages": [], + "html": [ + [ + "cacti_session_close", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": [], + "session": { + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + } + } + }, + "plan": null + }, + "statistical report 26": { + "return": { + "id": "4", + "name": "Top Talkers", + "device_id": "0", + "ex_addr": "", + "template_id": "-1", + "statistics": "26", + "printed": "0", + "sortfield": "bytes", + "cutofflines": "20", + "cutoffoctets": "0", + "includeif": "0", + "usenat": "", + "sourceip": "", + "sourceinterface": "", + "sourceport": "", + "sourceas": "", + "destip": "", + "destinterface": "", + "destport": "", + "destas": "", + "postnatsourceip": "", + "postnatsourceport": "", + "postnatdestip": "", + "postnatdestport": "", + "protocols": "", + "tcpflags": "", + "tosfields": "", + "data": [ + { + "src_addr": "10.0.0.1", + "dst_addr": "10.0.0.2", + "src_domain": "a.example", + "dst_domain": "", + "flows": "3", + "bytes": "3000", + "packets": "30" + }, + { + "src_addr": "10.0.0.3", + "dst_addr": "10.0.0.4", + "src_domain": "", + "dst_domain": "b.example", + "flows": "1", + "bytes": "64", + "packets": "1" + } + ], + "table": "
Source DNSDest DNSSource IPDest IPFlowsBytesPacketsBytes/Packet
a.exampleunresolved10.0.0.110.0.0.233,00030100
unresolvedb.example10.0.0.310.0.0.4164164
", + "title": "Top Talkers" + }, + "output": "", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT *\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT name\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT TABLE_NAME AS `table`\n\t\tFROM information_schema.TABLES\n\t\tWHERE TABLE_NAME LIKE \"plugin_flowview_raw_%\"", + "params": [] + }, + { + "fn": "db_fetch_assoc_prepared", + "sql": "SELECT src_prefix, dst_prefix, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM (SELECT src_prefix, dst_prefix, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024001 GROUP BY src_prefix, dst_prefix UNION ALL SELECT src_prefix, dst_prefix, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024002 GROUP BY src_prefix, dst_prefix UNION ALL SELECT src_prefix, dst_prefix, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024003 GROUP BY src_prefix, dst_prefix) AS rs GROUP BY src_prefix, dst_prefix ORDER BY bytes DESC LIMIT 20", + "params": [] + } + ], + "log": [ + "PARALLEL STATS: Time: Threads:1 Shards:3" + ], + "messages": [], + "html": [ + [ + "cacti_session_close", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": [], + "session": { + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + } + } + }, + "plan": null + }, + "statistical report 3": { + "return": { + "id": "4", + "name": "Top Talkers", + "device_id": "0", + "ex_addr": "", + "template_id": "-1", + "statistics": "3", + "printed": "0", + "sortfield": "bytes", + "cutofflines": "20", + "cutoffoctets": "0", + "includeif": "0", + "usenat": "", + "sourceip": "", + "sourceinterface": "", + "sourceport": "", + "sourceas": "", + "destip": "", + "destinterface": "", + "destport": "", + "destas": "", + "postnatsourceip": "", + "postnatsourceport": "", + "postnatdestip": "", + "postnatdestport": "", + "protocols": "", + "tcpflags": "", + "tosfields": "", + "data": [ + { + "src_addr": "10.0.0.1", + "dst_addr": "10.0.0.2", + "src_domain": "a.example", + "dst_domain": "", + "flows": "3", + "bytes": "3000", + "packets": "30" + }, + { + "src_addr": "10.0.0.3", + "dst_addr": "10.0.0.4", + "src_domain": "", + "dst_domain": "b.example", + "flows": "1", + "bytes": "64", + "packets": "1" + } + ], + "table": "
Source DNSDest DNSSource IPDest IPFlowsBytesPacketsBytes/Packet
a.exampleunresolved10.0.0.110.0.0.233,00030100
unresolvedb.example10.0.0.310.0.0.4164164
", + "title": "Top Talkers" + }, + "output": "", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT *\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT name\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT TABLE_NAME AS `table`\n\t\tFROM information_schema.TABLES\n\t\tWHERE TABLE_NAME LIKE \"plugin_flowview_raw_%\"", + "params": [] + }, + { + "fn": "db_fetch_assoc_prepared", + "sql": "SELECT dst_rdomain, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM (SELECT dst_rdomain, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024001 GROUP BY dst_rdomain UNION ALL SELECT dst_rdomain, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024002 GROUP BY dst_rdomain UNION ALL SELECT dst_rdomain, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024003 GROUP BY dst_rdomain) AS rs GROUP BY dst_rdomain ORDER BY bytes DESC LIMIT 20", + "params": [] + } + ], + "log": [ + "PARALLEL STATS: Time: Threads:1 Shards:3" + ], + "messages": [], + "html": [ + [ + "cacti_session_close", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": [], + "session": { + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + } + } + }, + "plan": null + }, + "statistical report 4": { + "return": { + "id": "4", + "name": "Top Talkers", + "device_id": "0", + "ex_addr": "", + "template_id": "-1", + "statistics": "4", + "printed": "0", + "sortfield": "bytes", + "cutofflines": "20", + "cutoffoctets": "0", + "includeif": "0", + "usenat": "", + "sourceip": "", + "sourceinterface": "", + "sourceport": "", + "sourceas": "", + "destip": "", + "destinterface": "", + "destport": "", + "destas": "", + "postnatsourceip": "", + "postnatsourceport": "", + "postnatdestip": "", + "postnatdestport": "", + "protocols": "", + "tcpflags": "", + "tosfields": "", + "data": [ + { + "src_addr": "10.0.0.1", + "dst_addr": "10.0.0.2", + "src_domain": "a.example", + "dst_domain": "", + "flows": "3", + "bytes": "3000", + "packets": "30" + }, + { + "src_addr": "10.0.0.3", + "dst_addr": "10.0.0.4", + "src_domain": "", + "dst_domain": "b.example", + "flows": "1", + "bytes": "64", + "packets": "1" + } + ], + "table": "
Source DNSDest DNSSource IPDest IPFlowsBytesPacketsBytes/Packet
a.exampleunresolved10.0.0.110.0.0.233,00030100
unresolvedb.example10.0.0.310.0.0.4164164
", + "title": "Top Talkers" + }, + "output": "", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT *\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT name\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT TABLE_NAME AS `table`\n\t\tFROM information_schema.TABLES\n\t\tWHERE TABLE_NAME LIKE \"plugin_flowview_raw_%\"", + "params": [] + }, + { + "fn": "db_fetch_assoc_prepared", + "sql": "SELECT src_rdomain, dst_rdomain, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM (SELECT src_rdomain, dst_rdomain, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024001 GROUP BY src_rdomain, dst_rdomain UNION ALL SELECT src_rdomain, dst_rdomain, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024002 GROUP BY src_rdomain, dst_rdomain UNION ALL SELECT src_rdomain, dst_rdomain, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024003 GROUP BY src_rdomain, dst_rdomain) AS rs GROUP BY src_rdomain, dst_rdomain ORDER BY bytes DESC LIMIT 20", + "params": [] + } + ], + "log": [ + "PARALLEL STATS: Time: Threads:1 Shards:3" + ], + "messages": [], + "html": [ + [ + "cacti_session_close", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": [], + "session": { + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + } + } + }, + "plan": null + }, + "statistical report 5": { + "return": { + "id": "4", + "name": "Top Talkers", + "device_id": "0", + "ex_addr": "", + "template_id": "-1", + "statistics": "5", + "printed": "0", + "sortfield": "bytes", + "cutofflines": "20", + "cutoffoctets": "0", + "includeif": "0", + "usenat": "", + "sourceip": "", + "sourceinterface": "", + "sourceport": "", + "sourceas": "", + "destip": "", + "destinterface": "", + "destport": "", + "destas": "", + "postnatsourceip": "", + "postnatsourceport": "", + "postnatdestip": "", + "postnatdestport": "", + "protocols": "", + "tcpflags": "", + "tosfields": "", + "data": [ + { + "src_addr": "10.0.0.1", + "dst_addr": "10.0.0.2", + "src_domain": "a.example", + "dst_domain": "", + "flows": "3", + "bytes": "3000", + "packets": "30" + }, + { + "src_addr": "10.0.0.3", + "dst_addr": "10.0.0.4", + "src_domain": "", + "dst_domain": "b.example", + "flows": "1", + "bytes": "64", + "packets": "1" + } + ], + "table": "
Source DNSDest DNSSource IPDest IPFlowsBytesPacketsBytes/Packet
a.exampleunresolved10.0.0.110.0.0.233,00030100
unresolvedb.example10.0.0.310.0.0.4164164
", + "title": "Top Talkers" + }, + "output": "", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT *\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT name\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT TABLE_NAME AS `table`\n\t\tFROM information_schema.TABLES\n\t\tWHERE TABLE_NAME LIKE \"plugin_flowview_raw_%\"", + "params": [] + }, + { + "fn": "db_fetch_assoc_prepared", + "sql": "SELECT dst_port, protocol, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM (SELECT dst_port, protocol, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024001 GROUP BY dst_port, protocol UNION ALL SELECT dst_port, protocol, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024002 GROUP BY dst_port, protocol UNION ALL SELECT dst_port, protocol, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024003 GROUP BY dst_port, protocol) AS rs GROUP BY dst_port, protocol ORDER BY bytes DESC LIMIT 20", + "params": [] + } + ], + "log": [ + "PARALLEL STATS: Time: Threads:1 Shards:3" + ], + "messages": [], + "html": [ + [ + "cacti_session_close", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": [], + "session": { + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + } + } + }, + "plan": null + }, + "statistical report 6": { + "return": { + "id": "4", + "name": "Top Talkers", + "device_id": "0", + "ex_addr": "", + "template_id": "-1", + "statistics": "6", + "printed": "0", + "sortfield": "bytes", + "cutofflines": "20", + "cutoffoctets": "0", + "includeif": "0", + "usenat": "", + "sourceip": "", + "sourceinterface": "", + "sourceport": "", + "sourceas": "", + "destip": "", + "destinterface": "", + "destport": "", + "destas": "", + "postnatsourceip": "", + "postnatsourceport": "", + "postnatdestip": "", + "postnatdestport": "", + "protocols": "", + "tcpflags": "", + "tosfields": "", + "data": [ + { + "src_addr": "10.0.0.1", + "dst_addr": "10.0.0.2", + "src_domain": "a.example", + "dst_domain": "", + "flows": "3", + "bytes": "3000", + "packets": "30" + }, + { + "src_addr": "10.0.0.3", + "dst_addr": "10.0.0.4", + "src_domain": "", + "dst_domain": "b.example", + "flows": "1", + "bytes": "64", + "packets": "1" + } + ], + "table": "
Source DNSDest DNSSource IPDest IPFlowsBytesPacketsBytes/Packet
a.exampleunresolved10.0.0.110.0.0.233,00030100
unresolvedb.example10.0.0.310.0.0.4164164
", + "title": "Top Talkers" + }, + "output": "", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT *\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT name\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT TABLE_NAME AS `table`\n\t\tFROM information_schema.TABLES\n\t\tWHERE TABLE_NAME LIKE \"plugin_flowview_raw_%\"", + "params": [] + }, + { + "fn": "db_fetch_assoc_prepared", + "sql": "SELECT src_port, protocol, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM (SELECT src_port, protocol, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024001 GROUP BY src_port, protocol UNION ALL SELECT src_port, protocol, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024002 GROUP BY src_port, protocol UNION ALL SELECT src_port, protocol, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024003 GROUP BY src_port, protocol) AS rs GROUP BY src_port, protocol ORDER BY bytes DESC LIMIT 20", + "params": [] + } + ], + "log": [ + "PARALLEL STATS: Time: Threads:1 Shards:3" + ], + "messages": [], + "html": [ + [ + "cacti_session_close", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": [], + "session": { + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + } + } + }, + "plan": null + }, + "statistical report 7": { + "return": { + "id": "4", + "name": "Top Talkers", + "device_id": "0", + "ex_addr": "", + "template_id": "-1", + "statistics": "7", + "printed": "0", + "sortfield": "bytes", + "cutofflines": "20", + "cutoffoctets": "0", + "includeif": "0", + "usenat": "", + "sourceip": "", + "sourceinterface": "", + "sourceport": "", + "sourceas": "", + "destip": "", + "destinterface": "", + "destport": "", + "destas": "", + "postnatsourceip": "", + "postnatsourceport": "", + "postnatdestip": "", + "postnatdestport": "", + "protocols": "", + "tcpflags": "", + "tosfields": "", + "data": [ + { + "src_addr": "10.0.0.1", + "dst_addr": "10.0.0.2", + "src_domain": "a.example", + "dst_domain": "", + "flows": "3", + "bytes": "3000", + "packets": "30" + }, + { + "src_addr": "10.0.0.3", + "dst_addr": "10.0.0.4", + "src_domain": "", + "dst_domain": "b.example", + "flows": "1", + "bytes": "64", + "packets": "1" + } + ], + "table": "
Source DNSDest DNSSource IPDest IPFlowsBytesPacketsBytes/Packet
a.exampleunresolved10.0.0.110.0.0.233,00030100
unresolvedb.example10.0.0.310.0.0.4164164
", + "title": "Top Talkers" + }, + "output": "", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT *\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT name\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT TABLE_NAME AS `table`\n\t\tFROM information_schema.TABLES\n\t\tWHERE TABLE_NAME LIKE \"plugin_flowview_raw_%\"", + "params": [] + }, + { + "fn": "db_fetch_assoc_prepared", + "sql": "SELECT src_port, dst_port, protocol, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM (SELECT src_port, dst_port, protocol, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024001 GROUP BY src_port, dst_port, protocol UNION ALL SELECT src_port, dst_port, protocol, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024002 GROUP BY src_port, dst_port, protocol UNION ALL SELECT src_port, dst_port, protocol, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024003 GROUP BY src_port, dst_port, protocol) AS rs GROUP BY src_port, dst_port, protocol ORDER BY bytes DESC LIMIT 20", + "params": [] + } + ], + "log": [ + "PARALLEL STATS: Time: Threads:1 Shards:3" + ], + "messages": [], + "html": [ + [ + "cacti_session_close", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": [], + "session": { + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + } + } + }, + "plan": null + }, + "statistical report 8": { + "return": { + "id": "4", + "name": "Top Talkers", + "device_id": "0", + "ex_addr": "", + "template_id": "-1", + "statistics": "8", + "printed": "0", + "sortfield": "bytes", + "cutofflines": "20", + "cutoffoctets": "0", + "includeif": "0", + "usenat": "", + "sourceip": "", + "sourceinterface": "", + "sourceport": "", + "sourceas": "", + "destip": "", + "destinterface": "", + "destport": "", + "destas": "", + "postnatsourceip": "", + "postnatsourceport": "", + "postnatdestip": "", + "postnatdestport": "", + "protocols": "", + "tcpflags": "", + "tosfields": "", + "data": [ + { + "src_addr": "10.0.0.1", + "dst_addr": "10.0.0.2", + "src_domain": "a.example", + "dst_domain": "", + "flows": "3", + "bytes": "3000", + "packets": "30" + }, + { + "src_addr": "10.0.0.3", + "dst_addr": "10.0.0.4", + "src_domain": "", + "dst_domain": "b.example", + "flows": "1", + "bytes": "64", + "packets": "1" + } + ], + "table": "
Source DNSDest DNSSource IPDest IPFlowsBytesPacketsBytes/Packet
a.exampleunresolved10.0.0.110.0.0.233,00030100
unresolvedb.example10.0.0.310.0.0.4164164
", + "title": "Top Talkers" + }, + "output": "", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT *\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT name\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT TABLE_NAME AS `table`\n\t\tFROM information_schema.TABLES\n\t\tWHERE TABLE_NAME LIKE \"plugin_flowview_raw_%\"", + "params": [] + }, + { + "fn": "db_fetch_assoc_prepared", + "sql": "SELECT INET6_NTOA(dst_addr) AS dst_addr, dst_domain, dst_rdomain, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM (SELECT dst_addr, dst_domain, dst_rdomain, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024001 GROUP BY dst_addr UNION ALL SELECT dst_addr, dst_domain, dst_rdomain, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024002 GROUP BY dst_addr UNION ALL SELECT dst_addr, dst_domain, dst_rdomain, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024003 GROUP BY dst_addr) AS rs GROUP BY INET6_NTOA(dst_addr) ORDER BY bytes DESC LIMIT 20", + "params": [] + } + ], + "log": [ + "PARALLEL STATS: Time: Threads:1 Shards:3" + ], + "messages": [], + "html": [ + [ + "cacti_session_close", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": [], + "session": { + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + } + } + }, + "plan": null + }, + "statistical report 9": { + "return": { + "id": "4", + "name": "Top Talkers", + "device_id": "0", + "ex_addr": "", + "template_id": "-1", + "statistics": "9", + "printed": "0", + "sortfield": "bytes", + "cutofflines": "20", + "cutoffoctets": "0", + "includeif": "0", + "usenat": "", + "sourceip": "", + "sourceinterface": "", + "sourceport": "", + "sourceas": "", + "destip": "", + "destinterface": "", + "destport": "", + "destas": "", + "postnatsourceip": "", + "postnatsourceport": "", + "postnatdestip": "", + "postnatdestport": "", + "protocols": "", + "tcpflags": "", + "tosfields": "", + "data": [ + { + "src_addr": "10.0.0.1", + "dst_addr": "10.0.0.2", + "src_domain": "a.example", + "dst_domain": "", + "flows": "3", + "bytes": "3000", + "packets": "30" + }, + { + "src_addr": "10.0.0.3", + "dst_addr": "10.0.0.4", + "src_domain": "", + "dst_domain": "b.example", + "flows": "1", + "bytes": "64", + "packets": "1" + } + ], + "table": "
Source DNSDest DNSSource IPDest IPFlowsBytesPacketsBytes/Packet
a.exampleunresolved10.0.0.110.0.0.233,00030100
unresolvedb.example10.0.0.310.0.0.4164164
", + "title": "Top Talkers" + }, + "output": "", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT *\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT name\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT TABLE_NAME AS `table`\n\t\tFROM information_schema.TABLES\n\t\tWHERE TABLE_NAME LIKE \"plugin_flowview_raw_%\"", + "params": [] + }, + { + "fn": "db_fetch_assoc_prepared", + "sql": "SELECT INET6_NTOA(src_addr) AS src_addr, src_domain, src_rdomain, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM (SELECT src_addr, src_domain, src_rdomain, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024001 GROUP BY src_addr UNION ALL SELECT src_addr, src_domain, src_rdomain, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024002 GROUP BY src_addr UNION ALL SELECT src_addr, src_domain, src_rdomain, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets FROM plugin_flowview_raw_2024003 GROUP BY src_addr) AS rs GROUP BY INET6_NTOA(src_addr) ORDER BY bytes DESC LIMIT 20", + "params": [] + } + ], + "log": [ + "PARALLEL STATS: Time: Threads:1 Shards:3" + ], + "messages": [], + "html": [ + [ + "cacti_session_close", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": [], + "session": { + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + } + } + }, + "plan": null + }, + "the range from the Filter": { + "return": { + "id": "4", + "name": "Top Talkers", + "device_id": "0", + "ex_addr": "", + "template_id": "-1", + "statistics": "10", + "printed": "0", + "sortfield": "bytes", + "cutofflines": "20", + "cutoffoctets": "0", + "includeif": "3", + "usenat": "", + "sourceip": "", + "sourceinterface": "", + "sourceport": "", + "sourceas": "", + "destip": "", + "destinterface": "", + "destport": "", + "destas": "", + "postnatsourceip": "", + "postnatsourceport": "", + "postnatdestip": "", + "postnatdestport": "", + "protocols": "", + "tcpflags": "", + "tosfields": "", + "data": [ + { + "src_addr": "10.0.0.1", + "dst_addr": "10.0.0.2", + "src_domain": "a.example", + "dst_domain": "", + "flows": "3", + "bytes": "3000", + "packets": "30" + }, + { + "src_addr": "10.0.0.3", + "dst_addr": "10.0.0.4", + "src_domain": "", + "dst_domain": "b.example", + "flows": "1", + "bytes": "64", + "packets": "1" + } + ], + "table": "
Source DNSDest DNSSource IPDest IPFlowsBytesPacketsBytes/Packet
a.exampleunresolved10.0.0.110.0.0.233,00030100
unresolvedb.example10.0.0.310.0.0.4164164
", + "title": "Top Talkers" + }, + "output": "", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT *\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT name\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT TABLE_NAME AS `table`\n\t\tFROM information_schema.TABLES\n\t\tWHERE TABLE_NAME LIKE \"plugin_flowview_raw_%\"", + "params": [] + }, + { + "fn": "db_fetch_assoc_prepared", + "sql": "SELECT INET6_NTOA(src_addr) AS src_addr, INET6_NTOA(dst_addr) AS dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM (SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024001 GROUP BY src_addr, dst_addr UNION ALL SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024002 GROUP BY src_addr, dst_addr UNION ALL SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024003 GROUP BY src_addr, dst_addr) AS rs GROUP BY INET6_NTOA(src_addr), INET6_NTOA(dst_addr) ORDER BY bytes DESC LIMIT 20", + "params": [] + } + ], + "log": [ + "PARALLEL STATS: Time: Threads:1 Shards:3" + ], + "messages": [], + "html": [ + [ + "cacti_session_close", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": [], + "session": { + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + } + } + }, + "plan": null + }, + "the range from the request": { + "return": { + "id": "4", + "name": "Top Talkers", + "device_id": "0", + "ex_addr": "", + "template_id": "-1", + "statistics": "10", + "printed": "0", + "sortfield": "bytes", + "cutofflines": "20", + "cutoffoctets": "0", + "includeif": "0", + "usenat": "", + "sourceip": "", + "sourceinterface": "", + "sourceport": "", + "sourceas": "", + "destip": "", + "destinterface": "", + "destport": "", + "destas": "", + "postnatsourceip": "", + "postnatsourceport": "", + "postnatdestip": "", + "postnatdestport": "", + "protocols": "", + "tcpflags": "", + "tosfields": "", + "data": [ + { + "src_addr": "10.0.0.1", + "dst_addr": "10.0.0.2", + "src_domain": "a.example", + "dst_domain": "", + "flows": "3", + "bytes": "3000", + "packets": "30" + }, + { + "src_addr": "10.0.0.3", + "dst_addr": "10.0.0.4", + "src_domain": "", + "dst_domain": "b.example", + "flows": "1", + "bytes": "64", + "packets": "1" + } + ], + "table": "
Source DNSDest DNSSource IPDest IPFlowsBytesPacketsBytes/Packet
a.exampleunresolved10.0.0.110.0.0.233,00030100
unresolvedb.example10.0.0.310.0.0.4164164
", + "title": "Top Talkers" + }, + "output": "", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT *\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT name\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT TABLE_NAME AS `table`\n\t\tFROM information_schema.TABLES\n\t\tWHERE TABLE_NAME LIKE \"plugin_flowview_raw_%\"", + "params": [] + }, + { + "fn": "db_fetch_assoc_prepared", + "sql": "SELECT INET6_NTOA(src_addr) AS src_addr, INET6_NTOA(dst_addr) AS dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM (SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024001 GROUP BY src_addr, dst_addr UNION ALL SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024002 GROUP BY src_addr, dst_addr UNION ALL SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024003 GROUP BY src_addr, dst_addr) AS rs GROUP BY INET6_NTOA(src_addr), INET6_NTOA(dst_addr) ORDER BY bytes DESC LIMIT 20", + "params": [] + } + ], + "log": [ + "PARALLEL STATS: Time: Threads:1 Shards:3" + ], + "messages": [], + "html": [ + [ + "cacti_session_close", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": { + "includeif": "2" + }, + "session": { + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + } + } + }, + "plan": null + }, + "the session asked for but not cached": { + "return": { + "id": "4", + "name": "Top Talkers", + "device_id": "0", + "ex_addr": "", + "template_id": "-1", + "statistics": "10", + "printed": "0", + "sortfield": "bytes", + "cutofflines": "20", + "cutoffoctets": "0", + "includeif": "0", + "usenat": "", + "sourceip": "", + "sourceinterface": "", + "sourceport": "", + "sourceas": "", + "destip": "", + "destinterface": "", + "destport": "", + "destas": "", + "postnatsourceip": "", + "postnatsourceport": "", + "postnatdestip": "", + "postnatdestport": "", + "protocols": "", + "tcpflags": "", + "tosfields": "", + "data": [ + { + "src_addr": "10.0.0.1", + "dst_addr": "10.0.0.2", + "src_domain": "a.example", + "dst_domain": "", + "flows": "3", + "bytes": "3000", + "packets": "30" + }, + { + "src_addr": "10.0.0.3", + "dst_addr": "10.0.0.4", + "src_domain": "", + "dst_domain": "b.example", + "flows": "1", + "bytes": "64", + "packets": "1" + } + ], + "table": "
Source DNSDest DNSSource IPDest IPFlowsBytesPacketsBytes/Packet
a.exampleunresolved10.0.0.110.0.0.233,00030100
unresolvedb.example10.0.0.310.0.0.4164164
", + "title": "Top Talkers" + }, + "output": "", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT *\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT name\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT TABLE_NAME AS `table`\n\t\tFROM information_schema.TABLES\n\t\tWHERE TABLE_NAME LIKE \"plugin_flowview_raw_%\"", + "params": [] + }, + { + "fn": "db_fetch_assoc_prepared", + "sql": "SELECT INET6_NTOA(src_addr) AS src_addr, INET6_NTOA(dst_addr) AS dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM (SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024001 GROUP BY src_addr, dst_addr UNION ALL SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024002 GROUP BY src_addr, dst_addr UNION ALL SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024003 GROUP BY src_addr, dst_addr) AS rs GROUP BY INET6_NTOA(src_addr), INET6_NTOA(dst_addr) ORDER BY bytes DESC LIMIT 20", + "params": [] + } + ], + "log": [ + "PARALLEL STATS: Time: Threads:1 Shards:3" + ], + "messages": [], + "html": [ + [ + "cacti_session_close", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": [], + "session": { + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + } + } + }, + "plan": null + }, + "the summary report, parallel": { + "return": { + "id": "4", + "name": "Top Talkers", + "device_id": "0", + "ex_addr": "", + "template_id": "-1", + "statistics": "99", + "printed": "0", + "sortfield": "-1", + "cutofflines": "20", + "cutoffoctets": "0", + "includeif": "0", + "usenat": "", + "sourceip": "", + "sourceinterface": "", + "sourceport": "", + "sourceas": "", + "destip": "", + "destinterface": "", + "destport": "", + "destas": "", + "postnatsourceip": "", + "postnatsourceport": "", + "postnatdestip": "", + "postnatdestport": "", + "protocols": "", + "tcpflags": "", + "tosfields": "", + "data": [ + { + "p0To32": 3, + "p32To64": 6, + "p64To96": 9, + "p96To128": 12, + "p128To160": 15, + "p160To192": 18, + "p192To224": 21, + "p224To256": 24, + "p256To288": 27, + "p288To320": 30, + "p320To352": 33, + "p352To384": 36, + "p384To416": 39, + "p416To448": 42, + "p448To480": 45, + "p480To512": 48, + "p512To544": 51, + "p544To576": 54, + "p576To1024": 57, + "p1024To1536": 60, + "p1536To2048": 63, + "p2048To2560": 66, + "p2560To3072": 69, + "p3072To3568": 72, + "p3568To4096": 75, + "p4096To4608": 78, + "p4608ToInfin": 81 + } + ], + "table": "
0 - 32 Bytes32 - 64 Bytes64 - 96 Bytes96 - 128 Bytes128 - 160 Bytes160 - 192 Bytes192 - 224 Bytes224 - 256 Bytes256 - 288 Bytes288 - 320 Bytes320 - 352 Bytes352 - 384 Bytes384 - 416 Bytes416 - 448 Bytes
0.26 %0.53 %0.79 %1.06 %1.32 %1.59 %1.85 %2.12 %2.38 %2.65 %2.91 %3.17 %3.44 %3.70 %

448 - 480 Bytes480 - 512 Bytes512 - 544 Bytes544 - 576 Bytes576 - 1024 Bytes1024 - 1536 Bytes1536 - 2048 Bytes2048 - 2560 Bytes2560 - 3072 Bytes3072 - 3568 Bytes3568 - 4096 Bytes4096 - 4680 Bytes> 4680 Bytes
3.97 %4.23 %4.50 %4.76 %5.03 %5.29 %5.56 %5.82 %6.08 %6.35 %6.61 %6.88 %7.14 %
", + "title": "Top Talkers" + }, + "output": "", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT *\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT name\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT TABLE_NAME AS `table`\n\t\tFROM information_schema.TABLES\n\t\tWHERE TABLE_NAME LIKE \"plugin_flowview_raw_%\"", + "params": [] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT id\n\t\tFROM parallel_database_query\n\t\tWHERE md5sum = ?\n\t\tAND user_id = ?", + "params": [ + "f4595967d83f660bb7e7bfd839c3c910", + 0 + ] + }, + { + "fn": "db_fetch_assoc_prepared", + "sql": "SELECT *\n\t\t\tFROM INFORMATION_SCHEMA.COLUMNS\n\t\t\tWHERE table_name = ?", + "params": [ + "plugin_flowview_raw_2024001" + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT ENGINE\n\t\t\tFROM information_schema.ENGINES\n\t\t\tWHERE ENGINE IN ('MyISAM', 'Aria', 'InnoDB')\n\t\t\tAND SUPPORT IN ('YES','DEFAULT')", + "params": [] + }, + { + "fn": "db_execute", + "sql": "CREATE TABLE IF NOT EXISTS parallel_database_query_map_0 (`p0To32` bigint unsigned NOT NULL default \"0\", `p32To64` bigint unsigned NOT NULL default \"0\", `p64To96` bigint unsigned NOT NULL default \"0\", `p96To128` bigint unsigned NOT NULL default \"0\", `p128To160` bigint unsigned NOT NULL default \"0\", `p160To192` bigint unsigned NOT NULL default \"0\", `p192To224` bigint unsigned NOT NULL default \"0\", `p224To256` bigint unsigned NOT NULL default \"0\", `p256To288` bigint unsigned NOT NULL default \"0\", `p288To320` bigint unsigned NOT NULL default \"0\", `p320To352` bigint unsigned NOT NULL default \"0\", `p352To384` bigint unsigned NOT NULL default \"0\", `p384To416` bigint unsigned NOT NULL default \"0\", `p416To448` bigint unsigned NOT NULL default \"0\", `p448To480` bigint unsigned NOT NULL default \"0\", `p480To512` bigint unsigned NOT NULL default \"0\", `p512To544` bigint unsigned NOT NULL default \"0\", `p544To576` bigint unsigned NOT NULL default \"0\", `p576To1024` bigint unsigned NOT NULL default \"0\", `p1024To1536` bigint unsigned NOT NULL default \"0\", `p1536To2048` bigint unsigned NOT NULL default \"0\", `p2048To2560` bigint unsigned NOT NULL default \"0\", `p2560To3072` bigint unsigned NOT NULL default \"0\", `p3072To3568` bigint unsigned NOT NULL default \"0\", `p3568To4096` bigint unsigned NOT NULL default \"0\", `p4096To4608` bigint unsigned NOT NULL default \"0\", `p4608ToInfin` bigint unsigned NOT NULL default \"0\") ENGINE=MyISAM ROW_FORMAT=Dynamic COMMENT='Holds Parallel Query Results'", + "params": [] + }, + { + "fn": "db_execute_prepared", + "sql": "UPDATE parallel_database_query\n\t\tSET map_create = ?\n\t\tWHERE id = ?", + "params": [ + "CREATE TABLE IF NOT EXISTS parallel_database_query_map_0 (`p0To32` bigint unsigned NOT NULL default \"0\", `p32To64` bigint unsigned NOT NULL default \"0\", `p64To96` bigint unsigned NOT NULL default \"0\", `p96To128` bigint unsigned NOT NULL default \"0\", `p128To160` bigint unsigned NOT NULL default \"0\", `p160To192` bigint unsigned NOT NULL default \"0\", `p192To224` bigint unsigned NOT NULL default \"0\", `p224To256` bigint unsigned NOT NULL default \"0\", `p256To288` bigint unsigned NOT NULL default \"0\", `p288To320` bigint unsigned NOT NULL default \"0\", `p320To352` bigint unsigned NOT NULL default \"0\", `p352To384` bigint unsigned NOT NULL default \"0\", `p384To416` bigint unsigned NOT NULL default \"0\", `p416To448` bigint unsigned NOT NULL default \"0\", `p448To480` bigint unsigned NOT NULL default \"0\", `p480To512` bigint unsigned NOT NULL default \"0\", `p512To544` bigint unsigned NOT NULL default \"0\", `p544To576` bigint unsigned NOT NULL default \"0\", `p576To1024` bigint unsigned NOT NULL default \"0\", `p1024To1536` bigint unsigned NOT NULL default \"0\", `p1536To2048` bigint unsigned NOT NULL default \"0\", `p2048To2560` bigint unsigned NOT NULL default \"0\", `p2560To3072` bigint unsigned NOT NULL default \"0\", `p3072To3568` bigint unsigned NOT NULL default \"0\", `p3568To4096` bigint unsigned NOT NULL default \"0\", `p4096To4608` bigint unsigned NOT NULL default \"0\", `p4608ToInfin` bigint unsigned NOT NULL default \"0\") ENGINE=MyISAM ROW_FORMAT=Dynamic COMMENT='Holds Parallel Query Results'", + 0 + ] + }, + { + "fn": "db_execute_prepared", + "sql": "UPDATE parallel_database_query\n\t\t\tSET map_table = ?\n\t\t\tWHERE id = ?", + "params": [ + "parallel_database_query_map_0", + 0 + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT TABLE_NAME AS `table`\n\t\tFROM information_schema.TABLES\n\t\tWHERE TABLE_NAME LIKE \"plugin_flowview_raw_%\"", + "params": [] + }, + { + "fn": "db_execute_prepared", + "sql": "INSERT INTO parallel_database_query_shard\n\t\t\t\t(query_id, shard_id, full_scan, map_table, map_partition, map_query, map_params)\n\t\t\t\tVALUES (?, ?, ?, ?, ?, ?, ?)", + "params": [ + 0, + 0, + "1", + "plugin_flowview_raw_2024001", + "", + "SELECT SUM(CASE WHEN bytes_ppacket BETWEEN 0 AND 32 THEN bytes_ppacket ELSE 0 END) AS p0To32, SUM(CASE WHEN bytes_ppacket BETWEEN 32 AND 64 THEN bytes_ppacket ELSE 0 END) AS p32To64, SUM(CASE WHEN bytes_ppacket BETWEEN 64 AND 96 THEN bytes_ppacket ELSE 0 END) AS p64To96, SUM(CASE WHEN bytes_ppacket BETWEEN 96 AND 128 THEN bytes_ppacket ELSE 0 END) AS p96To128, SUM(CASE WHEN bytes_ppacket BETWEEN 128 AND 160 THEN bytes_ppacket ELSE 0 END) AS p128To160, SUM(CASE WHEN bytes_ppacket BETWEEN 160 AND 192 THEN bytes_ppacket ELSE 0 END) AS p160To192, SUM(CASE WHEN bytes_ppacket BETWEEN 192 AND 224 THEN bytes_ppacket ELSE 0 END) AS p192To224, SUM(CASE WHEN bytes_ppacket BETWEEN 224 AND 256 THEN bytes_ppacket ELSE 0 END) AS p224To256, SUM(CASE WHEN bytes_ppacket BETWEEN 256 AND 288 THEN bytes_ppacket ELSE 0 END) AS p256To288, SUM(CASE WHEN bytes_ppacket BETWEEN 288 AND 320 THEN bytes_ppacket ELSE 0 END) AS p288To320, SUM(CASE WHEN bytes_ppacket BETWEEN 320 AND 352 THEN bytes_ppacket ELSE 0 END) AS p320To352, SUM(CASE WHEN bytes_ppacket BETWEEN 352 AND 384 THEN bytes_ppacket ELSE 0 END) AS p352To384, SUM(CASE WHEN bytes_ppacket BETWEEN 384 AND 416 THEN bytes_ppacket ELSE 0 END) AS p384To416, SUM(CASE WHEN bytes_ppacket BETWEEN 416 AND 448 THEN bytes_ppacket ELSE 0 END) AS p416To448, SUM(CASE WHEN bytes_ppacket BETWEEN 448 AND 480 THEN bytes_ppacket ELSE 0 END) AS p448To480, SUM(CASE WHEN bytes_ppacket BETWEEN 480 AND 512 THEN bytes_ppacket ELSE 0 END) AS p480To512, SUM(CASE WHEN bytes_ppacket BETWEEN 512 AND 544 THEN bytes_ppacket ELSE 0 END) AS p512To544, SUM(CASE WHEN bytes_ppacket BETWEEN 544 AND 576 THEN bytes_ppacket ELSE 0 END) AS p544To576, SUM(CASE WHEN bytes_ppacket BETWEEN 576 AND 1024 THEN bytes_ppacket ELSE 0 END) AS p576To1024, SUM(CASE WHEN bytes_ppacket BETWEEN 1024 AND 1536 THEN bytes_ppacket ELSE 0 END) AS p1024To1536, SUM(CASE WHEN bytes_ppacket BETWEEN 1536 AND 2048 THEN bytes_ppacket ELSE 0 END) AS p1536To2048, SUM(CASE WHEN bytes_ppacket BETWEEN 2048 AND 2560 THEN bytes_ppacket ELSE 0 END) AS p2048To2560, SUM(CASE WHEN bytes_ppacket BETWEEN 2560 AND 3072 THEN bytes_ppacket ELSE 0 END) AS p2560To3072, SUM(CASE WHEN bytes_ppacket BETWEEN 3072 AND 3568 THEN bytes_ppacket ELSE 0 END) AS p3072To3568, SUM(CASE WHEN bytes_ppacket BETWEEN 3568 AND 4096 THEN bytes_ppacket ELSE 0 END) AS p3568To4096, SUM(CASE WHEN bytes_ppacket BETWEEN 4096 AND 4608 THEN bytes_ppacket ELSE 0 END) AS p4096To4608, SUM(CASE WHEN bytes_ppacket BETWEEN 4680 AND -1 THEN bytes_ppacket ELSE 0 END) AS p4608ToInfin FROM plugin_flowview_raw_2024001 ", + "[]" + ] + }, + { + "fn": "db_execute_prepared", + "sql": "INSERT INTO parallel_database_query_shard\n\t\t\t\t(query_id, shard_id, full_scan, map_table, map_partition, map_query, map_params)\n\t\t\t\tVALUES (?, ?, ?, ?, ?, ?, ?)", + "params": [ + 0, + 1, + "1", + "plugin_flowview_raw_2024002", + "", + "SELECT SUM(CASE WHEN bytes_ppacket BETWEEN 0 AND 32 THEN bytes_ppacket ELSE 0 END) AS p0To32, SUM(CASE WHEN bytes_ppacket BETWEEN 32 AND 64 THEN bytes_ppacket ELSE 0 END) AS p32To64, SUM(CASE WHEN bytes_ppacket BETWEEN 64 AND 96 THEN bytes_ppacket ELSE 0 END) AS p64To96, SUM(CASE WHEN bytes_ppacket BETWEEN 96 AND 128 THEN bytes_ppacket ELSE 0 END) AS p96To128, SUM(CASE WHEN bytes_ppacket BETWEEN 128 AND 160 THEN bytes_ppacket ELSE 0 END) AS p128To160, SUM(CASE WHEN bytes_ppacket BETWEEN 160 AND 192 THEN bytes_ppacket ELSE 0 END) AS p160To192, SUM(CASE WHEN bytes_ppacket BETWEEN 192 AND 224 THEN bytes_ppacket ELSE 0 END) AS p192To224, SUM(CASE WHEN bytes_ppacket BETWEEN 224 AND 256 THEN bytes_ppacket ELSE 0 END) AS p224To256, SUM(CASE WHEN bytes_ppacket BETWEEN 256 AND 288 THEN bytes_ppacket ELSE 0 END) AS p256To288, SUM(CASE WHEN bytes_ppacket BETWEEN 288 AND 320 THEN bytes_ppacket ELSE 0 END) AS p288To320, SUM(CASE WHEN bytes_ppacket BETWEEN 320 AND 352 THEN bytes_ppacket ELSE 0 END) AS p320To352, SUM(CASE WHEN bytes_ppacket BETWEEN 352 AND 384 THEN bytes_ppacket ELSE 0 END) AS p352To384, SUM(CASE WHEN bytes_ppacket BETWEEN 384 AND 416 THEN bytes_ppacket ELSE 0 END) AS p384To416, SUM(CASE WHEN bytes_ppacket BETWEEN 416 AND 448 THEN bytes_ppacket ELSE 0 END) AS p416To448, SUM(CASE WHEN bytes_ppacket BETWEEN 448 AND 480 THEN bytes_ppacket ELSE 0 END) AS p448To480, SUM(CASE WHEN bytes_ppacket BETWEEN 480 AND 512 THEN bytes_ppacket ELSE 0 END) AS p480To512, SUM(CASE WHEN bytes_ppacket BETWEEN 512 AND 544 THEN bytes_ppacket ELSE 0 END) AS p512To544, SUM(CASE WHEN bytes_ppacket BETWEEN 544 AND 576 THEN bytes_ppacket ELSE 0 END) AS p544To576, SUM(CASE WHEN bytes_ppacket BETWEEN 576 AND 1024 THEN bytes_ppacket ELSE 0 END) AS p576To1024, SUM(CASE WHEN bytes_ppacket BETWEEN 1024 AND 1536 THEN bytes_ppacket ELSE 0 END) AS p1024To1536, SUM(CASE WHEN bytes_ppacket BETWEEN 1536 AND 2048 THEN bytes_ppacket ELSE 0 END) AS p1536To2048, SUM(CASE WHEN bytes_ppacket BETWEEN 2048 AND 2560 THEN bytes_ppacket ELSE 0 END) AS p2048To2560, SUM(CASE WHEN bytes_ppacket BETWEEN 2560 AND 3072 THEN bytes_ppacket ELSE 0 END) AS p2560To3072, SUM(CASE WHEN bytes_ppacket BETWEEN 3072 AND 3568 THEN bytes_ppacket ELSE 0 END) AS p3072To3568, SUM(CASE WHEN bytes_ppacket BETWEEN 3568 AND 4096 THEN bytes_ppacket ELSE 0 END) AS p3568To4096, SUM(CASE WHEN bytes_ppacket BETWEEN 4096 AND 4608 THEN bytes_ppacket ELSE 0 END) AS p4096To4608, SUM(CASE WHEN bytes_ppacket BETWEEN 4680 AND -1 THEN bytes_ppacket ELSE 0 END) AS p4608ToInfin FROM plugin_flowview_raw_2024002 ", + "[]" + ] + }, + { + "fn": "db_execute_prepared", + "sql": "INSERT INTO parallel_database_query_shard\n\t\t\t\t(query_id, shard_id, full_scan, map_table, map_partition, map_query, map_params)\n\t\t\t\tVALUES (?, ?, ?, ?, ?, ?, ?)", + "params": [ + 0, + 2, + "0", + "plugin_flowview_raw_2024003", + "live", + "SELECT SUM(CASE WHEN bytes_ppacket BETWEEN 0 AND 32 THEN bytes_ppacket ELSE 0 END) AS p0To32, SUM(CASE WHEN bytes_ppacket BETWEEN 32 AND 64 THEN bytes_ppacket ELSE 0 END) AS p32To64, SUM(CASE WHEN bytes_ppacket BETWEEN 64 AND 96 THEN bytes_ppacket ELSE 0 END) AS p64To96, SUM(CASE WHEN bytes_ppacket BETWEEN 96 AND 128 THEN bytes_ppacket ELSE 0 END) AS p96To128, SUM(CASE WHEN bytes_ppacket BETWEEN 128 AND 160 THEN bytes_ppacket ELSE 0 END) AS p128To160, SUM(CASE WHEN bytes_ppacket BETWEEN 160 AND 192 THEN bytes_ppacket ELSE 0 END) AS p160To192, SUM(CASE WHEN bytes_ppacket BETWEEN 192 AND 224 THEN bytes_ppacket ELSE 0 END) AS p192To224, SUM(CASE WHEN bytes_ppacket BETWEEN 224 AND 256 THEN bytes_ppacket ELSE 0 END) AS p224To256, SUM(CASE WHEN bytes_ppacket BETWEEN 256 AND 288 THEN bytes_ppacket ELSE 0 END) AS p256To288, SUM(CASE WHEN bytes_ppacket BETWEEN 288 AND 320 THEN bytes_ppacket ELSE 0 END) AS p288To320, SUM(CASE WHEN bytes_ppacket BETWEEN 320 AND 352 THEN bytes_ppacket ELSE 0 END) AS p320To352, SUM(CASE WHEN bytes_ppacket BETWEEN 352 AND 384 THEN bytes_ppacket ELSE 0 END) AS p352To384, SUM(CASE WHEN bytes_ppacket BETWEEN 384 AND 416 THEN bytes_ppacket ELSE 0 END) AS p384To416, SUM(CASE WHEN bytes_ppacket BETWEEN 416 AND 448 THEN bytes_ppacket ELSE 0 END) AS p416To448, SUM(CASE WHEN bytes_ppacket BETWEEN 448 AND 480 THEN bytes_ppacket ELSE 0 END) AS p448To480, SUM(CASE WHEN bytes_ppacket BETWEEN 480 AND 512 THEN bytes_ppacket ELSE 0 END) AS p480To512, SUM(CASE WHEN bytes_ppacket BETWEEN 512 AND 544 THEN bytes_ppacket ELSE 0 END) AS p512To544, SUM(CASE WHEN bytes_ppacket BETWEEN 544 AND 576 THEN bytes_ppacket ELSE 0 END) AS p544To576, SUM(CASE WHEN bytes_ppacket BETWEEN 576 AND 1024 THEN bytes_ppacket ELSE 0 END) AS p576To1024, SUM(CASE WHEN bytes_ppacket BETWEEN 1024 AND 1536 THEN bytes_ppacket ELSE 0 END) AS p1024To1536, SUM(CASE WHEN bytes_ppacket BETWEEN 1536 AND 2048 THEN bytes_ppacket ELSE 0 END) AS p1536To2048, SUM(CASE WHEN bytes_ppacket BETWEEN 2048 AND 2560 THEN bytes_ppacket ELSE 0 END) AS p2048To2560, SUM(CASE WHEN bytes_ppacket BETWEEN 2560 AND 3072 THEN bytes_ppacket ELSE 0 END) AS p2560To3072, SUM(CASE WHEN bytes_ppacket BETWEEN 3072 AND 3568 THEN bytes_ppacket ELSE 0 END) AS p3072To3568, SUM(CASE WHEN bytes_ppacket BETWEEN 3568 AND 4096 THEN bytes_ppacket ELSE 0 END) AS p3568To4096, SUM(CASE WHEN bytes_ppacket BETWEEN 4096 AND 4608 THEN bytes_ppacket ELSE 0 END) AS p4096To4608, SUM(CASE WHEN bytes_ppacket BETWEEN 4680 AND -1 THEN bytes_ppacket ELSE 0 END) AS p4608ToInfin FROM plugin_flowview_raw_2024003 WHERE (`end_time` >= ? AND `start_time` <= ?) ", + "[\"2024-01-01 00:00:00\",\"2024-01-05 00:00:00\"]" + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT COUNT(*)\n\t\t\tFROM parallel_database_query\n\t\t\tWHERE id = ?\n\t\t\tAND status = ?", + "params": [ + 0, + "pending" + ] + }, + { + "fn": "db_fetch_cell", + "sql": "SELECT COUNT(*)\n\t\t\tFROM parallel_database_query\n\t\t\tWHERE ID IN(0)\n\t\t\tAND status != \"complete\"", + "params": [] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT results\n\t\t\tFROM parallel_database_query\n\t\t\tWHERE id = ?", + "params": [ + 0 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT map_table\n\t\tFROM parallel_database_query\n\t\tWHERE id = ?", + "params": [ + 0 + ] + }, + { + "fn": "db_fetch_assoc_prepared", + "sql": "SELECT *\n\t\tFROM parallel_database_query_shard\n\t\tWHERE query_id = ?", + "params": [ + 0 + ] + }, + { + "fn": "db_execute_prepared", + "sql": "DELETE FROM parallel_database_query_shard\n\t\tWHERE query_id = ?", + "params": [ + 0 + ] + }, + { + "fn": "db_fetch_assoc_prepared", + "sql": "SELECT *\n\t\tFROM processes WHERE tasktype = ?\n\t\tAND taskname IN (?, ?)", + "params": [ + "flowview", + "db_query_0", + "db_shard_0" + ] + } + ], + "log": [], + "messages": [], + "html": [ + [ + "cacti_session_close", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": [], + "session": { + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + } + } + }, + "plan": null + }, + "the summary report, parallel, nothing seen": { + "return": { + "id": "4", + "name": "Top Talkers", + "device_id": "0", + "ex_addr": "", + "template_id": "-1", + "statistics": "99", + "printed": "0", + "sortfield": "-1", + "cutofflines": "20", + "cutoffoctets": "0", + "includeif": "0", + "usenat": "", + "sourceip": "", + "sourceinterface": "", + "sourceport": "", + "sourceas": "", + "destip": "", + "destinterface": "", + "destport": "", + "destas": "", + "postnatsourceip": "", + "postnatsourceport": "", + "postnatdestip": "", + "postnatdestport": "", + "protocols": "", + "tcpflags": "", + "tosfields": "", + "data": [ + { + "p0To32": 0, + "p32To64": 0, + "p64To96": 0, + "p96To128": 0, + "p128To160": 0, + "p160To192": 0, + "p192To224": 0, + "p224To256": 0, + "p256To288": 0, + "p288To320": 0, + "p320To352": 0, + "p352To384": 0, + "p384To416": 0, + "p416To448": 0, + "p448To480": 0, + "p480To512": 0, + "p512To544": 0, + "p544To576": 0, + "p576To1024": 0, + "p1024To1536": 0, + "p1536To2048": 0, + "p2048To2560": 0, + "p2560To3072": 0, + "p3072To3568": 0, + "p3568To4096": 0, + "p4096To4608": 0, + "p4608ToInfin": 0 + } + ], + "table": "
0 - 32 Bytes32 - 64 Bytes64 - 96 Bytes96 - 128 Bytes128 - 160 Bytes160 - 192 Bytes192 - 224 Bytes224 - 256 Bytes256 - 288 Bytes288 - 320 Bytes320 - 352 Bytes352 - 384 Bytes384 - 416 Bytes416 - 448 Bytes
N/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/A

448 - 480 Bytes480 - 512 Bytes512 - 544 Bytes544 - 576 Bytes576 - 1024 Bytes1024 - 1536 Bytes1536 - 2048 Bytes2048 - 2560 Bytes2560 - 3072 Bytes3072 - 3568 Bytes3568 - 4096 Bytes4096 - 4680 Bytes> 4680 Bytes
N/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/A
", + "title": "Top Talkers" + }, + "output": "", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT *\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT name\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT TABLE_NAME AS `table`\n\t\tFROM information_schema.TABLES\n\t\tWHERE TABLE_NAME LIKE \"plugin_flowview_raw_%\"", + "params": [] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT id\n\t\tFROM parallel_database_query\n\t\tWHERE md5sum = ?\n\t\tAND user_id = ?", + "params": [ + "f4595967d83f660bb7e7bfd839c3c910", + 0 + ] + }, + { + "fn": "db_fetch_assoc_prepared", + "sql": "SELECT *\n\t\t\tFROM INFORMATION_SCHEMA.COLUMNS\n\t\t\tWHERE table_name = ?", + "params": [ + "plugin_flowview_raw_2024001" + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT ENGINE\n\t\t\tFROM information_schema.ENGINES\n\t\t\tWHERE ENGINE IN ('MyISAM', 'Aria', 'InnoDB')\n\t\t\tAND SUPPORT IN ('YES','DEFAULT')", + "params": [] + }, + { + "fn": "db_execute", + "sql": "CREATE TABLE IF NOT EXISTS parallel_database_query_map_0 (`p0To32` bigint unsigned NOT NULL default \"0\", `p32To64` bigint unsigned NOT NULL default \"0\", `p64To96` bigint unsigned NOT NULL default \"0\", `p96To128` bigint unsigned NOT NULL default \"0\", `p128To160` bigint unsigned NOT NULL default \"0\", `p160To192` bigint unsigned NOT NULL default \"0\", `p192To224` bigint unsigned NOT NULL default \"0\", `p224To256` bigint unsigned NOT NULL default \"0\", `p256To288` bigint unsigned NOT NULL default \"0\", `p288To320` bigint unsigned NOT NULL default \"0\", `p320To352` bigint unsigned NOT NULL default \"0\", `p352To384` bigint unsigned NOT NULL default \"0\", `p384To416` bigint unsigned NOT NULL default \"0\", `p416To448` bigint unsigned NOT NULL default \"0\", `p448To480` bigint unsigned NOT NULL default \"0\", `p480To512` bigint unsigned NOT NULL default \"0\", `p512To544` bigint unsigned NOT NULL default \"0\", `p544To576` bigint unsigned NOT NULL default \"0\", `p576To1024` bigint unsigned NOT NULL default \"0\", `p1024To1536` bigint unsigned NOT NULL default \"0\", `p1536To2048` bigint unsigned NOT NULL default \"0\", `p2048To2560` bigint unsigned NOT NULL default \"0\", `p2560To3072` bigint unsigned NOT NULL default \"0\", `p3072To3568` bigint unsigned NOT NULL default \"0\", `p3568To4096` bigint unsigned NOT NULL default \"0\", `p4096To4608` bigint unsigned NOT NULL default \"0\", `p4608ToInfin` bigint unsigned NOT NULL default \"0\") ENGINE=MyISAM ROW_FORMAT=Dynamic COMMENT='Holds Parallel Query Results'", + "params": [] + }, + { + "fn": "db_execute_prepared", + "sql": "UPDATE parallel_database_query\n\t\tSET map_create = ?\n\t\tWHERE id = ?", + "params": [ + "CREATE TABLE IF NOT EXISTS parallel_database_query_map_0 (`p0To32` bigint unsigned NOT NULL default \"0\", `p32To64` bigint unsigned NOT NULL default \"0\", `p64To96` bigint unsigned NOT NULL default \"0\", `p96To128` bigint unsigned NOT NULL default \"0\", `p128To160` bigint unsigned NOT NULL default \"0\", `p160To192` bigint unsigned NOT NULL default \"0\", `p192To224` bigint unsigned NOT NULL default \"0\", `p224To256` bigint unsigned NOT NULL default \"0\", `p256To288` bigint unsigned NOT NULL default \"0\", `p288To320` bigint unsigned NOT NULL default \"0\", `p320To352` bigint unsigned NOT NULL default \"0\", `p352To384` bigint unsigned NOT NULL default \"0\", `p384To416` bigint unsigned NOT NULL default \"0\", `p416To448` bigint unsigned NOT NULL default \"0\", `p448To480` bigint unsigned NOT NULL default \"0\", `p480To512` bigint unsigned NOT NULL default \"0\", `p512To544` bigint unsigned NOT NULL default \"0\", `p544To576` bigint unsigned NOT NULL default \"0\", `p576To1024` bigint unsigned NOT NULL default \"0\", `p1024To1536` bigint unsigned NOT NULL default \"0\", `p1536To2048` bigint unsigned NOT NULL default \"0\", `p2048To2560` bigint unsigned NOT NULL default \"0\", `p2560To3072` bigint unsigned NOT NULL default \"0\", `p3072To3568` bigint unsigned NOT NULL default \"0\", `p3568To4096` bigint unsigned NOT NULL default \"0\", `p4096To4608` bigint unsigned NOT NULL default \"0\", `p4608ToInfin` bigint unsigned NOT NULL default \"0\") ENGINE=MyISAM ROW_FORMAT=Dynamic COMMENT='Holds Parallel Query Results'", + 0 + ] + }, + { + "fn": "db_execute_prepared", + "sql": "UPDATE parallel_database_query\n\t\t\tSET map_table = ?\n\t\t\tWHERE id = ?", + "params": [ + "parallel_database_query_map_0", + 0 + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT TABLE_NAME AS `table`\n\t\tFROM information_schema.TABLES\n\t\tWHERE TABLE_NAME LIKE \"plugin_flowview_raw_%\"", + "params": [] + }, + { + "fn": "db_execute_prepared", + "sql": "INSERT INTO parallel_database_query_shard\n\t\t\t\t(query_id, shard_id, full_scan, map_table, map_partition, map_query, map_params)\n\t\t\t\tVALUES (?, ?, ?, ?, ?, ?, ?)", + "params": [ + 0, + 0, + "1", + "plugin_flowview_raw_2024001", + "", + "SELECT SUM(CASE WHEN bytes_ppacket BETWEEN 0 AND 32 THEN bytes_ppacket ELSE 0 END) AS p0To32, SUM(CASE WHEN bytes_ppacket BETWEEN 32 AND 64 THEN bytes_ppacket ELSE 0 END) AS p32To64, SUM(CASE WHEN bytes_ppacket BETWEEN 64 AND 96 THEN bytes_ppacket ELSE 0 END) AS p64To96, SUM(CASE WHEN bytes_ppacket BETWEEN 96 AND 128 THEN bytes_ppacket ELSE 0 END) AS p96To128, SUM(CASE WHEN bytes_ppacket BETWEEN 128 AND 160 THEN bytes_ppacket ELSE 0 END) AS p128To160, SUM(CASE WHEN bytes_ppacket BETWEEN 160 AND 192 THEN bytes_ppacket ELSE 0 END) AS p160To192, SUM(CASE WHEN bytes_ppacket BETWEEN 192 AND 224 THEN bytes_ppacket ELSE 0 END) AS p192To224, SUM(CASE WHEN bytes_ppacket BETWEEN 224 AND 256 THEN bytes_ppacket ELSE 0 END) AS p224To256, SUM(CASE WHEN bytes_ppacket BETWEEN 256 AND 288 THEN bytes_ppacket ELSE 0 END) AS p256To288, SUM(CASE WHEN bytes_ppacket BETWEEN 288 AND 320 THEN bytes_ppacket ELSE 0 END) AS p288To320, SUM(CASE WHEN bytes_ppacket BETWEEN 320 AND 352 THEN bytes_ppacket ELSE 0 END) AS p320To352, SUM(CASE WHEN bytes_ppacket BETWEEN 352 AND 384 THEN bytes_ppacket ELSE 0 END) AS p352To384, SUM(CASE WHEN bytes_ppacket BETWEEN 384 AND 416 THEN bytes_ppacket ELSE 0 END) AS p384To416, SUM(CASE WHEN bytes_ppacket BETWEEN 416 AND 448 THEN bytes_ppacket ELSE 0 END) AS p416To448, SUM(CASE WHEN bytes_ppacket BETWEEN 448 AND 480 THEN bytes_ppacket ELSE 0 END) AS p448To480, SUM(CASE WHEN bytes_ppacket BETWEEN 480 AND 512 THEN bytes_ppacket ELSE 0 END) AS p480To512, SUM(CASE WHEN bytes_ppacket BETWEEN 512 AND 544 THEN bytes_ppacket ELSE 0 END) AS p512To544, SUM(CASE WHEN bytes_ppacket BETWEEN 544 AND 576 THEN bytes_ppacket ELSE 0 END) AS p544To576, SUM(CASE WHEN bytes_ppacket BETWEEN 576 AND 1024 THEN bytes_ppacket ELSE 0 END) AS p576To1024, SUM(CASE WHEN bytes_ppacket BETWEEN 1024 AND 1536 THEN bytes_ppacket ELSE 0 END) AS p1024To1536, SUM(CASE WHEN bytes_ppacket BETWEEN 1536 AND 2048 THEN bytes_ppacket ELSE 0 END) AS p1536To2048, SUM(CASE WHEN bytes_ppacket BETWEEN 2048 AND 2560 THEN bytes_ppacket ELSE 0 END) AS p2048To2560, SUM(CASE WHEN bytes_ppacket BETWEEN 2560 AND 3072 THEN bytes_ppacket ELSE 0 END) AS p2560To3072, SUM(CASE WHEN bytes_ppacket BETWEEN 3072 AND 3568 THEN bytes_ppacket ELSE 0 END) AS p3072To3568, SUM(CASE WHEN bytes_ppacket BETWEEN 3568 AND 4096 THEN bytes_ppacket ELSE 0 END) AS p3568To4096, SUM(CASE WHEN bytes_ppacket BETWEEN 4096 AND 4608 THEN bytes_ppacket ELSE 0 END) AS p4096To4608, SUM(CASE WHEN bytes_ppacket BETWEEN 4680 AND -1 THEN bytes_ppacket ELSE 0 END) AS p4608ToInfin FROM plugin_flowview_raw_2024001 ", + "[]" + ] + }, + { + "fn": "db_execute_prepared", + "sql": "INSERT INTO parallel_database_query_shard\n\t\t\t\t(query_id, shard_id, full_scan, map_table, map_partition, map_query, map_params)\n\t\t\t\tVALUES (?, ?, ?, ?, ?, ?, ?)", + "params": [ + 0, + 1, + "1", + "plugin_flowview_raw_2024002", + "", + "SELECT SUM(CASE WHEN bytes_ppacket BETWEEN 0 AND 32 THEN bytes_ppacket ELSE 0 END) AS p0To32, SUM(CASE WHEN bytes_ppacket BETWEEN 32 AND 64 THEN bytes_ppacket ELSE 0 END) AS p32To64, SUM(CASE WHEN bytes_ppacket BETWEEN 64 AND 96 THEN bytes_ppacket ELSE 0 END) AS p64To96, SUM(CASE WHEN bytes_ppacket BETWEEN 96 AND 128 THEN bytes_ppacket ELSE 0 END) AS p96To128, SUM(CASE WHEN bytes_ppacket BETWEEN 128 AND 160 THEN bytes_ppacket ELSE 0 END) AS p128To160, SUM(CASE WHEN bytes_ppacket BETWEEN 160 AND 192 THEN bytes_ppacket ELSE 0 END) AS p160To192, SUM(CASE WHEN bytes_ppacket BETWEEN 192 AND 224 THEN bytes_ppacket ELSE 0 END) AS p192To224, SUM(CASE WHEN bytes_ppacket BETWEEN 224 AND 256 THEN bytes_ppacket ELSE 0 END) AS p224To256, SUM(CASE WHEN bytes_ppacket BETWEEN 256 AND 288 THEN bytes_ppacket ELSE 0 END) AS p256To288, SUM(CASE WHEN bytes_ppacket BETWEEN 288 AND 320 THEN bytes_ppacket ELSE 0 END) AS p288To320, SUM(CASE WHEN bytes_ppacket BETWEEN 320 AND 352 THEN bytes_ppacket ELSE 0 END) AS p320To352, SUM(CASE WHEN bytes_ppacket BETWEEN 352 AND 384 THEN bytes_ppacket ELSE 0 END) AS p352To384, SUM(CASE WHEN bytes_ppacket BETWEEN 384 AND 416 THEN bytes_ppacket ELSE 0 END) AS p384To416, SUM(CASE WHEN bytes_ppacket BETWEEN 416 AND 448 THEN bytes_ppacket ELSE 0 END) AS p416To448, SUM(CASE WHEN bytes_ppacket BETWEEN 448 AND 480 THEN bytes_ppacket ELSE 0 END) AS p448To480, SUM(CASE WHEN bytes_ppacket BETWEEN 480 AND 512 THEN bytes_ppacket ELSE 0 END) AS p480To512, SUM(CASE WHEN bytes_ppacket BETWEEN 512 AND 544 THEN bytes_ppacket ELSE 0 END) AS p512To544, SUM(CASE WHEN bytes_ppacket BETWEEN 544 AND 576 THEN bytes_ppacket ELSE 0 END) AS p544To576, SUM(CASE WHEN bytes_ppacket BETWEEN 576 AND 1024 THEN bytes_ppacket ELSE 0 END) AS p576To1024, SUM(CASE WHEN bytes_ppacket BETWEEN 1024 AND 1536 THEN bytes_ppacket ELSE 0 END) AS p1024To1536, SUM(CASE WHEN bytes_ppacket BETWEEN 1536 AND 2048 THEN bytes_ppacket ELSE 0 END) AS p1536To2048, SUM(CASE WHEN bytes_ppacket BETWEEN 2048 AND 2560 THEN bytes_ppacket ELSE 0 END) AS p2048To2560, SUM(CASE WHEN bytes_ppacket BETWEEN 2560 AND 3072 THEN bytes_ppacket ELSE 0 END) AS p2560To3072, SUM(CASE WHEN bytes_ppacket BETWEEN 3072 AND 3568 THEN bytes_ppacket ELSE 0 END) AS p3072To3568, SUM(CASE WHEN bytes_ppacket BETWEEN 3568 AND 4096 THEN bytes_ppacket ELSE 0 END) AS p3568To4096, SUM(CASE WHEN bytes_ppacket BETWEEN 4096 AND 4608 THEN bytes_ppacket ELSE 0 END) AS p4096To4608, SUM(CASE WHEN bytes_ppacket BETWEEN 4680 AND -1 THEN bytes_ppacket ELSE 0 END) AS p4608ToInfin FROM plugin_flowview_raw_2024002 ", + "[]" + ] + }, + { + "fn": "db_execute_prepared", + "sql": "INSERT INTO parallel_database_query_shard\n\t\t\t\t(query_id, shard_id, full_scan, map_table, map_partition, map_query, map_params)\n\t\t\t\tVALUES (?, ?, ?, ?, ?, ?, ?)", + "params": [ + 0, + 2, + "0", + "plugin_flowview_raw_2024003", + "live", + "SELECT SUM(CASE WHEN bytes_ppacket BETWEEN 0 AND 32 THEN bytes_ppacket ELSE 0 END) AS p0To32, SUM(CASE WHEN bytes_ppacket BETWEEN 32 AND 64 THEN bytes_ppacket ELSE 0 END) AS p32To64, SUM(CASE WHEN bytes_ppacket BETWEEN 64 AND 96 THEN bytes_ppacket ELSE 0 END) AS p64To96, SUM(CASE WHEN bytes_ppacket BETWEEN 96 AND 128 THEN bytes_ppacket ELSE 0 END) AS p96To128, SUM(CASE WHEN bytes_ppacket BETWEEN 128 AND 160 THEN bytes_ppacket ELSE 0 END) AS p128To160, SUM(CASE WHEN bytes_ppacket BETWEEN 160 AND 192 THEN bytes_ppacket ELSE 0 END) AS p160To192, SUM(CASE WHEN bytes_ppacket BETWEEN 192 AND 224 THEN bytes_ppacket ELSE 0 END) AS p192To224, SUM(CASE WHEN bytes_ppacket BETWEEN 224 AND 256 THEN bytes_ppacket ELSE 0 END) AS p224To256, SUM(CASE WHEN bytes_ppacket BETWEEN 256 AND 288 THEN bytes_ppacket ELSE 0 END) AS p256To288, SUM(CASE WHEN bytes_ppacket BETWEEN 288 AND 320 THEN bytes_ppacket ELSE 0 END) AS p288To320, SUM(CASE WHEN bytes_ppacket BETWEEN 320 AND 352 THEN bytes_ppacket ELSE 0 END) AS p320To352, SUM(CASE WHEN bytes_ppacket BETWEEN 352 AND 384 THEN bytes_ppacket ELSE 0 END) AS p352To384, SUM(CASE WHEN bytes_ppacket BETWEEN 384 AND 416 THEN bytes_ppacket ELSE 0 END) AS p384To416, SUM(CASE WHEN bytes_ppacket BETWEEN 416 AND 448 THEN bytes_ppacket ELSE 0 END) AS p416To448, SUM(CASE WHEN bytes_ppacket BETWEEN 448 AND 480 THEN bytes_ppacket ELSE 0 END) AS p448To480, SUM(CASE WHEN bytes_ppacket BETWEEN 480 AND 512 THEN bytes_ppacket ELSE 0 END) AS p480To512, SUM(CASE WHEN bytes_ppacket BETWEEN 512 AND 544 THEN bytes_ppacket ELSE 0 END) AS p512To544, SUM(CASE WHEN bytes_ppacket BETWEEN 544 AND 576 THEN bytes_ppacket ELSE 0 END) AS p544To576, SUM(CASE WHEN bytes_ppacket BETWEEN 576 AND 1024 THEN bytes_ppacket ELSE 0 END) AS p576To1024, SUM(CASE WHEN bytes_ppacket BETWEEN 1024 AND 1536 THEN bytes_ppacket ELSE 0 END) AS p1024To1536, SUM(CASE WHEN bytes_ppacket BETWEEN 1536 AND 2048 THEN bytes_ppacket ELSE 0 END) AS p1536To2048, SUM(CASE WHEN bytes_ppacket BETWEEN 2048 AND 2560 THEN bytes_ppacket ELSE 0 END) AS p2048To2560, SUM(CASE WHEN bytes_ppacket BETWEEN 2560 AND 3072 THEN bytes_ppacket ELSE 0 END) AS p2560To3072, SUM(CASE WHEN bytes_ppacket BETWEEN 3072 AND 3568 THEN bytes_ppacket ELSE 0 END) AS p3072To3568, SUM(CASE WHEN bytes_ppacket BETWEEN 3568 AND 4096 THEN bytes_ppacket ELSE 0 END) AS p3568To4096, SUM(CASE WHEN bytes_ppacket BETWEEN 4096 AND 4608 THEN bytes_ppacket ELSE 0 END) AS p4096To4608, SUM(CASE WHEN bytes_ppacket BETWEEN 4680 AND -1 THEN bytes_ppacket ELSE 0 END) AS p4608ToInfin FROM plugin_flowview_raw_2024003 WHERE (`end_time` >= ? AND `start_time` <= ?) ", + "[\"2024-01-01 00:00:00\",\"2024-01-05 00:00:00\"]" + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT COUNT(*)\n\t\t\tFROM parallel_database_query\n\t\t\tWHERE id = ?\n\t\t\tAND status = ?", + "params": [ + 0, + "pending" + ] + }, + { + "fn": "db_fetch_cell", + "sql": "SELECT COUNT(*)\n\t\t\tFROM parallel_database_query\n\t\t\tWHERE ID IN(0)\n\t\t\tAND status != \"complete\"", + "params": [] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT results\n\t\t\tFROM parallel_database_query\n\t\t\tWHERE id = ?", + "params": [ + 0 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT map_table\n\t\tFROM parallel_database_query\n\t\tWHERE id = ?", + "params": [ + 0 + ] + }, + { + "fn": "db_fetch_assoc_prepared", + "sql": "SELECT *\n\t\tFROM parallel_database_query_shard\n\t\tWHERE query_id = ?", + "params": [ + 0 + ] + }, + { + "fn": "db_execute_prepared", + "sql": "DELETE FROM parallel_database_query_shard\n\t\tWHERE query_id = ?", + "params": [ + 0 + ] + }, + { + "fn": "db_fetch_assoc_prepared", + "sql": "SELECT *\n\t\tFROM processes WHERE tasktype = ?\n\t\tAND taskname IN (?, ?)", + "params": [ + "flowview", + "db_query_0", + "db_shard_0" + ] + } + ], + "log": [], + "messages": [], + "html": [ + [ + "cacti_session_close", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": [], + "session": { + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + } + } + }, + "plan": null + }, + "the summary report, serial": { + "return": { + "id": "4", + "name": "Top Talkers", + "device_id": "0", + "ex_addr": "", + "template_id": "-1", + "statistics": "99", + "printed": "0", + "sortfield": "-1", + "cutofflines": "20", + "cutoffoctets": "0", + "includeif": "0", + "usenat": "", + "sourceip": "", + "sourceinterface": "", + "sourceport": "", + "sourceas": "", + "destip": "", + "destinterface": "", + "destport": "", + "destas": "", + "postnatsourceip": "", + "postnatsourceport": "", + "postnatdestip": "", + "postnatdestport": "", + "protocols": "", + "tcpflags": "", + "tosfields": "", + "data": [ + { + "p0To32": 2, + "p32To64": 4, + "p64To96": 6, + "p96To128": 8, + "p128To160": 10, + "p160To192": 12, + "p192To224": 14, + "p224To256": 16, + "p256To288": 18, + "p288To320": 20, + "p320To352": 22, + "p352To384": 24, + "p384To416": 26, + "p416To448": 28, + "p448To480": 30, + "p480To512": 32, + "p512To544": 34, + "p544To576": 36, + "p576To1024": 38, + "p1024To1536": 40, + "p1536To2048": 42, + "p2048To2560": 44, + "p2560To3072": 46, + "p3072To3568": 48, + "p3568To4096": 50, + "p4096To4608": 52, + "p4608ToInfin": 54 + } + ], + "table": "
0 - 32 Bytes32 - 64 Bytes64 - 96 Bytes96 - 128 Bytes128 - 160 Bytes160 - 192 Bytes192 - 224 Bytes224 - 256 Bytes256 - 288 Bytes288 - 320 Bytes320 - 352 Bytes352 - 384 Bytes384 - 416 Bytes416 - 448 Bytes
0.26 %0.53 %0.79 %1.06 %1.32 %1.59 %1.85 %2.12 %2.38 %2.65 %2.91 %3.17 %3.44 %3.70 %

448 - 480 Bytes480 - 512 Bytes512 - 544 Bytes544 - 576 Bytes576 - 1024 Bytes1024 - 1536 Bytes1536 - 2048 Bytes2048 - 2560 Bytes2560 - 3072 Bytes3072 - 3568 Bytes3568 - 4096 Bytes4096 - 4680 Bytes> 4680 Bytes
3.97 %4.23 %4.50 %4.76 %5.03 %5.29 %5.56 %5.82 %6.08 %6.35 %6.61 %6.88 %7.14 %
", + "title": "Top Talkers" + }, + "output": "", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT *\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT name\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT TABLE_NAME AS `table`\n\t\tFROM information_schema.TABLES\n\t\tWHERE TABLE_NAME LIKE \"plugin_flowview_raw_%\"", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT SUM(p0To32) AS p0To32, SUM(p32To64) AS p32To64, SUM(p64To96) AS p64To96, SUM(p96To128) AS p96To128, SUM(p128To160) AS p128To160, SUM(p160To192) AS p160To192, SUM(p192To224) AS p192To224, SUM(p224To256) AS p224To256, SUM(p256To288) AS p256To288, SUM(p288To320) AS p288To320, SUM(p320To352) AS p320To352, SUM(p352To384) AS p352To384, SUM(p384To416) AS p384To416, SUM(p416To448) AS p416To448, SUM(p448To480) AS p448To480, SUM(p480To512) AS p480To512, SUM(p512To544) AS p512To544, SUM(p544To576) AS p544To576, SUM(p576To1024) AS p576To1024, SUM(p1024To1536) AS p1024To1536, SUM(p1536To2048) AS p1536To2048, SUM(p2048To2560) AS p2048To2560, SUM(p2560To3072) AS p2560To3072, SUM(p3072To3568) AS p3072To3568, SUM(p3568To4096) AS p3568To4096, SUM(p4096To4608) AS p4096To4608, SUM(p4608ToInfin) AS p4608ToInfin FROM (SELECT SUM(CASE WHEN bytes_ppacket BETWEEN 0 AND 32 THEN bytes_ppacket ELSE 0 END) AS p0To32, SUM(CASE WHEN bytes_ppacket BETWEEN 32 AND 64 THEN bytes_ppacket ELSE 0 END) AS p32To64, SUM(CASE WHEN bytes_ppacket BETWEEN 64 AND 96 THEN bytes_ppacket ELSE 0 END) AS p64To96, SUM(CASE WHEN bytes_ppacket BETWEEN 96 AND 128 THEN bytes_ppacket ELSE 0 END) AS p96To128, SUM(CASE WHEN bytes_ppacket BETWEEN 128 AND 160 THEN bytes_ppacket ELSE 0 END) AS p128To160, SUM(CASE WHEN bytes_ppacket BETWEEN 160 AND 192 THEN bytes_ppacket ELSE 0 END) AS p160To192, SUM(CASE WHEN bytes_ppacket BETWEEN 192 AND 224 THEN bytes_ppacket ELSE 0 END) AS p192To224, SUM(CASE WHEN bytes_ppacket BETWEEN 224 AND 256 THEN bytes_ppacket ELSE 0 END) AS p224To256, SUM(CASE WHEN bytes_ppacket BETWEEN 256 AND 288 THEN bytes_ppacket ELSE 0 END) AS p256To288, SUM(CASE WHEN bytes_ppacket BETWEEN 288 AND 320 THEN bytes_ppacket ELSE 0 END) AS p288To320, SUM(CASE WHEN bytes_ppacket BETWEEN 320 AND 352 THEN bytes_ppacket ELSE 0 END) AS p320To352, SUM(CASE WHEN bytes_ppacket BETWEEN 352 AND 384 THEN bytes_ppacket ELSE 0 END) AS p352To384, SUM(CASE WHEN bytes_ppacket BETWEEN 384 AND 416 THEN bytes_ppacket ELSE 0 END) AS p384To416, SUM(CASE WHEN bytes_ppacket BETWEEN 416 AND 448 THEN bytes_ppacket ELSE 0 END) AS p416To448, SUM(CASE WHEN bytes_ppacket BETWEEN 448 AND 480 THEN bytes_ppacket ELSE 0 END) AS p448To480, SUM(CASE WHEN bytes_ppacket BETWEEN 480 AND 512 THEN bytes_ppacket ELSE 0 END) AS p480To512, SUM(CASE WHEN bytes_ppacket BETWEEN 512 AND 544 THEN bytes_ppacket ELSE 0 END) AS p512To544, SUM(CASE WHEN bytes_ppacket BETWEEN 544 AND 576 THEN bytes_ppacket ELSE 0 END) AS p544To576, SUM(CASE WHEN bytes_ppacket BETWEEN 576 AND 1024 THEN bytes_ppacket ELSE 0 END) AS p576To1024, SUM(CASE WHEN bytes_ppacket BETWEEN 1024 AND 1536 THEN bytes_ppacket ELSE 0 END) AS p1024To1536, SUM(CASE WHEN bytes_ppacket BETWEEN 1536 AND 2048 THEN bytes_ppacket ELSE 0 END) AS p1536To2048, SUM(CASE WHEN bytes_ppacket BETWEEN 2048 AND 2560 THEN bytes_ppacket ELSE 0 END) AS p2048To2560, SUM(CASE WHEN bytes_ppacket BETWEEN 2560 AND 3072 THEN bytes_ppacket ELSE 0 END) AS p2560To3072, SUM(CASE WHEN bytes_ppacket BETWEEN 3072 AND 3568 THEN bytes_ppacket ELSE 0 END) AS p3072To3568, SUM(CASE WHEN bytes_ppacket BETWEEN 3568 AND 4096 THEN bytes_ppacket ELSE 0 END) AS p3568To4096, SUM(CASE WHEN bytes_ppacket BETWEEN 4096 AND 4608 THEN bytes_ppacket ELSE 0 END) AS p4096To4608, SUM(CASE WHEN bytes_ppacket BETWEEN 4680 AND -1 THEN bytes_ppacket ELSE 0 END) AS p4608ToInfin FROM plugin_flowview_raw_2024001 UNION ALL SELECT SUM(CASE WHEN bytes_ppacket BETWEEN 0 AND 32 THEN bytes_ppacket ELSE 0 END) AS p0To32, SUM(CASE WHEN bytes_ppacket BETWEEN 32 AND 64 THEN bytes_ppacket ELSE 0 END) AS p32To64, SUM(CASE WHEN bytes_ppacket BETWEEN 64 AND 96 THEN bytes_ppacket ELSE 0 END) AS p64To96, SUM(CASE WHEN bytes_ppacket BETWEEN 96 AND 128 THEN bytes_ppacket ELSE 0 END) AS p96To128, SUM(CASE WHEN bytes_ppacket BETWEEN 128 AND 160 THEN bytes_ppacket ELSE 0 END) AS p128To160, SUM(CASE WHEN bytes_ppacket BETWEEN 160 AND 192 THEN bytes_ppacket ELSE 0 END) AS p160To192, SUM(CASE WHEN bytes_ppacket BETWEEN 192 AND 224 THEN bytes_ppacket ELSE 0 END) AS p192To224, SUM(CASE WHEN bytes_ppacket BETWEEN 224 AND 256 THEN bytes_ppacket ELSE 0 END) AS p224To256, SUM(CASE WHEN bytes_ppacket BETWEEN 256 AND 288 THEN bytes_ppacket ELSE 0 END) AS p256To288, SUM(CASE WHEN bytes_ppacket BETWEEN 288 AND 320 THEN bytes_ppacket ELSE 0 END) AS p288To320, SUM(CASE WHEN bytes_ppacket BETWEEN 320 AND 352 THEN bytes_ppacket ELSE 0 END) AS p320To352, SUM(CASE WHEN bytes_ppacket BETWEEN 352 AND 384 THEN bytes_ppacket ELSE 0 END) AS p352To384, SUM(CASE WHEN bytes_ppacket BETWEEN 384 AND 416 THEN bytes_ppacket ELSE 0 END) AS p384To416, SUM(CASE WHEN bytes_ppacket BETWEEN 416 AND 448 THEN bytes_ppacket ELSE 0 END) AS p416To448, SUM(CASE WHEN bytes_ppacket BETWEEN 448 AND 480 THEN bytes_ppacket ELSE 0 END) AS p448To480, SUM(CASE WHEN bytes_ppacket BETWEEN 480 AND 512 THEN bytes_ppacket ELSE 0 END) AS p480To512, SUM(CASE WHEN bytes_ppacket BETWEEN 512 AND 544 THEN bytes_ppacket ELSE 0 END) AS p512To544, SUM(CASE WHEN bytes_ppacket BETWEEN 544 AND 576 THEN bytes_ppacket ELSE 0 END) AS p544To576, SUM(CASE WHEN bytes_ppacket BETWEEN 576 AND 1024 THEN bytes_ppacket ELSE 0 END) AS p576To1024, SUM(CASE WHEN bytes_ppacket BETWEEN 1024 AND 1536 THEN bytes_ppacket ELSE 0 END) AS p1024To1536, SUM(CASE WHEN bytes_ppacket BETWEEN 1536 AND 2048 THEN bytes_ppacket ELSE 0 END) AS p1536To2048, SUM(CASE WHEN bytes_ppacket BETWEEN 2048 AND 2560 THEN bytes_ppacket ELSE 0 END) AS p2048To2560, SUM(CASE WHEN bytes_ppacket BETWEEN 2560 AND 3072 THEN bytes_ppacket ELSE 0 END) AS p2560To3072, SUM(CASE WHEN bytes_ppacket BETWEEN 3072 AND 3568 THEN bytes_ppacket ELSE 0 END) AS p3072To3568, SUM(CASE WHEN bytes_ppacket BETWEEN 3568 AND 4096 THEN bytes_ppacket ELSE 0 END) AS p3568To4096, SUM(CASE WHEN bytes_ppacket BETWEEN 4096 AND 4608 THEN bytes_ppacket ELSE 0 END) AS p4096To4608, SUM(CASE WHEN bytes_ppacket BETWEEN 4680 AND -1 THEN bytes_ppacket ELSE 0 END) AS p4608ToInfin FROM plugin_flowview_raw_2024002 UNION ALL SELECT SUM(CASE WHEN bytes_ppacket BETWEEN 0 AND 32 THEN bytes_ppacket ELSE 0 END) AS p0To32, SUM(CASE WHEN bytes_ppacket BETWEEN 32 AND 64 THEN bytes_ppacket ELSE 0 END) AS p32To64, SUM(CASE WHEN bytes_ppacket BETWEEN 64 AND 96 THEN bytes_ppacket ELSE 0 END) AS p64To96, SUM(CASE WHEN bytes_ppacket BETWEEN 96 AND 128 THEN bytes_ppacket ELSE 0 END) AS p96To128, SUM(CASE WHEN bytes_ppacket BETWEEN 128 AND 160 THEN bytes_ppacket ELSE 0 END) AS p128To160, SUM(CASE WHEN bytes_ppacket BETWEEN 160 AND 192 THEN bytes_ppacket ELSE 0 END) AS p160To192, SUM(CASE WHEN bytes_ppacket BETWEEN 192 AND 224 THEN bytes_ppacket ELSE 0 END) AS p192To224, SUM(CASE WHEN bytes_ppacket BETWEEN 224 AND 256 THEN bytes_ppacket ELSE 0 END) AS p224To256, SUM(CASE WHEN bytes_ppacket BETWEEN 256 AND 288 THEN bytes_ppacket ELSE 0 END) AS p256To288, SUM(CASE WHEN bytes_ppacket BETWEEN 288 AND 320 THEN bytes_ppacket ELSE 0 END) AS p288To320, SUM(CASE WHEN bytes_ppacket BETWEEN 320 AND 352 THEN bytes_ppacket ELSE 0 END) AS p320To352, SUM(CASE WHEN bytes_ppacket BETWEEN 352 AND 384 THEN bytes_ppacket ELSE 0 END) AS p352To384, SUM(CASE WHEN bytes_ppacket BETWEEN 384 AND 416 THEN bytes_ppacket ELSE 0 END) AS p384To416, SUM(CASE WHEN bytes_ppacket BETWEEN 416 AND 448 THEN bytes_ppacket ELSE 0 END) AS p416To448, SUM(CASE WHEN bytes_ppacket BETWEEN 448 AND 480 THEN bytes_ppacket ELSE 0 END) AS p448To480, SUM(CASE WHEN bytes_ppacket BETWEEN 480 AND 512 THEN bytes_ppacket ELSE 0 END) AS p480To512, SUM(CASE WHEN bytes_ppacket BETWEEN 512 AND 544 THEN bytes_ppacket ELSE 0 END) AS p512To544, SUM(CASE WHEN bytes_ppacket BETWEEN 544 AND 576 THEN bytes_ppacket ELSE 0 END) AS p544To576, SUM(CASE WHEN bytes_ppacket BETWEEN 576 AND 1024 THEN bytes_ppacket ELSE 0 END) AS p576To1024, SUM(CASE WHEN bytes_ppacket BETWEEN 1024 AND 1536 THEN bytes_ppacket ELSE 0 END) AS p1024To1536, SUM(CASE WHEN bytes_ppacket BETWEEN 1536 AND 2048 THEN bytes_ppacket ELSE 0 END) AS p1536To2048, SUM(CASE WHEN bytes_ppacket BETWEEN 2048 AND 2560 THEN bytes_ppacket ELSE 0 END) AS p2048To2560, SUM(CASE WHEN bytes_ppacket BETWEEN 2560 AND 3072 THEN bytes_ppacket ELSE 0 END) AS p2560To3072, SUM(CASE WHEN bytes_ppacket BETWEEN 3072 AND 3568 THEN bytes_ppacket ELSE 0 END) AS p3072To3568, SUM(CASE WHEN bytes_ppacket BETWEEN 3568 AND 4096 THEN bytes_ppacket ELSE 0 END) AS p3568To4096, SUM(CASE WHEN bytes_ppacket BETWEEN 4096 AND 4608 THEN bytes_ppacket ELSE 0 END) AS p4096To4608, SUM(CASE WHEN bytes_ppacket BETWEEN 4680 AND -1 THEN bytes_ppacket ELSE 0 END) AS p4608ToInfin FROM plugin_flowview_raw_2024003 ) AS rs LIMIT 20", + "params": [] + } + ], + "log": [ + "PARALLEL STATS: Time: Threads:1 Shards:3" + ], + "messages": [], + "html": [ + [ + "cacti_session_close", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": [], + "session": { + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + } + } + }, + "plan": null + }, + "the whole range from the Filter": { + "return": { + "id": "4", + "name": "Top Talkers", + "device_id": "0", + "ex_addr": "", + "template_id": "-1", + "statistics": "10", + "printed": "0", + "sortfield": "bytes", + "cutofflines": "20", + "cutoffoctets": "0", + "includeif": "4", + "usenat": "", + "sourceip": "", + "sourceinterface": "", + "sourceport": "", + "sourceas": "", + "destip": "", + "destinterface": "", + "destport": "", + "destas": "", + "postnatsourceip": "", + "postnatsourceport": "", + "postnatdestip": "", + "postnatdestport": "", + "protocols": "", + "tcpflags": "", + "tosfields": "", + "data": [ + { + "src_addr": "10.0.0.1", + "dst_addr": "10.0.0.2", + "src_domain": "a.example", + "dst_domain": "", + "flows": "3", + "bytes": "3000", + "packets": "30" + }, + { + "src_addr": "10.0.0.3", + "dst_addr": "10.0.0.4", + "src_domain": "", + "dst_domain": "b.example", + "flows": "1", + "bytes": "64", + "packets": "1" + } + ], + "table": "
Source DNSDest DNSSource IPDest IPFlowsBytesPacketsBytes/Packet
a.exampleunresolved10.0.0.110.0.0.233,00030100
unresolvedb.example10.0.0.310.0.0.4164164
", + "title": "Top Talkers" + }, + "output": "", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT *\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT name\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT TABLE_NAME AS `table`\n\t\tFROM information_schema.TABLES\n\t\tWHERE TABLE_NAME LIKE \"plugin_flowview_raw_%\"", + "params": [] + }, + { + "fn": "db_fetch_assoc_prepared", + "sql": "SELECT INET6_NTOA(src_addr) AS src_addr, INET6_NTOA(dst_addr) AS dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM (SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024001 GROUP BY src_addr, dst_addr UNION ALL SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024002 GROUP BY src_addr, dst_addr UNION ALL SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024003 GROUP BY src_addr, dst_addr) AS rs GROUP BY INET6_NTOA(src_addr), INET6_NTOA(dst_addr) ORDER BY bytes DESC LIMIT 20", + "params": [] + } + ], + "log": [ + "PARALLEL STATS: Time: Threads:1 Shards:3" + ], + "messages": [], + "html": [ + [ + "cacti_session_close", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": [], + "session": { + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + } + } + }, + "plan": null + }, + "zero octets in the request": { + "return": { + "id": "4", + "name": "Top Talkers", + "device_id": "0", + "ex_addr": "", + "template_id": "-1", + "statistics": "10", + "printed": "0", + "sortfield": "bytes", + "cutofflines": "20", + "cutoffoctets": "2048", + "includeif": "0", + "usenat": "", + "sourceip": "", + "sourceinterface": "", + "sourceport": "", + "sourceas": "", + "destip": "", + "destinterface": "", + "destport": "", + "destas": "", + "postnatsourceip": "", + "postnatsourceport": "", + "postnatdestip": "", + "postnatdestport": "", + "protocols": "", + "tcpflags": "", + "tosfields": "", + "data": [ + { + "src_addr": "10.0.0.1", + "dst_addr": "10.0.0.2", + "src_domain": "a.example", + "dst_domain": "", + "flows": "3", + "bytes": "3000", + "packets": "30" + }, + { + "src_addr": "10.0.0.3", + "dst_addr": "10.0.0.4", + "src_domain": "", + "dst_domain": "b.example", + "flows": "1", + "bytes": "64", + "packets": "1" + } + ], + "table": "
Source DNSDest DNSSource IPDest IPFlowsBytesPacketsBytes/Packet
a.exampleunresolved10.0.0.110.0.0.233,00030100
unresolvedb.example10.0.0.310.0.0.4164164
", + "title": "Top Talkers" + }, + "output": "", + "exception": null, + "db": [ + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_row_prepared", + "sql": "SELECT *\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_cell_prepared", + "sql": "SELECT name\n\t\tFROM plugin_flowview_queries\n\t\tWHERE id = ?", + "params": [ + 4 + ] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT id, name\n\t\tFROM plugin_flowview_devices\n\t\tORDER BY name", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT template_id AS id, template_id AS name\n\t\tFROM plugin_flowview_device_templates\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT -1 AS id, \"All\" AS name UNION\n\t\tSELECT DISTINCT ex_addr AS id, name\n\t\tFROM plugin_flowview_device_streams\n\t\tORDER BY id", + "params": [] + }, + { + "fn": "db_fetch_assoc", + "sql": "SELECT TABLE_NAME AS `table`\n\t\tFROM information_schema.TABLES\n\t\tWHERE TABLE_NAME LIKE \"plugin_flowview_raw_%\"", + "params": [] + }, + { + "fn": "db_fetch_assoc_prepared", + "sql": "SELECT INET6_NTOA(src_addr) AS src_addr, INET6_NTOA(dst_addr) AS dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM (SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024001 GROUP BY src_addr, dst_addr UNION ALL SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024002 GROUP BY src_addr, dst_addr UNION ALL SELECT src_addr, dst_addr, SUM(flows) AS flows, SUM(bytes) AS bytes, SUM(packets) AS packets, src_domain, dst_domain FROM plugin_flowview_raw_2024003 GROUP BY src_addr, dst_addr) AS rs GROUP BY INET6_NTOA(src_addr), INET6_NTOA(dst_addr) HAVING bytes < 2048 ORDER BY bytes DESC LIMIT 20", + "params": [] + } + ], + "log": [ + "PARALLEL STATS: Time: Threads:1 Shards:3" + ], + "messages": [], + "html": [ + [ + "cacti_session_close", + [] + ] + ], + "exec": [], + "js": [], + "notices": [], + "request": { + "cutoffoctets": "0" + }, + "session": { + "sess_flowview_table_details": { + "plugin_flowview_raw_2024001": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024002": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + }, + "plugin_flowview_raw_2024003": { + "min_date": "2024-01-02 00:00:00", + "max_date": "2024-01-02 23:00:00", + "table_partition": "" + } + } + }, + "plan": null + } +} diff --git a/tests/helpers/golden.php b/tests/helpers/golden.php new file mode 100644 index 00000000..8bfb210e --- /dev/null +++ b/tests/helpers/golden.php @@ -0,0 +1,147 @@ + + */ +function flowview_golden_capture(callable $fn): array { + $GLOBALS['__test_db_calls'] = array(); + $GLOBALS['__test_cacti_log'] = array(); + $GLOBALS['__test_cacti_log_print'] = array(); + $GLOBALS['__test_messages'] = array(); + $GLOBALS['__test_html'] = array(); + $GLOBALS['__test_exec'] = array(); + $GLOBALS['__test_javascript_messages'] = array(); + + $notices = array(); + + set_error_handler(function ($errno, $errstr) use (&$notices) { + $notices[] = array($errno, $errstr); + + return true; + }); + + $exception = null; + $return = null; + + ob_start(); + + try { + $return = $fn(); + } catch (Throwable $e) { + $exception = get_class($e) . ': ' . $e->getMessage(); + } finally { + $output = ob_get_clean(); + + restore_error_handler(); + } + + $db = array(); + + foreach ($GLOBALS['__test_db_calls'] as $call) { + $db[] = array( + 'fn' => $call['fn'], + 'sql' => $call['sql'] ?? null, + 'params' => $call['params'] ?? null, + ); + } + + $trace = array( + 'return' => $return, + 'output' => $output, + 'exception' => $exception, + 'db' => $db, + 'log' => $GLOBALS['__test_cacti_log'], + 'messages' => $GLOBALS['__test_messages'], + 'html' => $GLOBALS['__test_html'], + 'exec' => $GLOBALS['__test_exec'], + 'js' => $GLOBALS['__test_javascript_messages'], + 'notices' => $notices, + 'request' => $_REQUEST, + 'session' => $_SESSION ?? null, + ); + + return flowview_golden_normalise($trace); +} + +/** + * Replace what changes from run to run (wall-clock timings and times) and + * round-trip the trace through JSON, so a recorded and a live trace compare + * like with like. + * + * @param array $trace + * + * @return array + */ +function flowview_golden_normalise(array $trace): array { + $json = json_encode($trace, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_PRESERVE_ZERO_FRACTION | JSON_PARTIAL_OUTPUT_ON_ERROR); + + $json = preg_replace('/Time:[0-9]+\.[0-9]+/', 'Time:', $json); + $json = preg_replace('/parallel_database_query_temp_[0-9]+/', 'parallel_database_query_temp_', $json); + + return json_decode($json, true); +} + +/** + * Compare a trace with the recorded one, or record it. + * + * @param string $suite File name, under tests/fixtures/golden, without .json. + * @param string $case The case within the suite. + * @param array $trace From flowview_golden_capture(). + * + * @return void + */ +function flowview_golden_assert(string $suite, string $case, array $trace): void { + $path = __DIR__ . '/../fixtures/golden/' . $suite . '.json'; + + if (getenv('FLOWVIEW_GOLDEN_UPDATE') === '1') { + $recorded = is_readable($path) ? json_decode((string) file_get_contents($path), true) : array(); + + $recorded[$case] = $trace; + + ksort($recorded); + + if (!is_dir(dirname($path))) { + mkdir(dirname($path), 0775, true); + } + + file_put_contents($path, json_encode($recorded, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_PRESERVE_ZERO_FRACTION) . "\n"); + } + + $recorded = json_decode((string) file_get_contents($path), true); + + expect($recorded)->toHaveKey($case); + expect($trace)->toBe($recorded[$case]); +}