2011-12-21 14:09:26 +01:00
< ? php
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// 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; 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.
global $config ;
include_once ( " include/functions_ui.php " );
check_login ();
2011-12-23 09:37:36 +01:00
if ( ! check_acl ( $config [ " id_user " ], 0 , " IR " )) {
2011-12-21 14:09:26 +01:00
db_pandora_audit ( " ACL Violation " ,
2013-01-11 17:02:10 +01:00
" Trying to access netflow setup " );
2011-12-21 14:09:26 +01:00
require ( " general/noaccess.php " );
return ;
}
2011-12-23 09:37:36 +01:00
$update = ( bool ) get_parameter ( " update " );
2011-12-21 14:09:26 +01:00
2013-10-16 18:46:09 +02:00
$table -> width = '98%' ;
2011-12-23 09:37:36 +01:00
$table -> border = 0 ;
$table -> cellspacing = 3 ;
$table -> cellpadding = 5 ;
$table -> class = " databox_color " ;
2011-12-21 14:09:26 +01:00
$table -> data = array ();
2013-02-27 15:25:24 +01:00
$table -> data [ 0 ][ 0 ] = '<b>' . __ ( 'Data storage path' ) . '</b>' .
ui_print_help_tip ( __ ( " Directory where netflow data will be stored. " ), true );
2011-12-23 09:37:36 +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
2013-09-13 16:21:22 +02:00
$table -> data [ 1 ][ 0 ] = '<b>' . __ ( 'Daemon interval' ) . '</b>' .
ui_print_help_tip ( __ ( " Specifies the time interval in seconds to rotate netflow data files. " ), true );
2012-01-23 16:37:45 +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
2013-02-27 15:25:24 +01:00
$table -> data [ 2 ][ 0 ] = '<b>' . __ ( 'Daemon binary path' ) . '</b>' ;
2012-01-23 16:37:45 +01:00
$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
2013-02-27 15:25:24 +01:00
$table -> data [ 3 ][ 0 ] = '<b>' . __ ( 'Nfdump binary path' ) . '</b>' ;
2012-12-05 Ramon Novoa <rnovoa@artica.es>
* pandoradb_data.sql,
include/functions_config.php,
include/functions_netflow.php,
operation/netflow/nf_live_view.php,
pandoradb.data.postgreSQL.sql,
pandoradb.data.oracle.sql,
godmode/setup/setup_netflow.php,
godmode/netflow/nf_edit_form.php: Performance improvements. Use csv
output to avoid using regular expressions. Removed byte, flow and
packet unit and added kilobyte, megabyte, kilobytes per second and
megabytes per second.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7232 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-12-05 18:29:06 +01:00
$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
2013-02-27 15:25:24 +01:00
$table -> data [ 4 ][ 0 ] = '<b>' . __ ( 'Nfexpire binary path' ) . '</b>' ;
2013-02-14 17:44:45 +01:00
$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
2013-02-27 15:25:24 +01:00
$table -> data [ 5 ][ 0 ] = '<b>' . __ ( 'Maximum chart resolution' ) . '</b>' . ui_print_help_tip ( __ ( " Maximum number of points that a netflow area chart will display. The higher the resolution the performance. Values between 50 and 100 are recommended. " ), true );
2013-02-14 17:44:45 +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
2013-02-27 15:25:24 +01:00
$table -> data [ 6 ][ 0 ] = '<b>' . __ ( 'Disable custom live view filters' ) . '</b>' .
ui_print_help_tip ( __ ( " Disable the definition of custom filters in the live view. Only existing filters can be used. " ), true );
2014-04-23 11:34:00 +02:00
$table -> data [ 6 ][ 1 ] = __ ( 'Yes' ) . ' ' . html_print_radio_button ( 'netflow_disable_custom_lvfilters' , 1 , '' , $config [ " netflow_disable_custom_lvfilters " ], true ) . ' ' ;
$table -> data [ 6 ][ 1 ] .= __ ( 'No' ) . ' ' . html_print_radio_button ( 'netflow_disable_custom_lvfilters' , 0 , '' , $config [ " netflow_disable_custom_lvfilters " ], true );
2013-02-27 15:25:24 +01:00
$table -> data [ 7 ][ 0 ] = '<b>' . __ ( 'Netflow max lifetime' ) . '</b>' . ui_print_help_tip ( __ ( " Sets the maximum lifetime for netflow data in days. " ), true );
2013-02-14 17:44:45 +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
2014-04-16 14:06:19 +02:00
$table -> data [ 8 ][ 0 ] = '<b>' . __ ( 'Name resolution for IP address' ) . '</b>' .
ui_print_help_tip ( __ ( " Resolve the IP addresses to get their hostnames. " ), true );
2014-04-23 11:34:00 +02:00
$onclick = " if (!confirm(' " . __ ( 'Warning' ) . " . " . __ ( 'IP address resolution can take a lot of time' ) . " .')) return false; " ;
$table -> data [ 8 ][ 1 ] = __ ( 'Yes' ) . ' ' . html_print_radio_button_extended ( 'netflow_get_ip_hostname' , 1 , '' , $config [ " netflow_get_ip_hostname " ], false , $onclick , '' , true ) . ' ' ;
$table -> data [ 8 ][ 1 ] .= __ ( 'No' ) . ' ' . html_print_radio_button ( 'netflow_get_ip_hostname' , 0 , '' , $config [ " netflow_get_ip_hostname " ], 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
2011-12-23 09:37:36 +01:00
html_print_table ( $table );
// Update button
2013-10-16 18:46:09 +02:00
echo '<div class="action-buttons" style="width:98%;">' ;
2012-01-24 Ramon Novoa <rnovoa@artica.es>
* include/functions_config.php,
include/functions_netflow.php,
pandoradb.sql,
pandoradb.postgreSQL.sql,
pandoradb.oracle.sql,
operation/netflow/nf_live_view.php,
extras/pandoradb_migrate_4.0.x_to_4.1.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_4.1.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_4.1.postgreSQL.sql,
godmode/agentes/module_manager_editor_prediction.php,
godmode/agentes/configurar_agente.php,
godmode/menu.php,
godmode/netflow/nf_edit_form.php: Added support for enterprise
netflow modules.
* godmode/netflow/nf_manage.php: Moved to
godmode/setup/setup_netflow.php.
* godmode/netflow/nf_option_form.php: Removed from repository. Not used.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5416 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-01-24 18:11:12 +01:00
html_print_input_hidden ( 'update_config' , 1 );
2011-12-23 09:37:36 +01:00
html_print_submit_button ( __ ( 'Update' ), 'upd_button' , false , 'class="sub upd"' );
echo '</div></form>' ;
2013-02-27 15:25:24 +01:00
2014-04-16 14:06:19 +02:00
?>