Merge remote-tracking branch 'origin/develop' into ent-9640-agrupacion-de-graficas-en-periodos-de-tiempo
Conflicts: pandora_console/include/javascript/pandora.js pandora_console/include/styles/pandora.css
This commit is contained in:
commit
855fc32a7d
|
@ -520,18 +520,18 @@ execute_cmd "systemctl restart mysql" "Configuring and restarting database engin
|
|||
|
||||
#Define packages
|
||||
if [ "$PANDORA_LTS" -eq '1' ] ; then
|
||||
[ "$PANDORA_SERVER_PACKAGE" ] || PANDORA_SERVER_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/Tarball/LTS/pandorafms_server-7.0NG.tar.gz"
|
||||
[ "$PANDORA_CONSOLE_PACKAGE" ] || PANDORA_CONSOLE_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/Tarball/LTS/pandorafms_console-7.0NG.tar.gz"
|
||||
[ "$PANDORA_SERVER_PACKAGE" ] || PANDORA_SERVER_PACKAGE="https://firefly.pandorafms.com/pandorafms/latest/Tarball/LTS/pandorafms_server-7.0NG.tar.gz"
|
||||
[ "$PANDORA_CONSOLE_PACKAGE" ] || PANDORA_CONSOLE_PACKAGE="https://firefly.pandorafms.com/pandorafms/latest/Tarball/LTS/pandorafms_console-7.0NG.tar.gz"
|
||||
[ "$PANDORA_AGENT_PACKAGE" ] || PANDORA_AGENT_PACKAGE="https://firefly.pandorafms.com/pandorafms/latest/Tarball/pandorafms_agent_linux-7.0NG.x86_64.tar.gz"
|
||||
elif [ "$PANDORA_LTS" -ne '1' ] ; then
|
||||
[ "$PANDORA_SERVER_PACKAGE" ] || PANDORA_SERVER_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/Tarball/pandorafms_server-7.0NG.tar.gz"
|
||||
[ "$PANDORA_CONSOLE_PACKAGE" ] || PANDORA_CONSOLE_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/Tarball/pandorafms_console-7.0NG.tar.gz"
|
||||
[ "$PANDORA_SERVER_PACKAGE" ] || PANDORA_SERVER_PACKAGE="https://firefly.pandorafms.com/pandorafms/latest/Tarball/pandorafms_server-7.0NG.tar.gz"
|
||||
[ "$PANDORA_CONSOLE_PACKAGE" ] || PANDORA_CONSOLE_PACKAGE="https://firefly.pandorafms.com/pandorafms/latest/Tarball/pandorafms_console-7.0NG.tar.gz"
|
||||
[ "$PANDORA_AGENT_PACKAGE" ] || PANDORA_AGENT_PACKAGE=" https://firefly.pandorafms.com/pandorafms/latest/Tarball/pandorafms_agent_linux-7.0NG.x86_64.tar.gz"
|
||||
fi
|
||||
|
||||
if [ "$PANDORA_BETA" -eq '1' ] ; then
|
||||
PANDORA_SERVER_PACKAGE="http://firefly.pandorafms.com/pandora_enterprise_nightlies/pandorafms_server-latest.tar.gz"
|
||||
PANDORA_CONSOLE_PACKAGE="http://firefly.pandorafms.com/pandora_enterprise_nightlies/pandorafms_console-latest.tar.gz"
|
||||
PANDORA_SERVER_PACKAGE="https://firefly.pandorafms.com/pandora_enterprise_nightlies/pandorafms_server-latest.tar.gz"
|
||||
PANDORA_CONSOLE_PACKAGE="https://firefly.pandorafms.com/pandora_enterprise_nightlies/pandorafms_console-latest.tar.gz"
|
||||
PANDORA_AGENT_PACKAGE="https://firefly.pandorafms.com/pandorafms/latest/Tarball/pandorafms_agent_linux-7.0NG.x86_64.tar.gz"
|
||||
fi
|
||||
|
||||
|
@ -837,7 +837,7 @@ echo "@hourly root bash -c /etc/cron.hourly/pandora_db" >> /etc/cront
|
|||
|
||||
## Enabling agent adn configuring Agente
|
||||
sed -i "s/^remote_config.*$/remote_config 1/g" $PANDORA_AGENT_CONF &>> "$LOGFILE"
|
||||
execute_cmd "/etc/init.d/pandora_agent_daemon start" "Starting PandoraFSM Agent"
|
||||
execute_cmd "/etc/init.d/pandora_agent_daemon restart" "Starting PandoraFSM Agent"
|
||||
systemctl enable pandora_agent_daemon &>> "$LOGFILE"
|
||||
|
||||
#fix path phantomjs
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-agent-unix
|
||||
Version: 7.0NG.774-231218
|
||||
Version: 7.0NG.774-231219
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: admin
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
pandora_version="7.0NG.774-231218"
|
||||
pandora_version="7.0NG.774-231219"
|
||||
|
||||
echo "Test if you has the tools for to make the packages."
|
||||
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null
|
||||
|
|
|
@ -1039,7 +1039,7 @@ my $Sem = undef;
|
|||
my $ThreadSem = undef;
|
||||
|
||||
use constant AGENT_VERSION => '7.0NG.774';
|
||||
use constant AGENT_BUILD => '231218';
|
||||
use constant AGENT_BUILD => '231219';
|
||||
|
||||
# Agent log default file size maximum and instances
|
||||
use constant DEFAULT_MAX_LOG_SIZE => 600000;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
%global __os_install_post %{nil}
|
||||
%define name pandorafms_agent_linux
|
||||
%define version 7.0NG.774
|
||||
%define release 231218
|
||||
%define release 231219
|
||||
|
||||
Summary: Pandora FMS Linux agent, PERL version
|
||||
Name: %{name}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
%define name pandorafms_agent_linux_bin
|
||||
%define source_name pandorafms_agent_linux
|
||||
%define version 7.0NG.774
|
||||
%define release 231218
|
||||
%define release 231219
|
||||
%define debug_package %{nil}
|
||||
|
||||
Summary: Pandora FMS Linux agent, binary version
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
%define name pandorafms_agent_linux_bin
|
||||
%define source_name pandorafms_agent_linux
|
||||
%define version 7.0NG.774
|
||||
%define release 231218
|
||||
%define release 231219
|
||||
%define debug_package %{nil}
|
||||
|
||||
Summary: Pandora FMS Linux agent, binary version
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
%define name pandorafms_agent_linux_bin
|
||||
%define source_name pandorafms_agent_linux
|
||||
%define version 7.0NG.774
|
||||
%define release 231218
|
||||
%define release 231219
|
||||
|
||||
Summary: Pandora FMS Linux agent, binary version
|
||||
Name: %{name}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
%global __os_install_post %{nil}
|
||||
%define name pandorafms_agent_linux
|
||||
%define version 7.0NG.774
|
||||
%define release 231218
|
||||
%define release 231219
|
||||
|
||||
Summary: Pandora FMS Linux agent, PERL version
|
||||
Name: %{name}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
# **********************************************************************
|
||||
|
||||
PI_VERSION="7.0NG.774"
|
||||
PI_BUILD="231218"
|
||||
PI_BUILD="231219"
|
||||
OS_NAME=`uname -s`
|
||||
|
||||
FORCE=0
|
||||
|
|
|
@ -186,7 +186,7 @@ UpgradeApplicationID
|
|||
{}
|
||||
|
||||
Version
|
||||
{231218}
|
||||
{231219}
|
||||
|
||||
ViewReadme
|
||||
{Yes}
|
||||
|
|
|
@ -30,7 +30,7 @@ using namespace Pandora;
|
|||
using namespace Pandora_Strutils;
|
||||
|
||||
#define PATH_SIZE _MAX_PATH+1
|
||||
#define PANDORA_VERSION ("7.0NG.774 Build 231218")
|
||||
#define PANDORA_VERSION ("7.0NG.774 Build 231219")
|
||||
|
||||
string pandora_path;
|
||||
string pandora_dir;
|
||||
|
|
|
@ -11,7 +11,7 @@ BEGIN
|
|||
VALUE "LegalCopyright", "Pandora FMS"
|
||||
VALUE "OriginalFilename", "PandoraAgent.exe"
|
||||
VALUE "ProductName", "Pandora FMS Windows Agent"
|
||||
VALUE "ProductVersion", "(7.0NG.774(Build 231218))"
|
||||
VALUE "ProductVersion", "(7.0NG.774(Build 231219))"
|
||||
VALUE "FileVersion", "1.0.0.0"
|
||||
END
|
||||
END
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-console
|
||||
Version: 7.0NG.774-231218
|
||||
Version: 7.0NG.774-231219
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: admin
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
pandora_version="7.0NG.774-231218"
|
||||
pandora_version="7.0NG.774-231219"
|
||||
|
||||
package_pear=0
|
||||
package_pandora=1
|
||||
|
|
|
@ -1142,4 +1142,10 @@ UPDATE talert_actions SET field2='[PANDORA] Alert FIRED on _agent_ / _module_ /
|
|||
|
||||
UPDATE `tdiscovery_apps` SET `version` = '1.2' WHERE `short_name` = 'pandorafms.vmware';
|
||||
|
||||
ALTER TABLE `tagente_modulo` ADD COLUMN `ignore_unknown` TINYINT NOT NULL DEFAULT 0;
|
||||
ALTER TABLE `tpolicy_modules` ADD COLUMN `ignore_unknown` TINYINT NOT NULL DEFAULT 0;
|
||||
|
||||
ALTER TABLE `tagente` ADD COLUMN `ignore_unknown` TINYINT NOT NULL DEFAULT 0;
|
||||
ALTER TABLE `tmetaconsole_agent` ADD COLUMN `ignore_unknown` TINYINT NOT NULL DEFAULT 0;
|
||||
|
||||
COMMIT;
|
||||
|
|
|
@ -927,8 +927,6 @@ echo sprintf('<div id="header_table" class="header_table_%s">', $menuTypeClass);
|
|||
|
||||
<?php if (enterprise_installed() === false) { ?>
|
||||
$('.header_left').on('click', function(){
|
||||
// Hidden tips modal.
|
||||
$(".window").css("display", "none");
|
||||
jQuery.post(
|
||||
"ajax.php",
|
||||
{
|
||||
|
|
|
@ -1074,6 +1074,17 @@ if (enterprise_installed() === true) {
|
|||
);
|
||||
}
|
||||
|
||||
$tableAdvancedAgent->data['ignore_unknown'][] = html_print_label_input_block(
|
||||
__('Ignore unknown').ui_print_help_tip(__('This disables the calculation of the unknown state in the agent and any of its modules, so it will never transition to unknown. The state it reflects is the last known status.'), true),
|
||||
html_print_checkbox_switch(
|
||||
'ignore_unknown',
|
||||
1,
|
||||
$ignore_unknown,
|
||||
true,
|
||||
false
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
ui_toggle(
|
||||
html_print_table($tableAdvancedAgent, true),
|
||||
|
|
|
@ -232,6 +232,7 @@ if ($create_agent) {
|
|||
$cps = (int) get_parameter_switch('cps', -1);
|
||||
$fixed_ip = (int) get_parameter_switch('fixed_ip', 0);
|
||||
$vul_scan_enabled = (int) get_parameter_switch('vul_scan_enabled', 2);
|
||||
$ignore_unknown = (int) get_parameter_switch('ignore_unknown', 0);
|
||||
$agent_version = $config['current_package'];
|
||||
$secondary_groups = (array) get_parameter('secondary_groups_selected', '');
|
||||
$fields = db_get_all_fields_in_table('tagent_custom_fields');
|
||||
|
@ -300,6 +301,7 @@ if ($create_agent) {
|
|||
'cps' => $cps,
|
||||
'fixed_ip' => $fixed_ip,
|
||||
'vul_scan_enabled' => $vul_scan_enabled,
|
||||
'ignore_unknown' => $ignore_unknown,
|
||||
'agent_version' => $agent_version,
|
||||
]
|
||||
);
|
||||
|
@ -1016,6 +1018,7 @@ if ($update_agent) {
|
|||
$satellite_server = (int) get_parameter('satellite_server', 0);
|
||||
$fixed_ip = (int) get_parameter_switch('fixed_ip', 0);
|
||||
$vul_scan_enabled = (int) get_parameter_switch('vul_scan_enabled', 2);
|
||||
$ignore_unknown = (int) get_parameter_switch('ignore_unknown', 0);
|
||||
$security_vunerability = (int) get_parameter_switch('security_vunerability', 0);
|
||||
$security_hardening = (int) get_parameter_switch('security_hardening', 0);
|
||||
$security_monitoring = (int) get_parameter_switch('security_monitoring', 0);
|
||||
|
@ -1150,6 +1153,7 @@ if ($update_agent) {
|
|||
'satellite_server' => $satellite_server,
|
||||
'fixed_ip' => $fixed_ip,
|
||||
'vul_scan_enabled' => $vul_scan_enabled,
|
||||
'ignore_unknown' => $ignore_unknown,
|
||||
];
|
||||
|
||||
if ($config['metaconsole_agent_cache'] == 1) {
|
||||
|
@ -1383,6 +1387,7 @@ if ($id_agente) {
|
|||
$satellite_server = (int) $agent['satellite_server'];
|
||||
$fixed_ip = (int) $agent['fixed_ip'];
|
||||
$vul_scan_enabled = (int) $agent['vul_scan_enabled'];
|
||||
$ignore_unknown = (int) $agent['ignore_unknown'];
|
||||
if (strpos($agent['agent_version'], '(')) {
|
||||
$agent_version = (int) explode('.', explode('(', $agent['agent_version'])[0])[2];
|
||||
} else {
|
||||
|
@ -1633,6 +1638,7 @@ if ($update_module === true || $create_module === true) {
|
|||
|
||||
$custom_id = (string) get_parameter('custom_id');
|
||||
$history_data = (int) get_parameter('history_data');
|
||||
$ignore_unknown = (int) get_parameter('ignore_unknown');
|
||||
$dynamic_interval = (int) get_parameter('dynamic_interval');
|
||||
$dynamic_max = (int) get_parameter('dynamic_max');
|
||||
$dynamic_min = (int) get_parameter('dynamic_min');
|
||||
|
@ -1841,6 +1847,7 @@ if ($update_module) {
|
|||
'max_retries' => $max_retries,
|
||||
'custom_id' => $custom_id,
|
||||
'history_data' => $history_data,
|
||||
'ignore_unknown' => $ignore_unknown,
|
||||
'dynamic_interval' => $dynamic_interval,
|
||||
'dynamic_max' => $dynamic_max,
|
||||
'dynamic_min' => $dynamic_min,
|
||||
|
@ -2042,6 +2049,7 @@ if ($create_module) {
|
|||
'id_modulo' => $id_module,
|
||||
'custom_id' => $custom_id,
|
||||
'history_data' => $history_data,
|
||||
'ignore_unknown' => $ignore_unknown,
|
||||
'dynamic_interval' => $dynamic_interval,
|
||||
'dynamic_max' => $dynamic_max,
|
||||
'dynamic_min' => $dynamic_min,
|
||||
|
|
|
@ -305,6 +305,7 @@ if ($id_agent_module) {
|
|||
$max_retries = $module['max_retries'];
|
||||
$custom_id = $module['custom_id'];
|
||||
$history_data = $module['history_data'];
|
||||
$ignore_unknown = $module['ignore_unknown'];
|
||||
$dynamic_interval = $module['dynamic_interval'];
|
||||
$dynamic_max = $module['dynamic_max'];
|
||||
$dynamic_min = $module['dynamic_min'];
|
||||
|
@ -443,6 +444,7 @@ if ($id_agent_module) {
|
|||
$plugin_parameter = '';
|
||||
$custom_id = '';
|
||||
$history_data = 1;
|
||||
$ignore_unknown = 0;
|
||||
$dynamic_interval = 0;
|
||||
$dynamic_min = 0;
|
||||
$dynamic_max = 0;
|
||||
|
|
|
@ -645,6 +645,15 @@ if ($disabledBecauseInPolicy) {
|
|||
);
|
||||
}
|
||||
|
||||
$table_simple->data['caption_ignore_unknown'][0] = __('Ignore unknown').ui_print_help_tip(_('This disables the module\'s state calculation to unknown, so it will never transition to unknown. The state it reflects is the last known status.'), true);
|
||||
$table_simple->data['ignore_unknown'][0] = html_print_checkbox_switch(
|
||||
'ignore_unknown',
|
||||
1,
|
||||
$ignore_unknown,
|
||||
true,
|
||||
false
|
||||
);
|
||||
|
||||
// Business Logic for Advanced Part.
|
||||
global $__code_from;
|
||||
// Code comes from module_editor.
|
||||
|
@ -1426,7 +1435,7 @@ if ($__code_from === 'modules') {
|
|||
$throw_unknown_events_check = policy_module_is_disable_type_event($__id_pol_mod, EVENTS_GOING_UNKNOWN);
|
||||
}
|
||||
|
||||
$table_advanced->data['caption_discard_unknown'][0] = __('Discard unknown events');
|
||||
$table_advanced->data['caption_discard_unknown'][0] = __('Discard unknown events').ui_print_help_tip(__('With this mode, the unknown state will be detected, but it will not generate events.'), true);
|
||||
$table_advanced->data['discard_unknown'][0] = html_print_checkbox_switch(
|
||||
'throw_unknown_events',
|
||||
1,
|
||||
|
|
|
@ -194,6 +194,10 @@ if ($update_agents) {
|
|||
$values['safe_mode_module'] = '0';
|
||||
}
|
||||
|
||||
if (get_parameter('ignore_unknown', '') != '') {
|
||||
$values['ignore_unknown'] = get_parameter('ignore_unknown');
|
||||
}
|
||||
|
||||
$secondary_groups_added = (array) get_parameter(
|
||||
'secondary_groups_added',
|
||||
[]
|
||||
|
@ -1183,6 +1187,24 @@ $table->data[7][1] .= html_print_select(
|
|||
true
|
||||
);
|
||||
|
||||
$table->data[8][0] = __('Ignore unknown').ui_print_help_tip(_('This disables the calculation of the unknown state in the agent and any of its modules, so it will never transition to unknown. The state it reflects is the last known status.'), true);
|
||||
$table->data[8][1] = html_print_select(
|
||||
[
|
||||
'' => __('No change'),
|
||||
'1' => __('Yes'),
|
||||
'0' => __('No'),
|
||||
],
|
||||
'ignore_unknown',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
'w100p'
|
||||
);
|
||||
|
||||
ui_toggle(html_print_table($table, true), __('Advanced options'));
|
||||
unset($table);
|
||||
|
||||
|
|
|
@ -1319,7 +1319,7 @@ $table->data[29][0] = html_print_label_input_block(
|
|||
);
|
||||
|
||||
$table->data[29][1] = html_print_label_input_block(
|
||||
__('Discard unknown events'),
|
||||
__('Discard unknown events').ui_print_help_tip(__('With this mode, the unknown state will be detected, but it will not generate events.'), true),
|
||||
html_print_select(
|
||||
[
|
||||
'' => __('No change'),
|
||||
|
@ -1544,6 +1544,26 @@ $table->data[40][0] = html_print_label_input_block(
|
|||
)
|
||||
);
|
||||
|
||||
$table->data[40][1] = html_print_label_input_block(
|
||||
__('Ignore unknown').ui_print_help_tip(_('This disables the module\'s state calculation to unknown, so it will never transition to unknown. The state it reflects is the last known status.'), true),
|
||||
html_print_select(
|
||||
[
|
||||
'' => __('No change'),
|
||||
'1' => __('Yes'),
|
||||
'0' => __('No'),
|
||||
],
|
||||
'ignore_unknown',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
'w100p'
|
||||
)
|
||||
);
|
||||
|
||||
echo '<form method="post" class="max_floating_element_size" action="index.php?sec=gmassive&sec2=godmode/massive/massive_operations&option=edit_modules" id="form_edit">';
|
||||
html_print_table($table);
|
||||
|
||||
|
@ -2358,6 +2378,7 @@ function process_manage_edit($module_name, $agents_select=null, $module_status='
|
|||
'plugin_pass',
|
||||
'id_export',
|
||||
'history_data',
|
||||
'ignore_unknown',
|
||||
'critical_inverse',
|
||||
'warning_inverse',
|
||||
'percentage_warning',
|
||||
|
|
|
@ -236,17 +236,39 @@ if ($add_module === true) {
|
|||
$id_modules
|
||||
);
|
||||
|
||||
$id_agent_modules = db_get_all_rows_sql(
|
||||
'SELECT id_agente_modulo FROM tagente_modulo WHERE id_agente IN ('.implode(',', $id_agents).") AND nombre IN ('".implode("','", $id_modules)."')"
|
||||
$sql = sprintf(
|
||||
'SELECT id_agente_modulo
|
||||
FROM tagente_modulo
|
||||
WHERE id_agente IN (%s)
|
||||
AND nombre IN ("%s")',
|
||||
implode(',', $id_agents),
|
||||
implode('","', $id_modules)
|
||||
);
|
||||
|
||||
$id_agent_modules = db_get_all_rows_sql($sql);
|
||||
|
||||
if (count($id_agent_modules) > 0 && $id_agent_modules != '') {
|
||||
$order = db_get_row_sql("SELECT `field_order` from tgraph_source WHERE id_graph=$id_graph ORDER BY `field_order` DESC");
|
||||
$sql_order = sprintf(
|
||||
'SELECT `field_order`
|
||||
FROM tgraph_source
|
||||
WHERE id_graph=%d
|
||||
ORDER BY `field_order` DESC',
|
||||
$id_graph
|
||||
);
|
||||
$order = db_get_row_sql($sql_order);
|
||||
|
||||
$order = $order['field_order'];
|
||||
foreach ($id_agent_modules as $id_agent_module) {
|
||||
$order++;
|
||||
$result = db_process_sql_insert('tgraph_source', ['id_graph' => $id_graph, 'id_agent_module' => $id_agent_module['id_agente_modulo'], 'weight' => $weight, 'field_order' => $order]);
|
||||
$result = db_process_sql_insert(
|
||||
'tgraph_source',
|
||||
[
|
||||
'id_graph' => $id_graph,
|
||||
'id_agent_module' => $id_agent_module['id_agente_modulo'],
|
||||
'weight' => $weight,
|
||||
'field_order' => $order,
|
||||
]
|
||||
);
|
||||
}
|
||||
} else {
|
||||
$result = false;
|
||||
|
|
|
@ -548,6 +548,7 @@ class Wizard
|
|||
if ($return === true) {
|
||||
ob_start();
|
||||
}
|
||||
|
||||
echo '<ul class="bigbuttonlist">';
|
||||
array_map('self::printBigButtonElement', $list_data);
|
||||
echo '</ul>';
|
||||
|
|
|
@ -2790,4 +2790,6 @@ class ExtensionsDiscovery extends Wizard
|
|||
$path = $config['homedir'].'/attachment/discovery/'.$shortName.'/discovery_definition.ini';
|
||||
return file_exists($path);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
/**
|
||||
* Pandora build version and version
|
||||
*/
|
||||
$build_version = 'PC231218';
|
||||
$build_version = 'PC231219';
|
||||
$pandora_version = 'v7.0NG.774';
|
||||
|
||||
// Do not overwrite default timezone set if defined.
|
||||
|
|
|
@ -6800,3 +6800,169 @@ function csv_format_delimiter(?string $str)
|
|||
// TODO: a setup option that enables user to choose a delimiter character would probably be desirable in the future.
|
||||
return '"'.$str.'"';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get List translate string.
|
||||
*
|
||||
* @param string $language Language.
|
||||
* @param string $text Text.
|
||||
* @param integer $page Page.
|
||||
*
|
||||
* @return array List.
|
||||
*/
|
||||
function getListStringsTranslate($language, $text='', $page=0)
|
||||
{
|
||||
global $config;
|
||||
|
||||
$fileLanguage = $config['homedir'].'/include/languages/'.$language.'.po';
|
||||
|
||||
$file = file($fileLanguage);
|
||||
|
||||
$listStrings = [];
|
||||
$readingOriginal = false;
|
||||
$readingTranslation = false;
|
||||
$original = '';
|
||||
$translation = '';
|
||||
foreach ($file as $line) {
|
||||
// Jump empty lines.
|
||||
if (strlen(trim($line)) == 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Jump comment lines.
|
||||
if (preg_match('/^#.*$/', $line) > 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (preg_match('/^msgid "(.*)"/', $line, $match) == 1) {
|
||||
if (empty($original) === false && (preg_match('/.*'.$text.'.*/', $original) >= 1)) {
|
||||
$listStrings[$original] = [];
|
||||
$listStrings[$original]['po'] = $translation;
|
||||
$listStrings[$original]['ext'] = '';
|
||||
}
|
||||
|
||||
$original = '';
|
||||
$readingOriginal = false;
|
||||
$readingTranslation = false;
|
||||
|
||||
if (strlen($match[1]) > 0) {
|
||||
$original = $match[1];
|
||||
} else {
|
||||
$readingOriginal = true;
|
||||
}
|
||||
} else if (preg_match('/^msgstr "(.*)"/', $line, $match) == 1) {
|
||||
if (strlen($match[1]) > 0) {
|
||||
$translation = $match[1];
|
||||
} else {
|
||||
$readingOriginal = false;
|
||||
$readingTranslation = true;
|
||||
$translation = '';
|
||||
}
|
||||
} else if (preg_match('/^"(.*)"/', $line, $match) == 1) {
|
||||
if ($readingOriginal) {
|
||||
$original = $original.$match[1];
|
||||
} else {
|
||||
$translation = $translation.$match[1];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (empty($original) === false && (preg_match('/.*'.$text.'.*/', $original) >= 1)) {
|
||||
$listStrings[$original] = [];
|
||||
$listStrings[$original]['po'] = $translation;
|
||||
$listStrings[$original]['ext'] = '';
|
||||
}
|
||||
|
||||
$sql = sprintf(
|
||||
'SELECT *
|
||||
FROM textension_translate_string
|
||||
WHERE lang = "%s"',
|
||||
$language
|
||||
);
|
||||
|
||||
$dbListStrings = db_get_all_rows_sql($sql);
|
||||
if ($dbListStrings === false) {
|
||||
$dbListStrings = [];
|
||||
}
|
||||
|
||||
foreach ($dbListStrings as $row) {
|
||||
if (array_key_exists(io_safe_output($row['string']), $listStrings)) {
|
||||
$listStrings[io_safe_output($row['string'])]['ext'] = io_safe_output($row['translation']);
|
||||
}
|
||||
}
|
||||
|
||||
return $listStrings;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Translate.
|
||||
*
|
||||
* @param string $string String.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
function get_defined_translation($string)
|
||||
{
|
||||
global $config;
|
||||
static $cache = [];
|
||||
static $cache_translation = [];
|
||||
|
||||
$language = get_user_language();
|
||||
|
||||
if (func_num_args() !== 1) {
|
||||
$args = func_get_args();
|
||||
array_shift($args);
|
||||
}
|
||||
|
||||
// Try with the cache.
|
||||
if (isset($cache[$language]) === true) {
|
||||
if (isset($cache[$language][$string]) === true) {
|
||||
if (func_num_args() === 1) {
|
||||
return $cache[$language][$string];
|
||||
} else {
|
||||
return vsprintf($cache[$language][$string], $args);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (is_array($cache_translation) === true && count($cache_translation) === 0) {
|
||||
$cache_translation_all = db_get_all_rows_sql(
|
||||
sprintf(
|
||||
'SELECT translation, string
|
||||
FROM textension_translate_string
|
||||
WHERE lang = "%s"',
|
||||
$language
|
||||
)
|
||||
);
|
||||
$cache_translation = false;
|
||||
if ($cache_translation_all !== false) {
|
||||
foreach ($cache_translation_all as $key => $value) {
|
||||
$cache_translation[md5(io_safe_output($value['string']))] = $value['translation'];
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if ($cache_translation === false) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (empty($cache_translation[md5($string)]) === false) {
|
||||
$translation = $cache_translation[md5($string)];
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (empty($translation) === true) {
|
||||
return false;
|
||||
} else {
|
||||
$cache[$language][$string] = io_safe_output($translation);
|
||||
|
||||
if (func_num_args() === 1) {
|
||||
return $cache[$language][$string];
|
||||
} else {
|
||||
return vsprintf($cache[$language][$string], $args);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3676,6 +3676,7 @@ function api_set_create_network_module($id, $thrash1, $other, $thrash3)
|
|||
'critical_inverse' => $other['data'][28],
|
||||
'warning_inverse' => $other['data'][29],
|
||||
'ff_type' => $other['data'][30],
|
||||
'ignore_unknown' => $other['data'][32],
|
||||
];
|
||||
|
||||
if (! $values['descripcion']) {
|
||||
|
@ -3840,6 +3841,7 @@ function api_set_update_network_module($id_module, $thrash1, $other, $thrash3)
|
|||
'warning_inverse',
|
||||
'policy_linked',
|
||||
'ff_type',
|
||||
'ignore_unknown',
|
||||
];
|
||||
|
||||
$values = [];
|
||||
|
@ -3853,7 +3855,6 @@ function api_set_update_network_module($id_module, $thrash1, $other, $thrash3)
|
|||
}
|
||||
|
||||
$values['policy_linked'] = 0;
|
||||
|
||||
$result_update = modules_update_agent_module($id_module, $values);
|
||||
|
||||
if ($result_update < 0) {
|
||||
|
@ -3954,6 +3955,7 @@ function api_set_create_plugin_module($id, $thrash1, $other, $thrash3)
|
|||
'critical_inverse' => $other['data'][33],
|
||||
'warning_inverse' => $other['data'][34],
|
||||
'ff_type' => $other['data'][35],
|
||||
'ignore_unknown' => $other['data'][37],
|
||||
];
|
||||
|
||||
$plugin = db_get_row('tplugin', 'id', $values['id_plugin']);
|
||||
|
@ -4115,6 +4117,7 @@ function api_set_update_plugin_module($id_module, $thrash1, $other, $thrash3)
|
|||
'warning_inverse',
|
||||
'policy_linked',
|
||||
'ff_type',
|
||||
'ignore_unknown',
|
||||
];
|
||||
|
||||
$values = [];
|
||||
|
@ -4241,6 +4244,7 @@ function api_set_create_data_module($id, $thrash1, $other, $thrash3)
|
|||
'critical_inverse' => $other['data'][24],
|
||||
'warning_inverse' => $other['data'][25],
|
||||
'ff_type' => $other['data'][26],
|
||||
'ignore_unknown' => $other['data'][27],
|
||||
];
|
||||
|
||||
if (! $values['descripcion']) {
|
||||
|
@ -4763,6 +4767,7 @@ function api_set_update_data_module($id_module, $thrash1, $other, $thrash3)
|
|||
'warning_inverse',
|
||||
'policy_linked',
|
||||
'ff_type',
|
||||
'ignore_unknown',
|
||||
];
|
||||
|
||||
$values = [];
|
||||
|
@ -4903,6 +4908,7 @@ function api_set_create_snmp_module($id, $thrash1, $other, $thrash3)
|
|||
'min_ff_event_warning' => $other['data'][32],
|
||||
'min_ff_event_critical' => $other['data'][33],
|
||||
'ff_type' => $other['data'][34],
|
||||
'ignore_unknown' => $other['data'][36],
|
||||
];
|
||||
} else {
|
||||
$values = [
|
||||
|
@ -4935,6 +4941,7 @@ function api_set_create_snmp_module($id, $thrash1, $other, $thrash3)
|
|||
'min_ff_event_warning' => $other['data'][26],
|
||||
'min_ff_event_critical' => $other['data'][27],
|
||||
'ff_type' => $other['data'][28],
|
||||
'ignore_unknown' => $other['data'][29],
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -5103,6 +5110,7 @@ function api_set_update_snmp_module($id_module, $thrash1, $other, $thrash3)
|
|||
'min_ff_event_critical',
|
||||
'policy_linked',
|
||||
'ff_type',
|
||||
'ignore_unknown',
|
||||
];
|
||||
} else {
|
||||
$snmp_module_fields = [
|
||||
|
@ -5135,6 +5143,7 @@ function api_set_update_snmp_module($id_module, $thrash1, $other, $thrash3)
|
|||
'min_ff_event_critical',
|
||||
'policy_linked',
|
||||
'ff_type',
|
||||
'ignore_unknown',
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -7982,6 +7991,7 @@ function api_set_update_data_module_policy($id, $thrash1, $other, $thrash3)
|
|||
'configuration_data',
|
||||
'disabled_types_event',
|
||||
'module_macros',
|
||||
'ignore_unknown',
|
||||
];
|
||||
|
||||
$cont = 0;
|
||||
|
@ -8120,6 +8130,7 @@ function api_set_add_network_module_policy($id, $thrash1, $other, $thrash3)
|
|||
$values['min_ff_event_warning'] = $other['data'][25];
|
||||
$values['min_ff_event_critical'] = $other['data'][26];
|
||||
$values['ff_type'] = $other['data'][27];
|
||||
$values['ignore_unknown'] = $other['data'][28];
|
||||
|
||||
if ($name_module_policy !== false) {
|
||||
if ($name_module_policy[0]['name'] == $other['data'][0]) {
|
||||
|
@ -8222,6 +8233,7 @@ function api_set_update_network_module_policy($id, $thrash1, $other, $thrash3)
|
|||
'custom_id',
|
||||
'disabled_types_event',
|
||||
'module_macros',
|
||||
'ignore_unknown',
|
||||
];
|
||||
|
||||
$cont = 0;
|
||||
|
@ -8338,6 +8350,7 @@ function api_set_add_plugin_module_policy($id, $thrash1, $other, $thrash3)
|
|||
$values['min_ff_event_warning'] = $other['data'][30];
|
||||
$values['min_ff_event_critical'] = $other['data'][31];
|
||||
$values['ff_type'] = $other['data'][32];
|
||||
$values['ignore_unknown'] = $other['data'][33];
|
||||
|
||||
if ($name_module_policy !== false) {
|
||||
if ($name_module_policy[0]['name'] == $other['data'][0]) {
|
||||
|
@ -8464,6 +8477,7 @@ function api_set_update_plugin_module_policy($id, $thrash1, $other, $thrash3)
|
|||
'disabled_types_event',
|
||||
'macros',
|
||||
'module_macros',
|
||||
'ignore_unknown',
|
||||
];
|
||||
|
||||
$cont = 0;
|
||||
|
@ -8782,6 +8796,7 @@ function api_set_add_snmp_module_policy($id, $thrash1, $other, $thrash3)
|
|||
'min_ff_event_warning' => $other['data'][31],
|
||||
'min_ff_event_critical' => $other['data'][32],
|
||||
'ff_type' => $other['data'][33],
|
||||
'ignore_unknown' => $other['data'][34],
|
||||
];
|
||||
} else {
|
||||
$values = [
|
||||
|
@ -8812,6 +8827,7 @@ function api_set_add_snmp_module_policy($id, $thrash1, $other, $thrash3)
|
|||
'min_ff_event_warning' => $other['data'][25],
|
||||
'min_ff_event_critical' => $other['data'][26],
|
||||
'ff_type' => $other['data'][27],
|
||||
'ignore_unknown' => $other['data'][28],
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -8944,6 +8960,7 @@ function api_set_update_snmp_module_policy($id, $thrash1, $other, $thrash3)
|
|||
'plugin_parameter',
|
||||
'plugin_user',
|
||||
'plugin_pass',
|
||||
'ignore_unknown',
|
||||
];
|
||||
} else {
|
||||
$fields_snmp_module = [
|
||||
|
@ -8968,6 +8985,7 @@ function api_set_update_snmp_module_policy($id, $thrash1, $other, $thrash3)
|
|||
'max',
|
||||
'custom_id',
|
||||
'description',
|
||||
'ignore_unknown',
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
@ -1338,8 +1338,9 @@ if (is_ajax()) {
|
|||
<tbody>
|
||||
<tr>
|
||||
<th style="width: 40%; border: 0px;">
|
||||
<a href="https://pandorafms.com/" target="_blank">
|
||||
<a href="javascript:christmas_click('.$config['eastern_eggs_disabled'].')">
|
||||
<img src="'.$image_about.'" alt="logo" width="70%">
|
||||
<input id="count_click" type="hidden" value="0" />
|
||||
</a>
|
||||
</th>
|
||||
<th style="width: 60%; text-align: left; border: 0px;">
|
||||
|
|
|
@ -3857,11 +3857,11 @@ function get_modules_agents(
|
|||
|
||||
$modules = array_reduce(
|
||||
$modules,
|
||||
function ($carry, $item) use ($id_agents, $selection) {
|
||||
function ($carry, $item) use ($id_agents, $selection, $useName) {
|
||||
if (count($id_agents) > 1 && (bool) $selection === true) {
|
||||
$carry[$item['id_agente_modulo']] = $item['alias'].' » '.$item['nombre'];
|
||||
$carry[($useName === true) ? io_safe_output($item['nombre']) : $item['id_agente_modulo']] = $item['alias'].' » '.$item['nombre'];
|
||||
} else {
|
||||
$carry[$item['id_agente_modulo']] = $item['nombre'];
|
||||
$carry[($useName === true) ? io_safe_output($item['nombre']) : $item['id_agente_modulo']] = $item['nombre'];
|
||||
}
|
||||
|
||||
return $carry;
|
||||
|
|
|
@ -2599,3 +2599,15 @@ function showPeriodicityOptions(element) {
|
|||
$("#li-row_period_type").hide();
|
||||
}
|
||||
}
|
||||
|
||||
function christmas_click(flagEasternEgg) {
|
||||
let counter = $("#count_click").val();
|
||||
counter++;
|
||||
$("#count_click").val(counter);
|
||||
if (counter == 25 && flagEasternEgg == true) {
|
||||
$("#container-snow").removeClass("invisible");
|
||||
setTimeout(() => {
|
||||
$("#container-snow").addClass("invisible");
|
||||
}, 120000);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -431,15 +431,34 @@ class AgentHive extends Widget
|
|||
|
||||
$output .= '</div>';
|
||||
|
||||
$style = 'font-size: 6pt; display: flex; justify-content: start;
|
||||
align-items: start; color: #9FA5B1; font-weight: 600;
|
||||
line-height:normal; text-align:left;';
|
||||
$style_div = $style.' margin-bottom: 15px;';
|
||||
|
||||
// OS description.
|
||||
$output .= html_print_div(
|
||||
[
|
||||
'content' => (empty($data['os_version']) === true)
|
||||
? get_os_name((int) $data['id_os'])
|
||||
: $data['os_version'],
|
||||
'style' => 'font-size: 6pt; display:
|
||||
flex;justify-content: start;align-items: start;
|
||||
color: #9FA5B1; font-weight: 600;margin-bottom: 5px',
|
||||
? ui_print_truncate_text(
|
||||
get_os_name((int) $data['id_os']),
|
||||
32,
|
||||
false,
|
||||
true,
|
||||
true,
|
||||
'…',
|
||||
$style
|
||||
)
|
||||
: ui_print_truncate_text(
|
||||
$data['os_version'],
|
||||
32,
|
||||
false,
|
||||
true,
|
||||
true,
|
||||
'…',
|
||||
$style
|
||||
),
|
||||
'style' => $style_div,
|
||||
],
|
||||
true
|
||||
);
|
||||
|
@ -455,8 +474,10 @@ class AgentHive extends Widget
|
|||
true,
|
||||
'…',
|
||||
),
|
||||
'style' => 'text-align: left;min-height: 42px;
|
||||
font-size: 8pt;max-height: 42px; margin-bottom: 10px',
|
||||
'style' => 'text-align: left;
|
||||
min-height: 42px; font-size: 8pt;
|
||||
max-height: 42px; line-height: normal;
|
||||
margin: 2px 0px 2px 0px',
|
||||
],
|
||||
true
|
||||
);
|
||||
|
@ -466,7 +487,9 @@ class AgentHive extends Widget
|
|||
[
|
||||
'content' => $data['direccion'],
|
||||
'style' => 'font-size: 10pt;color: #14524f;
|
||||
font-weight: 600; text-align: left',
|
||||
font-weight: 600;
|
||||
text-align: left;
|
||||
margin-top: 5px',
|
||||
],
|
||||
true
|
||||
);
|
||||
|
|
|
@ -49,6 +49,7 @@ class Group extends Entity
|
|||
'groupEventsByAgent',
|
||||
'loadInfoAgent',
|
||||
'getAgentsByGroup',
|
||||
'getGroupsName',
|
||||
];
|
||||
|
||||
|
||||
|
@ -751,4 +752,30 @@ class Group extends Entity
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get groups name.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public static function getGroupsName()
|
||||
{
|
||||
$groups = get_parameter('groups', []);
|
||||
|
||||
$sql = sprintf(
|
||||
'SELECT id_grupo, nombre FROM tgrupo WHERE id_grupo IN (%s)',
|
||||
implode(',', $groups)
|
||||
);
|
||||
|
||||
$result = db_get_all_rows_sql($sql);
|
||||
|
||||
$array_groups = [];
|
||||
foreach ($result as $value) {
|
||||
$array_groups[$value['id_grupo']] = $value['nombre'];
|
||||
}
|
||||
|
||||
echo json_encode($array_groups);
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
|
||||
namespace PandoraFMS\TacticalView;
|
||||
|
||||
use DateTimeZone;
|
||||
use Exception;
|
||||
use PandoraFMS\View;
|
||||
|
||||
|
@ -163,17 +164,25 @@ class GeneralTacticalView
|
|||
private function getWelcomeMessage():string
|
||||
{
|
||||
global $config;
|
||||
$user = users_get_user_by_id($config['id_user']);
|
||||
if (is_array($user) === true && count($user) > 0) {
|
||||
$name = $user['fullname'];
|
||||
} else {
|
||||
$name = '';
|
||||
}
|
||||
|
||||
if (empty($name) === true) {
|
||||
$message = __('Welcome back! 👋');
|
||||
$flag_eastern_egg = $config['eastern_eggs_disabled'];
|
||||
|
||||
if ((bool) $flag_eastern_egg === true) {
|
||||
$message = $this->randomWelcomeMessage();
|
||||
} else {
|
||||
$message = __('Welcome back %s! 👋', $name);
|
||||
$user = users_get_user_by_id($config['id_user']);
|
||||
if (is_array($user) === true && count($user) > 0) {
|
||||
$name = $user['fullname'];
|
||||
} else {
|
||||
$name = $user['firstname'];
|
||||
}
|
||||
|
||||
// 👋
|
||||
if (empty($name) === true) {
|
||||
$message = __('Welcome back! 👋');
|
||||
} else {
|
||||
$message = __('Welcome back %s! 👋', $name);
|
||||
}
|
||||
}
|
||||
|
||||
return html_print_div(
|
||||
|
@ -186,4 +195,88 @@ class GeneralTacticalView
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return random welcome message.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private function randomWelcomeMessage() : string
|
||||
{
|
||||
global $config;
|
||||
$welcome = [];
|
||||
|
||||
$user = users_get_user_by_id($config['id_user']);
|
||||
if (is_array($user) === true && count($user) > 0) {
|
||||
$name = $user['fullname'];
|
||||
} else {
|
||||
$name = $user['firstname'];
|
||||
}
|
||||
|
||||
// Config user time zone.
|
||||
if (!empty($user['timezone'])) {
|
||||
$timezone = $user['timezone'];
|
||||
} else {
|
||||
$timezone = date_default_timezone_get();
|
||||
}
|
||||
|
||||
date_default_timezone_set($timezone);
|
||||
$date_zone = new DateTimeZone($timezone);
|
||||
$zone_location = $date_zone->getLocation();
|
||||
$latitude = $zone_location['latitude'];
|
||||
|
||||
$emojiOptions = [
|
||||
'have_good_day' => __('Have a good day %s ✌', $name),
|
||||
'welcome_back' => __('Welcome back! %s 👋', $name),
|
||||
'merry_christmas' => __('Welcome back! %s 🎅', $name),
|
||||
'good_morning' => __('Good morning, %s! ☕', $name),
|
||||
'good_evening' => __('Good evening, %s 🌇', $name),
|
||||
'good_night' => __('Good night, %s 🌕', $name),
|
||||
'happy_summer' => __('Happy summer, %s 🌞', $name),
|
||||
'happy_winter' => __('Happy winter, %s ⛄', $name),
|
||||
'happy_autumn' => __('Happy autumn, %s 🍂', $name),
|
||||
'happy_spring' => __('Happy spring, %s 🌻', $name),
|
||||
];
|
||||
|
||||
// Welcome back.
|
||||
$user_last_connect = $user['last_connect'];
|
||||
$user_last_day = date('d', $user_last_connect);
|
||||
$day = date('d', strtotime('now'));
|
||||
if ($user_last_day === $day) {
|
||||
$welcome[] = $emojiOptions['welcome_back'];
|
||||
}
|
||||
|
||||
// Morning, evening, night.
|
||||
$date = date('H');
|
||||
if ($date < 13) {
|
||||
$welcome[] = $emojiOptions['good_morning'];
|
||||
} else if ($date < 18) {
|
||||
$welcome[] = $emojiOptions['good_evening'];
|
||||
} else {
|
||||
$welcome[] = $emojiOptions['good_night'];
|
||||
}
|
||||
|
||||
// Seasons.
|
||||
$mes = date('m');
|
||||
if (($latitude > 0 && ($mes >= 3 && $mes <= 5)) || ($latitude < 0 && ($mes >= 9 && $mes <= 11))) {
|
||||
$welcome[] = $emojiOptions['happy_spring'];
|
||||
} else if (($latitude > 0 && ($mes >= 6 && $mes <= 8)) || ($latitude < 0 && ($mes >= 12 || $mes <= 2))) {
|
||||
$welcome[] = $emojiOptions['happy_summer'];
|
||||
} else if (($latitude > 0 && ($mes >= 9 && $mes <= 11)) || ($latitude < 0 && ($mes >= 3 && $mes <= 5))) {
|
||||
$welcome[] = $emojiOptions['happy_autumn'];
|
||||
} else {
|
||||
$welcome[] = $emojiOptions['happy_winter'];
|
||||
}
|
||||
|
||||
if ($mes === '12' && $day === '25') {
|
||||
unset($welcome);
|
||||
$welcome[] = $emojiOptions['merry_christmas'];
|
||||
}
|
||||
|
||||
$length = count($welcome);
|
||||
$possition = rand(0, ($length - 1));
|
||||
|
||||
return $welcome[$possition];
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -670,9 +670,9 @@ form.modal-dashboard
|
|||
justify-content: center;
|
||||
align-items: start;
|
||||
min-width: 150px;
|
||||
max-width: 150px;
|
||||
max-width: 160px;
|
||||
min-height: 150px;
|
||||
max-height: 150px;
|
||||
max-height: 160px;
|
||||
margin: 8px;
|
||||
padding: 5px;
|
||||
border: 1px solid #eceef2;
|
||||
|
|
|
@ -12907,6 +12907,484 @@ tr.shown td.details-control {
|
|||
background-color: transparent;
|
||||
}
|
||||
|
||||
@-moz-keyframes nieve {
|
||||
from {
|
||||
top: -40px;
|
||||
}
|
||||
to {
|
||||
top: 101%;
|
||||
}
|
||||
}
|
||||
@-webkit-keyframes nieve {
|
||||
from {
|
||||
top: -40px;
|
||||
}
|
||||
to {
|
||||
top: 2000px;
|
||||
}
|
||||
}
|
||||
@keyframes nieve {
|
||||
from {
|
||||
top: -40px;
|
||||
}
|
||||
to {
|
||||
top: 2000px;
|
||||
}
|
||||
}
|
||||
|
||||
@-moz-keyframes horiz2 {
|
||||
20% {
|
||||
transform: translateX(0);
|
||||
}
|
||||
50% {
|
||||
transform: translateX(150px);
|
||||
}
|
||||
80% {
|
||||
transform: translateX(0);
|
||||
}
|
||||
}
|
||||
@-webkit-keyframes horiz2 {
|
||||
20% {
|
||||
transform: translateX(0);
|
||||
}
|
||||
50% {
|
||||
transform: translateX(150px);
|
||||
}
|
||||
80% {
|
||||
transform: translateX(0);
|
||||
}
|
||||
}
|
||||
@keyframes horiz2 {
|
||||
20% {
|
||||
transform: translateX(0);
|
||||
}
|
||||
50% {
|
||||
transform: translateX(-70px);
|
||||
}
|
||||
80% {
|
||||
transform: translateX(0);
|
||||
}
|
||||
}
|
||||
|
||||
@-moz-keyframes horiz {
|
||||
20% {
|
||||
transform: translateX(0);
|
||||
}
|
||||
50% {
|
||||
transform: translateX(150px);
|
||||
}
|
||||
80% {
|
||||
transform: translateX(0);
|
||||
}
|
||||
}
|
||||
@-webkit-keyframes horiz {
|
||||
20% {
|
||||
transform: translateX(0);
|
||||
}
|
||||
50% {
|
||||
transform: translateX(150px);
|
||||
}
|
||||
80% {
|
||||
transform: translateX(0);
|
||||
}
|
||||
}
|
||||
@keyframes horiz {
|
||||
20% {
|
||||
transform: translateX(0);
|
||||
}
|
||||
50% {
|
||||
transform: translateX(150px);
|
||||
}
|
||||
80% {
|
||||
transform: translateX(0);
|
||||
}
|
||||
}
|
||||
|
||||
#container-snow > div {
|
||||
position: fixed;
|
||||
-webkit-animation: ease-in infinite normal;
|
||||
-moz-animation: ease-in infinite normal;
|
||||
animation: ease-in infinite normal;
|
||||
}
|
||||
|
||||
#container-snow > div {
|
||||
z-index: 9999999999999;
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
-moz-border-radius: 50%;
|
||||
-webkit-border-radius: 50%;
|
||||
border-radius: 50%;
|
||||
background-color: #e8ede5;
|
||||
-webkit-animation-name: nieve, horiz;
|
||||
-moz-animation-name: nieve, horiz;
|
||||
animation-name: nieve, horiz;
|
||||
}
|
||||
#container-snow > div:nth-of-type(odd) {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
-webkit-animation-name: nieve, horiz2;
|
||||
-moz-animation-name: nieve, horiz2;
|
||||
animation-name: nieve, horiz2;
|
||||
}
|
||||
|
||||
#container-snow > div:nth-of-type(1) {
|
||||
left: 40px;
|
||||
-webkit-animation-duration: 5.5s;
|
||||
-moz-animation-duration: 5.5s;
|
||||
animation-duration: 5.5s;
|
||||
-webkit-animation-delay: 1s;
|
||||
-moz-animation-delay: 1s;
|
||||
animation-delay: 1s;
|
||||
}
|
||||
#container-snow > div:nth-of-type(2) {
|
||||
left: 120px;
|
||||
-webkit-animation-duration: 7s;
|
||||
-moz-animation-duration: 7s;
|
||||
animation-duration: 7s;
|
||||
}
|
||||
#container-snow > div:nth-of-type(3) {
|
||||
left: 200px;
|
||||
-webkit-animation-duration: 8s;
|
||||
-moz-animation-duration: 8s;
|
||||
animation-duration: 8s;
|
||||
}
|
||||
#container-snow > div:nth-of-type(4) {
|
||||
left: 20%;
|
||||
-webkit-animation-duration: 6s;
|
||||
-moz-animation-duration: 6s;
|
||||
animation-duration: 6s;
|
||||
-webkit-animation-delay: 1s;
|
||||
-moz-animation-delay: 1s;
|
||||
animation-delay: 1s;
|
||||
}
|
||||
#container-snow > div:nth-of-type(5) {
|
||||
left: 30%;
|
||||
-webkit-animation-duration: 9s;
|
||||
-moz-animation-duration: 9s;
|
||||
animation-duration: 9s;
|
||||
}
|
||||
#container-snow > div:nth-of-type(6) {
|
||||
left: 40%;
|
||||
-webkit-animation-duration: 7.2s;
|
||||
-moz-animation-duration: 7.2s;
|
||||
animation-duration: 7.2s;
|
||||
-webkit-animation-delay: 1s;
|
||||
-moz-animation-delay: 1s;
|
||||
animation-delay: 1s;
|
||||
}
|
||||
#container-snow > div:nth-of-type(7) {
|
||||
left: 50%;
|
||||
-webkit-animation-duration: 10s;
|
||||
-moz-animation-duration: 10s;
|
||||
animation-duration: 10s;
|
||||
}
|
||||
#container-snow > div:nth-of-type(8) {
|
||||
left: 60%;
|
||||
-webkit-animation-duration: 6.4s;
|
||||
-moz-animation-duration: 6.4s;
|
||||
animation-duration: 6.4s;
|
||||
-webkit-animation-delay: 1s;
|
||||
-moz-animation-delay: 1s;
|
||||
animation-delay: 1s;
|
||||
}
|
||||
#container-snow > div:nth-of-type(9) {
|
||||
left: 70%;
|
||||
-webkit-animation-duration: 10s;
|
||||
-moz-animation-duration: 10s;
|
||||
animation-duration: 10s;
|
||||
-webkit-animation-delay: 1.4s;
|
||||
-moz-animation-delay: 1.4s;
|
||||
animation-delay: 1.4s;
|
||||
}
|
||||
#container-snow > div:nth-of-type(10) {
|
||||
left: 80%;
|
||||
-webkit-animation-duration: 8s;
|
||||
-moz-animation-duration: 8s;
|
||||
animation-duration: 8s;
|
||||
}
|
||||
#container-snow > div:nth-of-type(11) {
|
||||
left: 90%;
|
||||
-webkit-animation-duration: 7.1s;
|
||||
-moz-animation-duration: 7.1s;
|
||||
animation-duration: 7.1s;
|
||||
-webkit-animation-delay: 2s;
|
||||
-moz-animation-delay: 2s;
|
||||
animation-delay: 2s;
|
||||
}
|
||||
#container-snow > div:nth-of-type(12) {
|
||||
left: 99%;
|
||||
-webkit-animation-duration: 6.6s;
|
||||
-moz-animation-duration: 6.6s;
|
||||
animation-duration: 6.6s;
|
||||
-webkit-animation-delay: 1.6s;
|
||||
-moz-animation-delay: 1.6s;
|
||||
animation-delay: 1.6s;
|
||||
}
|
||||
#container-snow > div:nth-of-type(13) {
|
||||
left: 10px;
|
||||
-webkit-animation-duration: 10.2s;
|
||||
-moz-animation-duration: 10.2s;
|
||||
animation-duration: 10.2s;
|
||||
}
|
||||
#container-snow > div:nth-of-type(14) {
|
||||
left: 180px;
|
||||
-webkit-animation-duration: 12s;
|
||||
-moz-animation-duration: 12s;
|
||||
animation-duration: 12s;
|
||||
}
|
||||
#container-snow > div:nth-of-type(15) {
|
||||
left: 213px;
|
||||
-webkit-animation-duration: 7.3s;
|
||||
-moz-animation-duration: 7.3s;
|
||||
animation-duration: 7.3s;
|
||||
-webkit-animation-delay: 0.5s;
|
||||
-moz-animation-delay: 0.5s;
|
||||
animation-delay: 0.5s;
|
||||
}
|
||||
#container-snow > div:nth-of-type(16) {
|
||||
left: 23%;
|
||||
-webkit-animation-duration: 9.2s;
|
||||
-moz-animation-duration: 9.2s;
|
||||
animation-duration: 9.2s;
|
||||
}
|
||||
#container-snow > div:nth-of-type(17) {
|
||||
left: 38%;
|
||||
-webkit-animation-duration: 5s;
|
||||
-moz-animation-duration: 5s;
|
||||
animation-duration: 5s;
|
||||
}
|
||||
#container-snow > div:nth-of-type(18) {
|
||||
left: 45%;
|
||||
-webkit-animation-duration: 15s;
|
||||
-moz-animation-duration: 15s;
|
||||
animation-duration: 15s;
|
||||
}
|
||||
#container-snow > div:nth-of-type(19) {
|
||||
left: 58%;
|
||||
-webkit-animation-duration: 5s;
|
||||
-moz-animation-duration: 5s;
|
||||
animation-duration: 5s;
|
||||
}
|
||||
#container-snow > div:nth-of-type(20) {
|
||||
left: 64%;
|
||||
-webkit-animation-duration: 12s;
|
||||
-moz-animation-duration: 12s;
|
||||
animation-duration: 12s;
|
||||
}
|
||||
#container-snow > div:nth-of-type(21) {
|
||||
left: 76%;
|
||||
-webkit-animation-duration: 5.6s;
|
||||
-moz-animation-duration: 5.6s;
|
||||
animation-duration: 5.6s;
|
||||
-webkit-animation-delay: 1s;
|
||||
-moz-animation-delay: 1s;
|
||||
animation-delay: 1s;
|
||||
}
|
||||
#container-snow > div:nth-of-type(22) {
|
||||
left: 86%;
|
||||
-webkit-animation-duration: 8.5s;
|
||||
-moz-animation-duration: 8.5s;
|
||||
animation-duration: 8.5s;
|
||||
}
|
||||
#container-snow > div:nth-of-type(23) {
|
||||
left: 83%;
|
||||
-webkit-animation-duration: 14.4s;
|
||||
-moz-animation-duration: 14.4s;
|
||||
animation-duration: 14.4s;
|
||||
}
|
||||
#container-snow > div:nth-of-type(24) {
|
||||
left: 95%;
|
||||
-webkit-animation-duration: 12s;
|
||||
-moz-animation-duration: 12s;
|
||||
animation-duration: 12s;
|
||||
}
|
||||
#container-snow > div:nth-of-type(25) {
|
||||
left: 55px;
|
||||
-webkit-animation-duration: 8.7s;
|
||||
-moz-animation-duration: 8.7s;
|
||||
animation-duration: 8.7s;
|
||||
-webkit-animation-delay: 1.2s;
|
||||
-moz-animation-delay: 1.2s;
|
||||
animation-delay: 1.2s;
|
||||
}
|
||||
#container-snow > div:nth-of-type(26) {
|
||||
left: 133px;
|
||||
-webkit-animation-duration: 5.2s;
|
||||
-moz-animation-duration: 5.2s;
|
||||
animation-duration: 5.2s;
|
||||
}
|
||||
#container-snow > div:nth-of-type(27) {
|
||||
left: 215px;
|
||||
-webkit-animation-duration: 10.4s;
|
||||
-moz-animation-duration: 10.4s;
|
||||
animation-duration: 10.4s;
|
||||
-webkit-animation-delay: 1.6s;
|
||||
-moz-animation-delay: 1.6s;
|
||||
animation-delay: 1.6s;
|
||||
}
|
||||
#container-snow > div:nth-of-type(28) {
|
||||
left: 26%;
|
||||
-webkit-animation-duration: 9s;
|
||||
-moz-animation-duration: 9s;
|
||||
animation-duration: 9s;
|
||||
}
|
||||
#container-snow > div:nth-of-type(29) {
|
||||
left: 33%;
|
||||
-webkit-animation-duration: 12s;
|
||||
-moz-animation-duration: 12s;
|
||||
animation-duration: 12s;
|
||||
}
|
||||
#container-snow > div:nth-of-type(30) {
|
||||
left: 49%;
|
||||
-webkit-animation-duration: 9.4s;
|
||||
-moz-animation-duration: 9.4s;
|
||||
animation-duration: 9.4s;
|
||||
-webkit-animation-delay: 1s;
|
||||
-moz-animation-delay: 1s;
|
||||
animation-delay: 1s;
|
||||
}
|
||||
#container-snow > div:nth-of-type(31) {
|
||||
left: 55%;
|
||||
-webkit-animation-duration: 9.1s;
|
||||
-moz-animation-duration: 9.1s;
|
||||
animation-duration: 9.1s;
|
||||
}
|
||||
#container-snow > div:nth-of-type(32) {
|
||||
left: 68%;
|
||||
-webkit-animation-duration: 9.6s;
|
||||
-moz-animation-duration: 9.6s;
|
||||
animation-duration: 9.6s;
|
||||
-webkit-animation-delay: 0.5s;
|
||||
-moz-animation-delay: 0.5s;
|
||||
animation-delay: 0.5s;
|
||||
}
|
||||
#container-snow > div:nth-of-type(33) {
|
||||
left: 73%;
|
||||
-webkit-animation-duration: 12.4s;
|
||||
-moz-animation-duration: 12.4s;
|
||||
animation-duration: 12.4s;
|
||||
-webkit-animation-delay: 1s;
|
||||
-moz-animation-delay: 1s;
|
||||
animation-delay: 1s;
|
||||
}
|
||||
#container-snow > div:nth-of-type(34) {
|
||||
left: 85%;
|
||||
-webkit-animation-duration: 9s;
|
||||
-moz-animation-duration: 9s;
|
||||
animation-duration: 9s;
|
||||
-webkit-animation-delay: 1.5s;
|
||||
-moz-animation-delay: 1.5s;
|
||||
animation-delay: 1.5s;
|
||||
}
|
||||
#container-snow > div:nth-of-type(35) {
|
||||
left: 93%;
|
||||
-webkit-animation-duration: 5s;
|
||||
-moz-animation-duration: 5s;
|
||||
animation-duration: 5s;
|
||||
}
|
||||
#container-snow > div:nth-of-type(36) {
|
||||
left: 99%;
|
||||
-webkit-animation-duration: 10.6s;
|
||||
-moz-animation-duration: 10.6s;
|
||||
animation-duration: 10.6s;
|
||||
}
|
||||
#container-snow > div:nth-of-type(37) {
|
||||
left: 15px;
|
||||
-webkit-animation-duration: 9.6s;
|
||||
-moz-animation-duration: 9.6s;
|
||||
animation-duration: 9.6s;
|
||||
}
|
||||
#container-snow > div:nth-of-type(38) {
|
||||
left: 99px;
|
||||
-webkit-animation-duration: 7.5s;
|
||||
-moz-animation-duration: 7.5s;
|
||||
animation-duration: 7.5s;
|
||||
}
|
||||
#container-snow > div:nth-of-type(39) {
|
||||
left: 260px;
|
||||
-webkit-animation-duration: 11s;
|
||||
-moz-animation-duration: 11s;
|
||||
animation-duration: 11s;
|
||||
-webkit-animation-delay: 1s;
|
||||
-moz-animation-delay: 1s;
|
||||
animation-delay: 1s;
|
||||
}
|
||||
#container-snow > div:nth-of-type(40) {
|
||||
left: 28%;
|
||||
-webkit-animation-duration: 19s;
|
||||
-moz-animation-duration: 19s;
|
||||
animation-duration: 19s;
|
||||
}
|
||||
#container-snow > div:nth-of-type(41) {
|
||||
left: 35%;
|
||||
-webkit-animation-duration: 14s;
|
||||
-moz-animation-duration: 14s;
|
||||
animation-duration: 14s;
|
||||
}
|
||||
#container-snow > div:nth-of-type(42) {
|
||||
left: 43%;
|
||||
-webkit-animation-duration: 5.6s;
|
||||
-moz-animation-duration: 5.6s;
|
||||
animation-duration: 5.6s;
|
||||
}
|
||||
#container-snow > div:nth-of-type(43) {
|
||||
left: 53%;
|
||||
-webkit-animation-duration: 8.8s;
|
||||
-moz-animation-duration: 8.8s;
|
||||
animation-duration: 8.8s;
|
||||
-webkit-animation-delay: 1s;
|
||||
-moz-animation-delay: 1s;
|
||||
animation-delay: 1s;
|
||||
}
|
||||
#container-snow > div:nth-of-type(44) {
|
||||
left: 66%;
|
||||
-webkit-animation-duration: 16s;
|
||||
-moz-animation-duration: 16s;
|
||||
animation-duration: 16s;
|
||||
}
|
||||
#container-snow > div:nth-of-type(45) {
|
||||
left: 78%;
|
||||
-webkit-animation-duration: 6s;
|
||||
-moz-animation-duration: 6s;
|
||||
animation-duration: 6s;
|
||||
}
|
||||
#container-snow > div:nth-of-type(46) {
|
||||
left: 88%;
|
||||
-webkit-animation-duration: 9.5s;
|
||||
-moz-animation-duration: 9.5s;
|
||||
animation-duration: 9.5s;
|
||||
-webkit-animation-delay: 0.5s;
|
||||
-moz-animation-delay: 0.5s;
|
||||
animation-delay: 0.5s;
|
||||
}
|
||||
#container-snow > div:nth-of-type(47) {
|
||||
left: 94%;
|
||||
-webkit-animation-duration: 7.6s;
|
||||
-moz-animation-duration: 7.6s;
|
||||
animation-duration: 7.6s;
|
||||
}
|
||||
#container-snow > div:nth-of-type(48) {
|
||||
left: 96%;
|
||||
-webkit-animation-duration: 8.2s;
|
||||
-moz-animation-duration: 8.2s;
|
||||
animation-duration: 8.2s;
|
||||
-webkit-animation-delay: 0.3s;
|
||||
-moz-animation-delay: 0.3s;
|
||||
animation-delay: 0.3s;
|
||||
}
|
||||
|
||||
@media (max-width: 600px) {
|
||||
#container-snow > div:nth-of-type(24) ~ * {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 800px) {
|
||||
#container-snow > div:nth-of-type(36) ~ * {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
#ncm_backups > caption > h4 {
|
||||
color: black;
|
||||
}
|
||||
|
|
|
@ -1199,8 +1199,18 @@ if ($config['pure'] == 0) {
|
|||
// Menu container prepared to autohide menu.
|
||||
$menuCollapsed = (isset($_SESSION['menu_type']) === true && $_SESSION['menu_type'] !== 'classic');
|
||||
$menuTypeClass = ($menuCollapsed === true) ? 'collapsed' : 'classic';
|
||||
// Snow.
|
||||
$string = '<div id="container-snow" class="tpl-snow invisible">
|
||||
<div></div><div></div><div></div><div></div><div></div><div></div><div></div>
|
||||
<div></div><div></div><div></div><div></div><div></div><div></div><div></div>
|
||||
<div></div><div></div><div></div><div></div><div></div><div></div><div></div>
|
||||
<div></div><div></div><div></div><div></div><div></div><div></div><div></div>
|
||||
<div></div><div></div><div></div><div></div><div></div><div></div><div></div>
|
||||
<div></div><div></div><div></div><div></div><div></div><div></div><div></div>
|
||||
<div></div><div></div><div></div><div></div><div></div>
|
||||
</div>';
|
||||
// Container.
|
||||
echo '<div id="container">';
|
||||
echo '<div id="container">'.$string;
|
||||
|
||||
// Notifications content wrapper
|
||||
echo '<div id="notification-content" class="invisible"/></div>';
|
||||
|
@ -1669,12 +1679,31 @@ require 'include/php_to_js_values.php';
|
|||
autoclose_info_box(item.id, $autocloseTime)
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
// Cog animations.
|
||||
$(document).ready(function() {
|
||||
// Cog animations.
|
||||
$(".submitButton").click(function(){
|
||||
$("#"+this.id+" > .subIcon.cog").addClass("rotation");
|
||||
});
|
||||
|
||||
<?php if ($_GET['logged'] === '1' && enterprise_installed() === false) { ?>
|
||||
$('#header_table_inner').find('.header_left').trigger('click');
|
||||
<?php } ?>
|
||||
});
|
||||
|
||||
// Snow animations.
|
||||
$(document).ready(function() {
|
||||
const date = new Date();
|
||||
const today = date.toLocaleDateString();
|
||||
const year = date.getFullYear();
|
||||
const christmasDay = "25/12/"+year;
|
||||
let flagEasternEgg = $("#flagEasternEgg").val();
|
||||
if (today === christmasDay && flagEasternEgg == true) {
|
||||
$("#container-snow").removeClass('invisible');
|
||||
setTimeout(() => {
|
||||
$("#container-snow").addClass('invisible');
|
||||
}, 30000);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
|
|
|
@ -131,7 +131,7 @@
|
|||
<div style='padding-bottom: 50px'>
|
||||
<?php
|
||||
$version = '7.0NG.774';
|
||||
$build = '231218';
|
||||
$build = '231219';
|
||||
$banner = "v$version Build $build";
|
||||
error_reporting(0);
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
%define debug_package %{nil}
|
||||
%define name pandorafms_console
|
||||
%define version 7.0NG.774
|
||||
%define release 231218
|
||||
%define release 231219
|
||||
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name httpd
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
%define debug_package %{nil}
|
||||
%define name pandorafms_console
|
||||
%define version 7.0NG.774
|
||||
%define release 231218
|
||||
%define release 231219
|
||||
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name httpd
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_console
|
||||
%define version 7.0NG.774
|
||||
%define release 231218
|
||||
%define release 231219
|
||||
%define httpd_name httpd
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name apache2
|
||||
|
|
|
@ -92,6 +92,7 @@ CREATE TABLE IF NOT EXISTS `tagente` (
|
|||
`fixed_ip` TINYINT NOT NULL DEFAULT 0,
|
||||
`disabled_by_downtime` TINYINT NOT NULL DEFAULT 0,
|
||||
`vul_scan_enabled` TINYINT NOT NULL DEFAULT 2,
|
||||
`ignore_unknown` TINYINT NOT NULL DEFAULT 0,
|
||||
PRIMARY KEY (`id_agente`),
|
||||
KEY `nombre` (`nombre`(255)),
|
||||
KEY `direccion` (`direccion`),
|
||||
|
@ -279,6 +280,7 @@ CREATE TABLE IF NOT EXISTS `tagente_modulo` (
|
|||
`disabled_by_downtime` TINYINT NOT NULL DEFAULT 0,
|
||||
`last_compact` TIMESTAMP NOT NULL DEFAULT 0,
|
||||
`made_enabled` TINYINT UNSIGNED DEFAULT 0,
|
||||
`ignore_unknown` TINYINT NOT NULL DEFAULT 0,
|
||||
PRIMARY KEY (`id_agente_modulo`),
|
||||
KEY `main_idx` (`id_agente_modulo`,`id_agente`),
|
||||
KEY `tam_agente` (`id_agente`),
|
||||
|
@ -2540,6 +2542,7 @@ CREATE TABLE IF NOT EXISTS `tpolicy_modules` (
|
|||
`percentage_critical` TINYINT UNSIGNED DEFAULT 0,
|
||||
`warning_time` INT UNSIGNED DEFAULT 0,
|
||||
`made_enabled` TINYINT UNSIGNED DEFAULT 0,
|
||||
`ignore_unknown` TINYINT NOT NULL DEFAULT 0,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `main_idx` (`id_policy`),
|
||||
UNIQUE (`id_policy`, `name`)
|
||||
|
@ -3550,6 +3553,7 @@ CREATE TABLE IF NOT EXISTS `tmetaconsole_agent` (
|
|||
`fixed_ip` TINYINT NOT NULL DEFAULT 0,
|
||||
`disabled_by_downtime` TINYINT NOT NULL DEFAULT 0,
|
||||
`vul_scan_enabled` TINYINT NOT NULL DEFAULT 2,
|
||||
`ignore_unknown` TINYINT NOT NULL DEFAULT 0,
|
||||
PRIMARY KEY (`id_agente`),
|
||||
KEY `nombre` (`nombre`(255)),
|
||||
KEY `direccion` (`direccion`),
|
||||
|
|
|
@ -1240,48 +1240,48 @@ INSERT INTO `tpolicies` VALUES (4,'Basic AIX Local Monitoring','B
|
|||
INSERT INTO `tpolicies` VALUES (5,'Basic HP-UX Local Monitoring','Basic local checks to monitoring HP/UX systems.',2,0,0,0);
|
||||
INSERT INTO `tpolicies` VALUES (6,'Basic Remote Checks','Basic Remote Checks (ping, latency, ports).',9,0,0,0);
|
||||
|
||||
INSERT INTO `tpolicy_modules` VALUES (1,1,'module_begin
module_name Bytes per second (Received)
module_type generic_data_inc
module_exec powershell -c "Get-NetAdapterStatistics |Measure-Object -Sum ReceivedBytes |Select -ExpandProperty Sum"
module_end



',4,'','Bytes per second (Received)','',0,0,1,'',0,'','','','',1,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tpolicy_modules` VALUES (2,1,'module_begin
module_name Bytes per second (Sent)
module_type generic_data_inc
module_exec powershell -c "Get-NetAdapterStatistics |Measure-Object -Sum SentBytes |Select -ExpandProperty Sum"
module_end




',4,'','Bytes per second (Sent)','',0,0,1,'',0,'','','','',1,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tpolicy_modules` VALUES (3,1,'module_begin
module_name CPU %
module_type generic_data
module_cpuusage all
module_unit %
module_min_warning 79.00
module_max_warning 90.00;module_min_critical 91.00
module_max_critical 00.00;
module_end





',1,'CPU usage (%)','CPU %','%',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,79.00,90.00,'',91.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tpolicy_modules` VALUES (4,1,'module_begin
module_name Total processes
module_type generic_data
module_exec tasklist | wc -l | gawk "{print $1}"
module_end


',1,'','Total processes','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tpolicy_modules` VALUES (5,1,'module_begin
module_name Uptime
module_type generic_data
module_exec powershell -c "((get-date) - (gcim Win32_OperatingSystem).LastBootUpTime | Select -ExpandProperty Ticks) / 100000"
module_end




',1,'','Uptime','_timeticks_',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tpolicy_modules` VALUES (6,1,'module_begin
module_name WMI Service
module_type generic_proc
module_service winmgmt
module_end

',2,'WMI Service enabled','WMI Service','',0,0,1,'',0,'','','','',3,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tpolicy_modules` VALUES (7,2,'module_begin
module_name Bytes per second (Received)
module_type generic_data_inc
module_exec awk '!/lo:/ {s+=$2}END{print s}' /proc/net/dev
module_min_warning 0
module_max_warning 0
module_min_critical 0
module_max_critical 0
module_end

',4,'','Bytes per second (Received)','bytes/sec',0,0,1,'',0,'','','','',1,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tpolicy_modules` VALUES (8,2,'module_begin
module_name Bytes per second (Sent)
module_type generic_data_inc
module_exec awk '!/lo:/ {s+=$10}END{print s}' /proc/net/dev
module_min_warning 0
module_max_warning 0
module_min_critical 0
module_max_critical 0
module_end
',4,'','Bytes per second (Sent)','bytes/sec',0,0,1,'',0,'','','','',1,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tpolicy_modules` VALUES (9,2,'module_begin
module_name CPU %
module_type generic_data
module_exec vmstat 1 1 | tail -1 | awk '{ print $13 + $14 }'
module_unit %
module_end

',1,'Current use of CPU (System + User).','CPU %','%',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tpolicy_modules` VALUES (10,2,'module_begin
module_name I/O Lock
module_type generic_data
module_exec vmstat 1 1 | tail -1 | awk '{print $16}'
module_description I/O Wait Disk
module_end


',1,'','I/O Lock','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tpolicy_modules` VALUES (11,2,'module_begin 
module_name Load Average
module_type generic_data
module_exec cat /proc/loadavg |awk '{print $2}'
module_end

',1,'Average process in CPU (Last 5 minutes).','Load Average','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tpolicy_modules` VALUES (12,2,'module_begin
module_name Port 22 Open (SSH)
module_type generic_proc
module_exec echo > /dev/tcp/127.0.0.1/22 >/dev/null 2>&1 && echo 1 || echo 0
module_end





',2,'Checks if port 22 (SSH) is listening.','Port 22 Open (SSH)','',0,0,1,'',0,'','','','',3,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tpolicy_modules` VALUES (13,2,'module_begin
module_name Total processes
module_type generic_data
module_exec ps ax | tail -n +2 | wc -l
module_description Total processes
module_end',1,'','Total processes','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tpolicy_modules` VALUES (14,2,'module_begin
module_name Uptime
module_type generic_data
module_exec awk '{print $1*100}' /proc/uptime
module_end
',1,'Host Up time (Timeticks)','Uptime','_timeticks_',0,0,1,'',0,'','','','',1,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tpolicy_modules` VALUES (15,3,'module_begin
module_name CPU %
module_type generic_data
module_exec vmstat 1 1 | tail -1| awk '{print (100-$NF)}'
module_unit %
module_end
',1,'CPU usage %','CPU %','%',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tpolicy_modules` VALUES (16,3,'module_begin
module_name Disk / usage (%)
module_type generic_data
module_exec df -k / | tail -1 | tr -d "%" | awk '{print $5}'
module_end



',1,'Disk use percentage for root partition (/)','Disk / usage (%)','',0,0,1,'',0,'','','','',1,1,1,0,0,'','','',0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *','','{\"going_unknown\":0}','W10=',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tpolicy_modules` VALUES (17,3,'module_begin
module_name Disk /var usage (%)
module_type generic_data
module_exec df -k /var | tail -1 | tr -d "%" | awk '{print $5}'
module_end



',1,'Disk use percentage for var partition (/var)','Disk /var usage (%)','',0,0,1,'',0,'','','','',1,1,1,0,0,'','','',0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *','','{\"going_unknown\":0}','W10=',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tpolicy_modules` VALUES (18,3,'module_begin
module_name Load Average
module_type generic_data
module_exec uptime | awk '{print $(NF-2)}' | tr -d ','
module_end
',1,'Load average','Load Average','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tpolicy_modules` VALUES (19,3,'module_begin
module_name Memory Free %
module_type generic_data
module_freepercentmemory
module_end




',1,'Percentage Mem Free','Memory Free %','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,8.00,15.00,'',0.00,7.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tpolicy_modules` VALUES (20,3,'module_begin
module_name Port 22 Open (SSH)
module_type generic_proc
module_exec timeout 1 bash -c "echo > /dev/tcp/127.0.0.1/22" >/dev/null 2>&1 && echo 1 || echo 0
module_end



',2,'Checks if port 22 (SSH) is listening.','Port 22 Open (SSH)','',0,0,1,'',0,'','','','',3,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tpolicy_modules` VALUES (21,3,'module_begin
module_name Swap Used %
module_type generic_data
module_exec swap -l |tail -1 | awk '{print 100 - ($NF / $(NF-1) * 100)}'
module_unit %
module_end


',1,'Swap memory available in %','Swap Used %','%',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tpolicy_modules` VALUES (22,3,'module_begin
module_name Total processes
module_type generic_data
module_exec ps -A | wc -l | awk '{print $1}'
module_end',1,'Total processes','Total processes','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tpolicy_modules` VALUES (23,3,'module_beg
module_name Uptime
module_type generic_data
module_exec perl -e "print 100*(time - $(kstat -p unix:0:system_misc:boot_time |awk '{print $2}'))"
module_end






',1,'Host Up time (Timeticks)','Uptime','_timeticks_',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tpolicy_modules` VALUES (24,4,'module_begin
module_name CPU %
module_type generic_data
module_exec sar 1 | tail -1 | awk '{print 100 - $5}'
module_description CPU usage in %
module_unit %
module_end',1,'','CPU %','%',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tpolicy_modules` VALUES (25,4,'module_begin
module_name CPU User
module_type generic_data
module_exec sar 1 | tail -1 | awk '{print $2}'
module_description CPU usage in %
module_unit %
module_end',1,'','CPU User','%',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tpolicy_modules` VALUES (26,4,'module_begin 
module_name Load Average
module_type generic_data
module_exec uptime | awk '{print $(NF-2)*1}' 
module_description Average process in CPU (Last minute) 
module_end',1,'','Load Average','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tpolicy_modules` VALUES (27,4,'module_begin
module_name Memory Free %
module_type generic_data
module_exec svmon -G|grep memory | awk '{print (1- $3/$2 )*100}'
module_description Percentage Mem Free
module_end
',1,'','Memory Free %','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tpolicy_modules` VALUES (28,4,'module_begin
module_name Pagination use
module_type generic_data
module_exec  lsps -s | tail -1 | awk '{print $2+0}'
module_end',1,'','Pagination use','',0,0,1,'',0,'','','','',1,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tpolicy_modules` VALUES (29,4,'module_begin
module_name Service sshd status
module_type generic_proc
module_exec lssrc -a | grep ssh | grep active
module_end',2,'','Service sshd status','',0,0,1,'',0,'','','','',3,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tpolicy_modules` VALUES (30,4,'module_begin
module_name Uptime
module_type generic_data_string
module_exec uptime |sed "s/us\.*$//g" | sed "s/,\.*$//g"
module_description Host Up time
module_end
',1,'','Uptime','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tpolicy_modules` VALUES (31,5,'module_begin
module_name CPU %
module_type generic_data
module_cpuusage all
module_unit %
module_end
',1,'','CPU %','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tpolicy_modules` VALUES (32,5,'module_begin
module_name CPU User
module_type generic_data
module_exec vmstat 1 2 | tail -1 | awk '{ print $(16) }'
module_description % of User CPU
module_unit %
module_end

',1,'','CPU User','%',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tpolicy_modules` VALUES (33,5,'module_begin
module_name Load Average
module_type generic_data
module_exec uptime | awk '{print $(NF-2)}' | tr -d ','
module_description System load average
module_end
',1,'','Load Average','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tpolicy_modules` VALUES (34,5,'module_begin
module_name Memory Free %
module_type generic_data
module_exec echo "" > /tmp/hpvm_toptest; top -d 1 -f /tmp/hpvm_toptest 2>/dev/null 1>/dev/null; cat /tmp/hpvm_toptest | grep -i Memory | head -1 | awk '{print $8/($2+$5) * 100}'
module_end


',1,'','Memory Free %','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tpolicy_modules` VALUES (35,5,'module_begin
module_name  Service sshd status
module_type generic_proc
module_exec ps -ef | grep  -v grep | grep "/opt/ssh/sbin/sshd" | wc -l
module_description SSH running
module_end

',2,'','Service sshd status','',0,0,1,'',0,'','','','',3,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tpolicy_modules` VALUES (36,5,'module_begin
module_name Total processes
module_type generic_data
module_exec echo $(((`ps -e | wc -l`)-1)) | tr -d “\n”
module_description Total processes
module_end

',1,'','Total processes','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tpolicy_modules` VALUES (37,5,'module_begin
module_name Uptime
module_type generic_data_string
module_exec uptime |sed s/us\.*$//g | sed s/,\.*$//g
module_description Host Up time
module_end
',3,'','Uptime','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tpolicy_modules` VALUES (38,5,'module_begin
module_name Zombie processes
module_type generic_data
module_exec ps -­elf | awk '$2~/'Z'/{print $2}' | wc -l | tr -d "\n"
module_description Zombie processes
module_end
',1,'','Zombie processes','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tpolicy_modules` VALUES (39,6,'',6,'','Host Alive','',0,0,300,'',0,'','','','',2,1,2,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tpolicy_modules` VALUES (40,6,'',7,'','Host Latency','',0,0,300,'',0,'','','','',2,1,2,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,80.00,149.00,'',150.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tpolicy_modules` VALUES (41,6,'',2,'Checks if port 161 is open and reachable for Pandora FMS server.','SNMP Available','',0,0,300,'',0,'','','','',1,1,4,0,0,'','','_field1_;Target IP;;_address_--_field2_;Port;;161',3,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *','{\"1\":{\"macro\":\"_field1_\",\"desc\":\"Target IP\",\"help\":\"\",\"value\":\"_address_\"},\"2\":{\"macro\":\"_field2_\",\"desc\":\"Port\",\"help\":\"\",\"value\":\"161\"}}','{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tpolicy_modules` VALUES (42,6,'',9,'Checks if port 22 is open and reachable for Pandora FMS server.','SSH Reachable','',0,0,300,'',22,'','','','',2,1,2,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tpolicy_modules` VALUES (1,1,'module_begin
module_name Bytes per second (Received)
module_type generic_data_inc
module_exec powershell -c "Get-NetAdapterStatistics |Measure-Object -Sum ReceivedBytes |Select -ExpandProperty Sum"
module_end



',4,'','Bytes per second (Received)','',0,0,1,'',0,'','','','',1,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tpolicy_modules` VALUES (2,1,'module_begin
module_name Bytes per second (Sent)
module_type generic_data_inc
module_exec powershell -c "Get-NetAdapterStatistics |Measure-Object -Sum SentBytes |Select -ExpandProperty Sum"
module_end




',4,'','Bytes per second (Sent)','',0,0,1,'',0,'','','','',1,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tpolicy_modules` VALUES (3,1,'module_begin
module_name CPU %
module_type generic_data
module_cpuusage all
module_unit %
module_min_warning 79.00
module_max_warning 90.00;module_min_critical 91.00
module_max_critical 00.00;
module_end





',1,'CPU usage (%)','CPU %','%',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,79.00,90.00,'',91.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tpolicy_modules` VALUES (4,1,'module_begin
module_name Total processes
module_type generic_data
module_exec tasklist | wc -l | gawk "{print $1}"
module_end


',1,'','Total processes','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tpolicy_modules` VALUES (5,1,'module_begin
module_name Uptime
module_type generic_data
module_exec powershell -c "((get-date) - (gcim Win32_OperatingSystem).LastBootUpTime | Select -ExpandProperty Ticks) / 100000"
module_end




',1,'','Uptime','_timeticks_',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tpolicy_modules` VALUES (6,1,'module_begin
module_name WMI Service
module_type generic_proc
module_service winmgmt
module_end

',2,'WMI Service enabled','WMI Service','',0,0,1,'',0,'','','','',3,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tpolicy_modules` VALUES (7,2,'module_begin
module_name Bytes per second (Received)
module_type generic_data_inc
module_exec awk '!/lo:/ {s+=$2}END{print s}' /proc/net/dev
module_min_warning 0
module_max_warning 0
module_min_critical 0
module_max_critical 0
module_end

',4,'','Bytes per second (Received)','bytes/sec',0,0,1,'',0,'','','','',1,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tpolicy_modules` VALUES (8,2,'module_begin
module_name Bytes per second (Sent)
module_type generic_data_inc
module_exec awk '!/lo:/ {s+=$10}END{print s}' /proc/net/dev
module_min_warning 0
module_max_warning 0
module_min_critical 0
module_max_critical 0
module_end
',4,'','Bytes per second (Sent)','bytes/sec',0,0,1,'',0,'','','','',1,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tpolicy_modules` VALUES (9,2,'module_begin
module_name CPU %
module_type generic_data
module_exec vmstat 1 1 | tail -1 | awk '{ print $13 + $14 }'
module_unit %
module_end

',1,'Current use of CPU (System + User).','CPU %','%',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tpolicy_modules` VALUES (10,2,'module_begin
module_name I/O Lock
module_type generic_data
module_exec vmstat 1 1 | tail -1 | awk '{print $16}'
module_description I/O Wait Disk
module_end


',1,'','I/O Lock','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tpolicy_modules` VALUES (11,2,'module_begin 
module_name Load Average
module_type generic_data
module_exec cat /proc/loadavg |awk '{print $2}'
module_end

',1,'Average process in CPU (Last 5 minutes).','Load Average','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tpolicy_modules` VALUES (12,2,'module_begin
module_name Port 22 Open (SSH)
module_type generic_proc
module_exec echo > /dev/tcp/127.0.0.1/22 >/dev/null 2>&1 && echo 1 || echo 0
module_end





',2,'Checks if port 22 (SSH) is listening.','Port 22 Open (SSH)','',0,0,1,'',0,'','','','',3,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tpolicy_modules` VALUES (13,2,'module_begin
module_name Total processes
module_type generic_data
module_exec ps ax | tail -n +2 | wc -l
module_description Total processes
module_end',1,'','Total processes','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tpolicy_modules` VALUES (14,2,'module_begin
module_name Uptime
module_type generic_data
module_exec awk '{print $1*100}' /proc/uptime
module_end
',1,'Host Up time (Timeticks)','Uptime','_timeticks_',0,0,1,'',0,'','','','',1,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tpolicy_modules` VALUES (15,3,'module_begin
module_name CPU %
module_type generic_data
module_exec vmstat 1 1 | tail -1| awk '{print (100-$NF)}'
module_unit %
module_end
',1,'CPU usage %','CPU %','%',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tpolicy_modules` VALUES (16,3,'module_begin
module_name Disk / usage (%)
module_type generic_data
module_exec df -k / | tail -1 | tr -d "%" | awk '{print $5}'
module_end



',1,'Disk use percentage for root partition (/)','Disk / usage (%)','',0,0,1,'',0,'','','','',1,1,1,0,0,'','','',0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *','','{\"going_unknown\":0}','W10=',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tpolicy_modules` VALUES (17,3,'module_begin
module_name Disk /var usage (%)
module_type generic_data
module_exec df -k /var | tail -1 | tr -d "%" | awk '{print $5}'
module_end



',1,'Disk use percentage for var partition (/var)','Disk /var usage (%)','',0,0,1,'',0,'','','','',1,1,1,0,0,'','','',0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *','','{\"going_unknown\":0}','W10=',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tpolicy_modules` VALUES (18,3,'module_begin
module_name Load Average
module_type generic_data
module_exec uptime | awk '{print $(NF-2)}' | tr -d ','
module_end
',1,'Load average','Load Average','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tpolicy_modules` VALUES (19,3,'module_begin
module_name Memory Free %
module_type generic_data
module_freepercentmemory
module_end




',1,'Percentage Mem Free','Memory Free %','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,8.00,15.00,'',0.00,7.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tpolicy_modules` VALUES (20,3,'module_begin
module_name Port 22 Open (SSH)
module_type generic_proc
module_exec timeout 1 bash -c "echo > /dev/tcp/127.0.0.1/22" >/dev/null 2>&1 && echo 1 || echo 0
module_end



',2,'Checks if port 22 (SSH) is listening.','Port 22 Open (SSH)','',0,0,1,'',0,'','','','',3,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tpolicy_modules` VALUES (21,3,'module_begin
module_name Swap Used %
module_type generic_data
module_exec swap -l |tail -1 | awk '{print 100 - ($NF / $(NF-1) * 100)}'
module_unit %
module_end


',1,'Swap memory available in %','Swap Used %','%',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tpolicy_modules` VALUES (22,3,'module_begin
module_name Total processes
module_type generic_data
module_exec ps -A | wc -l | awk '{print $1}'
module_end',1,'Total processes','Total processes','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tpolicy_modules` VALUES (23,3,'module_beg
module_name Uptime
module_type generic_data
module_exec perl -e "print 100*(time - $(kstat -p unix:0:system_misc:boot_time |awk '{print $2}'))"
module_end






',1,'Host Up time (Timeticks)','Uptime','_timeticks_',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tpolicy_modules` VALUES (24,4,'module_begin
module_name CPU %
module_type generic_data
module_exec sar 1 | tail -1 | awk '{print 100 - $5}'
module_description CPU usage in %
module_unit %
module_end',1,'','CPU %','%',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tpolicy_modules` VALUES (25,4,'module_begin
module_name CPU User
module_type generic_data
module_exec sar 1 | tail -1 | awk '{print $2}'
module_description CPU usage in %
module_unit %
module_end',1,'','CPU User','%',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tpolicy_modules` VALUES (26,4,'module_begin 
module_name Load Average
module_type generic_data
module_exec uptime | awk '{print $(NF-2)*1}' 
module_description Average process in CPU (Last minute) 
module_end',1,'','Load Average','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tpolicy_modules` VALUES (27,4,'module_begin
module_name Memory Free %
module_type generic_data
module_exec svmon -G|grep memory | awk '{print (1- $3/$2 )*100}'
module_description Percentage Mem Free
module_end
',1,'','Memory Free %','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tpolicy_modules` VALUES (28,4,'module_begin
module_name Pagination use
module_type generic_data
module_exec  lsps -s | tail -1 | awk '{print $2+0}'
module_end',1,'','Pagination use','',0,0,1,'',0,'','','','',1,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tpolicy_modules` VALUES (29,4,'module_begin
module_name Service sshd status
module_type generic_proc
module_exec lssrc -a | grep ssh | grep active
module_end',2,'','Service sshd status','',0,0,1,'',0,'','','','',3,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tpolicy_modules` VALUES (30,4,'module_begin
module_name Uptime
module_type generic_data_string
module_exec uptime |sed "s/us\.*$//g" | sed "s/,\.*$//g"
module_description Host Up time
module_end
',1,'','Uptime','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tpolicy_modules` VALUES (31,5,'module_begin
module_name CPU %
module_type generic_data
module_cpuusage all
module_unit %
module_end
',1,'','CPU %','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tpolicy_modules` VALUES (32,5,'module_begin
module_name CPU User
module_type generic_data
module_exec vmstat 1 2 | tail -1 | awk '{ print $(16) }'
module_description % of User CPU
module_unit %
module_end

',1,'','CPU User','%',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tpolicy_modules` VALUES (33,5,'module_begin
module_name Load Average
module_type generic_data
module_exec uptime | awk '{print $(NF-2)}' | tr -d ','
module_description System load average
module_end
',1,'','Load Average','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tpolicy_modules` VALUES (34,5,'module_begin
module_name Memory Free %
module_type generic_data
module_exec echo "" > /tmp/hpvm_toptest; top -d 1 -f /tmp/hpvm_toptest 2>/dev/null 1>/dev/null; cat /tmp/hpvm_toptest | grep -i Memory | head -1 | awk '{print $8/($2+$5) * 100}'
module_end


',1,'','Memory Free %','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tpolicy_modules` VALUES (35,5,'module_begin
module_name  Service sshd status
module_type generic_proc
module_exec ps -ef | grep  -v grep | grep "/opt/ssh/sbin/sshd" | wc -l
module_description SSH running
module_end

',2,'','Service sshd status','',0,0,1,'',0,'','','','',3,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tpolicy_modules` VALUES (36,5,'module_begin
module_name Total processes
module_type generic_data
module_exec echo $(((`ps -e | wc -l`)-1)) | tr -d “\n”
module_description Total processes
module_end

',1,'','Total processes','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tpolicy_modules` VALUES (37,5,'module_begin
module_name Uptime
module_type generic_data_string
module_exec uptime |sed s/us\.*$//g | sed s/,\.*$//g
module_description Host Up time
module_end
',3,'','Uptime','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tpolicy_modules` VALUES (38,5,'module_begin
module_name Zombie processes
module_type generic_data
module_exec ps -­elf | awk '$2~/'Z'/{print $2}' | wc -l | tr -d "\n"
module_description Zombie processes
module_end
',1,'','Zombie processes','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tpolicy_modules` VALUES (39,6,'',6,'','Host Alive','',0,0,300,'',0,'','','','',2,1,2,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tpolicy_modules` VALUES (40,6,'',7,'','Host Latency','',0,0,300,'',0,'','','','',2,1,2,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,80.00,149.00,'',150.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tpolicy_modules` VALUES (41,6,'',2,'Checks if port 161 is open and reachable for Pandora FMS server.','SNMP Available','',0,0,300,'',0,'','','','',1,1,4,0,0,'','','_field1_;Target IP;;_address_--_field2_;Port;;161',3,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *','{\"1\":{\"macro\":\"_field1_\",\"desc\":\"Target IP\",\"help\":\"\",\"value\":\"_address_\"},\"2\":{\"macro\":\"_field2_\",\"desc\":\"Port\",\"help\":\"\",\"value\":\"161\"}}','{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tpolicy_modules` VALUES (42,6,'',9,'Checks if port 22 is open and reachable for Pandora FMS server.','SSH Reachable','',0,0,300,'',22,'','','','',2,1,2,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||
|
||||
INSERT INTO `tpolicy_plugins` VALUES (1,1,'cscript.exe //B "%ProgramFiles%\Pandora_Agent\util\df_percent_used.vbs"',0);
|
||||
INSERT INTO `tpolicy_plugins` VALUES (2,1,'cscript.exe //B "%ProgramFiles%\Pandora_Agent\util\mem_percent_used.vbs"',0);
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
<?php
|
||||
|
||||
// Versions must be specified as a string in the following formats: '8', '8.0.30', ...
|
||||
$php_version = '8';
|
||||
$mysql_version = '8';
|
|
@ -1406,6 +1406,40 @@ class Client
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Compare version strings.
|
||||
*
|
||||
* @param string $version1 Version1.
|
||||
* @param string $version2 Version2.
|
||||
*
|
||||
* @return array
|
||||
* @throws \Exception On error.
|
||||
*/
|
||||
private function compareVersions(string $version1, string $version2):int
|
||||
{
|
||||
$v1_components = explode('.', $version1);
|
||||
$v2_components = explode('.', $version2);
|
||||
|
||||
$maxLength = max(count($v1_components), count($v2_components));
|
||||
|
||||
for ($i = 0; $i < $maxLength; $i++) {
|
||||
$v1_part = isset($v1_components[$i]) === true ? intval($v1_components[$i]) : 0;
|
||||
$v2_part = isset($v2_components[$i]) === true ? intval($v2_components[$i]) : 0;
|
||||
|
||||
if ($v1_part < $v2_part) {
|
||||
// $version1 is older.
|
||||
return -1;
|
||||
} else if ($v1_part > $v2_part) {
|
||||
// $version1 is newer.
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
// Versions are identical.
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Update files.
|
||||
*
|
||||
|
@ -1426,6 +1460,8 @@ class Client
|
|||
bool $classic=false,
|
||||
bool $called_recursively=false
|
||||
) :void {
|
||||
global $config;
|
||||
|
||||
if (is_dir($from) !== true || is_readable($from) !== true) {
|
||||
throw new \Exception('Cannot access patch files '.$from);
|
||||
}
|
||||
|
@ -1445,6 +1481,41 @@ class Client
|
|||
throw new \Exception('Files are not readable');
|
||||
}
|
||||
|
||||
// External path to required versions file.
|
||||
$download_filepath = $this->tmpDir.'/downloads/'.$version.'/required_um_versions.php';
|
||||
|
||||
// Fallback file path in console root.
|
||||
$local_filepath = $config['homedir'].'/required_um_versions.php';
|
||||
|
||||
$filepath = null;
|
||||
|
||||
if (file_exists($download_filepath) === true) {
|
||||
$filepath = $download_filepath;
|
||||
} else if (file_exists($local_filepath) === true) {
|
||||
$filepath = $local_filepath;
|
||||
}
|
||||
|
||||
if ($filepath !== null) {
|
||||
include $filepath;
|
||||
|
||||
$curr_php_version = phpversion();
|
||||
$curr_mysql_version = db_get_value_sql('SELECT VERSION() AS version');
|
||||
|
||||
if (isset($php_version) === true
|
||||
&& is_string($php_version) === true
|
||||
&& $this->compareVersions($curr_php_version, $php_version) < 0
|
||||
) {
|
||||
throw new \Exception('PHP version >= '.$php_version.' is required');
|
||||
}
|
||||
|
||||
if (isset($mysql_version) === true
|
||||
&& is_string($mysql_version) === true
|
||||
&& $this->compareVersions($curr_mysql_version, $mysql_version) < 0
|
||||
) {
|
||||
throw new \Exception('MySQL version >= '.$mysql_version.' is required');
|
||||
}
|
||||
}
|
||||
|
||||
if ($test === true && $called_recursively === false) {
|
||||
// Get size of folder and its subfolders corresponding to "from" path containing those files
|
||||
// that will be updated in product.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-server
|
||||
Version: 7.0NG.774-231218
|
||||
Version: 7.0NG.774-231219
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: admin
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
pandora_version="7.0NG.774-231218"
|
||||
pandora_version="7.0NG.774-231219"
|
||||
|
||||
package_cpan=0
|
||||
package_pandora=1
|
||||
|
|
|
@ -46,7 +46,7 @@ our @EXPORT = qw(
|
|||
|
||||
# version: Defines actual version of Pandora Server for this module only
|
||||
my $pandora_version = "7.0NG.774";
|
||||
my $pandora_build = "231218";
|
||||
my $pandora_build = "231219";
|
||||
our $VERSION = $pandora_version." ".$pandora_build;
|
||||
|
||||
# Setup hash
|
||||
|
|
|
@ -7036,7 +7036,9 @@ sub pandora_module_unknown ($$) {
|
|||
WHERE tagente.id_agente = tagente_estado.id_agente
|
||||
AND tagente_modulo.id_agente_modulo = tagente_estado.id_agente_modulo
|
||||
AND tagente.disabled = 0
|
||||
AND tagente.ignore_unknown = 0
|
||||
AND tagente_modulo.disabled = 0
|
||||
AND tagente_modulo.ignore_unknown = 0
|
||||
AND ((tagente_modulo.id_tipo_modulo IN (21, 22, 23) AND tagente_estado.estado <> 0)
|
||||
OR (' .
|
||||
($pa_config->{'unknown_updates'} == 0 ?
|
||||
|
|
|
@ -34,7 +34,7 @@ our @ISA = qw(Exporter);
|
|||
|
||||
# version: Defines actual version of Pandora Server for this module only
|
||||
my $pandora_version = "7.0NG.774";
|
||||
my $pandora_build = "231218";
|
||||
my $pandora_build = "231219";
|
||||
our $VERSION = $pandora_version." ".$pandora_build;
|
||||
|
||||
our %EXPORT_TAGS = ( 'all' => [ qw() ] );
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
%define debug_package %{nil}
|
||||
%define name pandorafms_server
|
||||
%define version 7.0NG.774
|
||||
%define release 231218
|
||||
%define release 231219
|
||||
|
||||
Summary: Pandora FMS Server
|
||||
Name: %{name}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
%global __os_install_post %{nil}
|
||||
%define name pandorafms_server
|
||||
%define version 7.0NG.774
|
||||
%define release 231218
|
||||
%define release 231219
|
||||
|
||||
Summary: Pandora FMS Server
|
||||
Name: %{name}
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
# **********************************************************************
|
||||
|
||||
PI_VERSION="7.0NG.774"
|
||||
PI_BUILD="231218"
|
||||
PI_BUILD="231219"
|
||||
|
||||
MODE=$1
|
||||
if [ $# -gt 1 ]; then
|
||||
|
|
|
@ -38,7 +38,7 @@ use PandoraFMS::Config;
|
|||
use PandoraFMS::DB;
|
||||
|
||||
# version: define current version
|
||||
my $version = "7.0NG.774 Build 231218";
|
||||
my $version = "7.0NG.774 Build 231219";
|
||||
|
||||
# Pandora server configuration
|
||||
my %conf;
|
||||
|
|
|
@ -36,7 +36,7 @@ use Encode::Locale;
|
|||
Encode::Locale::decode_argv;
|
||||
|
||||
# version: define current version
|
||||
my $version = "7.0NG.774 Build 231218";
|
||||
my $version = "7.0NG.774 Build 231219";
|
||||
|
||||
# save program name for logging
|
||||
my $progname = basename($0);
|
||||
|
@ -145,12 +145,12 @@ sub help_screen{
|
|||
help_screen_line('--agent_update_custom_fields', '<id_agent> <type_field> <field_to_change> <new_value>', "Update an agent custom field. The fields can be \n\t the following: Serial number, Department ... and types can be 0 text and 1 combo ");
|
||||
|
||||
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>\n\t <critical_instructions> <warning_instructions> <unknown_instructions> <use_alias>]", 'Add data server module to agent');
|
||||
help_screen_line('--create_web_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> <retries> <requests> <agent_browser_id> <auth_server> <auth_realm> <definition_file>\n\t <proxy_url> <proxy_auth_login> <proxy_auth_password> <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> <use_alias>].\n\t The valid data types are web_data, web_proc, web_content_data or web_content_string", 'Add web 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>\n\t <warning_inverse> <critical_inverse> <use_alias>]", '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_auth_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> <use_alias>]
|
||||
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> <use_alias> <ignore_unknown>]", 'Add data server module to agent');
|
||||
help_screen_line('--create_web_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> <retries> <requests> <agent_browser_id> <auth_server> <auth_realm> <definition_file>\n\t <proxy_url> <proxy_auth_login> <proxy_auth_password> <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> <use_alias> <ignore_unknown>].\n\t The valid data types are web_data, web_proc, web_content_data or web_content_string", 'Add web 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>\n\t <warning_inverse> <critical_inverse> <use_alias> <ignore_unknown>]", '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_auth_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> <use_alias> <ignore_unknown>]
|
||||
\n\t <critical_instructions> <warning_instructions> <unknown_instructions>\n\t <warning_inverse> <critical_inverse>]", '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>\n\t <warning_inverse> <critical_inverse> <use_alias>]", 'Add plug-in 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>\n\t <warning_inverse> <critical_inverse> <use_alias> <ignore_unknown>]", 'Add plug-in module to agent');
|
||||
help_screen_line('--get_module_group', '[<module_group_name>]', 'Dysplay all module groups');
|
||||
help_screen_line('--create_module_group', '<module_group_name>');
|
||||
help_screen_line('--module_group_synch', "<server_name1|server_name2|server_name3...> [<return_type>]", 'Synchronize metaconsole module groups');
|
||||
|
@ -214,12 +214,12 @@ 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> <critical_instructions> <warning_instructions> <unknown_instructions>\n\t <warning_inverse> <critical_inverse>]", 'Add data server module to policy');
|
||||
help_screen_line('--create_policy_web_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> <retries> <requests> <agent_browser_id> <auth_server> <auth_realm> <data_configuration> <proxy_url> <proxy_auth_login> <proxy_auth_password> <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> <warning_inverse> <critical_inverse> <critical_instructions> <warning_instructions> <unknown_instructions>].\n\t The valid data types are web_data, web_proc, web_content_data or web_content_string", 'Add web 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>\n\t <warning_inverse> <critical_inverse>]", "Add not snmp network 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>\n\t <warning_inverse> <critical_inverse> <ignore_unknown>]", 'Add data server module to policy');
|
||||
help_screen_line('--create_policy_web_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> <retries> <requests> <agent_browser_id> <auth_server> <auth_realm> <data_configuration> <proxy_url> <proxy_auth_login> <proxy_auth_password> <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> <warning_inverse> <critical_inverse> <critical_instructions> <warning_instructions> <unknown_instructions> <ignore_unknown>].\n\t The valid data types are web_data, web_proc, web_content_data or web_content_string", 'Add web 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>\n\t <warning_inverse> <critical_inverse> <ignore_unknown>]", "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>\n\t <warning_inverse> <critical_inverse>]", '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>\n\t <warning_inverse> <critical_inverse>]", 'Add plug-in module to policy');
|
||||
<critical_instructions> <warning_instructions> <unknown_instructions>\n\t <warning_inverse> <critical_inverse> <ignore_unknown>]", '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>\n\t <warning_inverse> <critical_inverse> <ignore_unknown>]", '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');
|
||||
|
@ -1655,23 +1655,23 @@ 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, $critical_instructions, $warning_instructions, $unknown_instructions, $use_alias);
|
||||
$warning_inverse, $critical_inverse, $critical_instructions, $warning_instructions, $unknown_instructions, $use_alias, $ignore_unknown);
|
||||
|
||||
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, $critical_instructions, $warning_instructions, $unknown_instructions, $use_alias) = @ARGV[2..31];
|
||||
$warning_inverse, $critical_inverse, $critical_instructions, $warning_instructions, $unknown_instructions, $use_alias, $ignore_unknown) = @ARGV[2..32];
|
||||
}
|
||||
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, $critical_instructions, $warning_instructions, $unknown_instructions) = @ARGV[2..31];
|
||||
$warning_inverse, $critical_inverse, $critical_instructions, $warning_instructions, $unknown_instructions, $ignore_unknown) = @ARGV[2..32];
|
||||
}
|
||||
|
||||
|
||||
my $module_name_def;
|
||||
my $module_type_def;
|
||||
|
||||
|
@ -1790,7 +1790,7 @@ sub cli_create_data_module($) {
|
|||
enterprise_hook('pandora_update_md5_file', [$conf, $agent_name]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ($in_policy == 0) {
|
||||
if (defined $use_alias and $use_alias eq 'use_alias') {
|
||||
foreach my $id (@id_agents) {
|
||||
|
@ -1886,7 +1886,8 @@ sub cli_create_data_module($) {
|
|||
$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);
|
||||
|
||||
$parameters{'ignore_unknown'} = $ignore_unknown unless !defined ($ignore_unknown);
|
||||
|
||||
if ($in_policy == 0) {
|
||||
if (defined $use_alias and $use_alias eq 'use_alias') {
|
||||
foreach my $id (@id_agents) {
|
||||
|
@ -1894,6 +1895,9 @@ sub cli_create_data_module($) {
|
|||
pandora_create_module_from_hash ($conf, \%parameters, $dbh);
|
||||
}
|
||||
} else {
|
||||
if ($parameters{'id_agente'} eq '') {
|
||||
$parameters{'id_agente'} = $agent_id;
|
||||
}
|
||||
pandora_create_module_from_hash ($conf, \%parameters, $dbh);
|
||||
}
|
||||
}
|
||||
|
@ -1914,7 +1918,7 @@ sub cli_create_web_module($) {
|
|||
$critical_max, $history_data, $retries, $requests, $agent_browser_id, $auth_server, $auth_realm,
|
||||
$definition_file, $proxy_url, $proxy_auth_login, $proxy_auth_password, $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, $critical_instructions, $warning_instructions, $unknown_instructions, $use_alias);
|
||||
$warning_inverse, $critical_inverse, $critical_instructions, $warning_instructions, $unknown_instructions, $use_alias, $ignore_unknown);
|
||||
|
||||
if ($in_policy == 0) {
|
||||
($module_name, $module_type, $agent_name, $description, $module_group,
|
||||
|
@ -1922,7 +1926,7 @@ sub cli_create_web_module($) {
|
|||
$critical_max, $history_data, $retries, $requests, $agent_browser_id, $auth_server, $auth_realm,
|
||||
$definition_file, $proxy_url, $proxy_auth_login, $proxy_auth_password, $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, $critical_instructions, $warning_instructions, $unknown_instructions, $use_alias) = @ARGV[2..39];
|
||||
$warning_inverse, $critical_inverse, $critical_instructions, $warning_instructions, $unknown_instructions, $use_alias, $ignore_unknown) = @ARGV[2..40];
|
||||
}
|
||||
else {
|
||||
($policy_name, $module_name, $module_type, $description, $module_group,
|
||||
|
@ -1930,7 +1934,7 @@ sub cli_create_web_module($) {
|
|||
$critical_max, $history_data, $retries, $requests, $agent_browser_id, $auth_server, $auth_realm, $configuration_data, $proxy_url,
|
||||
$proxy_auth_login, $proxy_auth_password, $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, $critical_instructions, $warning_instructions, $unknown_instructions) = @ARGV[2..38];
|
||||
$warning_inverse, $critical_inverse, $critical_instructions, $warning_instructions, $unknown_instructions, $ignore_unknown) = @ARGV[2..39];
|
||||
}
|
||||
|
||||
my $module_name_def;
|
||||
|
@ -2158,6 +2162,7 @@ sub cli_create_web_module($) {
|
|||
$parameters{'tcp_rcv'} = $proxy_auth_password unless !defined ($proxy_auth_password);
|
||||
$parameters{'ip_target'} = $auth_server unless !defined ($auth_server);
|
||||
$parameters{'snmp_community'} = $auth_realm unless !defined ($auth_realm);
|
||||
$parameters{'ignore_unknown'} = $ignore_unknown unless !defined ($ignore_unknown);
|
||||
|
||||
|
||||
|
||||
|
@ -2168,6 +2173,9 @@ sub cli_create_web_module($) {
|
|||
pandora_create_module_from_hash ($conf, \%parameters, $dbh);
|
||||
}
|
||||
} else {
|
||||
if ($parameters{'id_agente'} eq '') {
|
||||
$parameters{'id_agente'} = $agent_id;
|
||||
}
|
||||
pandora_create_module_from_hash ($conf, \%parameters, $dbh);
|
||||
}
|
||||
}
|
||||
|
@ -2357,7 +2365,7 @@ sub cli_create_network_module($) {
|
|||
$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, $critical_instructions,
|
||||
$warning_instructions, $unknown_instructions, $warning_inverse, $critical_inverse, $use_alias);
|
||||
$warning_instructions, $unknown_instructions, $warning_inverse, $critical_inverse, $use_alias, $ignore_unknown);
|
||||
|
||||
if ($in_policy == 0) {
|
||||
($module_name, $module_type, $agent_name, $module_address, $module_port, $description,
|
||||
|
@ -2365,7 +2373,7 @@ sub cli_create_network_module($) {
|
|||
$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,$critical_instructions, $warning_instructions, $unknown_instructions,
|
||||
$warning_inverse, $critical_inverse, $use_alias) = @ARGV[2..33];
|
||||
$warning_inverse, $critical_inverse, $use_alias, $ignore_unknown) = @ARGV[2..34];
|
||||
}
|
||||
else {
|
||||
($policy_name, $module_name, $module_type, $module_port, $description,
|
||||
|
@ -2373,7 +2381,7 @@ sub cli_create_network_module($) {
|
|||
$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, $critical_instructions, $warning_instructions, $unknown_instructions,
|
||||
$warning_inverse, $critical_inverse) = @ARGV[2..31];
|
||||
$warning_inverse, $critical_inverse, $ignore_unknown) = @ARGV[2..34];
|
||||
}
|
||||
|
||||
my $module_name_def;
|
||||
|
@ -2509,6 +2517,8 @@ sub cli_create_network_module($) {
|
|||
$parameters{'unknown_instructions'} = $unknown_instructions unless !defined ($unknown_instructions);
|
||||
$parameters{'critical_inverse'} = $critical_inverse unless !defined ($critical_inverse);
|
||||
$parameters{'warning_inverse'} = $warning_inverse unless !defined ($warning_inverse);
|
||||
$parameters{'ignore_unknown'} = $ignore_unknown unless !defined ($ignore_unknown);
|
||||
|
||||
|
||||
if ($in_policy == 0) {
|
||||
if (defined $use_alias and $use_alias eq 'use_alias') {
|
||||
|
@ -2517,6 +2527,9 @@ sub cli_create_network_module($) {
|
|||
pandora_create_module_from_hash ($conf, \%parameters, $dbh);
|
||||
}
|
||||
} else {
|
||||
if ($parameters{'id_agente'} eq '') {
|
||||
$parameters{'id_agente'} = $agent_id;
|
||||
}
|
||||
pandora_create_module_from_hash ($conf, \%parameters, $dbh);
|
||||
}
|
||||
}
|
||||
|
@ -2537,7 +2550,7 @@ sub cli_create_snmp_module($) {
|
|||
$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,
|
||||
$critical_instructions, $warning_instructions, $unknown_instructions, $warning_inverse, $critical_inverse, $use_alias);
|
||||
$critical_instructions, $warning_instructions, $unknown_instructions, $warning_inverse, $critical_inverse, $use_alias, $ignore_unknown);
|
||||
|
||||
if ($in_policy == 0) {
|
||||
($module_name, $module_type, $agent_name, $module_address, $module_port, $version, $community,
|
||||
|
@ -2545,7 +2558,7 @@ sub cli_create_snmp_module($) {
|
|||
$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,
|
||||
$critical_instructions, $warning_instructions, $unknown_instructions, $warning_inverse, $critical_inverse, $use_alias) = @ARGV[2..42];
|
||||
$critical_instructions, $warning_instructions, $unknown_instructions, $warning_inverse, $critical_inverse, $use_alias, $ignore_unknown) = @ARGV[2..43];
|
||||
}
|
||||
else {
|
||||
($policy_name, $module_name, $module_type, $module_port, $version, $community,
|
||||
|
@ -2553,7 +2566,7 @@ sub cli_create_snmp_module($) {
|
|||
$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,
|
||||
$critical_instructions, $warning_instructions, $unknown_instructions, $warning_inverse, $critical_inverse) = @ARGV[2..40];
|
||||
$critical_instructions, $warning_instructions, $unknown_instructions, $warning_inverse, $critical_inverse, $ignore_unknown) = @ARGV[2..41];
|
||||
}
|
||||
|
||||
my $module_name_def;
|
||||
|
@ -2694,6 +2707,7 @@ sub cli_create_snmp_module($) {
|
|||
$parameters{'unknown_instructions'} = $unknown_instructions unless !defined ($unknown_instructions);
|
||||
$parameters{'critical_inverse'} = $critical_inverse unless !defined ($critical_inverse);
|
||||
$parameters{'warning_inverse'} = $warning_inverse unless !defined ($warning_inverse);
|
||||
$parameters{'ignore_unknown'} = $ignore_unknown unless !defined ($ignore_unknown);
|
||||
|
||||
if ($in_policy == 0) {
|
||||
if (defined $use_alias and $use_alias eq 'use_alias') {
|
||||
|
@ -2722,7 +2736,7 @@ sub cli_create_plugin_module($) {
|
|||
$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,
|
||||
$critical_instructions, $warning_instructions, $unknown_instructions, $warning_inverse, $critical_inverse, $use_alias);
|
||||
$critical_instructions, $warning_instructions, $unknown_instructions, $warning_inverse, $critical_inverse, $use_alias, $ignore_unknown);
|
||||
|
||||
if ($in_policy == 0) {
|
||||
($module_name, $module_type, $agent_name, $module_address, $module_port, $plugin_name,
|
||||
|
@ -2730,7 +2744,7 @@ sub cli_create_plugin_module($) {
|
|||
$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,
|
||||
$critical_instructions, $warning_instructions, $unknown_instructions, $warning_inverse, $critical_inverse, $use_alias) = @ARGV[2..36];
|
||||
$critical_instructions, $warning_instructions, $unknown_instructions, $warning_inverse, $critical_inverse, $use_alias, $ignore_unknown) = @ARGV[2..37];
|
||||
}
|
||||
else {
|
||||
($policy_name, $module_name, $module_type, $module_port, $plugin_name,
|
||||
|
@ -2738,7 +2752,7 @@ sub cli_create_plugin_module($) {
|
|||
$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,
|
||||
$critical_instructions, $warning_instructions, $unknown_instructions, $warning_inverse, $critical_inverse) = @ARGV[2..34];
|
||||
$critical_instructions, $warning_instructions, $unknown_instructions, $warning_inverse, $critical_inverse, $ignore_unknown) = @ARGV[2..35];
|
||||
}
|
||||
|
||||
my $module_name_def;
|
||||
|
@ -2894,6 +2908,7 @@ sub cli_create_plugin_module($) {
|
|||
$parameters{'unknown_instructions'} = $unknown_instructions unless !defined ($unknown_instructions);
|
||||
$parameters{'critical_inverse'} = $critical_inverse unless !defined ($critical_inverse);
|
||||
$parameters{'warning_inverse'} = $warning_inverse unless !defined ($warning_inverse);
|
||||
$parameters{'ignore_unknown'} = $ignore_unknown unless !defined ($ignore_unknown);
|
||||
|
||||
if ($in_policy == 0) {
|
||||
if (defined $use_alias and $use_alias eq 'use_alias') {
|
||||
|
@ -7801,11 +7816,11 @@ sub pandora_manage_main ($$$) {
|
|||
cli_delete_agent();
|
||||
}
|
||||
elsif ($param eq '--create_data_module') {
|
||||
param_check($ltotal, 30, 24);
|
||||
param_check($ltotal, 31, 24);
|
||||
cli_create_data_module(0);
|
||||
}
|
||||
elsif ($param eq '--create_web_module') {
|
||||
param_check($ltotal, 39, 36);
|
||||
param_check($ltotal, 40, 36);
|
||||
cli_create_web_module(0);
|
||||
}
|
||||
|
||||
|
@ -7822,15 +7837,15 @@ sub pandora_manage_main ($$$) {
|
|||
cli_module_group_synch();
|
||||
}
|
||||
elsif ($param eq '--create_network_module') {
|
||||
param_check($ltotal, 33, 21);
|
||||
param_check($ltotal, 34, 21);
|
||||
cli_create_network_module(0);
|
||||
}
|
||||
elsif ($param eq '--create_snmp_module') {
|
||||
param_check($ltotal, 41, 29);
|
||||
param_check($ltotal, 43, 29);
|
||||
cli_create_snmp_module(0);
|
||||
}
|
||||
elsif ($param eq '--create_plugin_module') {
|
||||
param_check($ltotal, 35, 20);
|
||||
param_check($ltotal, 37, 20);
|
||||
cli_create_plugin_module(0);
|
||||
}
|
||||
elsif ($param eq '--delete_module') {
|
||||
|
@ -8018,23 +8033,23 @@ sub pandora_manage_main ($$$) {
|
|||
cli_create_policy();
|
||||
}
|
||||
elsif ($param eq '--create_policy_data_module') {
|
||||
param_check($ltotal, 29, 21);
|
||||
param_check($ltotal, 30, 21);
|
||||
cli_create_data_module(1);
|
||||
}
|
||||
elsif ($param eq '--create_policy_web_module') {
|
||||
param_check($ltotal, 37, 33);
|
||||
param_check($ltotal, 38, 33);
|
||||
cli_create_web_module(1);
|
||||
}
|
||||
elsif ($param eq '--create_policy_network_module') {
|
||||
param_check($ltotal, 30, 20);
|
||||
param_check($ltotal, 34, 20);
|
||||
cli_create_network_module(1);
|
||||
}
|
||||
elsif ($param eq '--create_policy_snmp_module') {
|
||||
param_check($ltotal, 39, 27);
|
||||
param_check($ltotal, 41, 27);
|
||||
cli_create_snmp_module(1);
|
||||
}
|
||||
elsif ($param eq '--create_policy_plugin_module') {
|
||||
param_check($ltotal, 33, 19);
|
||||
param_check($ltotal, 35, 19);
|
||||
cli_create_plugin_module(1);
|
||||
}
|
||||
elsif ($param eq '--create_alert_template') {
|
||||
|
|
Loading…
Reference in New Issue