Merge branch 'develop' of https://192.168.50.5:8081/artica/pandorafms into develop

This commit is contained in:
m-lopez-f 2016-10-20 10:39:56 +02:00
commit 1a4866fb3b
26 changed files with 84 additions and 54 deletions

View File

@ -1,5 +1,5 @@
package: pandorafms-agent-unix
Version: 6.1dev-161019
Version: 6.1dev-161020
Architecture: all
Priority: optional
Section: admin

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
pandora_version="6.1dev-161019"
pandora_version="6.1dev-161020"
echo "Test if you has the tools for to make the packages."
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null

View File

@ -41,7 +41,7 @@ my $Sem = undef;
my $ThreadSem = undef;
use constant AGENT_VERSION => '6.1dev';
use constant AGENT_BUILD => '161019';
use constant AGENT_BUILD => '161020';
# Agent log default file size maximum and instances
use constant DEFAULT_MAX_LOG_SIZE => 600000;

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_agent_unix
%define version 6.1dev
%define release 161019
%define release 161020
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_agent_unix
%define version 6.1dev
%define release 161019
%define release 161020
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}

View File

@ -10,7 +10,7 @@
# **********************************************************************
PI_VERSION="6.1dev"
PI_BUILD="161019"
PI_BUILD="161020"
OS_NAME=`uname -s`
FORCE=0

View File

@ -186,7 +186,7 @@ UpgradeApplicationID
{}
Version
{161019}
{161020}
ViewReadme
{Yes}

View File

@ -30,7 +30,7 @@ using namespace Pandora;
using namespace Pandora_Strutils;
#define PATH_SIZE _MAX_PATH+1
#define PANDORA_VERSION ("6.1dev(Build 161019)")
#define PANDORA_VERSION ("6.1dev(Build 161020)")
string pandora_path;
string pandora_dir;

View File

@ -11,7 +11,7 @@ BEGIN
VALUE "LegalCopyright", "Artica ST"
VALUE "OriginalFilename", "PandoraAgent.exe"
VALUE "ProductName", "Pandora FMS Windows Agent"
VALUE "ProductVersion", "(6.1dev(Build 161019))"
VALUE "ProductVersion", "(6.1dev(Build 161020))"
VALUE "FileVersion", "1.0.0.0"
END
END

View File

@ -1,5 +1,5 @@
package: pandorafms-console
Version: 6.1dev-161019
Version: 6.1dev-161020
Architecture: all
Priority: optional
Section: admin

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
pandora_version="6.1dev-161019"
pandora_version="6.1dev-161020"
package_pear=0
package_pandora=1

View File

@ -229,7 +229,7 @@ if($disabledBecauseInPolicy){
$table_simple->data[1][3] .= html_print_input_hidden ('id_module_group', $id_module_group, true);
}
$table_simple->data[2][0] = __('Dynamic Interval') .' ' . ui_print_help_icon ('warning_status', true);
html_debug_print($dynamic_interval);
$table_simple->data[2][1] = html_print_extended_select_for_time ('dynamic_interval', $dynamic_interval, '', 'None', '0', 10, true, 'width:150px',false);
$table_simple->data[2][2] = '<span><em>'.__('Dynamic Min. ').'</em>';
$table_simple->data[2][2] .= html_print_input_text ('dynamic_min', $dynamic_min, '', 10, 255, true);

View File

@ -103,7 +103,7 @@ $table->data[2][2] = __('Interval');
$table->data[2][3] = html_print_extended_select_for_time ('module_interval' , $module_interval, '', '', '0', false, true);
$table->data[3][0] = __('Dynamic Interval') .' ' . ui_print_help_icon ('warning_status', true);
html_debug_print($dynamic_interval);
$table->data[3][1] = html_print_extended_select_for_time ('dynamic_interval', $dynamic_interval, '', 'None', '0', 10, true, 'width:150px',false);
$table->data[3][2] = '<span><em>'.__('Dynamic Min. ').'</em>';
$table->data[3][2] .= html_print_input_text ('dynamic_min', $dynamic_min, '', 10, 255, true);

View File

@ -22,7 +22,7 @@
/**
* Pandora build version and version
*/
$build_version = 'PC161019';
$build_version = 'PC161020';
$pandora_version = 'v6.1dev';
// Do not overwrite default timezone set if defined.

View File

@ -71,7 +71,7 @@
<div style='height: 10px'>
<?php
$version = '6.1dev';
$build = '161019';
$build = '161020';
$banner = "v$version Build $build";
error_reporting(0);

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_console
%define version 6.1dev
%define release 161019
%define release 161020
# User and Group under which Apache is running
%define httpd_name httpd

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_console
%define version 6.1dev
%define release 161019
%define release 161020
%define httpd_name httpd
# User and Group under which Apache is running
%define httpd_name apache2

View File

@ -66,7 +66,7 @@ INSERT INTO tconfig (token, value) VALUES ('graph_res','5');
INSERT INTO tconfig (token, value) VALUES ('step_compact','1');
INSERT INTO tconfig (token, value) VALUES ('db_scheme_first_version','6.0orc');
INSERT INTO tconfig (token, value) VALUES('db_scheme_version','6.1dev');
INSERT INTO tconfig (token, value) VALUES('db_scheme_build','PD161019');
INSERT INTO tconfig (token, value) VALUES('db_scheme_build','PD161020');
INSERT INTO tconfig (token, value) VALUES ('show_unknown','0');
INSERT INTO tconfig (token, value) VALUES ('show_lastalerts','1');
INSERT INTO tconfig (token, value) VALUES ('style','pandora');

View File

@ -1,5 +1,5 @@
package: pandorafms-server
Version: 6.1dev-161019
Version: 6.1dev-161020
Architecture: all
Priority: optional
Section: admin

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
pandora_version="6.1dev-161019"
pandora_version="6.1dev-161020"
package_cpan=0
package_pandora=1

View File

@ -43,7 +43,7 @@ our @EXPORT = qw(
# version: Defines actual version of Pandora Server for this module only
my $pandora_version = "6.1dev";
my $pandora_build = "161019";
my $pandora_build = "161020";
our $VERSION = $pandora_version." ".$pandora_build;
# Setup hash

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_server
%define version 6.1dev
%define release 161019
%define release 161020
Summary: Pandora FMS Server
Name: %{name}

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_server
%define version 6.1dev
%define release 161019
%define release 161020
Summary: Pandora FMS Server
Name: %{name}

View File

@ -9,7 +9,7 @@
# **********************************************************************
PI_VERSION="6.1dev"
PI_BUILD="161019"
PI_BUILD="161020"
MODE=$1
if [ $# -gt 1 ]; then

View File

@ -33,7 +33,7 @@ use PandoraFMS::Tools;
use PandoraFMS::DB;
# version: define current version
my $version = "6.1dev PS161019";
my $version = "6.1dev PS161020";
# Pandora server configuration
my %conf;

View File

@ -35,7 +35,7 @@ use Encode::Locale;
Encode::Locale::decode_argv;
# version: define current version
my $version = "6.1dev PS161019";
my $version = "6.1dev PS161020";
# save program name for logging
my $progname = basename($0);
@ -126,10 +126,11 @@ sub help_screen{
help_screen_line('--get_bad_conf_files', '', 'Get the files bad configured (without essential tokens)');
help_screen_line('--locate_agent', '<agent_name>', 'Search a agent into of nodes of metaconsole. Only Enterprise.');
print "\nMODULES:\n\n" unless $param ne '';
help_screen_line('--create_data_module', "<module_name> <module_type> <agent_name> [<description> <module_group> \n\t <min> <max> <post_process> <interval> <warning_min> <warning_max> <critical_min> <critical_max> \n\t <history_data> <definition_file> <warning_str> <critical_str>\n\t <unknown_events> <ff_threshold> <each_ff> <ff_threshold_normal>\n\t <ff_threshold_warning> <ff_threshold_critical> <ff_timeout> <warning_inverse> <critical_inverse> ]", 'Add data server module to agent');
help_screen_line('--create_network_module', "<module_name> <module_type> <agent_name> <module_address> \n\t [<module_port> <description> <module_group> <min> <max> <post_process> <interval> \n\t <warning_min> <warning_max> <critical_min> <critical_max> <history_data> <ff_threshold>\n\t <warning_str> <critical_str> <unknown_events> <each_ff>\n\t <ff_threshold_normal> <ff_threshold_warning> <ff_threshold_critical> <timeout> <retries>]", 'Add not snmp network module to agent');
help_screen_line('--create_snmp_module', "<module_name> <module_type> <agent_name> <module_address> <module_port>\n\t <version> [<community> <oid> <description> <module_group> <min> <max> <post_process> <interval>\n\t <warning_min> <warning_max> <critical_min> <critical_max> <history_data> \n\t <snmp3_priv_method> <snmp3_priv_pass> <snmp3_sec_level> <snmp3_auth_method> \n\t <snmp3_auth_user> <snmp3_priv_pass> <ff_threshold> <warning_str> \n\t <critical_str> <unknown_events> <each_ff> <ff_threshold_normal>\n\t <ff_threshold_warning> <ff_threshold_critical> <timeout> <retries>]", 'Add snmp network module to agent');
help_screen_line('--create_plugin_module', "<module_name> <module_type> <agent_name> <module_address> \n\t <module_port> <plugin_name> <user> <password> <parameters> [<description> \n\t <module_group> <min> <max> <post_process> <interval> <warning_min> <warning_max> <critical_min> \n\t <critical_max> <history_data> <ff_threshold> <warning_str> <critical_str>\n\t <unknown_events> <each_ff> <ff_threshold_normal> <ff_threshold_warning>\n\t <ff_threshold_critical> <timeout>]", 'Add plug-in module to agent');
help_screen_line('--create_data_module', "<module_name> <module_type> <agent_name> [<description> <module_group> \n\t <min> <max> <post_process> <interval> <warning_min> <warning_max> <critical_min> <critical_max> \n\t <history_data> <definition_file> <warning_str> <critical_str>\n\t <unknown_events> <ff_threshold> <each_ff> <ff_threshold_normal>\n\t <ff_threshold_warning> <ff_threshold_critical> <ff_timeout> <warning_inverse> <critical_inverse>\n\t <critical_instructions> <warning_instructions> <unknown_instructions>]", 'Add data server module to agent');
help_screen_line('--create_network_module', "<module_name> <module_type> <agent_name> <module_address> \n\t [<module_port> <description> <module_group> <min> <max> <post_process> <interval> \n\t <warning_min> <warning_max> <critical_min> <critical_max> <history_data> <ff_threshold>\n\t <warning_str> <critical_str> <unknown_events> <each_ff>\n\t <ff_threshold_normal> <ff_threshold_warning> <ff_threshold_critical> <timeout> <retries>\n\t <critical_instructions> <warning_instructions> <unknown_instructions>]", 'Add not snmp network module to agent');
help_screen_line('--create_snmp_module', "<module_name> <module_type> <agent_name> <module_address> <module_port>\n\t <version> [<community> <oid> <description> <module_group> <min> <max> <post_process> <interval>\n\t <warning_min> <warning_max> <critical_min> <critical_max> <history_data> \n\t <snmp3_priv_method> <snmp3_priv_pass> <snmp3_sec_level> <snmp3_auth_method> \n\t <snmp3_auth_user> <snmp3_priv_pass> <ff_threshold> <warning_str> \n\t <critical_str> <unknown_events> <each_ff> <ff_threshold_normal>\n\t <ff_threshold_warning> <ff_threshold_critical> <timeout> <retries>
\n\t <critical_instructions> <warning_instructions> <unknown_instructions>]", 'Add snmp network module to agent');
help_screen_line('--create_plugin_module', "<module_name> <module_type> <agent_name> <module_address> \n\t <module_port> <plugin_name> <user> <password> <parameters> [<description> \n\t <module_group> <min> <max> <post_process> <interval> <warning_min> <warning_max> <critical_min> \n\t <critical_max> <history_data> <ff_threshold> <warning_str> <critical_str>\n\t <unknown_events> <each_ff> <ff_threshold_normal> <ff_threshold_warning>\n\t <ff_threshold_critical> <timeout> \n\t <critical_instructions> <warning_instructions> <unknown_instructions>]", 'Add plug-in module to agent');
help_screen_line('--create_module_group', '<module_group_name>');
help_screen_line('--delete_module', 'Delete module from agent', '<module_name> <agent_name>');
help_screen_line('--data_module', "<server_name> <agent_name> <module_name> \n\t <module_type> <module_new_data> [<datetime>]", 'Insert data to module');
@ -184,10 +185,11 @@ sub help_screen{
help_screen_line('--delete_not_policy_modules', '', 'Delete all modules without policy from configuration file');
help_screen_line('--disable_policy_alerts', '<policy_name>', 'Disable all the alerts of a policy');
help_screen_line('--create_policy', '<policy_name> <group_name> <description>');
help_screen_line('--create_policy_data_module', "<policy_name> <module_name> <module_type> [<description> \n\t <module_group> <min> <max> <post_process> <interval> <warning_min> <warning_max> \n\t <critical_min> <critical_max> <history_data> <data_configuration> <warning_str> \n\t <critical_str> <unknown_events> <ff_threshold> <each_ff>\n\t <ff_threshold_normal> <ff_threshold_warning> <ff_threshold_critical>\n\t <ff_timeout>]", 'Add data server module to policy');
help_screen_line('--create_policy_network_module', "<policy_name> <module_name> <module_type> [<module_port> \n\t <description> <module_group> <min> <max> <post_process> <interval> \n\t <warning_min> <warning_max> <critical_min> <critical_max> <history_data> <ff_threshold> \n\t <warning_str> <critical_str> <unknown_events> <each_ff>\n\t <ff_threshold_normal> <ff_threshold_warning> <ff_threshold_critical>]", "Add not snmp network module to policy");
help_screen_line('--create_policy_snmp_module', "<policy_name> <module_name> <module_type> <module_port> \n\t <version> [<community> <oid> <description> <module_group> <min> <max> \n\t <post_process> <interval> <warning_min> <warning_max> <critical_min> <critical_max> <history_data>\n\t <snmp3_priv_method> <snmp3_priv_pass> <snmp3_sec_level> <snmp3_auth_method> <snmp3_auth_user> \n\t <snmp3_priv_pass> <ff_threshold> <warning_str> <critical_str>\n\t <unknown_events> <each_ff> <ff_threshold_normal>\n\t <ff_threshold_warning> <ff_threshold_critical>]", 'Add snmp network module to policy');
help_screen_line('--create_policy_plugin_module', "<policy_name> <module_name> <module_type> \n\t <module_port> <plugin_name> <user> <password> <parameters> [<description> <module_group> <min> \n\t <max> <post_process> <interval> <warning_min> <warning_max> <critical_min> <critical_max>\n\t <history_data> <ff_threshold> <warning_str> <critical_str>\n\t <unknown_events> <each_ff> <ff_threshold_normal>\n\t <ff_threshold_warning> <ff_threshold_critical>]", 'Add plug-in module to policy');
help_screen_line('--create_policy_data_module', "<policy_name> <module_name> <module_type> [<description> \n\t <module_group> <min> <max> <post_process> <interval> <warning_min> <warning_max> \n\t <critical_min> <critical_max> <history_data> <data_configuration> <warning_str> \n\t <critical_str> <unknown_events> <ff_threshold> <each_ff>\n\t <ff_threshold_normal> <ff_threshold_warning> <ff_threshold_critical>\n\t <ff_timeout> <critical_instructions> <warning_instructions> <unknown_instructions>]", 'Add data server module to policy');
help_screen_line('--create_policy_network_module', "<policy_name> <module_name> <module_type> [<module_port> \n\t <description> <module_group> <min> <max> <post_process> <interval> \n\t <warning_min> <warning_max> <critical_min> <critical_max> <history_data> <ff_threshold> \n\t <warning_str> <critical_str> <unknown_events> <each_ff>\n\t <ff_threshold_normal> <ff_threshold_warning> <ff_threshold_critical>\n\t <critical_instructions> <warning_instructions> <unknown_instructions>]", "Add not snmp network module to policy");
help_screen_line('--create_policy_snmp_module', "<policy_name> <module_name> <module_type> <module_port> \n\t <version> [<community> <oid> <description> <module_group> <min> <max> \n\t <post_process> <interval> <warning_min> <warning_max> <critical_min> <critical_max> <history_data>\n\t <snmp3_priv_method> <snmp3_priv_pass> <snmp3_sec_level> <snmp3_auth_method> <snmp3_auth_user> \n\t <snmp3_priv_pass> <ff_threshold> <warning_str> <critical_str>\n\t <unknown_events> <each_ff> <ff_threshold_normal>\n\t <ff_threshold_warning> <ff_threshold_critical>\n\t
<critical_instructions> <warning_instructions> <unknown_instructions>]", 'Add snmp network module to policy');
help_screen_line('--create_policy_plugin_module', "<policy_name> <module_name> <module_type> \n\t <module_port> <plugin_name> <user> <password> <parameters> [<description> <module_group> <min> \n\t <max> <post_process> <interval> <warning_min> <warning_max> <critical_min> <critical_max>\n\t <history_data> <ff_threshold> <warning_str> <critical_str>\n\t <unknown_events> <each_ff> <ff_threshold_normal>\n\t <ff_threshold_warning> <ff_threshold_critical>\n\t <critical_instructions> <warning_instructions> <unknown_instructions>]", 'Add plug-in module to policy');
help_screen_line('--create_policy_data_module_from_local_component', '<policy_name> <component_name>');
help_screen_line('--add_collection_to_policy', "<policy_name> <collection_name>");
help_screen_line('--validate_policy_alerts', '<policy_name>', 'Validate the alerts of a given policy');
@ -1149,21 +1151,21 @@ sub cli_create_data_module($) {
$min,$max,$post_process, $interval, $warning_min, $warning_max, $critical_min,
$critical_max, $history_data, $definition_file, $configuration_data, $warning_str, $critical_str, $enable_unknown_events,
$ff_threshold, $each_ff, $ff_threshold_normal, $ff_threshold_warning, $ff_threshold_critical, $ff_timeout,
$warning_inverse, $critical_inverse);
$warning_inverse, $critical_inverse, $critical_instructions, $warning_instructions, $unknown_instructions);
if ($in_policy == 0) {
($module_name, $module_type, $agent_name, $description, $module_group,
$min,$max,$post_process, $interval, $warning_min, $warning_max, $critical_min,
$critical_max, $history_data, $definition_file, $warning_str, $critical_str, $enable_unknown_events, $ff_threshold,
$each_ff, $ff_threshold_normal, $ff_threshold_warning, $ff_threshold_critical, $ff_timeout,
$warning_inverse, $critical_inverse) = @ARGV[2..27];
$warning_inverse, $critical_inverse, $critical_instructions, $warning_instructions, $unknown_instructions) = @ARGV[2..30];
}
else {
($policy_name, $module_name, $module_type, $description, $module_group,
$min,$max,$post_process, $interval, $warning_min, $warning_max, $critical_min,
$critical_max, $history_data, $configuration_data, $warning_str, $critical_str, $enable_unknown_events, $ff_threshold,
$each_ff, $ff_threshold_normal, $ff_threshold_warning, $ff_threshold_critical, $ff_timeout,
$warning_inverse, $critical_inverse) = @ARGV[2..28];
$warning_inverse, $critical_inverse, $critical_instructions, $warning_instructions, $unknown_instructions) = @ARGV[2..31];
}
my $module_name_def;
@ -1307,6 +1309,9 @@ sub cli_create_data_module($) {
$parameters{'ff_timeout'} = $ff_timeout unless !defined ($ff_timeout);
$parameters{'critical_inverse'} = $critical_inverse unless !defined ($critical_inverse);
$parameters{'warning_inverse'} = $warning_inverse unless !defined ($warning_inverse);
$parameters{'critical_instructions'} = $critical_instructions unless !defined ($critical_instructions);
$parameters{'warning_instructions'} = $warning_instructions unless !defined ($warning_instructions);
$parameters{'unknown_instructions'} = $unknown_instructions unless !defined ($unknown_instructions);
if ($in_policy == 0) {
pandora_create_module_from_hash ($conf, \%parameters, $dbh);
@ -1382,21 +1387,22 @@ sub cli_create_network_module($) {
my ($policy_name, $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, $ff_threshold, $warning_str, $critical_str, $enable_unknown_events, $each_ff,
$ff_threshold_normal, $ff_threshold_warning, $ff_threshold_critical, $timeout, $retries);
$ff_threshold_normal, $ff_threshold_warning, $ff_threshold_critical, $timeout, $retries, $critical_instructions,
$warning_instructions, $unknown_instructions);
if ($in_policy == 0) {
($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, $ff_threshold, $warning_str, $critical_str, $enable_unknown_events,
$each_ff, $ff_threshold_normal, $ff_threshold_warning,
$ff_threshold_critical, $timeout, $retries) = @ARGV[2..27];
$ff_threshold_critical, $timeout, $retries,$critical_instructions, $warning_instructions, $unknown_instructions) = @ARGV[2..30];
}
else {
($policy_name, $module_name, $module_type, $module_port, $description,
$module_group, $min, $max, $post_process, $interval, $warning_min, $warning_max, $critical_min,
$critical_max, $history_data, $ff_threshold, $warning_str, $critical_str, $enable_unknown_events,
$each_ff, $ff_threshold_normal, $ff_threshold_warning,
$ff_threshold_critical, $timeout, $retries) = @ARGV[2..26];
$ff_threshold_critical, $timeout, $retries, $critical_instructions, $warning_instructions, $unknown_instructions) = @ARGV[2..29];
}
my $module_name_def;
@ -1508,6 +1514,9 @@ sub cli_create_network_module($) {
$parameters{'min_ff_event_critical'} = $ff_threshold_critical unless !defined ($ff_threshold_critical);
$parameters{'max_timeout'} = $timeout unless !defined ($timeout);
$parameters{'max_retries'} = $retries unless !defined ($retries);
$parameters{'critical_instructions'} = $critical_instructions unless !defined ($critical_instructions);
$parameters{'warning_instructions'} = $warning_instructions unless !defined ($warning_instructions);
$parameters{'unknown_instructions'} = $unknown_instructions unless !defined ($unknown_instructions);
if ($in_policy == 0) {
pandora_create_module_from_hash ($conf, \%parameters, $dbh);
@ -1528,21 +1537,24 @@ sub cli_create_snmp_module($) {
$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_auth_pass, $ff_threshold, $warning_str, $critical_str, $enable_unknown_events,
$each_ff, $ff_threshold_normal, $ff_threshold_warning, $ff_threshold_critical, $timeout, $retries);
$each_ff, $ff_threshold_normal, $ff_threshold_warning, $ff_threshold_critical, $timeout, $retries,
$critical_instructions, $warning_instructions, $unknown_instructions);
if ($in_policy == 0) {
($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_auth_pass, $ff_threshold, $warning_str, $critical_str, $enable_unknown_events,
$each_ff, $ff_threshold_normal, $ff_threshold_warning, $ff_threshold_critical, $timeout, $retries) = @ARGV[2..36];
$each_ff, $ff_threshold_normal, $ff_threshold_warning, $ff_threshold_critical, $timeout, $retries,
$critical_instructions, $warning_instructions, $unknown_instructions) = @ARGV[2..39];
}
else {
($policy_name, $module_name, $module_type, $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_auth_pass, $ff_threshold, $warning_str, $critical_str, $enable_unknown_events,
$each_ff, $ff_threshold_normal, $ff_threshold_warning, $ff_threshold_critical, $timeout, $retries) = @ARGV[2..35];
$each_ff, $ff_threshold_normal, $ff_threshold_warning, $ff_threshold_critical, $timeout, $retries,
$critical_instructions, $warning_instructions, $unknown_instructions) = @ARGV[2..38];
}
my $module_name_def;
@ -1659,6 +1671,9 @@ sub cli_create_snmp_module($) {
$parameters{'min_ff_event_critical'} = $ff_threshold_critical unless !defined ($ff_threshold_critical);
$parameters{'max_timeout'} = $timeout unless !defined ($timeout);
$parameters{'max_retries'} = $retries unless !defined ($retries);
$parameters{'critical_instructions'} = $critical_instructions unless !defined ($critical_instructions);
$parameters{'warning_instructions'} = $warning_instructions unless !defined ($warning_instructions);
$parameters{'unknown_instructions'} = $unknown_instructions unless !defined ($unknown_instructions);
if ($in_policy == 0) {
pandora_create_module_from_hash ($conf, \%parameters, $dbh);
@ -1679,21 +1694,24 @@ sub cli_create_plugin_module($) {
$user, $password, $params, $description, $module_group, $min, $max, $post_process,
$interval, $warning_min, $warning_max, $critical_min, $critical_max, $history_data,
$ff_threshold, $warning_str, $critical_str, $enable_unknown_events,
$each_ff, $ff_threshold_normal, $ff_threshold_warning, $ff_threshold_critical, $timeout);
$each_ff, $ff_threshold_normal, $ff_threshold_warning, $ff_threshold_critical, $timeout,
$critical_instructions, $warning_instructions, $unknown_instructions);
if ($in_policy == 0) {
($module_name, $module_type, $agent_name, $module_address, $module_port, $plugin_name,
$user, $password, $params, $description, $module_group, $min, $max, $post_process,
$interval, $warning_min, $warning_max, $critical_min, $critical_max, $history_data,
$ff_threshold, $warning_str, $critical_str, $enable_unknown_events,
$each_ff, $ff_threshold_normal, $ff_threshold_warning, $ff_threshold_critical, $timeout) = @ARGV[2..30];
$each_ff, $ff_threshold_normal, $ff_threshold_warning, $ff_threshold_critical, $timeout,
$critical_instructions, $warning_instructions, $unknown_instructions) = @ARGV[2..33];
}
else {
($policy_name, $module_name, $module_type, $module_port, $plugin_name,
$user, $password, $params, $description, $module_group, $min, $max, $post_process,
$interval, $warning_min, $warning_max, $critical_min, $critical_max, $history_data,
$ff_threshold, $warning_str, $critical_str, $enable_unknown_events,
$each_ff, $ff_threshold_normal, $ff_threshold_warning, $ff_threshold_critical, $timeout) = @ARGV[2..29];
$each_ff, $ff_threshold_normal, $ff_threshold_warning, $ff_threshold_critical, $timeout,
$critical_instructions, $warning_instructions, $unknown_instructions) = @ARGV[2..32];
}
my $module_name_def;
@ -1825,6 +1843,9 @@ sub cli_create_plugin_module($) {
$parameters{'min_ff_event_warning'} = $ff_threshold_warning unless !defined ($ff_threshold_warning);
$parameters{'min_ff_event_critical'} = $ff_threshold_critical unless !defined ($ff_threshold_critical);
$parameters{'max_timeout'} = $timeout unless !defined ($timeout);
$parameters{'critical_instructions'} = $critical_instructions unless !defined ($critical_instructions);
$parameters{'warning_instructions'} = $warning_instructions unless !defined ($warning_instructions);
$parameters{'unknown_instructions'} = $unknown_instructions unless !defined ($unknown_instructions);
if ($in_policy == 0) {
pandora_create_module_from_hash ($conf, \%parameters, $dbh);
@ -2524,6 +2545,15 @@ sub cli_module_update() {
elsif ($field eq 'ff_threshold_critical') {
$field = 'min_ff_event_critical';
}
elsif ($field eq 'critical_instructions') {
$field = 'critical_instructions';
}
elsif ($field eq 'warning_instructions') {
$field = 'warning_instructions';
}
elsif ($field eq 'unknown_instructions') {
$field = 'unknown_instructions';
}
else {
# If is not a common value, check type and call type update funtion
my $type = pandora_get_module_type($dbh,$id_agent_module);
@ -4520,7 +4550,7 @@ sub pandora_manage_main ($$$) {
cli_delete_agent();
}
elsif ($param eq '--create_data_module') {
param_check($ltotal, 27, 24);
param_check($ltotal, 30, 24);
cli_create_data_module(0);
}
elsif ($param eq '--create_module_group') {
@ -4528,15 +4558,15 @@ sub pandora_manage_main ($$$) {
cli_create_module_group();
}
elsif ($param eq '--create_network_module') {
param_check($ltotal, 24, 20);
param_check($ltotal, 30, 20);
cli_create_network_module(0);
}
elsif ($param eq '--create_snmp_module') {
param_check($ltotal, 35, 28);
param_check($ltotal, 38, 28);
cli_create_snmp_module(0);
}
elsif ($param eq '--create_plugin_module') {
param_check($ltotal, 29, 19);
param_check($ltotal, 32, 19);
cli_create_plugin_module(0);
}
elsif ($param eq '--delete_module') {
@ -4672,19 +4702,19 @@ sub pandora_manage_main ($$$) {
cli_create_policy();
}
elsif ($param eq '--create_policy_data_module') {
param_check($ltotal, 23, 20);
param_check($ltotal, 26, 20);
cli_create_data_module(1);
}
elsif ($param eq '--create_policy_network_module') {
param_check($ltotal, 23, 20);
param_check($ltotal, 26, 20);
cli_create_network_module(1);
}
elsif ($param eq '--create_policy_snmp_module') {
param_check($ltotal, 32, 27);
param_check($ltotal, 35, 27);
cli_create_snmp_module(1);
}
elsif ($param eq '--create_policy_plugin_module') {
param_check($ltotal, 27, 19);
param_check($ltotal, 30, 19);
cli_create_plugin_module(1);
}
elsif ($param eq '--create_alert_template') {