2012-01-23 Ramon Novoa <rnovoa@artica.es>
* pandoradb_data.sql, pandoradb.sql, pandoradb.data.postgreSQL.sql, pandoradb.data.oracle.sql, godmode/netflow/nf_manage.php: Added netflow daemon configuration options. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5403 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
012f714eb2
commit
3c20f8d77f
|
@ -1,3 +1,11 @@
|
|||
2012-01-23 Ramon Novoa <rnovoa@artica.es>
|
||||
|
||||
* pandoradb_data.sql, pandoradb.sql,
|
||||
pandoradb.data.postgreSQL.sql,
|
||||
pandoradb.data.oracle.sql,
|
||||
godmode/netflow/nf_manage.php: Added netflow daemon configuration
|
||||
options.
|
||||
|
||||
2012-01-23 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
|
||||
|
||||
* include/functions_api.php: Modified get_policy_modules function.
|
||||
|
|
|
@ -38,14 +38,12 @@ $update = (bool) get_parameter ("update");
|
|||
if ($update) {
|
||||
|
||||
$config['netflow_path'] = (string)get_parameter('netflow_path');
|
||||
$config['netflow_interval'] = (int)get_parameter('netflow_interval');
|
||||
$config['netflow_daemon'] = (string)get_parameter('netflow_daemon');
|
||||
|
||||
if (db_get_value('token', 'tconfig', 'token', 'netflow_path') === false) {
|
||||
config_create_value('netflow_path', $config['netflow_path']);
|
||||
} else {
|
||||
db_process_sql_update ('tconfig',
|
||||
array ('value' => $config['netflow_path']),
|
||||
array ('token' => 'netflow_path'));
|
||||
}
|
||||
db_process_sql_update ('tconfig', array ('value' => $config['netflow_path']), array ('token' => 'netflow_path'));
|
||||
db_process_sql_update ('tconfig', array ('value' => $config['netflow_interval']), array ('token' => 'netflow_interval'));
|
||||
db_process_sql_update ('tconfig', array ('value' => $config['netflow_daemon']), array ('token' => 'netflow_daemon'));
|
||||
}
|
||||
|
||||
$table->width = '70%';
|
||||
|
@ -57,8 +55,12 @@ $table->style[0] = 'vertical-align: top;';
|
|||
|
||||
$table->data = array ();
|
||||
|
||||
$table->data[0][0] = '<b>'.__('Path').'</b>'. ui_print_help_tip (__("Read input from a sequence of files in the same directory."), true);
|
||||
$table->data[0][0] = '<b>'.__('Data storage path').'</b>'. ui_print_help_tip (__("Directory where netflow data will be stored."), true);
|
||||
$table->data[0][1] = html_print_input_text ('netflow_path', $config['netflow_path'], false, 50, 200, true);
|
||||
$table->data[1][0] = '<b>'.__('Daemon interval').'</b>';
|
||||
$table->data[1][1] = html_print_input_text ('netflow_interval', $config['netflow_interval'], false, 50, 200, true);
|
||||
$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);
|
||||
|
||||
echo '<form id="netflow_setup" method="post">';
|
||||
|
||||
|
|
|
@ -85,6 +85,9 @@ INSERT INTO tconfig (token, value) VALUES ('integria_enabled', '0');
|
|||
INSERT INTO tconfig (token, value) VALUES ('integria_api_password', ' ');
|
||||
INSERT INTO tconfig (token, value) VALUES ('integria_inventory', '0');
|
||||
INSERT INTO tconfig (token, value) VALUES ('integria_url', ' ');
|
||||
INSERT INTO tconfig (token, value) VALUES ('netflow_path', '/var/spool/pandora/data_in/netflow');
|
||||
INSERT INTO tconfig (token, value) VALUES ('netflow_interval', '300');
|
||||
INSERT INTO tconfig (token, value) VALUES ('netflow_daemon', '/usr/bin/nfcapd');
|
||||
COMMIT;
|
||||
END;;
|
||||
|
||||
|
|
|
@ -81,7 +81,10 @@ INSERT INTO "tconfig" ("token", "value") VALUES
|
|||
('integria_enabled', '0'),
|
||||
('integria_api_password', ''),
|
||||
('integria_inventory', '0'),
|
||||
('integria_url', '');
|
||||
('integria_url', ''),
|
||||
('netflow_path', '/var/spool/pandora/data_in/netflow'),
|
||||
('netflow_interval', '300'),
|
||||
('netflow_daemon', '/usr/bin/nfcapd');
|
||||
COMMIT WORK;
|
||||
|
||||
|
||||
|
|
|
@ -1292,7 +1292,7 @@ CREATE TABLE IF NOT EXISTS `tnetflow_filter` (
|
|||
`ip_src` TEXT NOT NULL,
|
||||
`dst_port` TEXT NOT NULL,
|
||||
`src_port` TEXT NOT NULL,
|
||||
`advanced_filter` TEXT NOT NULL,,
|
||||
`advanced_filter` TEXT NOT NULL,
|
||||
`aggregate` varchar(60),
|
||||
`output` varchar(60),
|
||||
PRIMARY KEY (`id_sg`)
|
||||
|
|
|
@ -80,7 +80,10 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES
|
|||
('integria_enabled', '0'),
|
||||
('integria_api_password', ''),
|
||||
('integria_inventory', '0'),
|
||||
('integria_url', '');
|
||||
('integria_url', ''),
|
||||
('netflow_path', '/var/spool/pandora/data_in/netflow'),
|
||||
('netflow_interval', '300'),
|
||||
('netflow_daemon', '/usr/bin/nfcapd');
|
||||
|
||||
UNLOCK TABLES;
|
||||
|
||||
|
|
Loading…
Reference in New Issue