From c06b9b5e59fa8752a75cddd8097e7e7e45ec086d Mon Sep 17 00:00:00 2001 From: koichirok Date: Thu, 6 Oct 2011 08:07:35 +0000 Subject: [PATCH] 2011-10-06 Koichiro KIKUCHI * pandora_server/util/pandora_manage.pl: Added support for specifying ff_threthold value for network, snmp and plugin module creation. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5047 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_server/ChangeLog | 5 +++++ pandora_server/util/pandora_manage.pl | 19 +++++++++++-------- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/pandora_server/ChangeLog b/pandora_server/ChangeLog index dddace6494..a96d163285 100644 --- a/pandora_server/ChangeLog +++ b/pandora_server/ChangeLog @@ -1,3 +1,8 @@ +2011-10-06 Koichiro KIKUCHI + + * util/pandora_manage.pl: Added support for specifying ff_threthold + value for network, snmp and plugin module creation. + 2011-10-06 Koichiro Kikuchi * lib/PandoraFMS/DB.pm: Added function to get module group name. diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index abc82c8bf5..8b52870252 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -430,9 +430,9 @@ sub help_screen{ help_screen_line('--create_agent', ' [
]', 'Create agent'); help_screen_line('--delete_agent', '', 'Delete agent'); help_screen_line('--create_data_module', ' [ ]', 'Add data server module to agent'); - help_screen_line('--create_network_module', ' [ ]', 'Add not snmp network module to agent'); - help_screen_line('--create_snmp_module', ' [ ]', 'Add snmp network module to agent'); - help_screen_line('--create_plugin_module', ' [ ]', 'Add plug-in module to agent'); + help_screen_line('--create_network_module', ' [ ]', 'Add not snmp network module to agent'); + help_screen_line('--create_snmp_module', ' [ ]', 'Add snmp network module to agent'); + help_screen_line('--create_plugin_module', ' [ ]', 'Add plug-in module to agent'); help_screen_line('--delete_module', 'Delete module from agent', ' '); help_screen_line('--create_template_module', ' ', 'Add alert template to module'); help_screen_line('--delete_template_module', ' ', 'Delete alert template from module'); @@ -660,7 +660,7 @@ sub pandora_manage_main ($$$) { my ($module_name, $module_type, $agent_name, $module_address, $module_port, $description, $module_group, $min, $max, $post_process, $interval, $warning_min, $warning_max, $critical_min, - $critical_max, $history_data, $definition_file) = @ARGV[2..17]; + $critical_max, $history_data, $ff_threshold) = @ARGV[2..18]; my $module_name_def; my $module_type_def; @@ -718,18 +718,19 @@ sub pandora_manage_main ($$$) { $parameters{'max'} = $max unless !defined ($max); $parameters{'post_process'} = $post_process unless !defined ($post_process); $parameters{'module_interval'} = $interval unless !defined ($interval); + $parameters{'min_ff_event'} = $ff_threshold unless !defined ($ff_threshold); $parameters{'id_modulo'} = 2; pandora_create_module_from_hash ($conf, \%parameters, $dbh); } elsif ($param eq '--create_snmp_module') { - param_check($ltotal, 25, 19); + param_check($ltotal, 26, 20); my ($module_name, $module_type, $agent_name, $module_address, $module_port, $version, $community, $oid, $description, $module_group, $min, $max, $post_process, $interval, $warning_min, $warning_max, $critical_min, $critical_max, $history_data, $snmp3_priv_method, $snmp3_priv_pass, - $snmp3_sec_level, $snmp3_auth_method, $snmp3_auth_user, $snmp3_priv_pass) = @ARGV[2..26]; + $snmp3_sec_level, $snmp3_auth_method, $snmp3_auth_user, $snmp3_priv_pass, $ff_threshold) = @ARGV[2..27]; my $module_name_def; my $module_type_def; @@ -779,6 +780,7 @@ sub pandora_manage_main ($$$) { $parameters{'module_interval'} = $interval unless !defined ($interval); $parameters{'snmp_community'} = $community unless !defined ($community); $parameters{'snmp_oid'} = $oid unless !defined ($oid); + $parameters{'min_ff_event'} = $ff_threshold unless !defined ($ff_threshold); if($version == 3) { $parameters{'custom_string_1'} = $snmp3_priv_method; @@ -795,12 +797,12 @@ sub pandora_manage_main ($$$) { pandora_create_module_from_hash ($conf, \%parameters, $dbh); } elsif ($param eq '--create_plugin_module') { - param_check($ltotal, 20, 11); + param_check($ltotal, 21, 12); my ($module_name, $module_type, $agent_name, $module_address, $module_port, $plugin_name, $user, $password, $parameters, $description, $module_group, $min, $max, $post_process, $interval, $warning_min, $warning_max, $critical_min, $critical_max, $history_data, - $definition_file) = @ARGV[2..21]; + $ff_threshold) = @ARGV[2..22]; my $module_name_def; my $module_type_def; @@ -854,6 +856,7 @@ sub pandora_manage_main ($$$) { $parameters{'max'} = $max unless !defined ($max); $parameters{'post_process'} = $post_process unless !defined ($post_process); $parameters{'module_interval'} = $interval unless !defined ($interval); + $parameters{'min_ff_event'} = $ff_threshold unless !defined ($ff_threshold); $parameters{'id_modulo'} = 4;