2011-12-21 14:09:26 +01:00
|
|
|
<?php
|
2019-03-04 13:12:01 +01:00
|
|
|
/**
|
2022-05-06 11:19:44 +02:00
|
|
|
* Setup view for Netflow
|
|
|
|
*
|
|
|
|
* @category Setup
|
|
|
|
* @package Pandora FMS
|
|
|
|
* @subpackage Configuration
|
|
|
|
* @version 1.0.0
|
|
|
|
* @license See below
|
|
|
|
*
|
2019-03-04 13:12:01 +01:00
|
|
|
* ______ ___ _______ _______ ________
|
|
|
|
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
|
|
|
|
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
|
|
|
|
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
|
|
|
|
*
|
|
|
|
* ============================================================================
|
2022-05-06 11:19:44 +02:00
|
|
|
* Copyright (c) 2005-2022 Artica Soluciones Tecnologicas
|
2019-03-04 13:12:01 +01:00
|
|
|
* Please see http://pandorafms.org for full contribution list
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation for version 2.
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
* ============================================================================
|
|
|
|
*/
|
2011-12-21 14:09:26 +01:00
|
|
|
|
2022-05-06 11:19:44 +02:00
|
|
|
// Begin.
|
2011-12-21 14:09:26 +01:00
|
|
|
global $config;
|
|
|
|
|
2019-01-30 16:18:44 +01:00
|
|
|
require_once 'include/functions_ui.php';
|
2011-12-21 14:09:26 +01:00
|
|
|
|
2019-01-30 16:18:44 +01:00
|
|
|
check_login();
|
2011-12-21 14:09:26 +01:00
|
|
|
|
2019-01-30 16:18:44 +01:00
|
|
|
$update = (bool) get_parameter('update');
|
2011-12-21 14:09:26 +01:00
|
|
|
|
2022-05-06 11:19:44 +02:00
|
|
|
$table = new stdClass();
|
2015-06-26 11:20:08 +02:00
|
|
|
$table->width = '100%';
|
2011-12-23 09:37:36 +01:00
|
|
|
$table->border = 0;
|
|
|
|
$table->cellspacing = 3;
|
|
|
|
$table->cellpadding = 5;
|
2019-01-30 16:18:44 +01:00
|
|
|
$table->class = 'databox filters';
|
2011-12-21 14:09:26 +01:00
|
|
|
|
2019-01-30 16:18:44 +01:00
|
|
|
$table->data = [];
|
2013-02-27 15:25:24 +01:00
|
|
|
|
2020-05-29 11:37:06 +02:00
|
|
|
$table->data[0][0] = '<b>'.__('Data storage path').'</b>';
|
2019-01-30 16:18:44 +01:00
|
|
|
$table->data[0][1] = html_print_input_text('netflow_path', $config['netflow_path'], false, 50, 200, true);
|
2014-04-23 11:34:00 +02:00
|
|
|
|
2020-05-29 11:37:06 +02:00
|
|
|
$table->data[1][0] = '<b>'.__('Daemon interval').'</b>';
|
2019-01-30 16:18:44 +01:00
|
|
|
$table->data[1][1] = html_print_input_text('netflow_interval', $config['netflow_interval'], false, 50, 200, true);
|
2014-04-23 11:34:00 +02:00
|
|
|
|
2019-01-30 16:18:44 +01:00
|
|
|
$table->data[2][0] = '<b>'.__('Daemon binary path').'</b>';
|
|
|
|
$table->data[2][1] = html_print_input_text('netflow_daemon', $config['netflow_daemon'], false, 50, 200, true);
|
2014-04-23 11:34:00 +02:00
|
|
|
|
2019-01-30 16:18:44 +01:00
|
|
|
$table->data[3][0] = '<b>'.__('Nfdump binary path').'</b>';
|
|
|
|
$table->data[3][1] = html_print_input_text('netflow_nfdump', $config['netflow_nfdump'], false, 50, 200, true);
|
2014-04-23 11:34:00 +02:00
|
|
|
|
2019-01-30 16:18:44 +01:00
|
|
|
$table->data[4][0] = '<b>'.__('Nfexpire binary path').'</b>';
|
|
|
|
$table->data[4][1] = html_print_input_text('netflow_nfexpire', $config['netflow_nfexpire'], false, 50, 200, true);
|
2014-04-23 11:34:00 +02:00
|
|
|
|
2020-05-29 11:37:06 +02:00
|
|
|
$table->data[5][0] = '<b>'.__('Maximum chart resolution').'</b>';
|
2019-01-30 16:18:44 +01:00
|
|
|
$table->data[5][1] = html_print_input_text('netflow_max_resolution', $config['netflow_max_resolution'], false, 50, 200, true);
|
2014-04-23 11:34:00 +02:00
|
|
|
|
2020-05-29 11:37:06 +02:00
|
|
|
$table->data[6][0] = '<b>'.__('Disable custom live view filters').'</b>';
|
2019-03-04 13:12:01 +01:00
|
|
|
$table->data[6][1] = html_print_checkbox_switch('netflow_disable_custom_lvfilters', 1, $config['netflow_disable_custom_lvfilters'], true);
|
2020-05-29 11:37:06 +02:00
|
|
|
$table->data[7][0] = '<b>'.__('Netflow max lifetime').'</b>';
|
2019-01-30 16:18:44 +01:00
|
|
|
$table->data[7][1] = html_print_input_text('netflow_max_lifetime', $config['netflow_max_lifetime'], false, 50, 200, true);
|
2014-04-23 11:34:00 +02:00
|
|
|
|
2020-05-29 11:37:06 +02:00
|
|
|
$table->data[8][0] = '<b>'.__('Name resolution for IP address').'</b>';
|
2019-01-30 16:18:44 +01:00
|
|
|
$onclick = "if (!confirm('".__('Warning').'. '.__('IP address resolution can take a lot of time')."')) return false;";
|
2019-03-04 13:12:01 +01:00
|
|
|
$table->data[8][1] = html_print_checkbox_switch_extended('netflow_get_ip_hostname', 1, $config['netflow_get_ip_hostname'], false, $onclick, '', true);
|
2013-03-04 15:41:26 +01:00
|
|
|
|
2011-12-23 09:37:36 +01:00
|
|
|
echo '<form id="netflow_setup" method="post">';
|
2013-02-27 15:25:24 +01:00
|
|
|
|
2019-01-30 16:18:44 +01:00
|
|
|
html_print_table($table);
|
2011-12-23 09:37:36 +01:00
|
|
|
|
2019-03-04 13:12:01 +01:00
|
|
|
// Update button.
|
2021-03-11 15:40:23 +01:00
|
|
|
echo '<div class="action-buttons w100p">';
|
2019-01-30 16:18:44 +01:00
|
|
|
html_print_input_hidden('update_config', 1);
|
|
|
|
html_print_submit_button(__('Update'), 'upd_button', false, 'class="sub upd"');
|
2011-12-23 09:37:36 +01:00
|
|
|
echo '</div></form>';
|