Merge branch 'develop' into feature#new-iface-names

This commit is contained in:
Ramon Novoa 2017-03-10 10:32:40 +01:00
commit 9e7c6612be
118 changed files with 39891 additions and 316792 deletions

View File

@ -143,8 +143,8 @@ echo "Updating Pandora Windows Agent version..."
sed -i -e "s/\s*#define\s*PANDORA_VERSION\s*.*/#define PANDORA_VERSION (\"$VERSION(Build $BUILD)\")/" "$AGENT_WIN_FILE"
sed -i -e "s/{Pandora FMS Windows Agent v.*}/{Pandora FMS Windows Agent v$VERSION}/" "$AGENT_WIN_MPI_FILE"
NUMERIC_VERSION=$(echo $VERSION | sed -e "s/\([0-9]*\.[0-9]*\).*/\1/")
sed -in "1h;1!H;\${;g;s/[\r\n]InstallVersion[\r\n]{\S*}/\nInstallVersion\n{$NUMERIC_VERSION.0.0}/g;p;}" "$AGENT_WIN_MPI_FILE"
sed -in "1h;1!H;\${;g;s/[\r\n]Version[\r\n]{[^\n\r]*}/\nVersion\n{$BUILD}/g;p;}" "$AGENT_WIN_MPI_FILE"
sed -i -n "1h;1!H;\${;g;s/[\r\n]InstallVersion[\r\n]{\S*}/\nInstallVersion\n{$NUMERIC_VERSION.0.0}/g;p;}" "$AGENT_WIN_MPI_FILE"
sed -i -n "1h;1!H;\${;g;s/[\r\n]Version[\r\n]{[^\n\r]*}/\nVersion\n{$BUILD}/g;p;}" "$AGENT_WIN_MPI_FILE"
if [ $NB == 1 ]; then
sed --in-place -n "1h;1!H;\${;g;s/[\r\n]Windows\,Executable[\r\n]{[^\n\r]*}/\nWindows\,Executable\n{\<\%AppName\%\>\-\<\%Version\%\>\-Setup\<\%Ext\%\>}/g;p;}" "$AGENT_WIN_MPI_FILE"
else

View File

@ -1,5 +1,5 @@
package: pandorafms-agent-unix
Version: NG_BETA-170302
Version: NG_BETA-170308
Architecture: all
Priority: optional
Section: admin

View File

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

View File

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

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_agent_unix
%define version NG_BETA
%define release 170302
%define release 170308
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_agent_unix
%define version NG_BETA
%define release 170302
%define release 170308
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}

View File

@ -10,7 +10,7 @@
# **********************************************************************
PI_VERSION="NG_BETA"
PI_BUILD="170302"
PI_BUILD="170308"
OS_NAME=`uname -s`
FORCE=0

File diff suppressed because it is too large Load Diff

View File

@ -30,7 +30,7 @@ using namespace Pandora;
using namespace Pandora_Strutils;
#define PATH_SIZE _MAX_PATH+1
#define PANDORA_VERSION ("NG_BETA(Build 170302)")
#define PANDORA_VERSION ("NG_BETA(Build 170308)")
string pandora_path;
string pandora_dir;

View File

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

View File

@ -7,4 +7,6 @@ attachment/files_repo
include/config.php
pandora_console.log
enterprise
*.bak
*.bak
audit.log
install_old.php

View File

@ -1,5 +1,5 @@
package: pandorafms-console
Version: NG_BETA-170302
Version: NG_BETA-170308
Architecture: all
Priority: optional
Section: admin

View File

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

View File

@ -181,10 +181,6 @@ function extension_db_check_tables_differences($connection_test,
$diff_tables = array_diff($tables_test, $tables_system);
//~ html_debug_print($tables_test);
//~ html_debug_print($tables_system);
//~ html_debug_print($diff_tables);
ui_print_result_message(
empty($diff_tables),
__('Successful the DB Pandora has all tables'),

View File

@ -20,7 +20,7 @@ $id_agente = get_parameter ("id_agente");
$address = agents_get_address($id_agente);
if (!empty($address) || empty($id_agente)) {
extensions_add_opemode_tab_agent ('ssh_gateway','SSH Gateway','extensions/ssh_gateway/secure_console.png',"ssh_gateway", "v1r1");
extensions_add_opemode_tab_agent ('ssh_gateway','SSH Gateway','extensions/ssh_gateway/secure_console.png',"ssh_gateway", "v1r1", 'AW');
}
function ssh_gateway () {

View File

@ -39,6 +39,6 @@ $id_agente = get_parameter ("id_agente");
$address = agents_get_address($id_agente);
if (!empty($address) || empty($id_agente)) {
extensions_add_opemode_tab_agent('vnc_view', __('VNC view'), 'images/vnc.png', 'vnc_view', "v1r1");
extensions_add_opemode_tab_agent('vnc_view', __('VNC view'), 'images/vnc.png', 'vnc_view', "v1r1", 'AW');
}
?>

View File

@ -1,4 +1,4 @@
# Ignorar todo en este directorio
*
# *
# Excepto este archivo
!.gitignore

View File

@ -0,0 +1,41 @@
-- Pandora FMS - the Flexible Monitoring System
-- ============================================
-- Copyright (c) 2005-2011 Artica Soluciones Tecnológicas, http://www.artica.es
-- Please see http://pandora.sourceforge.net for full contribution list
-- This program is free software; you can redistribute it and/or
-- modify it under the terms of the GNU General Public License
-- as published by the Free Software Foundation for version 2.
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
-- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software
-- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-- PLEASE NO NOT USE MULTILINE COMMENTS
-- Because Pandora Installer don't understand them
-- and fails creating database !!!
-- Priority : 0 - Maintance (grey)
-- Priority : 1 - Low (green)
-- Priority : 2 - Normal (blue)
-- Priority : 3 - Warning (yellow)
-- Priority : 4 - Critical (red)
-- ---------------------------------------------------------------------
-- Table `ttable_test`
-- ---------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS `ttable_test` (
`id` int(10) unsigned NOT NULL auto_increment,
`field1` varchar(60) NOT NULL default '',
`field2` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ---------------------------------------------------------------------
-- Table `tusuario`
-- ---------------------------------------------------------------------
ALTER TABLE `tusuario` ADD COLUMN `test` tinyint(1) NOT NULL DEFAULT 0;

View File

@ -0,0 +1,41 @@
-- ============================================
-- Copyright (c) 2005-2011 Artica Soluciones Tecnológicas, http://www.artica.es
-- Please see http://pandora.sourceforge.net for full contribution list
-- This program is free software; you can redistribute it and/or
-- modify it under the terms of the GNU General Public License
-- as published by the Free Software Foundation for version 2.
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
-- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software
-- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-- PLEASE NO NOT USE MULTILINE COMMENTS
-- Because Pandora Installer don't understand them
-- and fails creating database !!!
-- Priority : 0 - Maintance (grey)
-- Priority : 1 - Low (green)
-- Priority : 2 - Normal (blue)
-- Priority : 3 - Warning (yellow)
-- Priority : 4 - Critical (red)
-- ---------------------------------------------------------------------
-- Table `ttable_test`
-- ---------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS `ttable_test2` (
`id` int(10) unsigned NOT NULL auto_increment,
`field1` varchar(60) NOT NULL default '',
`field2` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ---------------------------------------------------------------------
-- Table `ttable_test`
-- ---------------------------------------------------------------------
ALTER TABLE `ttable_test` ADD COLUMN `field3` tinyint(1) NOT NULL DEFAULT 0;
ALTER TABLE `ttable_test` MODIFY COLUMN `field1` tinyint(1) NOT NULL DEFAULT 0;

View File

@ -0,0 +1,38 @@
-- Pandora FMS - the Flexible Monitoring System
-- ============================================
-- Copyright (c) 2005-2011 Artica Soluciones Tecnológicas, http://www.artica.es
-- Please see http://pandora.sourceforge.net for full contribution list
-- This program is free software; you can redistribute it and/or
-- modify it under the terms of the GNU General Public License
-- as published by the Free Software Foundation for version 2.
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
-- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software
-- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-- PLEASE NO NOT USE MULTILINE COMMENTS
-- Because Pandora Installer don't understand them
-- and fails creating database !!!
-- Priority : 0 - Maintance (grey)
-- Priority : 1 - Low (green)
-- Priority : 2 - Normal (blue)
-- Priority : 3 - Warning (yellow)
-- Priority : 4 - Critical (red)
-- ---------------------------------------------------------------------
-- Table `ttable_test3`
-- ---------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS `ttable_test3` (
`id` int(10) unsigned NOT NULL auto_increment,
`field1` varchar(60) NOT NULL default '',
`field2` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
DROP TABLE ttable_test2;

View File

@ -0,0 +1,30 @@
-- Pandora FMS - the Flexible Monitoring System
-- ============================================
-- Copyright (c) 2005-2011 Artica Soluciones Tecnológicas, http://www.artica.es
-- Please see http://pandora.sourceforge.net for full contribution list
-- This program is free software; you can redistribute it and/or
-- modify it under the terms of the GNU General Public License
-- as published by the Free Software Foundation for version 2.
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
-- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software
-- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-- PLEASE NO NOT USE MULTILINE COMMENTS
-- Because Pandora Installer don't understand them
-- and fails creating database !!!
-- Priority : 0 - Maintance (grey)
-- Priority : 1 - Low (green)
-- Priority : 2 - Normal (blue)
-- Priority : 3 - Warning (yellow)
-- Priority : 4 - Critical (red)
-- ---------------------------------------------------------------------
-- Table `tinventada`
-- ---------------------------------------------------------------------
ALTER TABLE `tinventada` ADD COLUMN `test` tinyint(1) NOT NULL DEFAULT 0;

View File

@ -0,0 +1,28 @@
-- Copyright (c) 2005-2011 Artica Soluciones Tecnológicas, http://www.artica.es
-- Please see http://pandora.sourceforge.net for full contribution list
-- This program is free software; you can redistribute it and/or
-- modify it under the terms of the GNU General Public License
-- as published by the Free Software Foundation for version 2.
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
-- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software
-- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-- PLEASE NO NOT USE MULTILINE COMMENTS
-- Because Pandora Installer don't understand them
-- and fails creating database !!!
-- Priority : 0 - Maintance (grey)
-- Priority : 1 - Low (green)
-- Priority : 2 - Normal (blue)
-- Priority : 3 - Warning (yellow)
-- Priority : 4 - Critical (red)
-- ---------------------------------------------------------------------
-- Table `ttable_test`
-- ---------------------------------------------------------------------
ALTER TABLE `ttable_test` asdfasdf;

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +1,824 @@
-- -----------------------------------------------------
-- Table "tlocal_component"
-- -----------------------------------------------------
-- tlocal_component is a repository of local modules for
-- physical agents on Windows / Unix physical agents
CREATE TABLE "tlocal_component" (
"id" SERIAL NOT NULL PRIMARY KEY,
"name" TEXT NOT NULL,
"data" TEXT NOT NULL,
"description" varchar(1024) default NULL,
"id_os" INTEGER NOT NULL default 0,
"os_version" varchar(100) default '',
"id_network_component_group" INTEGER NOT NULL default 0 REFERENCES tnetwork_component_group("id_sg") ON DELETE CASCADE ON UPDATE CASCADE,
"type" SMALLINT NOT NULL default 6,
"max" INTEGER NOT NULL default 0,
"min" INTEGER NOT NULL default 0,
"module_interval" INTEGER NOT NULL default 0,
"id_module_group" INTEGER NOT NULL default 0,
"history_data" INTEGER default '1',
"min_warning" DOUBLE PRECISION default NULL,
"max_warning" DOUBLE PRECISION default NULL,
"str_warning" TEXT default '',
"min_critical" DOUBLE PRECISION default NULL,
"max_critical" DOUBLE PRECISION default NULL,
"str_critical" TEXT default '',
"min_ff_event" INTEGER NOT NULL default 0,
"post_process" DOUBLE PRECISION default NULL,
"unit" TEXT default '',
"wizard_level" type_tlocal_component_wizard_level default 'nowizard',
"macros" TEXT default '',
"critical_instructions" TEXT default '',
"warning_instructions" TEXT default '',
"unknown_instructions" TEXT default '',
"critical_inverse" SMALLINT default 0 NOT NULL,
"warning_inverse" SMALLINT default 0 NOT NULL,
"id_category" INTEGER NOT NULL default 0,
"tags" TEXT default '',
"disabled_types_event" TEXT default '',
"min_ff_event_normal" INTEGER default 0,
"min_ff_event_warning" INTEGER default 0,
"min_ff_event_critical" INTEGER default 0,
"dynamic_interval" INTEGER default 0,
"dynamic_max" INTEGER default 0,
"dynamic_min" INTEGER default 0,
"dynamic_next" INTEGER default 0 NOT NULL,
"dynamic_two_tailed" SMALLINT default 0,
"each_ff" SMALLINT default 0,
"ff_timeout" INTEGER default 0
);
-- -----------------------------------------------------
-- Table "tpolicy_modules"
-- -----------------------------------------------------
CREATE TABLE "tpolicy_modules" (
"id" SERIAL NOT NULL PRIMARY KEY,
"id_policy" INTEGER NOT NULL default 0,
"configuration_data" TEXT NOT NULL,
"id_tipo_modulo" SMALLINT NOT NULL default 0,
"description" varchar(1024) NOT NULL default '',
"name" varchar(200) NOT NULL default '',
"unit" TEXT default '',
"max" BIGINT NOT NULL default 0,
"min" BIGINT NOT NULL default 0,
"module_interval" INTEGER NOT NULL default 0,
"tcp_port" INTEGER NOT NULL default 0,
"tcp_send" text default '',
"tcp_rcv" text default '',
"snmp_community" varchar(100) default '',
"snmp_oid" varchar(255) default '0',
"id_module_group" INTEGER NOT NULL default 0,
"flag" SMALLINT NOT NULL default 0,
"id_module" INTEGER NOT NULL default 0,
"disabled" SMALLINT NOT NULL default 0,
"id_export" SMALLINT NOT NULL default 0,
"plugin_user" text default '',
"plugin_pass" text default '',
"plugin_parameter" text,
"id_plugin" INTEGER NOT NULL default 0,
"post_process" DOUBLE PRECISION default NULL,
"prediction_module" BIGINT NOT NULL default 0,
"max_timeout" INTEGER NOT NULL default 0,
"max_retries" INTEGER NOT NULL default 0,
"custom_id" varchar(255) default '',
"history_data" SMALLINT NOT NULL default 1,
"min_warning" DOUBLE PRECISION default 0,
"max_warning" DOUBLE PRECISION default 0,
"str_warning" text default '',
"min_critical" DOUBLE PRECISION default 0,
"max_critical" DOUBLE PRECISION default 0,
"str_critical" text default '',
"min_ff_event" INTEGER NOT NULL default 0,
"custom_string_1" text default '',
"custom_string_2" text default '',
"custom_string_3" text default '',
"custom_integer_1" INTEGER NOT NULL default 0,
"custom_integer_2" INTEGER NOT NULL default 0,
"pending_delete" SMALLINT NOT NULL default 0,
"critical_instructions" TEXT default '',
"warning_instructions" TEXT default '',
"unknown_instructions" TEXT default '',
"critical_inverse" SMALLINT default 0 NOT NULL,
"warning_inverse" SMALLINT default 0 NOT NULL,
"id_category" INTEGER NOT NULL default 0,
"module_ff_interval" INTEGER NOT NULL default 0,
"quiet" SMALLINT NOT NULL default 0,
"cron_interval" varchar(100) default '',
"macros" text default '',
"disabled_types_event" TEXT default '',
"module_macros" TEXT default '',
"min_ff_event_normal" INTEGER default 0,
"min_ff_event_warning" INTEGER default 0,
"min_ff_event_critical" INTEGER default 0,
"each_ff" SMALLINT default 0,
"ff_timeout" INTEGER default 0,
"dynamic_interval" INTEGER default 0,
"dynamic_max" INTEGER default 0,
"dynamic_min" INTEGER default 0,
"dynamic_next" INTEGER NOT NULL default 0,
"dynamic_two_tailed" INTEGER default 0
);
CREATE UNIQUE INDEX "tpolicy_modules_id_policy_name_idx" ON "tpolicy_modules"("id_policy", "name");
CREATE INDEX "tpolicy_modules_id_policy_idx" ON "tpolicy_modules"("id_policy");
-- -----------------------------------------------------
-- Table "tpolicies"
-- -----------------------------------------------------
-- 'status' could be 0 (without changes, updated), 1 (needy update only database) or 2 (needy update database and conf files)
CREATE TABLE "tpolicies" (
"id" SERIAL NOT NULL PRIMARY KEY,
"name" text NOT NULL default '',
"description" varchar(255) NOT NULL default '',
"id_group" INTEGER NOT NULL default 0,
"status" INTEGER NOT NULL default 0
);
-- -----------------------------------------------------
-- Table "tpolicy_alerts"
-- -----------------------------------------------------
CREATE TABLE "tpolicy_alerts" (
"id" SERIAL NOT NULL PRIMARY KEY,
"id_policy" INTEGER NOT NULL default 0 REFERENCES tpolicies("id") ON DELETE CASCADE ON UPDATE CASCADE,
"id_policy_module" INTEGER NOT NULL default 0,
"id_alert_template" INTEGER NOT NULL default 0 REFERENCES talert_templates("id") ON DELETE CASCADE ON UPDATE CASCADE,
"name_extern_module" TEXT NOT NULL default '',
"disabled" SMALLINT NOT NULL default 0,
"standby" SMALLINT NOT NULL default 0,
"pending_delete" SMALLINT NOT NULL default 0
);
-- -----------------------------------------------------
-- Table "tpolicy_agents"
-- -----------------------------------------------------
CREATE TABLE "tpolicy_agents" (
"id" SERIAL NOT NULL PRIMARY KEY,
"id_policy" INTEGER NOT NULL default 0,
"id_agent" INTEGER NOT NULL default 0,
"policy_applied" SMALLINT NOT NULL default 0,
"pending_delete" SMALLINT NOT NULL default 0,
"last_apply_utimestamp" INTEGER NOT NULL default 0
);
CREATE UNIQUE INDEX "tpolicy_agents_id_policy_id_agent_idx" ON "tpolicy_agents"("id_policy", "id_agent");
-- -----------------------------------------------------
-- Table "tdashboard"
-- -----------------------------------------------------
CREATE TABLE "tdashboard" (
"id" BIGSERIAL NOT NULL PRIMARY KEY,
"name" varchar(60) NOT NULL default '',
"id_user" varchar(60) NOT NULL default '',
"id_group" INTEGER NOT NULL default 0,
"active" SMALLINT NOT NULL default 0,
"cells" text default ''
);
-- -----------------------------------------------------
-- Table "twidget"
-- -----------------------------------------------------
CREATE TABLE "twidget" (
"id" BIGSERIAL NOT NULL PRIMARY KEY,
"class_name" varchar(60) NOT NULL default '',
"unique_name" varchar(60) NOT NULL default '',
"description" text NOT NULL default '',
"options" text NOT NULL default '',
"page" varchar(120) NOT NULL default ''
);
-- -----------------------------------------------------
-- Table "twidget_dashboard"
-- -----------------------------------------------------
CREATE TABLE "twidget_dashboard" (
"id" BIGSERIAL NOT NULL PRIMARY KEY,
"options" text NOT NULL default '',
"order" INTEGER NOT NULL default 0,
"id_dashboard" BIGINT NOT NULL default 0 REFERENCES tdashboard("id") ON DELETE CASCADE ON UPDATE CASCADE,
"id_widget" BIGINT NOT NULL default 0,
"prop_width" DOUBLE PRECISION NOT NULL default 0.32,
"prop_height" DOUBLE PRECISION NOT NULL default 0.32,
);
-- -----------------------------------------------------
-- Table "tmodule_inventory"
-- -----------------------------------------------------
CREATE TABLE "tmodule_inventory" (
"id_module_inventory"SERIAL NOT NULL PRIMARY KEY,
"id_os" INTEGER default NULL REFERENCES tconfig_os("id_os") ON UPDATE CASCADE ON DELETE CASCADE,
"name" varchar(100) default '',
"description" varchar(100) default '',
"interpreter" varchar(100) default '',
"data_format" varchar(100) default '',
"code" BYTEA NOT NULL
);
-- ---------------------------------------------------------------------
-- Table "tagent_module_inventory"
-- ---------------------------------------------------------------------
CREATE TABLE "tagent_module_inventory" (
"id_agent_module_inventory" SERIAL NOT NULL PRIMARY KEY,
"id_agente" INTEGER NOT NULL REFERENCES tagente("id_agente") ON UPDATE CASCADE ON DELETE CASCADE,
"id_module_inventory" INTEGER NOT NULL REFERENCES tmodule_inventory("id_module_inventory") ON UPDATE CASCADE ON DELETE CASCADE,
"target" varchar(100) default '',
"interval" INTEGER NOT NULL default 3600,
"username" varchar(100) default '',
"password" varchar(100) default '',
"data" BYTEA NOT NULL,
"timestamp" TIMESTAMP without time zone default '1970-01-01 00:00:00',
"utimestamp" INTEGER NOT NULL default 0,
"flag" SMALLINT NOT NULL default 1,
"id_policy_module_inventory" INTEGER NOT NULL default 0
);
-- -----------------------------------------------------
-- Table "tagente_datos_inventory"
-- -----------------------------------------------------
CREATE TABLE "tagente_datos_inventory" (
"id_agent_module_inventory" SERIAL NOT NULL,
"data" BYTEA NOT NULL,
"utimestamp" INTEGER NOT NULL default 0,
"timestamp" TIMESTAMP without time zone default '1970-01-01 00:00:00'
);
CREATE UNIQUE INDEX "tagente_datos_inventory_id" ON "tagente_datos_inventory"("id_agent_module_inventory");
CREATE UNIQUE INDEX "tagente_datos_inventory_ut" ON "tagente_datos_inventory"("utimestamp");
-- -----------------------------------------------------
-- Table "ttrap_custom_values"
-- -----------------------------------------------------
CREATE TABLE "ttrap_custom_values" (
"id" SERIAL NOT NULL PRIMARY KEY,
"oid" varchar(255) NOT NULL default '',
"custom_oid" varchar(255) NOT NULL default '',
"text" varchar(255) default '',
"description" varchar(255) default '',
"severity" INTEGER NOT NULL default 2
);
-- -----------------------------------------------------
-- Table "tmetaconsole_setup"
-- -----------------------------------------------------
--Table to store metaconsole sources
CREATE TABLE "tmetaconsole_setup" (
"id" SERIAL NOT NULL PRIMARY KEY,
"server_name" text default '',
"server_url" text default '',
"dbuser" text default '',
"dbpass" text default '',
"dbhost" text default '',
"dbport" text default '',
"dbname" text default '',
"auth_token" text default '',
"id_group" INTEGER NOT NULL default 0,
"api_password" text default '',
"disabled" SMALLINT NOT NULL default 0,
"last_event_replication" BIGINT NOT NULL default 0
);
-- -----------------------------------------------------
-- Table "tprofile_view"
-- -----------------------------------------------------
--Table to define by each profile defined in Pandora, to which sec/page has access independently of its ACL (for showing in the console or not). By default have access to all pages allowed by ACL, if forbidden here, then pages are not shown.
CREATE TABLE "tprofile_view" (
"id" SERIAL NOT NULL PRIMARY KEY,
"id_profile" INTEGER NOT NULL default 0,
"sec" text default '',
"sec2" text default ''
);
-- ---------------------------------------------------------------------
-- Table "tservice"
-- ---------------------------------------------------------------------
--Table to define services to monitor
CREATE TABLE "tservice" (
"id" SERIAL NOT NULL PRIMARY KEY,
"name" varchar(100) NOT NULL default '',
"description" text NOT NULL default '',
"id_group" INTEGER NOT NULL default 0,
"critical" DOUBLE PRECISION NOT NULL default 0,
"warning" DOUBLE PRECISION NOT NULL default 0,
"service_interval" DOUBLE PRECISION NOT NULL default 0,
"service_value" DOUBLE PRECISION NOT NULL default 0,
"status" INTEGER NOT NULL default -1,
"utimestamp" INTEGER NOT NULL default 0,
"auto_calculate" INTEGER NOT NULL default 1,
"id_agent_module" INTEGER NOT NULL default 0,
"sla_interval" DOUBLE PRECISION NOT NULL default 0,
"sla_id_module" INTEGER NOT NULL default 0,
"sla_value_id_module" INTEGER NOT NULL default 0,
"sla_limit" DOUBLE PRECISION NOT NULL default 100,
"id_template_alert_warning" INTEGER NOT NULL default 0,
"id_template_alert_critical" INTEGER NOT NULL default 0,
"id_template_alert_unknown" INTEGER NOT NULL default 0,
"id_template_alert_critical_sla" INTEGER NOT NULL default 0
);
-- -----------------------------------------------------
-- Table "tservice_element"
-- -----------------------------------------------------
--Table to define the modules and the weights of the modules that define a service
CREATE TABLE "tservice_element" (
"id" SERIAL NOT NULL PRIMARY KEY,
"id_service" INTEGER NOT NULL,
"weight_ok" DOUBLE PRECISION NOT NULL default 0,
"weight_warning" DOUBLE PRECISION NOT NULL default 0,
"weight_critical" DOUBLE PRECISION NOT NULL default 0,
"weight_unknown" DOUBLE PRECISION NOT NULL default 0,
"description" text NOT NULL default '',
"id_agente_modulo" INTEGER NOT NULL default 0,
"id_agent" INTEGER NOT NULL default 0,
"id_service_child" INTEGER NOT NULL default 0,
"id_server_meta" INTEGER NOT NULL default 0
);
-- ---------------------------------------------------------------------
-- Table "tcollection"
-- ---------------------------------------------------------------------
CREATE TABLE "tcollection" (
"id" SERIAL NOT NULL PRIMARY KEY,
"name" varchar(100) NOT NULL default '',
"short_name" varchar(100) NOT NULL default '',
"id_group" INTEGER NOT NULL default 0,
"description" TEXT,
"status" INTEGER NOT NULL default 0
);
-- status: 0 - Not apply
-- status: 1 - Applied
-- -----------------------------------------------------
-- Table "tpolicy_collections"
-- -----------------------------------------------------
CREATE TABLE "tpolicy_collections" (
"id" SERIAL NOT NULL PRIMARY KEY,
"id_policy" INTEGER NOT NULL default 0 REFERENCES "tpolicies" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
"id_collection" INTEGER NOT NULL default 0 REFERENCES "tcollection" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
"pending_delete" SMALLINT NOT NULL default 0
);
-- -----------------------------------------------------
-- Table "tpolicy_alerts_actions"
-- -----------------------------------------------------
CREATE TABLE "tpolicy_alerts_actions" (
"id" SERIAL NOT NULL PRIMARY KEY,
"id_policy_alert" INTEGER NOT NULL default 0 REFERENCES "tpolicy_alerts" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
"id_alert_action" INTEGER NOT NULL default 0 REFERENCES "talert_actions" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
"fires_min" INTEGER default 0,
"fires_max" INTEGER default 0
);
-- ---------------------------------------------------------------------
-- Table "tpolicy_plugins"
-- ---------------------------------------------------------------------
CREATE TABLE "tpolicy_plugins" (
"id" SERIAL NOT NULL PRIMARY KEY,
"id_policy" INTEGER NOT NULL default 0,
"plugin_exec" TEXT default '',
"pending_delete" SMALLINT NOT NULL default 0
);
-- -----------------------------------------------------
-- Table "tsesion_extended"
-- -----------------------------------------------------
CREATE TABLE "tsesion_extended" (
"id" SERIAL NOT NULL PRIMARY KEY,
"id_sesion" INTEGER NOT NULL,
"extended_info" TEXT default '',
"hash" varchar(255) default ''
);
-- -----------------------------------------------------
-- Table `tskin`
-- -----------------------------------------------------
CREATE TABLE "tskin" (
"id" SERIAL NOT NULL PRIMARY KEY,
"name" TEXT NOT NULL DEFAULT '',
"relative_path" TEXT NOT NULL DEFAULT '',
"description" text NOT NULL DEFAULT '',
"disabled" INTEGER NOT NULL default 0
);
-- ---------------------------------------------------------------------
-- Table `tpolicy_queue`
-- ---------------------------------------------------------------------
CREATE TABLE "tpolicy_queue" (
"id" BIGSERIAL NOT NULL PRIMARY KEY,
"id_policy" INTEGER NOT NULL default 0,
"id_agent" INTEGER NOT NULL default 0,
"operation" varchar(15) NOT NULL default '',
"progress" INTEGER NOT NULL default 0,
"end_utimestamp" INTEGER NOT NULL default 0,
"priority" INTEGER NOT NULL default 0
);
-- -----------------------------------------------------
-- Table `tmodule_synth`
-- -----------------------------------------------------
CREATE TYPE type_tmodule_synth_operation AS ENUM ('ADD', 'SUB', 'DIV', 'MUL', 'AVG', 'NOP');
CREATE TABLE "tmodule_synth" (
"id" SERIAL NOT NULL PRIMARY KEY,
"id_agent_module_source" INTEGER NOT NULL default 0,
"id_agent_module_target" INTEGER NOT NULL default 0 REFERENCES tagente_modulo("id_agente_modulo") ON UPDATE CASCADE ON DELETE CASCADE,
"fixed_value" float default NULL,
"operation" type_tmodule_synth_operation NOT NULL default 'NOP',
"order" INTEGER NOT NULL default 0
);
-- -----------------------------------------------------
-- Table `tevent_rule`
-- -----------------------------------------------------
CREATE TYPE type_tevent_rule_operation AS ENUM ('NOP', 'AND','OR','XOR','NAND','NOR','NXOR');
CREATE TYPE type_tevent_rule_event_type AS ENUM ('','unknown','alert_fired','alert_recovered','alert_ceased','alert_manual_validation','recon_host_detected','system','error','new_agent','going_up_warning','going_up_critical','going_down_warning','going_down_normal','going_down_critical','going_up_normal');
CREATE TABLE "tevent_rule" (
"id_event_rule" SERIAL NOT NULL PRIMARY KEY,
"id_event_alert" INTEGER NOT NULL,
"operation" type_tevent_rule_operation NOT NULL,
"order" INTEGER default '0',
"window" INTEGER NOT NULL default '0',
"count" INTEGER NOT NULL default '1',
"agent" text default '',
"id_usuario" VARCHAR(100) NOT NULL default '',
"id_grupo" INTEGER NOT NULL default '0',
"evento" text NOT NULL default '',
"event_type" type_tevent_rule_event_type default 'unknown',
"module" text default '',
"alert" text default '',
"criticity" INTEGER NOT NULL default '0',
"user_comment" text NOT NULL,
"id_tag" INTEGER NOT NULL default '0',
"name" text default ''
);
CREATE INDEX "tevent_rule_id_event_alert_idx" ON "tevent_rule"("id_event_alert");
-- -----------------------------------------------------
-- Table `tevent_alert`
-- -----------------------------------------------------
CREATE TYPE type_tevent_alert_mode AS ENUM ('PASS','DROP');
CREATE TYPE type_tevent_alert_group_by AS ENUM ('','id_agente','id_agentmodule','id_alert_am','id_grupo');
CREATE TABLE "tevent_alert" (
"id" SERIAL NOT NULL PRIMARY KEY,
"name" text default '',
"description" text,
"order" INTEGER default 0,
"mode" type_tevent_alert_mode,
"field1" text NOT NULL default '',
"field2" text NOT NULL default '',
"field3" text NOT NULL default '',
"field4" text NOT NULL default '',
"field5" text NOT NULL default '',
"field6" text NOT NULL default '',
"field7" text NOT NULL default '',
"field8" text NOT NULL default '',
"field9" text NOT NULL default '',
"field10" text NOT NULL default '',
"time_threshold" INTEGER NOT NULL default '0',
"max_alerts" INTEGER NOT NULL default '1',
"min_alerts" INTEGER NOT NULL default '0',
"time_from" time default '00:00:00',
"time_to" time default '00:00:00',
"monday" INTEGER default 1,
"tuesday" INTEGER default 1,
"wednesday" INTEGER default 1,
"thursday" INTEGER default 1,
"friday" INTEGER default 1,
"saturday" INTEGER default 1,
"sunday" INTEGER default 1,
"recovery_notify" INTEGER default '0',
"field2_recovery" text NOT NULL default '',
"field3_recovery" text NOT NULL,
"id_group" INTEGER NULL default 0,
"internal_counter" INTEGER default '0',
"last_fired" BIGINT NOT NULL default '0',
"last_reference" BIGINT NOT NULL default '0',
"times_fired" INTEGER NOT NULL default '0',
"disabled" INTEGER default '0',
"standby" INTEGER default '0',
"priority" INTEGER default '0',
"force_execution" INTEGER default '0',
"group_by" type_tevent_alert_group_by default ''
);
-- -----------------------------------------------------
-- Table `tevent_alert_action`
-- -----------------------------------------------------
CREATE TABLE "tevent_alert_action" (
"id" SERIAL NOT NULL PRIMARY KEY,
"id_event_alert" INTEGER NOT NULL REFERENCES tevent_alert("id") ON DELETE CASCADE ON UPDATE CASCADE,
"id_alert_action" INTEGER NOT NULL REFERENCES talert_actions("id") ON DELETE CASCADE ON UPDATE CASCADE,
"fires_min" INTEGER default 0,
"fires_max" INTEGER default 0,
"module_action_threshold" INTEGER NOT NULL default '0',
"last_execution" BIGINT NOT NULL default '0'
);
-- ---------------------------------------------------------------------
-- Table `tpolicy_modules_inventory`
-- ---------------------------------------------------------------------
CREATE TABLE "tpolicy_modules_inventory" (
"id" SERIAL NOT NULL PRIMARY KEY,
"id_policy" INTEGER NOT NULL REFERENCES tpolicies("id") ON UPDATE CASCADE ON DELETE CASCADE,
"id_module_inventory" INTEGER NOT NULL REFERENCES tmodule_inventory("id_module_inventory") ON UPDATE CASCADE ON DELETE CASCADE,
"interval" INTEGER NOT NULL default 3600,
"username" varchar(100) default '',
"password" varchar(100) default '',
"pending_delete" SMALLINT NOT NULL default 0
);
-- -----------------------------------------------------
-- Table `tnetworkmap_enterprise`
-- -----------------------------------------------------
CREATE TABLE "tnetworkmap_enterprise" (
"id" SERIAL NOT NULL PRIMARY KEY,
"name" varchar(500) default '',
"id_group" INTEGER NOT NULL default 0,
"options" TEXT default ''
);
-- -----------------------------------------------------
-- Table `tnetworkmap_enterprise_nodes`
-- -----------------------------------------------------
CREATE TABLE "tnetworkmap_enterprise_nodes" (
"id" SERIAL NOT NULL PRIMARY KEY,
"id_networkmap_enterprise" INTEGER NOT NULL REFERENCES tnetworkmap_enterprise("id") ON UPDATE CASCADE ON DELETE CASCADE,
"x" INTEGER NOT NULL default 0,
"y" INTEGER NOT NULL default 0,
"z" INTEGER NOT NULL default 0,
"id_agent" INTEGER NOT NULL default 0,
"id_module" INTEGER NOT NULL default 0,
"id_agent_module" INTEGER NOT NULL default 0,
"parent" INTEGER default 0,
"options" text default '',
"deleted" text default '',
"state" TEXT default ''
);
-- -----------------------------------------------------
-- Table `tnetworkmap_ent_rel_nodes` (Before `tnetworkmap_enterprise_relation_nodes`)
-- -----------------------------------------------------
CREATE TABLE "tnetworkmap_ent_rel_nodes" (
"id" SERIAL NOT NULL PRIMARY KEY,
"id_networkmap_enterprise" INTEGER NOT NULL REFERENCES tnetworkmap_enterprise("id") ON UPDATE CASCADE ON DELETE CASCADE,
"parent" INTEGER default 0,
"parent_type" varchar(30) default 'node',
"child" INTEGER default 0,
"child_type" varchar(30) default 'node',
"deleted" text default ''
);
-- -----------------------------------------------------
-- Table `treport_template`
-- -----------------------------------------------------
CREATE TABLE "treport_template" (
"id_report" SERIAL NOT NULL PRIMARY KEY,
"id_user" varchar(100) NOT NULL default '',
"name" varchar(150) NOT NULL default '',
"description" TEXT NOT NULL,
"private" SMALLINT NOT NULL default 0,
"id_group" SMALLINT NULL default NULL,
"custom_logo" varchar(200) default NULL,
"header" TEXT default NULL,
"first_page" TEXT default NULL,
"footer" TEXT default NULL,
"custom_font" varchar(200) default NULL,
"metaconsole" SMALLINT DEFAULT 0
);
-- -----------------------------------------------------
-- Table `treport_content_template`
-- -----------------------------------------------------
CREATE TABLE "treport_content_template" (
"id_rc" SERIAL NOT NULL PRIMARY KEY,
"id_report" INTEGER NOT NULL default 0 REFERENCES treport_template("id_report") ON DELETE CASCADE,
"id_gs" INTEGER NULL default NULL,
"text_agent_module" TEXT default NULL,
"type" varchar(30) default 'simple_graph',
"period" INTEGER NOT NULL default 0,
"order" INTEGER NOT NULL default 0,
"description" TEXT,
"text_agent" TEXT default '',
"text" TEXT default NULL,
"external_source" TEXT default NULL,
"treport_custom_sql_id" INTEGER default 0,
"header_definition" TEXT default NULL,
"column_separator" TEXT default NULL,
"line_separator" TEXT default NULL,
"time_from" TIME without time zone default '00:00:00',
"time_to" TIME without time zone default '00:00:00',
"monday" SMALLINT NOT NULL default 1,
"tuesday" SMALLINT NOT NULL default 1,
"wednesday" SMALLINT NOT NULL default 1,
"thursday" SMALLINT NOT NULL default 1,
"friday" SMALLINT NOT NULL default 1,
"saturday" SMALLINT NOT NULL default 1,
"sunday" SMALLINT NOT NULL default 1,
"only_display_wrong" SMALLINT not null default 0,
"top_n" INTEGER NOT NULL default 0,
"top_n_value" INTEGER NOT NULL default 10,
"exception_condition" INTEGER NOT NULL default 0,
"exception_condition_value" DOUBLE PRECISION NOT NULL default 0,
"show_resume" INTEGER NOT NULL default 0,
"order_uptodown" INTEGER NOT NULL default 0,
"show_graph" INTEGER NOT NULL default 0,
"group_by_agent" INTEGER NOT NULL default 0,
"style" TEXT NOT NULL DEFAULT '',
"id_group" INTEGER NOT NULL DEFAULT 0,
"id_module_group" INTEGER NOT NULL DEFAULT 0,
"server_name" text default '',
"exact_match" SMALLINT default 0,
"module_names" TEXT default NULL,
"module_free_text" TEXT default NULL,
"each_agent" SMALLINT NOT NULL default 1
);
-- -----------------------------------------------------
-- Table `treport_content_sla_com_temp`
-- -----------------------------------------------------
CREATE TABLE "treport_content_sla_com_temp" (
"id" SERIAL NOT NULL,
"id_report_content" INTEGER NOT NULL REFERENCES treport_content_template("id_rc") ON DELETE CASCADE,
"text_agent" TEXT default '',
"text_agent_module" TEXT default '',
"sla_max" DOUBLE PRECISION NOT NULL default 0,
"sla_min" DOUBLE PRECISION NOT NULL default 0,
"sla_limit" DOUBLE PRECISION NOT NULL default 0,
"server_name" TEXT default '',
"exact_match" SMALLINT default 0
);
-- -----------------------------------------------------
-- Table `treport_content_item_temp` (treport_content_item_template)
-- -----------------------------------------------------
CREATE TABLE "treport_content_item_temp" (
"id" SERIAL NOT NULL,
"id_report_content" INTEGER NOT NULL REFERENCES treport_content_template("id_rc") ON DELETE CASCADE,
"text_agent" TEXT default '',
"text_agent_module" TEXT default '',
"server_name" TEXT default '',
"exact_match" SMALLINT default 0,
"operation" TEXT
);
-- -----------------------------------------------------
-- Table `tgraph_template`
-- -----------------------------------------------------
CREATE TABLE "tgraph_template" (
"id_graph_template" SERIAL NOT NULL PRIMARY KEY,
"id_user" TEXT NOT NULL default '',
"name" TEXT NOT NULL default '',
"description" TEXT NOT NULL default '',
"period" INTEGER NOT NULL default 0,
"width" SMALLINT NOT NULL default 0,
"height" SMALLINT NOT NULL default 0,
"private" SMALLINT NOT NULL default 0,
"events" SMALLINT NOT NULL default 0,
"stacked" SMALLINT NOT NULL default 0,
"id_group" INTEGER NOT NULL default 0
);
-- -----------------------------------------------------
-- Table `tgraph_source_template`
-- -----------------------------------------------------
CREATE TABLE "tgraph_source_template" (
"id_gs_template" SERIAL NOT NULL PRIMARY KEY,
"id_template" INTEGER NOT NULL default 0,
"agent" TEXT NOT NULL default '',
"module" TEXT NOT NULL default '',
"period" INTEGER NOT NULL default 0,
"weight" DOUBLE PRECISION default 2.0,
"exact_match" SMALLINT NOT NULL default 0
);
-- ---------------------------------------------------------------------
-- Table `tmetaconsole_event`
-- ---------------------------------------------------------------------
CREATE TYPE type_tmetaconsole_event_event AS ENUM ('going_unknown','unknown','alert_fired','alert_recovered','alert_ceased','alert_manual_validation','recon_host_detected','system','error','new_agent','going_up_warning','going_up_critical','going_down_warning','going_down_normal','going_down_critical','going_up_normal', 'configuration_change');
CREATE TABLE "tmetaconsole_event" (
"id_evento" BIGSERIAL NOT NULL PRIMARY KEY,
"id_source_event" BIGSERIAL NOT NULL,
"id_agente" INTEGER NOT NULL default 0,
"agent_name" varchar(600) NOT NULL default '',
"id_usuario" varchar(100) NOT NULL default '0',
"id_grupo" INTEGER NOT NULL default 0,
"group_name" text NOT NULL default '',
"estado" INTEGER NOT NULL default 0,
"timestamp" TIMESTAMP without time zone default '1970-01-01 00:00:00',
"evento" text NOT NULL default '',
"utimestamp" BIGINT NOT NULL default 0,
"event_type" type_tmetaconsole_event_event default 'unknown',
"id_agentmodule" INTEGER NOT NULL default 0,
"module_name" TEXT NOT NULL default '',
"id_alert_am" INTEGER NOT NULL default 0,
"alert_template_name" text default '',
"criticity" INTEGER NOT NULL default 0,
"user_comment" text NOT NULL,
"tags" text NOT NULL,
"source" text NOT NULL default '',
"id_extra" text NOT NULL default '',
"critical_instructions" TEXT default '',
"warning_instructions" TEXT default '',
"unknown_instructions" TEXT default '',
"owner_user" varchar(100) NOT NULL default '0',
"ack_utimestamp" BIGINT NOT NULL default 0,
"server_id" INTEGER NOT NULL,
"custom_data" text NOT NULL
);
CREATE INDEX "tmetaconsole_event_id_1_idx" ON "tmetaconsole_event"("id_agente", "id_evento");
CREATE INDEX "tmetaconsole_event_id_agentmodule_idx" ON "tmetaconsole_event"("id_agentmodule");
CREATE INDEX "tmetaconsole_event_server_id_idx" ON "tmetaconsole_event"("server_id");
CREATE INDEX "tmetaconsole_event_id_grupo_idx" ON "tmetaconsole_event"("id_grupo");
CREATE INDEX "tmetaconsole_event_criticity_idx" ON "tmetaconsole_event"("criticity");
CREATE INDEX "tmetaconsole_event_estado_idx" ON "tmetaconsole_event"("estado");
-- ---------------------------------------------------------------------
-- Table `tmetaconsole_event_history`
-- ---------------------------------------------------------------------
CREATE TYPE type_tmetaconsole_event_event_h AS ENUM ('going_unknown','unknown','alert_fired','alert_recovered','alert_ceased','alert_manual_validation','recon_host_detected','system','error','new_agent','going_up_warning','going_up_critical','going_down_warning','going_down_normal','going_down_critical','going_up_normal', 'configuration_change');
CREATE TABLE "tmetaconsole_event_history" (
"id_evento" BIGSERIAL NOT NULL PRIMARY KEY,
"id_source_event" BIGSERIAL NOT NULL,
"id_agente" INTEGER NOT NULL default 0,
"agent_name" varchar(600) NOT NULL default '',
"id_usuario" varchar(100) NOT NULL default '0',
"id_grupo" INTEGER NOT NULL default 0,
"group_name" text NOT NULL default '',
"estado" INTEGER NOT NULL default 0,
"timestamp" TIMESTAMP without time zone default '1970-01-01 00:00:00',
"evento" text NOT NULL default '',
"utimestamp" BIGINT NOT NULL default 0,
"event_type" type_tmetaconsole_event_event_h default 'unknown',
"id_agentmodule" INTEGER NOT NULL default 0,
"module_name" TEXT NOT NULL default '',
"id_alert_am" INTEGER NOT NULL default 0,
"alert_template_name" text default '',
"criticity" INTEGER NOT NULL default 0,
"user_comment" text NOT NULL,
"tags" text NOT NULL,
"source" text NOT NULL default '',
"id_extra" text NOT NULL default '',
"critical_instructions" TEXT default '',
"warning_instructions" TEXT default '',
"unknown_instructions" TEXT default '',
"owner_user" varchar(100) NOT NULL default '0',
"ack_utimestamp" BIGINT NOT NULL default 0,
"server_id" INTEGER NOT NULL,
"custom_data" text NOT NULL
);
CREATE INDEX "tmetaconsole_event_h_id_1_idx" ON "tmetaconsole_event_history"("id_agente", "id_evento");
CREATE INDEX "tmetaconsole_event_h_id_agentmodule_idx" ON "tmetaconsole_event_history"("id_agentmodule");
CREATE INDEX "tmetaconsole_event_h_server_id_idx" ON "tmetaconsole_event_history"("server_id");
CREATE INDEX "tmetaconsole_event_h_id_grupo_idx" ON "tmetaconsole_event_history"("id_grupo");
CREATE INDEX "tmetaconsole_event_h_criticity_idx" ON "tmetaconsole_event_history"("criticity");
CREATE INDEX "tmetaconsole_event_h_estado_idx" ON "tmetaconsole_event_history"("estado");
-- ---------------------------------------------------------------------
-- Table `tagent_module_log`
-- ---------------------------------------------------------------------
CREATE TABLE "tagent_module_log" (
"id_agent_module_log" SERIAL NOT NULL PRIMARY KEY,
"id_agent" INTEGER NOT NULL REFERENCES tagente("id_agente") ON UPDATE CASCADE ON DELETE CASCADE,
"source" TEXT,
"timestamp" TIMESTAMP without time zone default '1970-01-01 00:00:00',
"utimestamp" BIGINT NOT NULL default 0
);
-- ---------------------------------------------------------------------
-- Table `tevent_custom_field`
-- ---------------------------------------------------------------------
CREATE TABLE "tevent_custom_field" (
"id_group" INTEGER NOT NULL default 0,
"value" text NOT NULL default ''
);
-- ----------------------------------------------------------------------
-- Table `tagente_estado`
-- ----------------------------------------------------------------------
@ -99,3 +920,28 @@ ALTER TABLE talert_actions ADD COLUMN field15_recovery TEXT NOT NULL DEFAULT "";
-- Table `tnetflow_filter`
-- ---------------------------------------------------------------------
ALTER TABLE tnetflow_filter ADD COLUMN router_ip TEXT NOT NULL DEFAULT "";
-- ---------------------------------------------------------------------
-- Table `tlocal_component`
-- ---------------------------------------------------------------------
ALTER TABLE tlocal_component ADD "dynamic_interval" INTEGER default 0;
ALTER TABLE tlocal_component ADD "dynamic_max" INTEGER default 0;
ALTER TABLE tlocal_component ADD "dynamic_min" INTEGER default 0;
ALTER TABLE tlocal_component ADD "dynamic_next" INTEGER default 0 NOT NULL;
ALTER TABLE tlocal_component ADD "dynamic_two_tailed" SMALLINT default 0;
-- ---------------------------------------------------------------------
-- Table `tpolicy_module`
-- ---------------------------------------------------------------------
ALTER TABLE tpolicy_modules ADD "dynamic_interval" INTEGER default 0;
ALTER TABLE tpolicy_modules ADD "dynamic_max" INTEGER default 0;
ALTER TABLE tpolicy_modules ADD "dynamic_min" INTEGER default 0;
ALTER TABLE tpolicy_modules ADD "dynamic_next" INTEGER default 0 NOT NULL;
ALTER TABLE tpolicy_modules ADD "dynamic_two_tailed" SMALLINT default 0;
-- ---------------------------------------------------------------------
-- Table `tmetaconsole_agent`
-- ---------------------------------------------------------------------
ALTER TABLE tmetaconsole_agent ADD "remote" INTEGER default 0 NOT NULL;
ALTER TABLE tmetaconsole_agent ADD "cascade_protection_module" INTEGER default 0;
ALTER TABLE tmetaconsole_agent ADD "transactional_agent" INTEGER default 0 NOT NULL;

View File

@ -15,12 +15,16 @@
// GNU General Public License for more details.
global $config;
global $incident_w;
global $incident_m;
check_login ();
ui_require_css_file ('firts_task');
?>
<?php
ui_print_info_message ( array('no_close'=>true, 'message'=> __('There are no incidents defined yet.') ) );
ui_print_info_message ( array('no_close'=>true, 'message'=> __('There are no incidents defined yet.') ) );
if ($incident_w || $incident_m) {
?>
<div class="new_task">
@ -41,3 +45,4 @@ ui_print_info_message ( array('no_close'=>true, 'message'=> __('There are no in
</form>
</div>
</div>
<?php } ?>

View File

@ -15,6 +15,8 @@
// GNU General Public License for more details.
global $config;
global $vconsoles_write;
global $vconsoles_manage;
check_login ();
ui_require_css_file ('firts_task');
@ -22,6 +24,7 @@ ui_print_info_message(
array(
'no_close'=>true,
'message'=> __('There are no visual console defined yet.')));
if ($vconsoles_write || $vconsoles_manage) {
?>
<div class="new_task">
@ -41,3 +44,4 @@ ui_print_info_message(
</form>
</div>
</div>
<?php } ?>

View File

@ -15,25 +15,31 @@
// GNU General Public License for more details.
global $config;
global $agent_w;
check_login ();
ui_require_css_file ('firts_task');
?>
<?php ui_print_info_message ( array('no_close'=>true, 'message'=> __('There are no services defined yet.') ) ); ?>
<div class="new_task">
<div class="image_task">
<?php echo html_print_image('images/firts_task/icono_grande_servicios.png', true, array("title" => __('Services')));?>
<?php if ($agent_w) { ?>
<div class="new_task">
<div class="image_task">
<?php echo html_print_image('images/firts_task/icono_grande_servicios.png', true, array("title" => __('Services')));?>
</div>
<div class="text_task">
<h3> <?php echo __('Create Services'); ?></h3>
<p id="description_task"> <?php echo __("A service is a way to group your IT resources based on their functionalities.
A service could be e.g. your official website, your CRM system, your support application, or even your printers.
Services are logical groups which can include hosts, routers, switches, firewalls, CRMs, ERPs, websites and numerous other services.
By the following example, you're able to see more clearly what a service is:
A chip manufacturer sells computers by its website all around the world.
His company consists of three big departments: A management, an on-line shop and support."); ?></p>
<form action="index.php?sec=estado&sec2=enterprise/godmode/services/services.service&action=new_service" method="post">
<input type="submit" class="button_task" value="<?php echo __('Create Services'); ?>" />
</form>
</div>
</div>
<div class="text_task">
<h3> <?php echo __('Create Services'); ?></h3>
<p id="description_task"> <?php echo __("A service is a way to group your IT resources based on their functionalities.
A service could be e.g. your official website, your CRM system, your support application, or even your printers.
Services are logical groups which can include hosts, routers, switches, firewalls, CRMs, ERPs, websites and numerous other services.
By the following example, you're able to see more clearly what a service is:
A chip manufacturer sells computers by its website all around the world.
His company consists of three big departments: A management, an on-line shop and support."); ?></p>
<form action="index.php?sec=estado&sec2=enterprise/godmode/services/services.service&action=new_service" method="post">
<input type="submit" class="button_task" value="<?php echo __('Create Services'); ?>" />
</form>
</div>
</div>
<?php } ?>

View File

@ -15,10 +15,15 @@
// GNU General Public License for more details.
global $config;
global $networkmaps_write;
global $networkmaps_manage;
check_login ();
ui_require_css_file ('firts_task');
?>
<?php ui_print_info_message ( array('no_close'=>true, 'message'=> __('There are no transactions defined yet.') ) ); ?>
<?php ui_print_info_message ( array('no_close'=>true, 'message'=> __('There are no transactions defined yet.') ) );
if ($networkmaps_write || $networkmaps_manage) {
?>
<div class="new_task">
<div class="image_task">
@ -33,4 +38,5 @@ Transaction graphs represent the different processes within our infrastructure t
<input type="submit" class="button_task" value="<?php echo __('Create Transactions'); ?>" />
</form>
</div>
</div>
</div>
<?php } ?>

View File

@ -146,10 +146,12 @@ if (!empty($all_data)) {
$table->data[] = $tdata;
// Users
$tdata = array();
$tdata[0] = reporting_get_stats_users($data);
$table->rowclass[] = '';
$table->data[] = $tdata;
if (users_is_admin()) {
$tdata = array();
$tdata[0] = reporting_get_stats_users($data);
$table->rowclass[] = '';
$table->data[] = $tdata;
}
html_print_table($table);
unset($table);

View File

@ -204,8 +204,9 @@ if (!$new_agent) {
}
$table->data[1][0] = __('Alias');
$table->data[1][1] = html_print_input_text ('alias', $alias, '', 50, 100, true);
if($new_agent){
$table->data[1][1] .= html_print_checkbox ("alias_as_name", 1, $alias_as_name, true).__('Use alias as name');
}
$table->data[2][0] = __('IP Address');
$table->data[2][1] = html_print_input_text ('direccion', $direccion_agente, '', 16, 100, true);

View File

@ -74,6 +74,7 @@ $maximo = 0;
$minimo = 0;
$nombre_agente = "";
$alias = get_parameter('alias', '');
$alias_as_name = 0;
$direccion_agente = get_parameter('direccion', '');
$direccion_agente = trim(io_safe_output($direccion_agente));
$direccion_agente = io_safe_input($direccion_agente);
@ -149,6 +150,7 @@ $module_macros = array ();
// Create agent
if ($create_agent) {
$alias = (string) get_parameter_post("alias",'');
$alias_as_name = (int) get_parameter_post("alias_as_name", 0);
$direccion_agente = (string) get_parameter_post("direccion",'');
$direccion_agente = trim(io_safe_output($direccion_agente));
$direccion_agente = io_safe_input($direccion_agente);
@ -175,7 +177,7 @@ if ($create_agent) {
if ($fields === false) $fields = array();
$field_values = array();
foreach ($fields as $field) {
$field_values[$field['id_field']] = (string) get_parameter_post ('customvalue_'.$field['id_field'], '');
}
@ -191,26 +193,39 @@ if ($create_agent) {
$agent_created_ok = 0;
}*/
else {
$id_agente = db_process_sql_insert ('tagente',
array ('nombre' => $nombre_agente,
'alias' => $alias,
'direccion' => $direccion_agente,
'id_grupo' => $grupo,
'intervalo' => $intervalo,
'comentarios' => $comentarios,
'modo' => $modo,
'id_os' => $id_os,
'disabled' => $disabled,
'cascade_protection' => $cascade_protection,
'cascade_protection_module' => $cascade_protection_module,
'server_name' => $server_name,
'id_parent' => $id_parent,
'custom_id' => $custom_id,
'icon_path' => $icon_path,
'update_gis_data' => $update_gis_data,
'url_address' => $url_description,
'quiet' => $quiet));
enterprise_hook ('update_agent', array ($id_agente));
if($alias_as_name){
$sql = 'SELECT nombre FROM tagente WHERE nombre = "' . $alias . '"';
$exists_alias = db_get_row_sql($sql);
$nombre_agente = $alias;
}
if(!$exists_alias){
$id_agente = db_process_sql_insert ('tagente',
array ('nombre' => $nombre_agente,
'alias' => $alias,
'alias_as_name' => $alias_as_name,
'direccion' => $direccion_agente,
'id_grupo' => $grupo,
'intervalo' => $intervalo,
'comentarios' => $comentarios,
'modo' => $modo,
'id_os' => $id_os,
'disabled' => $disabled,
'cascade_protection' => $cascade_protection,
'cascade_protection_module' => $cascade_protection_module,
'server_name' => $server_name,
'id_parent' => $id_parent,
'custom_id' => $custom_id,
'icon_path' => $icon_path,
'update_gis_data' => $update_gis_data,
'url_address' => $url_description,
'quiet' => $quiet));
enterprise_hook ('update_agent', array ($id_agente));
}
else{
$id_agente = false;
}
if ($id_agente !== false) {
// Create custom fields for this agent
foreach ($field_values as $key => $value) {
@ -249,6 +264,9 @@ if ($create_agent) {
else {
$id_agente = 0;
$agent_creation_error = __('Could not be created');
if($exists_alias){
$agent_creation_error = __('Could not be created, because name already exists');
}
}
}
}
@ -471,25 +489,27 @@ if ($id_agente) {
//Extensions tabs
foreach ($config['extensions'] as $extension) {
if (isset($extension['extension_god_tab']) && check_acl ($config["id_user"], $group, "AW", $id_agente)) {
$image = $extension['extension_god_tab']['icon'];
$name = $extension['extension_god_tab']['name'];
$id = $extension['extension_god_tab']['id'];
$id_extension = get_parameter('id_extension', '');
if ($id_extension == $id) {
$active = true;
if (isset($extension['extension_god_tab'])) {
if (check_acl ($config["id_user"], $group, $extension['extension_god_tab']['acl'])) {
$image = $extension['extension_god_tab']['icon'];
$name = $extension['extension_god_tab']['name'];
$id = $extension['extension_god_tab']['id'];
$id_extension = get_parameter('id_extension', '');
if ($id_extension == $id) {
$active = true;
}
else {
$active = false;
}
$url = 'index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=extension&id_agente='.$id_agente . '&id_extension=' . $id;
$extension_tab = array('text' => '<a href="' . $url .'">' . html_print_image ($image, true, array ( "title" => $name)) . '</a>', 'active' => $active);
$onheader = $onheader + array($id => $extension_tab);
}
else {
$active = false;
}
$url = 'index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=extension&id_agente='.$id_agente . '&id_extension=' . $id;
$extension_tab = array('text' => '<a href="' . $url .'">' . html_print_image ($image, true, array ( "title" => $name)) . '</a>', 'active' => $active);
$onheader = $onheader + array($id => $extension_tab);
}
}
@ -591,7 +611,6 @@ if ($delete_conf_file) {
__('Could not delete conf file'));
}
// Show agent creation results
if ($create_agent) {
if (!isset($agent_creation_error)) {
@ -645,6 +664,7 @@ if ($update_agent) { // if modified some agent paramenter
$id_agente = (int) get_parameter_post ("id_agente");
$nombre_agente = str_replace('`','&lsquo;',(string) get_parameter_post ("agente", ""));
$alias = str_replace('`','&lsquo;',(string) get_parameter_post ("alias", ""));
$alias_as_name = (int) get_parameter_post ('alias_as_name', 0);
$direccion_agente = (string) get_parameter_post ("direccion", '');
$direccion_agente = trim(io_safe_output($direccion_agente));
$direccion_agente = io_safe_input($direccion_agente);
@ -737,6 +757,7 @@ if ($update_agent) { // if modified some agent paramenter
'id_os' => $id_os,
'modo' => $modo,
'alias' => $alias,
'alias_as_name' => $alias_as_name,
'direccion' => $direccion_agente,
'id_grupo' => $grupo,
'intervalo' => $intervalo,
@ -814,6 +835,7 @@ if ($id_agente) {
$alias = $nombre_agente;
}
}
$alias_as_name = $agent["alias_as_name"];
$direccion_agente = $agent["direccion"];
$grupo = $agent["id_grupo"];
$ultima_act = $agent["ultimo_contacto"];
@ -1183,8 +1205,20 @@ if ($update_module) {
$result = false;
}
else {
$result = modules_update_agent_module ($id_agent_module,
$values, false, $id_tag);
$check_dynamic =
db_get_row_sql('SELECT dynamic_interval, dynamic_max, dynamic_min, dynamic_two_tailed
FROM tagente_modulo WHERE id_agente_modulo =' . $id_agent_module);
if( ($check_dynamic['dynamic_interval'] == $dynamic_interval) &&
($check_dynamic['dynamic_max'] == $dynamic_max) &&
($check_dynamic['dynamic_min'] == $dynamic_min) &&
($check_dynamic['dynamic_two_tailed'] == $dynamic_two_tailed) ) {
$result = modules_update_agent_module ($id_agent_module, $values, false, $id_tag);
}
else{
$values['dynamic_next'] = 0;
$result = modules_update_agent_module ($id_agent_module, $values, false, $id_tag);
}
}
if (is_error($result)) {

View File

@ -139,6 +139,7 @@ $table_simple->style[0] = 'font-weight: bold; width: 15%;';
$table_simple->style[1] = 'width: 35%';
$table_simple->style[2] = 'font-weight: bold; width: 25%;';
$table_simple->style[3] = 'width: 25%';
$table_simple->cellclass = array();
#$table_simple->colspan[4][1] = 3;
@ -255,6 +256,14 @@ if($disabledBecauseInPolicy){
$table_simple->data[3][0] = __('Dynamic Threshold Interval') .' ' . ui_print_help_icon ('dynamic_threshold', true);
$table_simple->data[3][1] = html_print_extended_select_for_time ('dynamic_interval', $dynamic_interval, '', 'None', '0', 10, true, 'width:150px',false, $classdisabledBecauseInPolicy, $disabledBecauseInPolicy);
$table_simple->data[3][1] .= '<a onclick=advanced_option_dynamic()>' . html_print_image('images/cog.png', true, array('title' => __('Advanced options Dynamic Threshold'))) . '</a>';
if($in_policy){
$table_simple->cellclass[2][2] = 'hide_dinamic';
$table_simple->cellclass[2][3] = 'hide_dinamic';
}
else{
$table_simple->cellclass[3][2] = 'hide_dinamic';
$table_simple->cellclass[3][3] = 'hide_dinamic';
}
$table_simple->data[3][2] = '<span><em>'.__('Dynamic Threshold Min. ').'</em>';
$table_simple->data[3][2] .= html_print_input_text ('dynamic_min', $dynamic_min, '', 10, 255, true,
@ -874,9 +883,14 @@ $(document).ready (function () {
disabled_status(disabledBecauseInPolicy);
});
disabled_two_tailed(disabledBecauseInPolicy);
$('#checkbox-dynamic_two_tailed').change (function() {
disabled_two_tailed(disabledBecauseInPolicy);
});
//Dynamic_options_advance;
$('#simple-3-2').hide();
$('#simple-3-3').hide();
$('.hide_dinamic').hide();
//paint graph stutus critical and warning:
paint_graph_values();
@ -925,7 +939,7 @@ function disabled_status (disabledBecauseInPolicy) {
$('#text-max_critical').prop('readonly', true);
$('#text-max_critical').addClass('readonly');
} else {
if (!disabledBecauseInPolicy){
if (disabledBecauseInPolicy == 0){
$('#text-min_warning').prop('readonly', false);
$('#text-min_warning').removeClass('readonly');
$('#text-max_warning').prop('readonly', false);
@ -938,14 +952,27 @@ function disabled_status (disabledBecauseInPolicy) {
}
}
function disabled_two_tailed (disabledBecauseInPolicy) {
if($('#checkbox-dynamic_two_tailed').prop('checked')){
$('#text-dynamic_max').prop('readonly', false);
$('#text-dynamic_max').removeClass('readonly');
}
else{
if (disabledBecauseInPolicy == 0){
$('#text-dynamic_max').prop('readonly', true);
$('#text-dynamic_max').addClass('readonly');
}
}
}
//Dynamic_options_advance;
function advanced_option_dynamic() {
if($('#simple-3-2').is(":visible")){
$('#simple-3-2').hide();
$('#simple-3-3').hide();
if($('.hide_dinamic').is(":visible")){
$('.hide_dinamic').hide();
} else {
$('#simple-3-2').show();
$('#simple-3-3').show();
$('.hide_dinamic').show();
}
}

View File

@ -221,7 +221,7 @@ $table->data[2][0] .= html_print_image('images/spinner.png', true);
$table->data[2][0] .= '</span>';
$agents_alerts = alerts_get_agents_with_alert_template ($id_alert_template, $id_group,
false, array ('tagente.alias', 'tagente.id_agente'));
html_debug($agents_alerts);
$table->data[2][1] = html_print_select (index_array ($agents_alerts, 'id_agente', 'alias'),
'id_agents[]', '', '', '', '', true, true, true, '', $id_alert_template == 0);
$table->data[2][2] = __('When select agents');

View File

@ -106,7 +106,7 @@ if (count($module_array) > 0) {
echo "<table><tr>";
echo "<form method='post' action='index.php?sec=reporting&sec2=godmode/reporting/graph_builder&edit_graph=1&tab=graph_editor&change_label=1&id=". $id_graph ."&graph=" . $idgs_array[$a] . "'>";
html_print_input_text ('label', $label_array[$a], '', 20, 10, false, false);
html_print_input_text ('label', $label_array[$a], '', 20, 30, false, false);
html_print_submit_button ('Ok', 'btn', false, '', false);
echo "</form>";

View File

@ -776,10 +776,10 @@ You can of course remove the warnings, that's why we include the source and do n
<td style="font-weight:bold;"><?php echo __('Data range') . ui_print_help_icon('prediction_date', true); ?></td>
<td>
<?php
echo __('Max') . "&nbsp;";
html_print_input_text('max_interval', $max_interval, '', 5, 10);
echo "&nbsp;" . __('Min') . "&nbsp;";
echo __('Min') . "&nbsp;";
html_print_input_text('min_interval', $min_interval, '', 5, 10);
echo "&nbsp;" . __('Max') . "&nbsp;";
html_print_input_text('max_interval', $max_interval, '', 5, 10);
?>
</td>
</tr>

View File

@ -299,7 +299,7 @@ if ($items) {
$table->head[3] .= ' <a onclick="return message_check_sort_items();" href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=order&dir=up&field=module&id_report=' . $idReport . $urlFilter . '&pure=' . $config['pure'] . '">' . html_print_image("images/sort_up.png", true, array("title" => __('Ascendent'))) . '</a>' .
'<a onclick="return message_check_sort_items();" href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=order&dir=down&field=module&id_report=' . $idReport . $urlFilter . '&pure=' . $config['pure'] . '">' . html_print_image("images/sort_down.png", true, array("title" => __('Descent'))) . '</a>';
}
$table->head[4] = __('Period');
$table->head[4] = __('Time lapse');
$table->head[5] = __('Name') . " / " . __('Description');
if (check_acl ($config['id_user'], 0, "RM")) {
$table->head[6] = '<span title="' . __('Options') . '">' . __('Op.') . '</span>';

View File

@ -930,6 +930,7 @@ switch ($action) {
$es['id_agents'] = $agents_to_report;
$values['external_source'] = json_encode($es);
$values['period'] = get_parameter('period');
$good_format = true;
break;
case 'prediction_date':
@ -1284,6 +1285,7 @@ switch ($action) {
$es['id_agents'] = $agents_to_report;
$values['external_source'] = json_encode($es);
$values['period'] = get_parameter('period');
$good_format = true;
break;
case 'agent_module':

View File

@ -243,30 +243,33 @@ function update_button_palette_callback() {
return false;
}
$("#text_" + idItem).html(values['label']);
if ((values['width'] == 0) || (values['height'] == 0)) {
$("#text_" + idItem).html(values['label']);
if ((values['width'] == 0) || (values['height'] == 0)) {
if($('#preview > img')[0].naturalWidth > 150 || $('#preview > img')[0].naturalHeight > 150){
$("#image_" + idItem).removeAttr('width');
$("#image_" + idItem).removeAttr('height');
$("#image_" + idItem).attr('width', 70);
$("#image_" + idItem).attr('height', 70);
$("#image_" + idItem).css('width', '70px');
$("#image_" + idItem).css('height', '70px');
}
else {
else{
$("#image_" + idItem).removeAttr('width');
$("#image_" + idItem).removeAttr('height');
$("#image_" + idItem).attr('width', values['width']);
$("#image_" + idItem).attr('height', values['height']);
$("#image_" + idItem).css('width', values['width'] + 'px');
$("#image_" + idItem).css('height', values['height'] + 'px');
}
$("#image_" + idItem).attr('width', $('#preview > img')[0].naturalHeight);
$("#image_" + idItem).attr('height', $('#preview > img')[0].naturalHeight);
$("#image_" + idItem).css('width', $('#preview > img')[0].naturalHeight+'px');
$("#image_" + idItem).css('height', $('#preview > img')[0].naturalHeight+'px');
}
}
else {
$("#image_" + idItem).removeAttr('width');
$("#image_" + idItem).removeAttr('height');
$("#image_" + idItem).attr('width', values['width']);
$("#image_" + idItem).attr('height', values['height']);
$("#image_" + idItem).css('width', values['width'] + 'px');
$("#image_" + idItem).css('height', values['height'] + 'px');
}
break;
case 'percentile_bar':
case 'percentile_item':
@ -333,27 +336,33 @@ function update_button_palette_callback() {
alert('Undefined height');
return false;
}
$("#image_" + idItem).attr('src', "images/spinner.gif");
if ((values['width'] == 0) || (values['height'] == 0)) {
$("#image_" + idItem).attr('src', "images/spinner.gif");
if ((values['width'] == 0) || (values['height'] == 0)) {
if($('#preview > img')[0].naturalWidth > 150 || $('#preview > img')[0].naturalHeight > 150){
$("#image_" + idItem).removeAttr('width');
$("#image_" + idItem).removeAttr('height');
$("#image_" + idItem).attr('width', 70);
$("#image_" + idItem).attr('height', 70);
$("#image_" + idItem).css('width', '70px');
$("#image_" + idItem).css('height', '70px');
}
else {
}
else{
$("#image_" + idItem).removeAttr('width');
$("#image_" + idItem).removeAttr('height');
$("#image_" + idItem).attr('width', values['width']);
$("#image_" + idItem).attr('height', values['height']);
$("#image_" + idItem).css('width', values['width'] + 'px');
$("#image_" + idItem).css('height', values['height'] + 'px');
}
$("#image_" + idItem).attr('width', $('#preview > img')[0].naturalHeight);
$("#image_" + idItem).attr('height', $('#preview > img')[0].naturalHeight);
$("#image_" + idItem).css('width', $('#preview > img')[0].naturalHeight+'px');
$("#image_" + idItem).css('height', $('#preview > img')[0].naturalHeight+'px');
}
}
else {
$("#image_" + idItem).removeAttr('width');
$("#image_" + idItem).removeAttr('height');
$("#image_" + idItem).attr('width', values['width']);
$("#image_" + idItem).attr('height', values['height']);
$("#image_" + idItem).css('width', values['width'] + 'px');
$("#image_" + idItem).css('height', values['height'] + 'px');
}
var image = values['image'] + ".png";
set_image("image", idItem, image);
break;
@ -1959,8 +1968,10 @@ function createItem(type, values, id_data) {
if ((values['width'] == 0) || (values['height'] == 0)) {
// Do none
$image.attr('width', '70')
.attr('height', '70');
if($('#preview > img')[0].naturalWidth > 150 || $('#preview > img')[0].naturalHeight > 150){
$image.attr('width', '70')
.attr('height', '70');
}
}
else {
$image.attr('width', values['width'])
@ -2159,8 +2170,10 @@ function createItem(type, values, id_data) {
break;
case 'icon':
if ((values['width'] == 0) || (values['height'] == 0)) {
sizeStyle = 'width: ' + '70' + 'px; height: ' + '70' + 'px;';
imageSize = 'width="' + '70' + '" height="' + '70' + '"';
if($('#preview > img')[0].naturalWidth > 150 || $('#preview > img')[0].naturalHeight > 150){
sizeStyle = 'width: ' + '70' + 'px; height: ' + '70' + 'px;';
imageSize = 'width="' + '70' + '" height="' + '70' + '"';
}
}
else {
sizeStyle = 'width: ' + values['width'] + 'px; height: ' + values['height'] + 'px;';
@ -2177,12 +2190,14 @@ function createItem(type, values, id_data) {
default:
//Maybe create in any Enterprise item.
if (typeof(enterprise_createItem) == 'function') {
values['image'] = 'visualmap.services';
if (values['image'] == "") {
values['image'] = 'visualmap.services';
}
temp_item = enterprise_createItem(type, values, id_data);
if (temp_item != false) {
item = temp_item;
}
$('#'+id_data).css({'width':'','height':''});
$('#'+id_data).css({'width':'','height':''});
}
break;
}
@ -2234,7 +2249,6 @@ function insertDB(type, values) {
}
});
var id = null;
parameter = Array();
@ -2713,8 +2727,8 @@ function eventsItems(drag) {
unselectAll();
$(divParent).attr('withborder','true');
$(divParent).css('border', '1px blue dotted');
//$(divParent).css('left', '-=1px');
//$(divParent).css('top', '-=1px');
$(divParent).css('left', '-=1px');
$(divParent).css('top', '-=1px');
if ($(divParent).hasClass('box_item')) {
creationItem = null;
@ -3116,8 +3130,8 @@ function unselectAll() {
$(".item").each(function(){
$(this).css('border', '');
if($(this).attr('withborder') == 'true'){
//$(this).css('top', '+=1');
//$(this).css('left', '+=1');
$(this).css('top', '+=1');
$(this).css('left', '+=1');
$(this).attr('withborder', 'false');
}

View File

@ -107,6 +107,7 @@ if ((isset ($_GET["update"])) OR ((isset ($_GET["create"])))) {
$resolve_names = (int) get_parameter ("resolve_names", 0);
$parent_detection = (int) get_parameter ("parent_detection", 0);
$parent_recursion = (int) get_parameter ("parent_recursion", 1);
$alias_as_name = (int) get_parameter ("alias_as_name", 0);
// Get macros
$macros = (string) get_parameter ('macros');
@ -149,7 +150,8 @@ if (isset($_GET["update"])) {
'resolve_names' => $resolve_names,
'parent_detection' => $parent_detection,
'parent_recursion' => $parent_recursion,
'macros' => $macros
'macros' => $macros,
'alias_as_name' => $alias_as_name
);
$where = array('id_rt' => $id);
@ -209,7 +211,8 @@ if (isset($_GET["create"])) {
'resolve_names' => $resolve_names,
'parent_detection' => $parent_detection,
'parent_recursion' => $parent_recursion,
'macros' => $macros
'macros' => $macros,
'alias_as_name' => $alias_as_name
);
$name = io_safe_output($name);

View File

@ -120,10 +120,10 @@ if (isset($_GET["update"]) || (isset($_GET["upd"]))) {
$os_detect = $row["os_detect"];
$resolve_names = $row["resolve_names"];
$os_detect = $row["os_detect"];
$resolve_names = $row["resolve_names"];
$parent_detection = $row["parent_detection"];
$parent_recursion = $row["parent_recursion"];
$macros = $row["macros"];
$alias_as_name = $row["alias_as_name"];
$name_script = db_get_value('name',
'trecon_script', 'id_recon_script', $id_recon_script);
@ -168,6 +168,7 @@ elseif (isset($_GET["create"]) || isset($_GET["crt"])) {
$parent_detection = 1;
$parent_recursion = 5;
$macros = '';
$alias_as_name = 0;
}
$modify = false;
@ -374,6 +375,10 @@ $table->data[20][1] = html_print_checkbox ('parent_detection', 1, $parent_detec
$table->data[21][0] = "<b>".__('Parent recursion');
$table->data[21][1] = html_print_input_text ('parent_recursion', $parent_recursion, '', 5, 0, true) . ui_print_help_tip (__('Maximum number of parent hosts that will be created if parent detection is enabled.'), true);
// Alias as name
$table->data[22][0] = "<b>".__('Alias as Name');
$table->data[22][1] = html_print_checkbox ('alias_as_name', 1, $alias_as_name, true);
// Different Form url if it's a create or if it's a update form
echo '<form name="modulo" method="post" action="index.php?sec=gservers&sec2=godmode/servers/manage_recontask&'.(($id_rt != -1) ? 'update='.$id_rt : 'create=1').'">';
html_print_table ($table);

View File

@ -206,11 +206,16 @@ $row++;
$table_styles->data[$row][0] = __('Custom logo (login)') . ui_print_help_icon("custom_logo_login", true);
if(enterprise_installed()) {
$table_styles->data[$row][1] = html_print_select(
list_files('enterprise/images/custom_logo_login', "png", 1, 0), 'custom_logo_login',
$config["custom_logo_login"], '', '', '',true,false,true,'',$open,'width:240px');
}
else {
$table_styles->data[$row][1] = html_print_select(
"", 'custom_logo_login',
$config["custom_logo_login"], '', '', '',true,false,true,'',$open,'width:240px');
}
$table_styles->data[$row][1] .= "&nbsp;" . html_print_button(__("View"), 'custom_logo_login_preview', $open, '', 'class="sub camera"', true,false,$open,'visualmodal');
$row++;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 473 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.8 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.2 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 730 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 728 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 733 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 733 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 390 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 407 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 460 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 467 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 529 B

View File

@ -306,11 +306,14 @@ function process_user_login_remote ($login, $pass, $api = false) {
}
}
else {
$user_info = array ('fullname' => $login,
'comments' => 'Imported from ' . $config['auth']);
if ( is_metaconsole() && $config["auth"] === 'ad')
$user_info['metaconsole_access_node'] = $config['ad_adv_user_node'];
// Create the user in the local database
if (create_user ($login, $pass,
array ('fullname' => $login,
'comments' => 'Imported from ' . $config['auth'])
) === false) {
if (create_user ($login, $pass, $user_info ) === false) {
$config["auth_error"] = __("User not found in database or incorrect password");
return false;
}
@ -339,7 +342,7 @@ function process_user_login_remote ($login, $pass, $api = false) {
foreach ($servers as $server) {
$perfil_maestro = db_get_row('tperfil',
'id_perfil', $config['default_remote_profile']);
if (metaconsole_connect($server) == NOERR ) {
if (!profile_exist($perfil_maestro['name'])) {
@ -350,10 +353,12 @@ function process_user_login_remote ($login, $pass, $api = false) {
$id_profile = db_get_value('id_perfil', 'tperfil', 'name', $perfil_maestro['name']);
}
if (create_user ($login, $pass,
array ('fullname' => $login,
'comments' => 'Imported from ' . $config['auth'])
) === false)
if ($config["auth"] === 'ad') {
unset($user_info['metaconsole_access_node']);
$user_info['not_login'] = (int) !$config['ad_adv_user_node'];
}
if (create_user ($login, $pass, $user_info) === false)
continue;
profile_create_user_profile ($login, $id_profile,
$config['default_remote_group'], false, $config['default_assign_tags']);

View File

@ -22,7 +22,7 @@
/**
* Pandora build version and version
*/
$build_version = 'PC170302';
$build_version = 'PC170308';
$pandora_version = 'vNG_BETA';
// Do not overwrite default timezone set if defined.

View File

@ -348,6 +348,8 @@ define('SERVER_TYPE_ENTERPRISE_ICMP', 11);
define('SERVER_TYPE_ENTERPRISE_SNMP', 12);
define('SERVER_TYPE_ENTERPRISE_SATELLITE', 13);
define('SERVER_TYPE_ENTERPRISE_TRANSACTIONAL', 14);
define('SERVER_TYPE_MAINFRAME', 15);
define('SERVER_TYPE_SYNC', 16);
/* REPORTS */
define('REPORT_TOP_N_MAX', 1);

View File

@ -346,11 +346,8 @@ function postgresql_db_process_sql_insert($table, $values) {
}
$query .= '(' . implode(', ', $fields) . ')';
$query .= ' VALUES (' . $values_str . ')';
//html_debug_print($query);
return db_process_sql($query, 'insert_id');
}

View File

@ -173,7 +173,7 @@ function list_files ($directory, $stringSearch, $searchHandler, $return = false)
}
if ($searchHandler == 1) {
while (false !== ($fileName = @readdir ($directoryHandler))) {
if (@substr_count ($fileName, $stringSearch) > 0) {
if ((@substr_count ($fileName, $stringSearch) > 0) || (@substr_count ($fileName, strtoupper($stringSearch)) > 0)) {
$result[$fileName] = $fileName;
}
}

View File

@ -2545,7 +2545,9 @@ function agents_get_agent_custom_field ($agent_id, $custom_field_name) {
return db_get_value_sql($sql);
}
function select_modules_for_agent_group($id_group, $id_agents, $selection, $return=true){
function select_modules_for_agent_group($id_group, $id_agents,
$selection, $return = true) {
$agents = implode(",", $id_agents);
$filter_group = "";

View File

@ -342,6 +342,52 @@ function api_get_agent_module_name_last_value($agentName, $moduleName, $other =
}
}
function api_get_agent_module_name_last_value_alias($alias, $moduleName, $other = ';', $returnType)
{
global $config;
switch ($config["dbtype"]) {
case "mysql":
$sql = sprintf('SELECT tagente_modulo.id_agente_modulo FROM tagente_modulo
INNER JOIN tagente ON tagente_modulo.id_agente = tagente.id_agente
WHERE tagente.alias LIKE "%s" AND tagente_modulo.nombre LIKE "%s"', $alias, $moduleName);
break;
case "postgresql":
case "oracle":
$sql = sprintf('SELECT tagente_modulo.id_agente_modulo FROM tagente_modulo
INNER JOIN tagente ON tagente_modulo.id_agente = tagente.id_agente
WHERE tagente.alias LIKE \'%s\' AND tagente_modulo.nombre LIKE \'%s\'', $alias, $moduleName);
break;
}
$idModuleAgent = db_get_value_sql($sql);
if ($idModuleAgent === false) {
switch ($other['type']) {
case 'string':
switch ($other['data']) {
case 'error_message':
default:
returnError('id_not_found', $returnType);
break;
}
break;
case 'array':
switch ($other['data'][0]) {
case 'error_value':
returnData($returnType, array('type' => 'string', 'data' => $other['data'][1]));
break;
}
break;
}
}
else {
api_get_module_last_value($idModuleAgent, null, $other, $returnType);
}
}
function api_get_module_last_value($idAgentModule, $trash1, $other = ';', $returnType) {
if (defined ('METACONSOLE')) {
return;
@ -525,7 +571,7 @@ function api_get_tree_agents($trash1, $trahs2, $other, $returnType) {
'group_other',
'agent_id',
'agent_name',
'alias',
'agent_direction',
'agent_comentary',
'agent_id_group',
@ -542,6 +588,7 @@ function api_get_tree_agents($trash1, $trahs2, $other, $returnType) {
'agent_server_name',
'agent_cascade_protection',
'agent_cascade_protection_module',
'agent_name',
'module_id_agent_modulo',
'module_id_agent',
@ -764,7 +811,7 @@ function api_get_tree_agents($trash1, $trahs2, $other, $returnType) {
$groups = str_replace('\n', $returnReplace, $groups);
$agents = db_get_all_rows_sql('
SELECT id_agente AS agent_id, id_grupo AS agent_id_group ' . $agent_additional_columns . ' FROM tagente');
SELECT id_agente AS agent_id, id_grupo AS agent_id_group , alias' . $agent_additional_columns . ' FROM tagente');
if ($agents === false) $agents = array();
$agents = str_replace('\n', $returnReplace, $agents);
@ -936,6 +983,67 @@ function api_get_module_properties_by_name($agent_name, $module_name, $other, $r
/*
* subroutine for api_get_module_properties() and api_get_module_properties_by_name().
*/
/**
*
* @param $alias
* @param $module_name
* @param mixed $other If $other is string is only the separator,
* but if it's array, $other as param is <separator>;<replace_return>;(<field_1>,<field_2>...<field_n>) in this order
* and separator char (after text ; ) must be diferent that separator (and other) url (pass in param othermode as othermode=url_encode_separator_<separator>)
* example:
*
* return csv with fields type_row,group_id and agent_name, separate with ";" and the return of the text replace for " "
* api.php?op=get&op2=module_properties_by_name&id=sample_agent&id2=sample_module&return_type=csv&other=;| |module_id_agent,module_name,module_str_critical,module_str_warning&other_mode=url_encode_separator_|
*
* @param $returnType
* @return unknown_type
*/
function api_get_module_properties_by_alias($alias, $module_name, $other, $returnType)
{
if ($other['type'] == 'array') {
$separator = $other['data'][0];
$returnReplace = $other['data'][1];
if (trim($other['data'][2]) == '')
$fields = false;
else {
$fields = explode(',', $other['data'][2]);
foreach($fields as $index => $field)
$fields[$index] = trim($field);
}
}
else {
if (strlen($other['data']) == 0)
$separator = ';'; //by default
else
$separator = $other['data'];
$returnReplace = ' ';
$fields = false;
}
$sql = sprintf('SELECT tagente_modulo.id_agente_modulo FROM tagente_modulo
INNER JOIN tagente ON tagente_modulo.id_agente = tagente.id_agente
WHERE tagente.alias LIKE "%s" AND tagente_modulo.nombre LIKE "%s"', $alias, $module_name);
$module_id = db_get_value_sql($sql);
if( !empty($alias) && $module_id > 0 ) {
get_module_properties($module_id, $fields, $separator, $returnType, $returnReplace);
}
else {
if(empty($alias)) {
returnError('error_get_module_properties_by_name', __('Does not exist agent with this name.'));
} else {
returnError('error_get_module_properties_by_name', __('Does not exist module with this name.'));
}
}
}
/*
* subroutine for api_get_module_properties() and api_get_module_properties_by_name().
*/
function get_module_properties($id_module, $fields, $separator, $returnType, $returnReplace)
{
/** NOTE: if you want to add an output field, you have to add it to;
@ -1062,7 +1170,7 @@ function api_set_update_agent($id_agent, $thrash2, $other, $thrash3) {
return;
}
$name = $other['data'][0];
$alias = $other['data'][0];
$ip = $other['data'][1];
$idParent = $other['data'][2];
$idGroup = $other['data'][3];
@ -1089,7 +1197,7 @@ function api_set_update_agent($id_agent, $thrash2, $other, $thrash3) {
}
$return = db_process_sql_update('tagente',
array('nombre' => $name,
array('alias' => $alias,
'direccion' => $ip,
'id_grupo' => $idGroup,
'intervalo' => $intervalSeconds,
@ -1134,7 +1242,7 @@ function api_set_new_agent($thrash1, $thrash2, $other, $thrash3) {
return;
}
$name = $other['data'][0];
$alias = $other['data'][0];
$ip = $other['data'][1];
$idParent = $other['data'][2];
$idGroup = $other['data'][3];
@ -1148,6 +1256,16 @@ function api_set_new_agent($thrash1, $thrash2, $other, $thrash3) {
$learningMode = $other['data'][10];
$disabled = $other['data'][11];
$description = $other['data'][12];
$alias_as_name = $other['data'][13];
if($alias_as_name && !empty($alias)){
$name = $alias;
} else {
$name = hash("sha256",$alias . "|" .$direccion_agente ."|". time() ."|". sprintf("%04d", rand(0,10000)));
if(empty($alias)){
$alias = $name;
}
}
if ($cascadeProtection == 1) {
if (($idParent != 0) && (db_get_value_sql('SELECT id_agente_modulo
@ -1203,6 +1321,7 @@ function api_set_new_agent($thrash1, $thrash2, $other, $thrash3) {
else {
$idAgente = db_process_sql_insert ('tagente',
array ('nombre' => $name,
'alias' => $alias,
'direccion' => $ip,
'id_grupo' => $idGroup,
'intervalo' => $intervalSeconds,
@ -1371,9 +1490,9 @@ function api_get_all_agents($thrash1, $thrash2, $other, $returnType) {
}
}
if (isset($other['data'][3])) {
// Filter by name
// Filter by alias
if ($other['data'][3] != "") {
$where .= " AND nombre LIKE ('%" . $other['data'][3] . "%')";
$where .= " AND alias LIKE ('%" . $other['data'][3] . "%')";
}
}
if (isset($other['data'][4])) {
@ -1394,14 +1513,14 @@ function api_get_all_agents($thrash1, $thrash2, $other, $returnType) {
// Initialization of array
$result_agents = array();
// Filter by state
$sql = "SELECT id_agente, nombre, direccion, comentarios,
tconfig_os.name, url_address
$sql = "SELECT id_agente, alias, direccion, comentarios,
tconfig_os.name, url_address, nombre
FROM tagente, tconfig_os
WHERE tagente.id_os = tconfig_os.id_os
AND disabled = 0 " . $where;
$all_agents = db_get_all_rows_sql($sql);
// Filter by status: unknown, warning, critical, without modules
if (isset($other['data'][2])) {
if ($other['data'][2] != "") {
@ -1469,7 +1588,6 @@ function api_get_all_agents($thrash1, $thrash2, $other, $returnType) {
if (count($result_agents) > 0 and $result_agents !== false) {
$data = array('type' => 'array', 'data' => $result_agents);
returnData($returnType, $data, $separator);
}
else {
@ -1950,6 +2068,79 @@ function api_get_group_agent_by_name($thrash1, $thrash2, $other, $thrash3) {
}
}
/**
* Get name group for an agent, and print all the result like a csv.
*
* @param $thrash1 Don't use.
* @param $thrash2 Don't use.
* @param array $other it's array, $other as param are the filters available <alias> in this order
* and separator char (after text ; ) and separator (pass in param othermode as othermode=url_encode_separator_<separator>)
* example:
*
* api.php?op=get&op2=group_agent_by_alias&return_type=csv&other=Pepito&other_mode=url_encode_separator_|
*
* @param $thrash3 Don't use.
*/
function api_get_group_agent_by_alias($thrash1, $thrash2, $other, $thrash3) {
$group_names =array();
if (is_metaconsole()) {
$servers = db_get_all_rows_sql ("SELECT *
FROM tmetaconsole_setup
WHERE disabled = 0");
if ($servers === false)
$servers = array();
foreach($servers as $server) {
if (metaconsole_connect($server) == NOERR) {
$sql = sprintf("SELECT tagente.id_agente FROM tagente WHERE alias LIKE '%s' ",$other['data'][0]);
$agent_id = db_get_all_rows_sql($sql);
foreach ($agent_id as &$id) {
$sql = sprintf("SELECT groups.nombre nombre
FROM tagente agents, tgrupo groups
WHERE id_agente = %d
AND agents.id_grupo = groups.id_grupo",$id['id_agente']);
$group_server_names = db_get_all_rows_sql($sql);
if ($group_server_names) {
foreach($group_server_names as $group_server_name) {
$group_names[] = $group_server_name;
}
}
}
}
metaconsole_restore_db();
}
}
else {
$sql = sprintf("SELECT tagente.id_agente FROM tagente WHERE alias LIKE '%s' ",$other['data'][0]);
$agent_id = db_get_all_rows_sql($sql);
foreach ($agent_id as &$id) {
$sql = sprintf("SELECT groups.nombre nombre
FROM tagente agents, tgrupo groups
WHERE id_agente = %d
AND agents.id_grupo = groups.id_grupo",$id['id_agente']);
$group_name = db_get_all_rows_sql($sql);
$group_names[] = $group_name[0];
}
}
if (count($group_names) > 0 and $group_names !== false) {
$data = array('type' => 'array', 'data' => $group_names);
returnData('csv', $data, ';');
}
else {
returnError('error_group_agent', 'No groups retrieved.');
}
}
/**
* Get id server whare agent is located, and print all the result like a csv.
*
@ -2064,6 +2255,78 @@ function api_get_id_group_agent_by_name($thrash1, $thrash2, $other, $thrash3) {
}
}
/**
* Get id group for an agent, and print all the result like a csv.
*
* @param $thrash1 Don't use.
* @param $thrash2 Don't use.
* @param array $other it's array, $other as param are the filters available <alias> in this order
* and separator char (after text ; ) and separator (pass in param othermode as othermode=url_encode_separator_<separator>)
* example:
*
* api.php?op=get&op2=id_group_agent_by_alias&return_type=csv&other=Nova&other_mode=url_encode_separator_|
*
* @param $thrash3 Don't use.
*/
function api_get_id_group_agent_by_alias($thrash1, $thrash2, $other, $thrash3) {
$group_names =array();
if (is_metaconsole()) {
$servers = db_get_all_rows_sql ("SELECT *
FROM tmetaconsole_setup
WHERE disabled = 0");
if ($servers === false)
$servers = array();
foreach($servers as $server) {
if (metaconsole_connect($server) == NOERR) {
$sql = sprintf("SELECT tagente.id_agente FROM tagente WHERE alias LIKE '%s' ",$other['data'][0]);
$agent_id = db_get_all_rows_sql($sql);
foreach ($agent_id as &$id) {
$sql = sprintf("SELECT groups.id_grupo id_group
FROM tagente agents, tgrupo groups
WHERE id_agente = %d
AND agents.id_grupo = groups.id_grupo",$id['id_agente']);
$group_server_names = db_get_all_rows_sql($sql);
if ($group_server_names) {
foreach($group_server_names as $group_server_name) {
$group_names[] = $group_server_name;
}
}
}
}
metaconsole_restore_db();
}
}
else {
$sql = sprintf("SELECT tagente.id_agente FROM tagente WHERE alias LIKE '%s' ",$other['data'][0]);
$agent_id = db_get_all_rows_sql($sql);
foreach ($agent_id as &$id) {
$sql = sprintf("SELECT groups.id_grupo id_group
FROM tagente agents, tgrupo groups
WHERE id_agente = %d
AND agents.id_grupo = groups.id_grupo",$id['id_agente']);
$group_name = db_get_all_rows_sql($sql);
$group_names[] = $group_name[0];
}
}
if (count($group_names) > 0 and $group_names !== false) {
$data = array('type' => 'array', 'data' => $group_names);
returnData('csv', $data);
}
else {
returnError('error_group_agent', 'No groups retrieved.');
}
}
/**
* Get all policies, possible filtered by agent, and print all the result like a csv.
*
@ -3702,7 +3965,7 @@ function api_get_module_value_all_agents($id, $thrash1, $other, $thrash2) {
return;
}
$sql = sprintf("SELECT agent.id_agente, agent.nombre, module_state.datos FROM tagente agent, tagente_modulo module, tagente_estado module_state WHERE agent.id_agente = module.id_agente AND module.id_agente_modulo=module_state.id_agente_modulo AND module.nombre = '%s'", $id);
$sql = sprintf("SELECT agent.id_agente, agent.alias, module_state.datos, agent.nombre FROM tagente agent, tagente_modulo module, tagente_estado module_state WHERE agent.id_agente = module.id_agente AND module.id_agente_modulo=module_state.id_agente_modulo AND module.nombre = '%s'", $id);
$module_values = db_get_all_rows_sql($sql);
@ -6086,7 +6349,6 @@ function api_set_update_group($id_group, $thrash2, $other, $thrash3) {
return;
}
//html_debug_print($other);
$name = $other['data'][0];
$icon = $other['data'][1];
$parent = $other['data'][2];
@ -7714,7 +7976,7 @@ function get_events_with_user($trash1, $trash2, $other, $returnType, $user_in_db
}
else {
$sql = "SELECT *,
(SELECT t1.nombre
(SELECT t1.alias
FROM tagente t1
WHERE t1.id_agente = tevento.id_agente) AS agent_name,
(SELECT t2.nombre
@ -7740,7 +8002,7 @@ function get_events_with_user($trash1, $trash2, $other, $returnType, $user_in_db
case "postgresql":
//TODO TOTAL
$sql = "SELECT *,
(SELECT t1.nombre
(SELECT t1.alias
FROM tagente t1
WHERE t1.id_agente = tevento.id_agente) AS agent_name,
(SELECT t2.nombre
@ -7767,6 +8029,9 @@ function get_events_with_user($trash1, $trash2, $other, $returnType, $user_in_db
$set['offset'] = $offset;
$sql = "SELECT *,
(SELECT t1.alias
FROM tagente t1
WHERE t1.id_agente = tevento.id_agente) AS alias,
(SELECT t1.nombre
FROM tagente t1
WHERE t1.id_agente = tevento.id_agente) AS agent_name,
@ -7853,9 +8118,8 @@ function get_events_with_user($trash1, $trash2, $other, $returnType, $user_in_db
else if ($other['type'] == 'array') {
$separator = $other['data'][0];
}
//html_debug_print($filter, true);
$result = db_get_all_rows_sql ($sql);
//html_debug_print($sql, true);
if (($result !== false) &&
(!$filter['total']) &&
@ -7911,8 +8175,6 @@ function get_events_with_user($trash1, $trash2, $other, $returnType, $user_in_db
}
}
//html_debug_print($result);
$data['type'] = 'array';
$data['data'] = $result;
@ -7945,12 +8207,10 @@ function api_get_events($trash1, $trash2, $other, $returnType, $user_in_db = nul
returnError('ERROR_API_PANDORAFMS', $returnType);
}
}
return;
}
if ($other['type'] == 'string') {
if ($other['data'] != '') {
returnError('error_parameter', 'Error in the parameters.');
@ -8390,7 +8650,7 @@ function api_get_total_agents($id_group, $trash1, $trash2, $returnType) {
/**
* Agent name for a given id
*
* @param int $id_group
* @param int $id_agent
*
**/
// http://localhost/pandora_console/include/api.php?op=get&op2=agent_name&id=1&apipass=1234&user=admin&pass=pandora
@ -8412,6 +8672,31 @@ function api_get_agent_name($id_agent, $trash1, $trash2, $returnType) {
returnData($returnType, $data);
}
/**
* Agent alias for a given id
*
* @param int $id_agent
*
**/
// http://localhost/pandora_console/include/api.php?op=get&op2=agent_name&id=1&apipass=1234&user=admin&pass=pandora
function api_get_agent_alias($id_agent, $trash1, $trash2, $returnType) {
if (defined ('METACONSOLE')) {
return;
}
$sql = sprintf('SELECT alias
FROM tagente
WHERE id_agente = %d', $id_agent);
$value = db_get_value_sql($sql);
if ($value === false) {
returnError('id_not_found', $returnType);
}
$data = array('type' => 'string', 'data' => $value);
returnData($returnType, $data);
}
/**
* Module name for a given id
*

6
pandora_console/include/functions_extensions.php Normal file → Executable file
View File

@ -409,7 +409,7 @@ function extensions_add_godmode_menu_option ($name, $acl, $fatherId = null, $ico
* @param tabIcon Path to the image icon
* @param tabFunction Name of the function to execute when this extension is called
*/
function extensions_add_godmode_tab_agent($tabId, $tabName, $tabIcon, $tabFunction, $version="N/A") {
function extensions_add_godmode_tab_agent($tabId, $tabName, $tabIcon, $tabFunction, $version="N/A", $acl = 'AW') {
global $config;
global $extension_file;
@ -420,6 +420,7 @@ function extensions_add_godmode_tab_agent($tabId, $tabName, $tabIcon, $tabFuncti
$extension['extension_god_tab']['icon'] = $tabIcon;
$extension['extension_god_tab']['function'] = $tabFunction;
$extension['extension_god_tab']['version'] = $version;
$extension['extension_ope_tab']['acl'] = $acl;
}
/**
@ -430,7 +431,7 @@ function extensions_add_godmode_tab_agent($tabId, $tabName, $tabIcon, $tabFuncti
* @param tabIcon Path to the image icon
* @param tabFunction Name of the function to execute when this extension is called
*/
function extensions_add_opemode_tab_agent($tabId, $tabName, $tabIcon, $tabFunction, $version="N/A") {
function extensions_add_opemode_tab_agent($tabId, $tabName, $tabIcon, $tabFunction, $version="N/A", $acl = 'AR') {
global $config;
global $extension_file;
@ -441,6 +442,7 @@ function extensions_add_opemode_tab_agent($tabId, $tabName, $tabIcon, $tabFuncti
$extension['extension_ope_tab']['icon'] = $tabIcon;
$extension['extension_ope_tab']['function'] = $tabFunction;
$extension['extension_ope_tab']['version'] = $version;
$extension['extension_ope_tab']['acl'] = $acl;
}
/**

View File

@ -480,7 +480,7 @@ function grafico_modulo_sparse_data_chart (&$chart, &$chart_data_extra, &$long_i
}
}
if (!is_null($percentil)) {
if (!is_null($percentil) && $percentil) {
$avg = array_map(function($item) { return $item['sum'];}, $chart);
$percentil_result = get_percentile($percentil, $avg);
@ -774,7 +774,7 @@ function grafico_modulo_sparse_data ($agent_module_id, $period, $show_events,
$chart_extra_data['legend_unknown'] = $legend['unknown'.$series_suffix_str];
}
if (!is_null($percentil)) {
if (!is_null($percentil) && $percentil) {
$first_data = reset($chart);
$percentil_value = format_for_graph($first_data['percentil'], 2);
@ -1429,8 +1429,6 @@ function graphic_combined_module ($module_list, $weight_list, $period,
if ($projection == false or ($projection != false and $i == 0)) {
$module_name_list[$i] .= ": ";
if ($show_last)
$module_name_list[$i] .= __('Last') . ": $last $unit; ";
if ($show_max)
$module_name_list[$i] .= __("Max") . ": $max $unit; ";
if ($show_min)
@ -1739,8 +1737,7 @@ function graphic_combined_module ($module_list, $weight_list, $period,
}
break;
default:
if (!is_null($percentil)) {
if (!is_null($percentil) && $percentil) {
foreach ($graph_values as $graph_group => $point) {
foreach ($point as $timestamp_point => $point_value) {
$temp[$timestamp_point][$graph_group] = $point_value;
@ -1750,7 +1747,7 @@ function graphic_combined_module ($module_list, $weight_list, $period,
$percentil_result[$graph_group] = array_fill ( 0, count($point), $percentile_value);
$series_type[$graph_group] = 'line';
$agent_name = io_safe_output(
modules_get_agentmodule_agent_name ($module_list[$graph_group]));
modules_get_agentmodule_agent_alias ($module_list[$graph_group]));
$module_name = io_safe_output(
modules_get_agentmodule_name ($module_list[$graph_group]));
$module_name_list['percentil'.$graph_group] = __('Percentile %dº', $config['percentil']) . __(' of module ') . $agent_name .' / ' . $module_name . ' (' . $percentile_value . ' ' . $unit . ') ';
@ -2004,7 +2001,7 @@ function graphic_combined_module ($module_list, $weight_list, $period,
$width, $height, $color, $module_name_list, $long_index,
ui_get_full_url("images/image_problem.opaque.png", false, false, false),
"", "", $water_mark, $config['fontpath'], $fixed_font_size,
"", $ttl, $homeurl, $background_color);
"", $ttl, $homeurl, $background_color, true);
break;
case CUSTOM_GRAPH_PIE:
return ring_graph($flash_charts, $graph_values, $width, $height,
@ -2825,7 +2822,7 @@ function graph_incidents_status () {
'url' => ui_get_full_url("images/logo_vertical_water.png", false, false, false));
}
return pie3d_graph($config['flash_charts'], $data, 370, 180,
return pie3d_graph($config['flash_charts'], $data, 320, 200,
__('Other'), '', $water_mark,
$config['fontpath'], $config['font_size']);
}
@ -2996,12 +2993,29 @@ function graphic_incident_source($width = 320, $height = 200) {
$config['fontpath'], $config['font_size']);
}
function graph_events_validated($width = 300, $height = 200, $url = "", $meta = false, $history = false) {
function graph_events_validated($width = 300, $height = 200, $extra_filters = array(), $meta = false, $history = false) {
global $config;
global $graphic_type;
$event_type = false;
if (array_key_exists('event_type', $extra_filters))
$event_type = $extra_filters['event_type'];
$event_severity = false;
if (array_key_exists('event_severity', $extra_filters))
$event_severity = $extra_filters['event_severity'];
$event_status = false;
if (array_key_exists('event_status', $extra_filters))
$event_status = $extra_filters['event_status'];
$event_filter_search = false;
if (array_key_exists('event_filter_search', $extra_filters))
$event_filter_search = $extra_filters['event_filter_search'];
$data_graph = events_get_count_events_validated(
array('id_group' => array_keys(users_get_groups())));
array('id_group' => array_keys(users_get_groups())), null, null,
$event_severity, $event_type, $event_status, $event_filter_search);
$colors = array();
foreach ($data_graph as $k => $v) {
@ -3088,25 +3102,12 @@ function grafico_eventos_grupo ($width = 300, $height = 200, $url = "", $meta =
//This will give the distinct id_agente, give the id_grupo that goes
//with it and then the number of times it occured. GROUP BY statement
//is required if both DISTINCT() and COUNT() are in the statement
switch ($config["dbtype"]) {
case "mysql":
case "postgresql":
$sql = sprintf ('SELECT DISTINCT(id_agente) AS id_agente,
$sql = sprintf ('SELECT DISTINCT(id_agente) AS id_agente,
COUNT(id_agente) AS count'.$field_extra.'
FROM '.$event_table.'
WHERE 1=1 %s %s
GROUP BY id_agente'.$groupby_extra.'
ORDER BY count DESC LIMIT 8', $url, $tags_condition);
break;
case "oracle":
$sql = sprintf ('SELECT DISTINCT(id_agente) AS id_agente,
id_grupo, COUNT(id_agente) AS count'.$field_extra.'
FROM '.$event_table.'
WHERE rownum <= 8 %s %s
GROUP BY id_agente, id_grupo'.$groupby_extra.'
ORDER BY count DESC', $url, $tags_condition);
break;
}
$result = db_get_all_rows_sql ($sql, false, false);
if ($result === false) {
@ -3253,9 +3254,14 @@ function grafico_eventos_total($filter = "", $width = 320, $height = 200, $noWat
$legend = array ();
$total = 0;
$sql = "SELECT criticity, COUNT(id_evento) events
FROM tevento
GROUP BY criticity ORDER BY events DESC";
$where = '';
if (!users_is_admin()) {
$where = 'WHERE event_type NOT IN (\'recon_host_detected\', \'system\',\'error\', \'new_agent\', \'configuration_change\')';
}
$sql = sprintf("SELECT criticity, COUNT(id_evento) events
FROM tevento %s
GROUP BY criticity ORDER BY events DESC", $where);
$criticities = db_get_all_rows_sql ($sql, false, false);
@ -3322,23 +3328,17 @@ function grafico_eventos_usuario ($width, $height) {
$data = array ();
$max_items = 5;
switch ($config["dbtype"]) {
case "mysql":
case "postgresql":
$sql = sprintf ('SELECT COUNT(id_evento) events, id_usuario
FROM tevento
GROUP BY id_usuario
ORDER BY 1 DESC LIMIT %d', $max_items);
break;
case "oracle":
$sql = sprintf ('SELECT *
FROM (SELECT COUNT(id_evento) events, id_usuario
FROM tevento
GROUP BY id_usuario
ORDER BY 1 DESC)
WHERE rownum <= %d', $max_items);
break;
$where = '';
if (!users_is_admin()) {
$where = 'WHERE event_type NOT IN (\'recon_host_detected\', \'system\',\'error\', \'new_agent\', \'configuration_change\')';
}
$sql = sprintf ('SELECT COUNT(id_evento) events, id_usuario
FROM tevento %s
GROUP BY id_usuario
ORDER BY 1 DESC LIMIT %d', $where, $max_items);
$events = db_get_all_rows_sql ($sql);
if ($events === false) {

View File

@ -1200,7 +1200,7 @@ function reporting_event_top_n($report, $content, $type = 'dinamic',
if ($show_graph != REPORT_TOP_N_ONLY_TABLE) {
arsort($data_pie_graph);
$return['charts']['pie'] = pie3d_graph(false,
$data_pie_graph,
$width, $height,
@ -1222,14 +1222,14 @@ function reporting_event_top_n($report, $content, $type = 'dinamic',
array(),
"",
"",
true,
ui_get_full_url(false, true, false, false) . '/',
false,
false,
$config['homedir'] . "/images/logo_vertical_water.png",
$config['fontpath'],
$config['font_size'],
true,
$ttl,
true);
$config['homeurl']);
}
$return['resume'] = null;
@ -3407,11 +3407,11 @@ function reporting_prediction_date($report, $content) {
$return['agent_name'] = $agent_name;
$return['module_name'] = $module_name;
set_time_limit(500);
$intervals_text = explode(';', $content['text']);
$intervals_text = $content['text'];
$max_interval = substr($intervals_text, 0, strpos($intervals_text, ';'));
$min_interval = substr($intervals_text, strpos($intervals_text, ';') + 1);
$max_interval = $intervals_text[0];
$min_interval = $intervals_text[1];
$value = forecast_prediction_date ($content['id_agent_module'], $content['period'], $max_interval, $min_interval);
if ($value === false) {
@ -5800,7 +5800,15 @@ function reporting_custom_graph($report, $content, $type = 'dinamic',
reporting_set_conf_charts($width, $height, $only_image, $type,
$content, $ttl);
$height += count($modules) * REPORTING_CUSTOM_GRAPH_LEGEND_EACH_MODULE_VERTICAL_SIZE;
//height for bullet chart
if($graph['stacked'] != 4){
$height += count($modules) * REPORTING_CUSTOM_GRAPH_LEGEND_EACH_MODULE_VERTICAL_SIZE;
}
else{
if(!$only_image){
$height = 50;
}
}
switch ($type) {
case 'dinamic':

View File

@ -1360,13 +1360,8 @@ function reporting_html_agent_module($table, $item) {
$textcolor = '#FFF';
break;
}
/*
$file_name = string2image(
ui_print_truncate_text($row['agent_name'], 'agent_small',
false, true, false, '...'),
false, false, 6, 0, $rowcolor, $textcolor, 4, 0);
*/
$file_name = ui_print_truncate_text($row['agent_name'], 'agent_small',
$file_name = ui_print_truncate_text($row['agent_alias'], 'agent_small',
false, true, false, '...');
$table_data .= "<td style='background-color: " . $rowcolor . ";'>" .
$file_name . "</td>";
@ -2060,7 +2055,7 @@ function reporting_html_monitor_report($table, $item, $mini) {
function reporting_html_graph($table, $item) {
$table->colspan['chart']['cell'] = 3;
$table->cellstyle['chart']['cell'] = 'text-align: center;';
$table->data['chart']['cell'] = $item['chart'];
$table->data['chart']['cell'] = $item['chart'].'<br><br><br><br>';
}
function reporting_html_prediction_date($table, $item, $mini) {

View File

@ -434,6 +434,16 @@ function servers_get_info ($id_server = -1) {
$server["type"] = "enterprise transactional";
$id_modulo = 0;
break;
case SERVER_TYPE_MAINFRAME:
$server["img"] = html_print_image ("images/mainframe.png", true, array ("title" => __('Mainframe server')));
$server["type"] = "mainframe";
$id_modulo = 0;
break;
case SERVER_TYPE_SYNC:
$server["img"] = html_print_image ("images/sync.png", true, array ("title" => __('Sync server')));
$server["type"] = "sync";
$id_modulo = 0;
break;
default:
$server["img"] = '';
$server["type"] = "unknown";

View File

@ -250,11 +250,6 @@ function update_manager_check_online_free_packages_available() {
$http_status = curl_getinfo($curlObj, CURLINFO_HTTP_CODE);
curl_close($curlObj);
//~ html_debug_print("----------", true);
//~ html_debug_print($params, true);
//~ html_debug_print($http_status, true);
//~ html_debug_print($result, true);
if ($result === false) {
return false;
}
@ -316,11 +311,6 @@ function update_manager_check_online_free_packages ($is_ajax=true) {
$http_status = curl_getinfo($curlObj, CURLINFO_HTTP_CODE);
curl_close($curlObj);
//~ html_debug_print("=============", true);
//~ html_debug_print($params, true);
//~ html_debug_print($http_status, true);
//~ html_debug_print($result, true);
if ($result === false) {
if ($is_ajax) {
echo __("Could not connect to internet");
@ -412,10 +402,6 @@ function update_manager_curl_request ($action, $additional_params = false) {
curl_close($curlObj);
$error_array['http_status'] = $http_status;
//~ html_debug_print("=============", true);
//~ html_debug_print($params, true);
//~ html_debug_print($http_status, true);
//~ html_debug_print($result, true);
if ($result === false) {
$error_array['success'] = false;
@ -591,10 +577,6 @@ function update_manager_remote_read_messages ($id_message) {
$result = update_manager_curl_request ('mark_as_read', $params);
//if (!$result['success']) {
// html_debug ($result['update_message'], true);
//}
return $result['success'];
}

View File

@ -124,105 +124,83 @@ function visual_map_print_item($mode = "read", $layoutData,
$text = '<span id="text_' . $id . '" class="text">' . $label .'</span>';
if($height == 0){
switch($type){
case 0:
case 11:
$tableheight0 = '70';
break;
case 3:
$tableheight0 = '30';
break;
case 9:
$tableheight0 = '130';
break;
case 1:
$tableheight0 = '180';
break;
case SERVICE:
$tableheight0 = '50';
break;
if ($height == 0) {
switch($type) {
case 0:
case 11:
$tableheight0 = '70';
break;
case 3:
$tableheight0 = '30';
break;
case 9:
$tableheight0 = '130';
break;
case 1:
$tableheight0 = '180';
break;
case SERVICE:
$tableheight0 = '50';
break;
}
}
else {
$tableheight0 = $height;
}
}
else{
$tableheight0 = $height;
}
if ($layoutData['width'] == 0 || $layoutData['height'] == 0){
switch($type){
case 0:
case 11:
$himg = '70';
$wimg ='70';
break;
case 3:
if(get_parameter('action') == 'edit'){
$himg = '30';
$wimg = '150';
}
else{
$himg = '15';
$wimg = '150';
}
break;
case 9:
$himg = '130';
$wimg = '130';
break;
case 1:
$himg = '180';
$wimg = '300';
break;
case SERVICE:
$himg = '50';
$wimg = '150';
break;
}
}
else{
$wimg = $layoutData['width'];
$himg = $layoutData['height'];
if($type == 3){
if(get_parameter('action') == 'edit'){
$himg = '30';
}
else{
$himg = '15';
if ($layoutData['width'] == 0 || $layoutData['height'] == 0) {
switch($type) {
case 0:
case 11:
$himg = '70';
$wimg ='70';
break;
case 3:
if (get_parameter('action') == 'edit') {
$himg = '30';
$wimg = '150';
}
else{
$himg = '15';
$wimg = '150';
}
break;
case 9:
$himg = '130';
$wimg = '130';
break;
case 1:
$himg = '180';
$wimg = '300';
break;
case SERVICE:
$himg = '50';
$wimg = '150';
break;
}
}
if($type == 9){
$himg = $wimg;
else {
$wimg = $layoutData['width'];
$himg = $layoutData['height'];
if ($type == 3) {
if(get_parameter('action') == 'edit')
$himg = '30';
else
$himg = '15';
}
if ($type == 9) {
$himg = $wimg;
}
}
}
if($label_position == 'left'){
if ($label_position == 'left') {
$text = '<table style="float:left;height:'.$himg.'px;"><tr><td></td></tr><tr><td><span id="text_' . $id . '" class="text">' . $label .'</span></td></tr><tr><td></td></tr></table>';
}
else if($label_position == 'right'){
elseif ($label_position == 'right') {
$text = '<table style="float:right;height:'.$himg.'px;"><tr><td></td></tr><tr><td><span style="" id="text_' . $id . '" class="text">' . $label .'</span></td></tr><tr><td></td></tr></table>';
}
else{
else {
$text = '<table style="width:'.$wimg.'px;"><tr><td></td></tr><tr><td><span style="" id="text_' . $id . '" class="text">' . $label .'</span></td></tr><tr><td></td></tr></table>';
}
@ -276,9 +254,7 @@ else{
case GROUP_ITEM:
if ($layoutData['enable_link']
&& can_user_access_node()) {
$link = true;
}
break;
case LABEL:
@ -906,7 +882,8 @@ else{
}
}
$only_image = !$graph_javascript || $isExternalLink;
$only_image = !$graph_javascript && $isExternalLink;
if ($layoutData['id_custom_graph'] != 0) {
// Show only avg on the visual console
if (get_parameter('action') == 'edit') {
@ -1012,10 +989,11 @@ else{
false, $type_graph) . '</div>';
}
else {
$img = grafico_modulo_sparse($id_module, $period, 0,300,180,
'',null,
false, 1, false, 0, '', 0, 0, true, $only_image, '', 1, false,
'', false, false, false, $layoutData['image'], null, true, false,$type_graph);
$img = grafico_modulo_sparse($id_module,
$period, 0, 300, 180, '',null, false, 1,
false, 0, '', 0, 0, true, $only_image, '',
1, false, '', false, false, false,
$layoutData['image'], null, true, false, $type_graph);
}
}
else{
@ -1204,17 +1182,28 @@ else{
else if($layoutData['label_position']=='right'){
$imgpos = 'float:left';
}
if ($width == 0 || $height == 0)
echo html_print_image($img, true,
array("class" => "image",
$varsize = getimagesize($img);
if ($width == 0 || $height == 0) {
if($varsize[0] > 150 || $varsize[1] > 150){
echo html_print_image($img, true,
array("class" => "image",
"id" => "image_" . $id,
"width" => "70px",
"height" => "70px",
"title" => $img_style_title,
"style" => $borderStyle.$imgpos), false,
false, false, $isExternalLink);
else
}
else{
echo html_print_image($img, true,
array("class" => "image",
"id" => "image_" . $id,
"title" => $img_style_title,
"style" => $borderStyle.$imgpos), false,
false, false, $isExternalLink);
}
}
else{
echo html_print_image($img, true,
array("class" => "image",
"id" => "image_" . $id,
@ -1223,6 +1212,7 @@ else{
"title" => $img_style_title,
"style" => $borderStyle.$imgpos), false,
false, false, $isExternalLink);
}
}
@ -1236,72 +1226,66 @@ else{
break;
case PERCENTILE_BAR:
$imgpos = '';
if($layoutData['label_position']=='left'){
$imgpos = 'float:right;';
}
else if($layoutData['label_position']=='right'){
$imgpos = 'float:left;';
}
$progress_bar_heigh = 15;
if (!empty($proportion)) {
if ($width != 0) {
$width = (integer)($proportion['proportion_width'] * $width);
$imgpos = '';
if($layoutData['label_position']=='left'){
$imgpos = 'float:right;';
}
else {
$width = (integer)($proportion['proportion_width'] * $infoImage[0]);
else if($layoutData['label_position']=='right'){
$imgpos = 'float:left;';
}
if ($height != 0) {
$height = (integer)($proportion['proportion_height'] * $height);
$progress_bar_heigh = $progress_bar_heigh * $proportion['proportion_height'];
}
else {
$height = (integer)($proportion['proportion_height'] * $infoImage[1]);
}
}
if($layoutData['label_position']=='up'){
echo io_safe_output($text);
}
ob_start();
if ($type == PERCENTILE_BUBBLE) {
echo progress_bubble($percentile, $width, $width, '', 1, $value_text, $colorStatus,$imgpos);
}
else {
echo progress_bar($percentile, $width, $progress_bar_heigh, '', 1, $value_text, $colorStatus,$imgpos);
}
$img = ob_get_clean();
if(get_parameter('action') == 'edit'){
if($width == 0){
$img = '<img src="images/console/signes/percentil.png" style="width:130px;height:30px;'.$imgpos.'">';
}
else{
$img = '<img src="images/console/signes/percentil.png" style="width:'.$width.'px;height:30px;'.$imgpos.'">';
}
}
else{
$img = str_replace('>', 'class="image" style="height:'.$himg.'px;width:'.$wimg.'px;'.$imgpos.'" id="image_' . $id . '" />', $img);
}
echo $img;
if($layoutData['label_position']=='down'){
echo io_safe_output($text);
}
else if($layoutData['label_position']=='left' || $layoutData['label_position']=='right'){
echo io_safe_output($text);
}
$progress_bar_heigh = 15;
if (!empty($proportion)) {
if ($width != 0) {
$width = (integer)($proportion['proportion_width'] * $width);
}
else {
$width = (integer)($proportion['proportion_width'] * $infoImage[0]);
}
if ($height != 0) {
$height = (integer)($proportion['proportion_height'] * $height);
$progress_bar_heigh = $progress_bar_heigh * $proportion['proportion_height'];
}
else {
$height = (integer)($proportion['proportion_height'] * $infoImage[1]);
}
}
if($layoutData['label_position']=='up'){
echo io_safe_output($text);
}
ob_start();
if ($type == PERCENTILE_BUBBLE) {
echo progress_bubble($percentile, $width, $width, '', 1, $value_text, $colorStatus,$imgpos);
}
else {
echo progress_bar($percentile, $width, $progress_bar_heigh, '', 1, $value_text, $colorStatus,$imgpos);
}
$img = ob_get_clean();
if (get_parameter('action') == 'edit') {
if ($width == 0) {
$img = '<img src="images/console/signes/percentil.png" style="width:130px;height:30px;'.$imgpos.'">';
}
else {
$img = '<img src="images/console/signes/percentil.png" style="width:'.$width.'px;height:30px;'.$imgpos.'">';
}
}
else{
$img = str_replace('>', 'class="image" style="height:'.$himg.'px;width:'.$wimg.'px;'.$imgpos.'" id="image_' . $id . '" />', $img);
}
echo $img;
if($layoutData['label_position']=='down'){
echo io_safe_output($text);
}
else if($layoutData['label_position']=='left' || $layoutData['label_position']=='right'){
echo io_safe_output($text);
}
break;
@ -1494,18 +1478,30 @@ else{
}
}
if (($width != 0) && ($height != 0))
$varsize = getimagesize($img);
if (($width != 0) && ($height != 0)){
echo html_print_image($img, true,
array("class" => "image",
"id" => "image_" . $id,
"width" => "$width",
"height" => "$height"), false,
false, false, $isExternalLink);
else
}
else{
if($varsize[0] > 150 || $varsize[0] > 150){
echo html_print_image($img, true,
array("class" => "image", "id" => "image_" . $id,"width" => "70px",
"70px" => "$height"),
false, false, false, $isExternalLink);
}
else{
echo html_print_image($img, true,
array("class" => "image",
"id" => "image_" . $id), false,
false, false, $isExternalLink);
}
}
}
break;
default:

View File

@ -287,6 +287,7 @@ function area_graph($flash_chart, $chart_data, $width, $height, $color,
$graph['backgroundColor'] = $backgroundColor;
$graph['unit'] = $unit;
$graph['series_type'] = $series_type;
$graph['percentil'] = $percentil_values;
$id_graph = serialize_in_temp($graph, null, $ttl);
// Warning: This string is used in the function "api_get_module_graph" from 'functions_api.php' with the regec patern "/<img src='(.+)'>/"
@ -399,7 +400,7 @@ function stacked_line_graph($flash_chart, $chart_data, $width, $height,
false,
'',
$menu,
$background_color,
$backgroundColor,
$dashboard,
$vconsole);
}
@ -569,7 +570,7 @@ function line_graph($flash_chart, $chart_data, $width, $height, $color,
$graph['font'] = $font;
$graph['font_size'] = $font_size;
$graph['backgroundColor'] = $backgroundColor;
$graph['percentil'] = $percentil_values;
$id_graph = serialize_in_temp($graph, null, $ttl);
return "<img src='" . $homeurl . "include/graphs/functions_pchart.php?static_graph=1&graph_type=line&ttl=".$ttl."&id_graph=" . $id_graph . "' />";

View File

@ -164,9 +164,8 @@ function pandoraFlotPieCustom(graph_id, values, labels, width,
pie: {
show: true,
radius: 3/4,
innerRadius: 0.4,
label: label_conf
innerRadius: 0.4
//label: label_conf
}
},
legend: {
@ -1723,7 +1722,7 @@ function pandoraFlotArea(graph_id, values, labels, labels_long, legend,
if (currentRanges == null || (currentRanges.xaxis.from < j && j < currentRanges.xaxis.to)) {
$('#timestamp_'+graph_id).show();
// If no legend, the timestamp labels are short and with value
if (legends.length == 0) {
if (legend.length == 0) {
$('#timestamp_'+graph_id).text(labels[j] + ' (' + parseFloat(y).toFixed(2) + ')');
}
else {
@ -1946,6 +1945,11 @@ function pandoraFlotArea(graph_id, values, labels, labels_long, legend,
$.extend(true, {}, options, {
yaxis: {max: maxim_data + (maxim_data*0.5)},
}));
} else {
plot = $.plot($('#' + graph_id), data_base,
$.extend(true, {}, options, {
yaxis: {max: plot.getAxes().yaxis.max},
}));
}
datas = add_threshold (data_base, threshold_data, plot.getAxes().yaxis.min, plot.getAxes().yaxis.max,
yellow_threshold, red_threshold, extremes, red_up);
@ -1977,7 +1981,7 @@ function pandoraFlotArea(graph_id, values, labels, labels_long, legend,
// Adjust the menu image on top of the plot
// If there is no legend we increase top-padding to make space to the menu
if (legends.length == 0) {
if (legend.length == 0) {
$('#menu_' + graph_id).parent().css('padding-top',
$('#menu_' + graph_id).css('height'));
}

View File

@ -137,6 +137,10 @@ if (isset($graph['series_type'])) {
$series_type = $graph['series_type'];
}
if (isset($graph['percentil'])){
$percentil = $graph['percentil'];
}
/*
@ -219,10 +223,23 @@ switch ($graph_type) {
case 'line':
case 'threshold':
case 'scatter':
if (!empty($percentil)) {
$count_percentil = count($percentil);
for ($j=0; $j < $count_percentil; $j++) {
$i=0;
foreach ($data as $key => $value) {
$data[$key]['percentil' . $j] = $percentil[$j][$i];
if($graph_type == 'area'){
$series_type['percentil' . $j] = 'line';
}
$i++;
}
}
}
foreach ($data as $i => $d) {
$data_values[] = $d;
if (($c % $step) == 0) {
$data_keys[] = $i;
}
@ -297,6 +314,36 @@ foreach ($colors as $i => $color) {
$rgb_color[$i]['alpha'] = $color['alpha'];
}
}
//add color for percentil
if($percentil){
for ($j=0; $j < $count_percentil; $j++) {
if (isset ($colors[$j]['border'])) {
$rgb['border'] = html_html2rgb($colors[$j]['border']);
if (isset($rgb['border'])) {
$rgb_color['percentil' . $j]['border']['R'] = $rgb['border'][0];
$rgb_color['percentil' . $j]['border']['G'] = $rgb['border'][1];
$rgb_color['percentil' . $j]['border']['B'] = $rgb['border'][2];
}
}
if (isset ($colors[$j]['color'])) {
$rgb['color'] = html_html2rgb($colors[$j]['color']);
if (isset($rgb['color'])) {
$rgb_color['percentil' . $j]['color']['R'] = $rgb['color'][0];
$rgb_color['percentil' . $j]['color']['G'] = $rgb['color'][1];
$rgb_color['percentil' . $j]['color']['B'] = $rgb['color'][2];
}
}
if (isset ($colors[$j]['alpha'])) {
$rgb_color['percentil' . $j]['alpha'] = $colors[$j]['alpha'];
}
}
}
//add for report with max 15 modules comparation repeat
$countlegend = count($legend);
if($countlegend > 15){
@ -812,7 +859,7 @@ function pch_vertical_graph ($graph_type, $index, $data, $width, $height,
"BorderB" => $rgb_color[$i]['border']["B"],
"Alpha" => $rgb_color[$i]['alpha']));
/*$palette_color = array();
$palette_color = array();
if (isset($rgb_color[$i]['color'])) {
$palette_color["R"] = $rgb_color[$i]['color']["R"];
$palette_color["G"] = $rgb_color[$i]['color']["G"];
@ -827,7 +874,7 @@ function pch_vertical_graph ($graph_type, $index, $data, $width, $height,
$palette_color["Alpha"] = $rgb_color[$i]['Alpha'];
}
$MyData->setPalette($point_id, $palette_color);*/
$MyData->setPalette($point_id, $palette_color);
}
// The weight of the line is not calculated in pixels, so it needs to be transformed

View File

@ -0,0 +1,8 @@
<?php
/**
* @package Include/help/en
*/
?>
<h1>Reports - Time lapse</h1>
<br>
This is the range, or period of time over which the report renders the information for this report type. For example, a week means data from a week ago from now.

View File

@ -0,0 +1,8 @@
<?php
/**
* @package Include/help/en
*/
?>
<h1>Reports - Time lapse</h1>
<br>
Este es el lapso de tiempo que refleja el informe. Si es una semana, por ejemplo, el informe mostrará los datos desde hace una semana hasta ahora

View File

@ -0,0 +1,8 @@
<?php
/**
* @package Include/help/ja
*/
?>
<h1>レポート - 時間経過</h1>
<br>
これは、レポートがこのレポートタイプの情報をレンダリングする範囲または期間です。 たとえば、1週間は、今から1週間前のデータを意味します。

View File

@ -1903,10 +1903,17 @@ function add_interface_link_js () {
}
function refresh_holding_area() {
holding_pos_x = d3.select("#holding_area_" + networkmap_id).attr("x");
holding_pos_y = d3.select("#holding_area_" + networkmap_id).attr("y");
var pos_x = parseInt(holding_pos_x) + parseInt(node_radius);
var pos_y = parseInt(holding_pos_y) + parseInt(node_radius);
if (enterprise_installed) {
var params = [];
params.push("refresh_holding_area=1");
params.push("id=" + networkmap_id);
params.push("x=" + pos_x);
params.push("y=" + pos_y);
params.push("page=enterprise/operation/agentes/pandora_networkmap.view");
jQuery.ajax ({
data: params.join ("&"),
@ -1914,6 +1921,7 @@ function refresh_holding_area() {
type: 'POST',
url: action="ajax.php",
success: function (data) {
if (data['correct']) {
window.holding_area = data['holding_area'];
@ -1932,7 +1940,7 @@ function refresh_holding_area() {
temp_node['y'] = node['y'];
temp_node['z'] = 0;
temp_node['fixed'] = true;
temp_node['state'] = node['state'];
temp_node['state'] = 'holding_area';
temp_node['type'] = 0;
temp_node['color'] = node['color'];
temp_node['shape'] = node['shape'];
@ -2142,11 +2150,15 @@ function init_drag_and_drop() {
var selection = d3.selectAll('.node_selected');
if (enterprise_installed) {
holding_pos_x = d3.select("#holding_area_" + networkmap_id).attr("x");
holding_pos_y = d3.select("#holding_area_" + networkmap_id).attr("y");
selection
.each(function(d) {
var params = [];
params.push("update_node=1");
params.push("node=" + JSON.stringify(d));
params.push("x=" + holding_pos_x);
params.push("y=" + holding_pos_y);
params.push("page=enterprise/operation/agentes/pandora_networkmap.view");
jQuery.ajax ({
data: params.join ("&"),
@ -2159,14 +2171,13 @@ function init_drag_and_drop() {
if (data['state'] == "") {
//Remove the style of nodes and links
//in holding area
d3.select("#id_node_" + d.id + networkmap_id)
.classed("holding_area", false);
d3.select(".source_" + d.id + networkmap_id)
.classed("holding_area_link", false);
d3.select(".target_" + d.id + networkmap_id)
.classed("holding_area_link", false);
graph.nodes[d.id].state = "";
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -23,8 +23,7 @@ h1 {
text-align: center;
}
h2 {
font: bold 1em Arial, Sans-serif;
border-bottom: solid 1px #00aa00;
font: Verdana;
font-size: 16px;
}
@ -40,7 +39,6 @@ div#logo_img {
}
div#wizard {
text-align: left;
border: 1px solid #999;
margin-top: 1em;
width: 650px;
@ -51,7 +49,6 @@ div#wizard {
margin-top: 0px;
margin-left: 0px;
margin-right: 0px;
border-radius: 10px;
position: relative;
}
@ -74,19 +71,13 @@ div#install_box, div#install_img {
div#install_box {
background: F3F3F3;
-moz-border-radius: 8px;
-webkit-border-radius: 8px;
border-radius: 8px;
border: 0px;
border: 1px solid #ccc;
padding: 10px 25px;
margin-top: 10px;
-moz-box-shadow: -1px 1px 6px #aaa;
-webkit-box-shadow: -1px 1px 6px #aaa;
box-shadow: -1px 1px 6px #aaa;
margin-top: 40px;
}
div#install_box h2 {
color: #00aa00;
color: #82B92E;
text-transform: uppercase;
}
@ -114,22 +105,25 @@ input#step4, input#step4:hover {
background-color: #fafafa;
}
div.warn {
background: url(../../images/warn.png) no-repeat 0% -2px;
color: #880;
margin-top: 7px;
padding: 2px 1px 6px 30px;
min-height: 24px;
background: url(../../images/icono_warning_install.png) no-repeat 0% -2px;
color: #222;
margin-top: 14px;
padding: 2px 1px 6px 40px;
}
div.info {
background: url(../../images/info.png) no-repeat 0% -2px;
color: #222;
margin-top: 7px;
padding: 2px 1px 6px 30px;
min-height: 24px;
background: url(../../images/icono_info_install.png) no-repeat 0% -2px;
color: #222;
margin-top: 14px;
padding: 2px 1px 6px 40px;
}
div.err {
background: url(../../images/error_red.png) no-repeat 0% -2px;
color: #cc0000;
margin-top: 7px;
padding: 2px 1px 6px 30px;
min-height: 24px;
background: url(../../images/icono_critical_install.png) no-repeat 0% -2px;
color: #cc0000;
margin-top: 14px;
padding: 2px 1px 6px 40px;
}
span.arr {
background: url(../../images/arrow.png) no-repeat;
@ -152,8 +146,22 @@ body{
}
div.installation_step {
position: absolute;
position: static;
float: right;
top: 7px;
right: 10px;
color: #666;
margin-top: 14px;
margin-right: 12px;
}
.btn_install_next {
margin: 10px;
padding: 8px 20px 8px 20px;
background-color: transparent;
border: 1px solid #82B92E;
font: bold 1em Verdana;
font-size: 14pt;
color: #82B92E;
border-radius: 0%;
}

View File

@ -3006,11 +3006,30 @@ table#policy_modules td * {
padding: 10px 30px;
font-size: 20px;
font-weight: bold;
height: 66px;
width: 191px;
border-radius: 2px;
}
div.sumary_div{
color: #FFF;
font-size: 20px;
font-weight: bold;
border-radius: 2px;
width: 120px;
height: 40px;
text-align: center;
display: table-cell;
vertical-align: middle;
}
div.div_groups_status{
width: 350px;
background-color: white;
border: 1px solid #ECECEC;
border-radius: 5px;
margin: 20px;
float:left;
}
.databox.data>tbody>tr>td{
border-bottom: 1px solid #E2E2E2;
}

View File

@ -71,7 +71,7 @@
<div style='height: 10px'>
<?php
$version = 'NG_BETA';
$build = '170302';
$build = '170308';
$banner = "v$version Build $build";
error_reporting(0);
@ -150,41 +150,52 @@ function check_exists ( $file, $label ) {
}
function check_generic ( $ok, $label ) {
echo "<tr><td>";
echo "<span class='arr'> $label </span>";
echo "</td><td>";
echo "<tr><td style='width:10%'>";
if ($ok == 0 ) {
echo " <img src='images/dot_red.png'>";
echo "<td>";
echo "<span class='arr'> $label </span>";
echo "</td>";
echo "</td></tr>";
return 1;
}
else {
echo " <img src='images/dot_green.png'>";
echo "<td>";
echo "<span class='arr'> $label </span>";
echo "</td>";
echo "</td></tr>";
return 0;
}
echo "</td></tr>";
}
function check_writable ( $fullpath, $label ) {
echo "<tr><td>";
echo "<span class='arr'> $label </span>";
echo "</td><td>";
echo "<tr><td style='width:10%;'>";
if (file_exists($fullpath))
if (is_writable($fullpath)) {
echo " <img src='images/dot_green.png'>";
echo " <img style='margin-left:50px;' src='images/dot_green.png'>";
echo "<td>";
echo "<span class='arr'> $label </span>";
echo "</td>";
echo "</td></tr>";
return 0;
}
else {
echo " <img src='images/dot_red.png'>";
echo " <img style='margin-left:50px;' src='images/dot_red.png'>";
echo "<td>";
echo "<span class='arr'> $label </span>";
echo "</td>";
echo "</td></tr>";
return 1;
}
else {
echo " <img src='images/dot_red.png'>";
echo " <img style='margin-left:50px;' src='images/dot_red.png'>";
echo "<td>";
echo "<span class='arr'> $label </span>";
echo "</td>";
echo "</td></tr>";
return 1;
}
}
function check_variable ( $var, $value, $label, $mode ) {
@ -258,160 +269,6 @@ function parse_mysqli_dump($connection, $url) {
return 0;
}
function parse_postgresql_dump($connection, $url, $debug = false) {
if (file_exists($url)) {
$file_content = file($url);
$query = "";
foreach ($file_content as $sql_line) {
$clean_line = trim($sql_line);
$comment = preg_match("/^(\s|\t)*--.*$/", $clean_line);
if ($comment) {
continue;
}
if (empty($clean_line)) {
continue;
}
$query .= $clean_line;
//Check if the end of query with the the semicolon and any returns in the end of line
if(preg_match("/;[\040]*\$/", $clean_line)) {
//And execute and clean buffer
pg_send_query($connection, $query);
$result = pg_get_result($connection);
if ($debug) {
var_dump($query);
var_dump(pg_result_error($result));
}
if (pg_result_status($result) == PGSQL_FATAL_ERROR) {
echo pg_result_error($result);
echo "<i><br>$query<br></i>";
return 0;
}
$query = "";
}
}
return 1;
}
else {
return 0;
}
}
function parse_oracle_dump($connection, $url, $debug = false) {
if (file_exists($url)) {
$file_content = file($url);
$query = "";
$plsql_block = false;
$datetime_tz_format = oci_parse($connection, 'alter session set NLS_TIMESTAMP_TZ_FORMAT =\'YYYY-MM-DD HH24:MI:SS\'');
$datetime_format = oci_parse($connection, 'alter session set NLS_TIMESTAMP_FORMAT =\'YYYY-MM-DD HH24:MI:SS\'');
$date_format = oci_parse($connection, 'alter session set NLS_DATE_FORMAT =\'YYYY-MM-DD HH24:MI:SS\'');
$decimal_separator = oci_parse($connection, 'alter session set NLS_NUMERIC_CHARACTERS =\',.\'');
oci_execute($datetime_tz_format);
oci_execute($datetime_format);
oci_execute($date_format);
oci_execute($decimal_separator);
oci_free_statement($datetime_tz_format);
oci_free_statement($datetime_format);
oci_free_statement($date_format);
oci_free_statement($decimal_separator);
foreach ($file_content as $sql_line) {
$clean_line = trim($sql_line);
$comment = preg_match("/^(\s|\t)*--.*$/", $clean_line);
if ($comment) {
continue;
}
if (empty($clean_line)) {
continue;
}
//Support for PL/SQL blocks
if (preg_match("/^BEGIN$/", $clean_line)) {
$query .= $clean_line . ' ';
$plsql_block = true;
}
else {
$query .= $clean_line;
}
//Check query's end with a back slash and any returns in the end of line or if it's a PL/SQL block 'END;;' string
if ((preg_match("/;[\040]*\$/", $clean_line) && !$plsql_block) ||
(preg_match("/^END;;[\040]*\$/", $clean_line) && $plsql_block)) {
$plsql_block = false;
//Execute and clean buffer
//Delete the last semicolon from current query
$query = substr($query, 0, strlen($query) - 1);
$sql = oci_parse($connection, $query);
$result = oci_execute($sql);
if ($debug) {
var_dump($query);
}
if (!$result) {
$e = oci_error($sql);
echo "<tr><td><div class='warn'>Errors creating schema:</div><div style=\"overflow:auto; height:50px;\" >";
echo htmlentities($e['message'], ENT_QUOTES);
echo "<i><br>$query<br></i>";
echo "</div></td></tr>";
return 0;
}
$query = "";
oci_free_statement($sql);
}
}
return 1;
}
else {
return 0;
}
}
function oracle_drop_all_objects ($connection) {
//Drop all objects of the current installation
$stmt = oci_parse($connection,
"BEGIN " .
"FOR cur_rec IN (SELECT object_name, object_type " .
"FROM user_objects " .
"WHERE object_type IN ('TABLE', 'VIEW', 'PACKAGE', 'PROCEDURE', 'FUNCTION', 'SEQUENCE', 'SNAPSHOT', 'MATERIALIZED VIEW')) LOOP " .
"BEGIN " .
"IF cur_rec.object_type = 'TABLE' THEN " .
"EXECUTE IMMEDIATE 'DROP ' || cur_rec.object_type || ' \"' || cur_rec.object_name || '\" CASCADE CONSTRAINTS'; " .
"ELSE " .
"EXECUTE IMMEDIATE 'DROP ' || cur_rec.object_type || ' \"' || cur_rec.object_name || '\"'; " .
"END IF; " .
"EXCEPTION " .
"WHEN OTHERS THEN " .
"DBMS_OUTPUT.put_line('FAILED: DROP ' || cur_rec.object_type || ' \"' || cur_rec.object_name || '\"'); " .
"END; " .
"END LOOP; " .
"END; ");
$result = oci_execute($stmt);
oci_free_statement($stmt);
return 0;
}
function random_name ($size) {
$temp = "";
for ($a=0;$a< $size;$a++)
@ -423,16 +280,19 @@ function random_name ($size) {
function print_logo_status ($step, $step_total) {
global $banner;
return "
<div id='logo_img'>
<div>
<img src='images/pandora_tinylogo_open.png' border='0'><br>
<span style='font-size: 9px;'>$banner</span>
</div>
<div class='installation_step'>
<b>Install step $step of $step_total</b>
$header = "
<div id='logo_img' style='width: 100%;'>
<div style='width:100%; background-color:#333333;'>
<img src='images/logo_opensource.png' border='0'><br>
<span style='font-size: 9px;'>$banner</span>
</div>
</div>";
$header .= "
<div class='installation_step'>
<b>Install step $step of $step_total</b>
</div>";
return $header;
}
//
@ -515,14 +375,17 @@ function install_step1() {
If you want to upgrade from Pandora FMS 4.x to 5.0 version, please use the migration tool inside /extras directory in this setup.
</div>";
echo "<br>";
if ($writable == 0) {
echo "<div style='text-align:right; width:100%;'>";
echo "<a id='step11' href='install.php?step=11'><button type='submit' class='btn_install_next'>Next</button></a>";
echo "</div>";
echo "<a id='step11' href='install.php?step=11'><img align='right' style='margin-top: 20px;' src='images/arrow_next.png' border='0'></a>";
}
else {
echo "<div class='err'><b>ERROR:</b>You need to setup permissions to be able to write in ./include directory</div>";
echo "</div>";
}
echo "</div>";
echo "<div style='clear:both;'></div>";
echo "
@ -556,7 +419,7 @@ function install_step1_licence() {
echo file_get_contents ("COPYING");
echo "</textarea>";
echo "<p>";
echo "<div style='text-align: right;'><input type=submit value='Yes, I accept licence terms'></div>";
echo "<div style='text-align: right;'><button id='btn_accept' class='btn_install_next' type='submit'>Yes, I accept licence terms</button></div>";
}
echo "</div>";
@ -612,8 +475,6 @@ function install_step2() {
echo "</td></tr>";
check_extension("mysql", "PHP MySQL extension");
check_extension("mysqli", "PHP MySQL(mysqli) extension");
check_extension("pgsql", "PHP PostgreSQL extension");
check_extension("oci8", "PHP Oracle extension");
echo "</table>";
if ($res > 0) {
@ -628,17 +489,18 @@ function install_step2() {
your HTTP/Apache server after it to use the new
modules.
</div>
<div style='text-align: right;'>
Ignore it. <a href='install.php?step=3' style='font-weight: bolder;'>Force install Step #3</a>
<div style='text-align:right; width:100%;'>
Ignore it. <a id='step3' href='install.php?step=3' style='font-weight: bolder;'><button class='btn_install_next' type='submit'>Force install Step #3</button></a>
</div>";
echo "</div>";
}
else {
echo "<div style='text-align:right; width:100%;'>";
echo "<a id='step3' href='install.php?step=3'>
<button class='btn_install_next' type='submit'>Next</button></a>";
echo "</div>";
echo "<a id='step3' href='install.php?step=3'><br>
<img align='right' src='images/arrow_next.png' border='0' alt=''></a>
<div style='clear: both;'><!-- --></div>";
}
echo "</div>";
echo "<div style='clear: both;'><!-- --></div>";
echo "
</div>
<div style='clear: both;'><!-- --></div>
@ -659,12 +521,6 @@ function install_step3() {
if (extension_loaded("mysqli")) {
$options .= "<option value='mysqli'>MySQL(mysqli)</option>";
}
if (extension_loaded("pgsql")) {
$options .= "<option value='pgsql'>PostgreSQL</option>";
}
if (extension_loaded("oci8")) {
$options .= "<option value='oracle'>Oracle</option>";
}
$error = false;
if (empty($options)) {
@ -778,13 +634,15 @@ function install_step3() {
</table>
";
if (!$error) {
echo "<div style='text-align:right; width:100%;'>";
echo "<a id='step4' href='install.php?step=4'>
<button class='btn_install_next' type='submit'>Next</button></a>";
echo "</div>";
}
echo "</div>";
if (!$error) {
echo "<input type='image' src='images/arrow_next.png' value='Step #4' id='step4'>";
}
echo "</form>";
echo "<div style='clear:both;'></div>";
@ -1034,296 +892,14 @@ function install_step4() {
$everything_ok = 1;
}
break;
case 'oracle':
$connection = oci_connect($dbuser, $dbpassword, '//' . $dbhost . '/' . $dbname);
if (!$connection) {
check_generic(0, "Connection with Database");
}
else {
check_generic(1, "Connection with Database");
// Drop all objects if needed
if ($dbdrop == 1) {
oracle_drop_all_objects($connection);
}
$step1 = parse_oracle_dump($connection, "pandoradb.oracle.sql");
check_generic($step1, "Creating schema");
if ($step1) {
$step2 = parse_oracle_dump($connection, "pandoradb.data.oracle.sql");
}
check_generic ($step2, "Populating database");
if (PHP_OS == "FreeBSD")
{
$step_freebsd = adjust_paths_for_freebsd ($engine, $connection);
check_generic ($step_freebsd, "Adjusting paths in database for FreeBSD");
}
echo "<tr><td><div class='warn'>Please, you will need to setup your Pandora FMS server, editing the </i>/etc/pandora/pandora_server.conf</i> file and set database password.</div></tr></td>";
if ($step2) {
$step3 = is_writable("include");
}
check_generic ($step3, "Write permissions to save config file in './include'");
if ($step3) {
$cfgin = fopen ("include/config.inc.php","r");
$cfgout = fopen ($pandora_config,"w");
$config_contents = fread ($cfgin, filesize("include/config.inc.php"));
$dbtype = 'oracle';
$config_new = '<?php
// Begin of automatic config file
$config["dbtype"] = "' . $dbtype . '"; //DB type (mysql, postgresql, oracle)
$config["dbname"]="' . $dbname . '"; // Oracle DataBase name
$config["dbuser"]="' . $dbuser . '"; // DB User
$config["dbpass"]="' . $dbpassword . '"; // DB Password
$config["dbhost"]="' . $dbhost . '"; // DB Host
$config["homedir"]="' . $path . '"; // Config homedir
/*
----------Attention--------------------
Please note that in certain installations:
- reverse proxy.
- web server in other ports.
- https
This variable might be dynamically altered.
But it is save as backup in the
$config["homeurl_static"]
for expecial cases.
----------Attention--------------------
*/
$config["homeurl"]="' . $url . '"; // Base URL
$config["homeurl_static"]="'.$url.'"; // Don\'t delete
// End of automatic config file
?>';
$step4 = fputs ($cfgout, $config_new);
$step4 = $step4 + fputs ($cfgout, $config_contents);
if ($step4 > 0)
$step4 = 1;
fclose ($cfgin);
fclose ($cfgout);
chmod ($pandora_config, 0600);
}
check_generic ($step4, "Created new config file at '" . $pandora_config . "'");
if (($step4 + $step3 + $step2 + $step1) == 4) {
$everything_ok = 1;
}
}
break;
case 'pgsql':
$step1 = $step2 = $step3 = $step4 = $step5 = $step6 = $step7 = 0;
$connection = pg_connect("host='" . $dbhost . "' dbname='postgres' user='" . $dbuser . "' password='" . $dbpassword . "'");
if ($connection === false) {
check_generic(0, "Connection with Database");
}
else {
check_generic(1, "Connection with Database");
// Drop database if needed
if ($dbdrop == 1 && $dbaction == 'db_exist') {
$result = pg_query($connection, "DROP DATABASE \"" . $dbname . "\";");
}
if ($dbaction != 'db_exist' || $dbdrop == 1) {
pg_send_query($connection, "CREATE DATABASE \"" . $dbname . "\" WITH ENCODING 'utf8';");
$result = pg_get_result($connection);
if (pg_result_status($result) != PGSQL_FATAL_ERROR) {
$step1 = 1;
}
check_generic ($step1, "Creating database '$dbname'");
}
else {
$step1 = 1;
}
check_generic ($step1, "Creating database '$dbname'");
if ($step1 == 1) {
//Reopen DB because I don't know how to use DB in PostgreSQL
pg_close($connection);
$connection = pg_connect("host='" . $dbhost . "' dbname='" . $dbname .
"' user='" . $dbuser . "' password='" . $dbpassword . "'");
if ($connection !== false) {
$step2 = 1;
}
}
check_generic ($step2, "Opening database '$dbname'");
if ($step2) {
$step3 = parse_postgresql_dump($connection, "pandoradb.postgreSQL.sql");
}
check_generic($step3, "Creating schema");
if ($step3) {
$step4 = parse_postgresql_dump($connection, "pandoradb.data.postgreSQL.sql");
}
check_generic ($step4, "Populating database");
if (PHP_OS == "FreeBSD") {
$step_freebsd = adjust_paths_for_freebsd ($engine, $connection);
check_generic ($step_freebsd, "Adjusting paths in database for FreeBSD");
}
if ($step4) {
$random_password = random_name (8);
pg_query($connection, "DROP USER pandora");
pg_send_query($connection, "CREATE USER pandora WITH PASSWORD '" . $random_password . "'");
$result = pg_get_result($connection);
if (pg_result_status($result) != PGSQL_FATAL_ERROR) {
//Set the privileges for DB
pg_send_query($connection, "GRANT ALL PRIVILEGES ON DATABASE pandora TO pandora;");
$result = pg_get_result($connection);
$setDBPrivileges = 0;
if (pg_result_status($result) != PGSQL_FATAL_ERROR) {
$setDBPrivileges = 1;
}
if ($setDBPrivileges) {
//Set the privileges for each tables.
pg_send_query($connection, "SELECT table_name FROM information_schema.tables WHERE table_schema = 'public';");
$result = pg_get_result($connection);
$tables = array();
while ($row = pg_fetch_assoc($result)) {
$tables[] = $row['table_name'];
}
$correct = 1;
foreach ($tables as $table) {
pg_send_query($connection, "GRANT ALL PRIVILEGES ON TABLE " . $table . " TO pandora;");
$result = pg_get_result($connection);
if (pg_result_status($result) == PGSQL_FATAL_ERROR) {
$correct = 0;
break;
}
//For each table make owner pandora
pg_send_query($connection, "ALTER TABLE " . $table . " OWNER TO pandora;");
$result = pg_get_result($connection);
if (pg_result_status($result) == PGSQL_FATAL_ERROR) {
$correct = 0;
break;
}
//INI ----- Grant for secuences
pg_send_query($connection, "SELECT column_name FROM information_schema.columns WHERE table_name = '" . $table . "';");
$result2 = pg_get_result($connection);
$columns = array();
while ($row = pg_fetch_assoc($result2)) {
$columns[] = $row['column_name'];
}
//Check for each column if it have a sequence to grant
foreach ($columns as $column) {
pg_send_query($connection, "SELECT pg_get_serial_sequence('" . $table . "', '" . $column . "');");
$result3 = pg_get_result($connection);
$sequence = pg_fetch_assoc($result3);
if (!empty($sequence['pg_get_serial_sequence'])) {
pg_send_query($connection, "GRANT ALL PRIVILEGES ON SEQUENCE " . $sequence['pg_get_serial_sequence'] . " to pandora;");
$result4 = pg_get_result($connection);
if (pg_result_status($result4) == PGSQL_FATAL_ERROR) {
$correct = 0;
break;
}
}
}
//END ----- Grant for secuences
}
if ($correct) {
$step5 = 1;
}
}
}
}
check_generic ($step5, "Established privileges for user pandora. A new random password has been generated: <b>$random_password</b><div class='warn'>Please write it down, you will need to setup your Pandora FMS server, editing the </i>/etc/pandora/pandora_server.conf</i> file</div>");
if ($step5) {
$step6 = is_writable("include");
}
check_generic ($step6, "Write permissions to save config file in './include'");
if ($step6) {
$cfgin = fopen ("include/config.inc.php","r");
$cfgout = fopen ($pandora_config,"w");
$config_contents = fread ($cfgin, filesize("include/config.inc.php"));
$dbtype = 'postgresql';
$config_new = '<?php
// Begin of automatic config file
$config["dbtype"] = "' . $dbtype . '"; //DB type (mysql, postgresql...in future others)
$config["dbname"]="'.$dbname.'"; // MySQL DataBase name
$config["dbuser"]="pandora"; // DB User
$config["dbpass"]="'.$random_password.'"; // DB Password
$config["dbhost"]="'.$dbhost.'"; // DB Host
$config["homedir"]="'.$path.'"; // Config homedir
/*
----------Attention--------------------
Please note that in certain installations:
- reverse proxy.
- web server in other ports.
- https
This variable might be dynamically altered.
But it is save as backup in the
$config["homeurl_static"]
for expecial cases.
----------Attention--------------------
*/
$config["homeurl"]="'.$url.'"; // Base URL
$config["homeurl_static"]="'.$url.'"; // Don\'t delete
// End of automatic config file
?>';
$step7 = fputs ($cfgout, $config_new);
$step7 = $step7 + fputs ($cfgout, $config_contents);
if ($step7 > 0)
$step7 = 1;
fclose ($cfgin);
fclose ($cfgout);
chmod ($pandora_config, 0600);
}
check_generic ($step7, "Created new config file at '".$pandora_config."'");
if (($step7 + $step6 + $step5 + $step4 + $step3 + $step2 + $step1) == 7) {
$everything_ok = 1;
}
}
break;
}
echo "</table>";
if ($everything_ok == 1) {
echo "<div style='text-align:right; width:100%;'>";
echo "<a id='step5' href='install.php?step=5'>
<button class='btn_install_next' type='submit'>Next</button></a>";
echo "</div>";
echo "<div style='margin-top: 20px;'><a id='step5' href='install.php?step=5'>
<img align='right' src='images/arrow_next.png' border='0' alt=''></a></div>";
}
else {
$info = "<div class='err'><b>There were some problems.
@ -1358,15 +934,10 @@ function install_step4() {
mysqli_query ($connection, "DROP DATABASE $dbname");
}
break;
case 'pgsql':
break;
case 'oracle':
oracle_drop_all_objects($connection);
break;
}
echo "</div>";
}
echo "</div>";
echo "<div style='clear: both;'></div>";
echo "
</div>
@ -1395,10 +966,10 @@ function install_step5() {
for updates.
<p>Select if you want to rename '<i>install.php</i>'.</p>
<form method='post' action='index.php'>
<input type='submit' name='rn_file' value='Yes, rename the file'>
<button class='btn_install_next' type='submit' name='rn_file'>Yes, rename the file</button>
<input type='hidden' name='rename_file' value='1'>
</form>
<p><br><b><a id='access_pandora' href='index.php'>Click here to access to your Pandora FMS console</a>.</b>
<p><br><b><a id='access_pandora' href='index.php'><button class='btn_install_next' type='submit'>Click here to access to your Pandora FMS console</button></a>.</b>
</p>
</div>";

View File

@ -157,19 +157,15 @@ $data_agents = array(
$table->data[1][0] = reporting_get_stats_alerts($data);
$table->data[2][0] = reporting_get_stats_modules_status($data, 180, 100, false, $data_agents);
$table->data[3][0] = reporting_get_stats_agents_monitors($data);
$table->rowclass[] = '';
// ---------------------------------------------------------------------
// Server performance
// ---------------------------------------------------------------------
if ($is_admin) {
$table->data[4][0] = reporting_get_stats_servers(false);
$table->rowclass[] = '';
}
html_print_table($table);
@ -178,7 +174,6 @@ echo '</td>'; //Left column
echo '<td style="vertical-align: top; width: 75%; padding-top: 0px;" id="rightcolumn">';
// ---------------------------------------------------------------------
// Last events information
// ---------------------------------------------------------------------

View File

@ -490,35 +490,33 @@ if (is_ajax ()) {
asort($result);
}
else {
if(implode(',', $idAgents) < 0){
$sql = 'SELECT DISTINCT(nombre) FROM tagente_modulo
WHERE nombre IN (
SELECT nombre
FROM tagente_modulo
GROUP BY nombre
HAVING count(nombre) = (SELECT count(nombre) FROM tagente_modulo))';
}
else{
$sql = 'SELECT DISTINCT(nombre)
FROM tagente_modulo t1
WHERE ' . $filter . '
AND t1.delete_pending = 0
AND t1.id_agente IN (' . implode(',', $idAgents) . ')';
if ($selection_mode == 'common') {
$sql .= ' AND (
SELECT count(nombre)
FROM tagente_modulo t2
WHERE t2.delete_pending = 0
AND t1.nombre = t2.nombre
AND t2.id_agente IN (' . implode(',', $idAgents) . ')) = (' . count($idAgents) . ')';
}elseif ($selection_mode == 'unknown'){
$sql .= 'AND t1.id_agente_modulo IN (SELECT id_agente_modulo FROM tagente_estado where estado = 3 OR estado = 4)';
if(implode(',', $idAgents) < 0) {
$sql = 'SELECT DISTINCT(nombre) FROM tagente_modulo
WHERE nombre IN (
SELECT nombre
FROM tagente_modulo
GROUP BY nombre
HAVING count(nombre) = (SELECT count(nombre) FROM tagente_modulo))';
}
else {
$sql = 'SELECT DISTINCT(nombre)
FROM tagente_modulo t1
WHERE ' . $filter . '
AND t1.delete_pending = 0
AND t1.id_agente IN (' . implode(',', $idAgents) . ')';
if ($selection_mode == 'common') {
$sql .= ' AND (
SELECT count(nombre)
FROM tagente_modulo t2
WHERE t2.delete_pending = 0
AND t1.nombre = t2.nombre
AND t2.id_agente IN (' . implode(',', $idAgents) . ')) = (' . count($idAgents) . ')';
}
elseif ($selection_mode == 'unknown') {
$sql .= 'AND t1.id_agente_modulo IN (SELECT id_agente_modulo FROM tagente_estado where estado = 3 OR estado = 4)';
}
}
}
$sql .= ' ORDER BY nombre';
$nameModules = db_get_all_rows_sql($sql);
@ -1155,57 +1153,53 @@ if (isset($ehorus_tab) && !empty($ehorus_tab)) {
//Tabs for extensions
foreach ($config['extensions'] as $extension) {
if (isset($extension['extension_ope_tab'])) {
//VMware extension is only available for VMware OS
if ($extension['extension_ope_tab']['id'] === "vmware_manager") {
//Check if OS is vmware
$id_remote_field = db_get_value ("id_field",
"tagent_custom_fields", "name", "vmware_type");
$vmware_type = db_get_value_filter("description",
"tagent_custom_data",
array("id_field" => $id_remote_field, "id_agent" => $agent["id_agente"]));
if ($vmware_type != "vm") {
continue;
if (check_acl($config['id_user'], $id_grupo, $extension['extension_ope_tab']['acl'])) {
//VMware extension is only available for VMware OS
if ($extension['extension_ope_tab']['id'] === "vmware_manager") {
//Check if OS is vmware
$id_remote_field = db_get_value ("id_field",
"tagent_custom_fields", "name", "vmware_type");
$vmware_type = db_get_value_filter("description",
"tagent_custom_data",
array("id_field" => $id_remote_field, "id_agent" => $agent["id_agente"]));
if ($vmware_type != "vm") {
continue;
}
}
}
//RHEV extension is only available for RHEV Virtual Machines
if ($extension['extension_ope_tab']['id'] === "rhev_manager") {
//Get id for remote field "rhev_type"
$id_remote_field = db_get_value("id_field", "tagent_custom_fields", "name", "rhev_type");
//Get rhev type for this agent
$rhev_type = db_get_value_filter ("description", "tagent_custom_data", array ("id_field" => $id_remote_field, "id_agent" => $agent['id_agente']));
//Check if rhev type is a vm
if ($rhev_type != "vm") {
continue;
//RHEV extension is only available for RHEV Virtual Machines
if ($extension['extension_ope_tab']['id'] === "rhev_manager") {
//Get id for remote field "rhev_type"
$id_remote_field = db_get_value("id_field", "tagent_custom_fields", "name", "rhev_type");
//Get rhev type for this agent
$rhev_type = db_get_value_filter ("description", "tagent_custom_data", array ("id_field" => $id_remote_field, "id_agent" => $agent['id_agente']));
//Check if rhev type is a vm
if ($rhev_type != "vm") {
continue;
}
}
$image = $extension['extension_ope_tab']['icon'];
$name = $extension['extension_ope_tab']['name'];
$id = $extension['extension_ope_tab']['id'];
$id_extension = get_parameter('id_extension', '');
if ($id_extension == $id) {
$active = true;
}
else {
$active = false;
}
$url = 'index.php?sec=estado&sec2=operation/agentes/ver_agente&tab=extension&id_agente='.$id_agente . '&id_extension=' . $id;
$extension_tab = array('text' => '<a href="' . $url .'">' . html_print_image ($image, true, array ( "title" => $name)) . '</a>', 'active' => $active);
$onheader = $onheader + array($id => $extension_tab);
}
$image = $extension['extension_ope_tab']['icon'];
$name = $extension['extension_ope_tab']['name'];
$id = $extension['extension_ope_tab']['id'];
$id_extension = get_parameter('id_extension', '');
if ($id_extension == $id) {
$active = true;
}
else {
$active = false;
}
$url = 'index.php?sec=estado&sec2=operation/agentes/ver_agente&tab=extension&id_agente='.$id_agente . '&id_extension=' . $id;
$extension_tab = array('text' => '<a href="' . $url .'">' . html_print_image ($image, true, array ( "title" => $name)) . '</a>', 'active' => $active);
$onheader = $onheader + array($id => $extension_tab);
}
}

View File

@ -31,52 +31,56 @@ if (! check_acl ($config['id_user'], 0, "ER") && ! check_acl ($config['id_user']
//header
ui_print_page_header (__('Statistics'), "images/op_events.png",false, false);
echo "<table width=95%>";
echo "<tr>";
echo "<td valign='top'>";
echo "<h3>" . __('Event graph') . "</h3>";
echo "</td>";
echo "<tr>";
echo "<td valign='top'>";
echo "<h3>" . __('Event graph') . "</h3>";
echo "</td>";
echo "<td valign='top'>";
echo "<h3>" . __('Event graph by user') . "</h3>";
echo "</td>";
echo "<td valign='top'>";
echo "<h3>" . __('Event graph by user') . "</h3>";
echo "</td>";
echo "</tr>";
echo "</tr>";
echo "<tr>";
echo "<td valign='top'>";
echo grafico_eventos_total();
echo "</td>";
echo "<tr>";
echo "<td valign='top'>";
echo grafico_eventos_usuario(300, 200);
echo "</td>";
echo "</tr>";
echo "<td valign='top'>";
echo grafico_eventos_total();
echo "</td>";
echo "<tr>";
echo "<td valign='top'>";
echo "<h3>" . __('Event graph by agent') . "</h3>";
echo "</td>";
echo "<td valign='top'>";
echo grafico_eventos_usuario(300, 200);
echo "</td>";
echo "<td valign='top'>";
echo "<h3>" . __('Amount events validated') . "</h3>";
echo "</td>";
echo "</tr>";
echo "</tr>";
$where = '';
if (!users_is_admin()) {
$where = 'AND event_type NOT IN (\'recon_host_detected\', \'system\',\'error\', \'new_agent\', \'configuration_change\')';
}
echo "<tr>";
echo "<td valign='top'>";
echo grafico_eventos_grupo(300, 200, $where);
echo "</td>";
echo "<tr>";
echo "<td valign='top'>";
$extra_filter = array();
if (!users_is_admin()) {
$extra_filter['event_type'] = array('unknown','alert_fired','alert_recovered',
'alert_ceased','alert_manual_validation', 'critical',
'warning','normal');
}
echo graph_events_validated(300, 200, $extra_filter);
echo "</td>";
echo "</tr>";
echo "<td valign='top'>";
echo "<h3>" . __('Event graph by agent') . "</h3>";
echo "</td>";
echo "<td valign='top'>";
echo "<h3>" . __('Amount events validated') . "</h3>";
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td valign='top'>";
echo grafico_eventos_grupo(300, 200);
echo "</td>";
echo "<td valign='top'>";
echo graph_events_validated(300, 200);
echo "</td>";
echo "</tr>";
echo "</table>";
?>

View File

@ -259,6 +259,9 @@ else {
$table->head[$i] = html_print_checkbox ("all_validate_box", "1", false, true);
$table->align[$i] = 'left';
}
else {
$table->head[$i] = '';
}
}
if ($meta) {

View File

@ -69,35 +69,42 @@ echo "<h1 class='modalheaderh1'>" . __("Sound console"). "</h1>";
$table = null;
$table->width = '100%';
$table->class = ' ';
$table->size[0] = '10%';
$table->style[0] = 'font-weight: bold; vertical-align: top;';
$table->style[1] = 'font-weight: bold; vertical-align: top;';
$table->style[2] = 'font-weight: bold; vertical-align: top;';
$table->data[0][0] = __('Group');
$table->data[0][0] .= html_print_select_groups(false, $access, true, 'group', '', 'changeGroup();', '', 0, true) . '<br />' . '<br />';
$table->data[0][0] .= __('Agent');
$table->data[0][0] .= html_print_select($agents, 'id_agents[]', true, false, '', '', true, true,'','','','','',false,'','',true);
$table->data[0][1] = __('Type');
$table->data[0][1] .= '<br />' . html_print_checkbox('alert_fired', 'alert_fired', true, true, false, 'changeType();') . __('Alert fired') . '<br />' .
$table->data[0][1] .= html_print_select_groups(false, $access, true, 'group', '', 'changeGroup();', '', 0, true) . '<br />' . '<br />';
$table->data[1][0] .= __('Agent');
$table->data[1][1] .= html_print_select($agents, 'id_agents[]', true, false, '', '', true, true,'','','','','',false,'','',true);
$table->data[0][2] = __('Type');
$table->data[0][3] .= html_print_checkbox('alert_fired', 'alert_fired', true, true, false, 'changeType();') . __('Alert fired') . '<br />' .
html_print_checkbox('critical', 'critical', true, true, false, 'changeType();') . __('Monitor critical') . '<br />' .
html_print_checkbox('unknown', 'unknown', true, true, false, 'changeType();') . __('Monitor unknown') . '<br />' .
html_print_checkbox('warning', 'warning', true, true, false, 'changeType();') . __('Monitor warning') . '<br />';
html_print_table($table);
echo '<br />';
echo '<div style="text-align:center">';
echo '<a href="javascript: toggleButton();">' .
html_print_image("images/play.button.png", true, array("id" => "button")) .
'</a>';
echo '<a href="javascript: ok();">' .
html_print_image("images/ok.button.png", true, array("style" => "margin-left: 15px;")) .
'</a>';
echo '<a href="javascript: test_sound_button();">' .
html_print_image("images/icono_test.png", true, array("id" => "button_try", "style" => "margin-left: 15px;")) .
'</a>';
echo '</div>';
echo '<br>';
$table = null;
$table->width = '100%';
$table->class = ' ';
$table->bgcolor = 'white';
$table->data[0][0] = '<a href="javascript: toggleButton();">' .
html_print_image("images/play.button.png", true, array("id" => "button")) .
'</a>';
$table->data[0][1] .= '<a href="javascript: ok();">' .
html_print_image("images/ok.button.png", true, array("style" => "margin-left: 15px;")) .
'</a>';
$table->data[0][2] .= '<a href="javascript: test_sound_button();">' .
html_print_image("images/icono_test.png", true, array("id" => "button_try", "style" => "margin-left: 15px;")) .
'</a>';
html_print_table($table);
?>
<script src="../../include/javascript/jquery.js" type="text/javascript"></script>
<script type="text/javascript">
@ -120,7 +127,7 @@ var test_sound = false;
function test_sound_button() {
if (!test_sound) {
$("#button_try").attr('src', '../../images/icono_test_active.png');
$("#button_try").attr('src', '../../images/icono_test.png');
$('body').append("<audio src='../../include/sounds/Star_Trek_emergency_simulation.wav' autoplay='true' hidden='true' loop='false'>");
test_sound = true;
}
@ -141,8 +148,7 @@ function changeGroup() {
},
function (data) {
$("#id_agents").empty();
$("#id_agents").style("size", 0);
jQuery.each (data, function (id, value) {
if (value != "") {
$("#id_agents").append('<option value="' + id + '">' + value + '</option>');
@ -274,6 +280,8 @@ function animation() {
$(document).ready (function () {
setInterval("check_event()", (10 * 1000)); //10 seconds between ajax request
setInterval("animation()", (0.1 * 1000));
$("#table1").css("background-color", "#fff");
$("#table2").css("background-color", "#fff");
});
</script>
<?php

View File

@ -31,7 +31,9 @@ $confMap = gis_get_map_conf($idMap);
// Default open map (used to overwrite unlicensed google map view)
$confMapDefault = get_good_con();
$confMapUrlDefault = json_decode($confMapDefault['conection_data'], true)['url'];
$confMapDefaultFull = array();
$confMapDefaultUrlFull = json_decode($confMapDefault['conection_data'], true);
$confMapUrlDefault = $confMapDefaultFull['url'];
if (! check_acl ($config['id_user'], $map['group_id'], "MR") && ! check_acl ($config['id_user'], $map['group_id'], "MW") && ! check_acl ($config['id_user'], $map['group_id'], "MM")) {
db_pandora_audit("ACL Violation", "Trying to access map builder");

View File

@ -215,6 +215,9 @@ if ($enable_init_date) {
$report = reporting_make_reporting_data(null, $id_report, $date, $time,
$period, 'dinamic');
for ($i=0; $i < sizeof($report['contents']); $i++) {
$report['contents'][$i]['description'] = str_replace('&#x0d;&#x0a;','<br/>',$report['contents'][$i]['description']);
}
reporting_html_print_report($report,false,$config['custom_report_info']);

View File

@ -100,7 +100,10 @@ if ($vconsole_write || $vconsole_manage) {
$hash = md5($config["dbpass"] . $id_layout . $config["id_user"]);
$options['public_link']['text'] = '<a href="' . ui_get_full_url('operation/visual_console/public_console.php?hash='.$hash.'&id_layout='.$id_layout.'&id_user='.$config["id_user"]) . '" target="_blank">'.
$options['public_link']['text'] = '<a href="' .
ui_get_full_url('operation/visual_console/public_console.php?hash=' .
$hash.'&id_layout='.$id_layout.'&id_user='.$config["id_user"]) .
'" target="_blank">'.
html_print_image ("images/camera_mc.png", true,
array ("title" => __('Show link to public Visual Console'))).'</a>';
$options['public_link']['active'] = false;
@ -149,11 +152,11 @@ if ($config['pure']) {
// Container of the visual map (ajax loaded)
echo '<div id="vc-container">' .
visual_map_print_visual_map ($id_layout, true, true,
null, null, '', false, $graph_javascript)
null, null, '', false, true)
. '</div>';
// Floating menu - Start
echo '<div id="vc-controls">';
echo '<div id="vc-controls" style="z-index: 999">';
echo '<div id="menu_tab">';
echo '<ul class="mn">';
@ -204,7 +207,7 @@ if ($config['pure']) {
<?php
}
else {
visual_map_print_visual_map ($id_layout, true, true, null, null, '', false, $graph_javascript, true);
visual_map_print_visual_map ($id_layout, true, true, null, null, '', false, true, true);
}
ui_require_javascript_file('wz_jsgraphics');
@ -234,35 +237,13 @@ $ignored_params['refr'] = '';
url = js_html_entity_decode( href ) + duration;
//$(document).attr ("location", url);
$.get(window.location.href.replace("render_view","pure_ajax"), function(respuestaSolicitud){
$('#background_<?php echo $id_layout; ?>').html(respuestaSolicitud);
$('#background_<?php echo $id_layout; ?>').html(respuestaSolicitud);
startCountDown(refr, false);
});
}
});
}
//~ var fetchMap = function () {
//~ $.ajax({
//~ url: 'ajax.php',
//~ type: 'GET',
//~ dataType: 'html',
//~ data: {
//~ page: 'include/ajax/visual_console.ajax',
//~ render_map: true,
//~ keep_aspect_ratio: true,
//~ id_visual_console: <?php echo $id_layout; ?>,
//~ graph_javascript: <?php echo (int) $graph_javascript; ?>,
//~ width: $(window).width(),
//~ height: $(window).height()
//~ }
//~ })
//~ .done(function (data, textStatus, xhr) {
//~ $('div#vc-container').html(data);
//~ startCountDown(refr, false);
//~ });
//~ }
startCountDown(refr, false);
//~ // Auto hide controls
var controls = document.getElementById('vc-controls');
@ -272,9 +253,6 @@ $ignored_params['refr'] = '';
refr = Number.parseInt(event.target.value, 10);
startCountDown(refr, false);
});
//~ // Start the map fetch
//~ fetchMap();
}
else {
$('#refr').change(function () {
@ -282,77 +260,52 @@ $ignored_params['refr'] = '';
});
}
/*
$(".module_graph").each(function(){
left = parseInt($(this).css("left")) + 150 + ((parseInt($(this).css("width"))-300)/2);
$(this).css('left', left);
});
$('.item:not([class~="module_graph"])').each(function(){
left = parseInt($(this).css('left')) + ((parseInt($('#' + $(this).attr('id')).css('width')) - parseInt($('#' + $(this).attr('id') + " img").css('width')))*0.5);
$(this).css('left', left);
});
*/
$(".module_graph .menu_graph").css('display','none');
$(".parent_graph").each(function(){
if($(this).css('background-color') != 'rgb(255, 255, 255)'){
$(this).css('color', '#999');
}
});
$(".parent_graph").each( function() {
if ($(this).css('background-color') != 'rgb(255, 255, 255)')
$(this).css('color', '#999');
});
$(".overlay").removeClass("overlay").addClass("overlaydisabled");
$('.item:not(.icon) img').each(function(){
if($(this).css('float')=='left' || $(this).css('float')=='right'){
$(this).css('margin-top',(parseInt($(this).parent().parent().css('height'))/2-parseInt($(this).css('height'))/2)+'px');
$(this).css('margin-left','');
$('.item:not(.icon) img').each( function() {
if ($(this).css('float')=='left' || $(this).css('float')=='right') {
$(this).css('margin-top',(parseInt($(this).parent().parent().css('height'))/2-parseInt($(this).css('height'))/2)+'px');
$(this).css('margin-left','');
}
else{
else {
$(this).css('margin-left',(parseInt($(this).parent().parent().css('width'))/2-parseInt($(this).css('width'))/2)+'px');
$(this).css('margin-top','');
}
});
$('.item > div').each(function(){
if($(this).css('float')=='left' || $(this).css('float')=='right'){
$(this).css('margin-top',(parseInt($(this).parent().css('height'))/2-parseInt($(this).css('height'))/2-15)+'px');
$(this).css('margin-left','');
$('.item > div').each( function() {
if ($(this).css('float')=='left' || $(this).css('float')=='right') {
$(this).css('margin-top',(parseInt($(this).parent().css('height'))/2-parseInt($(this).css('height'))/2-15)+'px');
$(this).css('margin-left','');
}
else{
else {
$(this).css('margin-left',(parseInt($(this).parent().css('width'))/2-parseInt($(this).css('width'))/2)+'px');
$(this).css('margin-top','');
}
});
$('.item > a > div').each(function(){
if($(this).css('float')=='left' || $(this).css('float')=='right'){
$(this).css('margin-top',(parseInt($(this).parent().parent().css('height'))/2-parseInt($(this).css('height'))/2-5)+'px');
$(this).css('margin-left','');
$('.item > a > div').each( function() {
if ($(this).css('float')=='left' || $(this).css('float')=='right') {
$(this).css('margin-top',(parseInt($(this).parent().parent().css('height'))/2-parseInt($(this).css('height'))/2-5)+'px');
$(this).css('margin-left','');
}
else{
else {
$(this).css('margin-left',(parseInt($(this).parent().parent().css('width'))/2-parseInt($(this).css('width'))/2)+'px');
$(this).css('margin-top','');
}
});
$(".graph").each(function(){
height = parseInt($(this).css("height")) - 30;
$(this).css('height', height);
});
/*
@ -374,4 +327,4 @@ $ignored_params['refr'] = '';
*/
});
</script>
</script>

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_console
%define version NG_BETA
%define release 170302
%define release 170308
# User and Group under which Apache is running
%define httpd_name httpd

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_console
%define version NG_BETA
%define release 170302
%define release 170308
%define httpd_name httpd
# User and Group under which Apache is running
%define httpd_name apache2

View File

@ -66,7 +66,7 @@ INSERT INTO tconfig (token, value) VALUES ('graph_res','5');
INSERT INTO tconfig (token, value) VALUES ('step_compact','1');
INSERT INTO tconfig (token, value) VALUES ('db_scheme_first_version','6.0orc');
INSERT INTO tconfig (token, value) VALUES('db_scheme_version','NG_BETA');
INSERT INTO tconfig (token, value) VALUES('db_scheme_build','PD170302');
INSERT INTO tconfig (token, value) VALUES('db_scheme_build','PD170308');
INSERT INTO tconfig (token, value) VALUES ('show_unknown','0');
INSERT INTO tconfig (token, value) VALUES ('show_lastalerts','1');
INSERT INTO tconfig (token, value) VALUES ('style','pandora');
@ -138,6 +138,7 @@ INSERT INTO tconfig (token, value) VALUES ('custom_report_front_footer', '');
INSERT INTO tconfig (token, value) VALUES ('identification_reminder', 1);
INSERT INTO tconfig (token, value) VALUES ('identification_reminder_timestamp', 0);
INSERT INTO tconfig (token, value) VALUES ('MR', 0);
INSERT INTO tconfig (token, value) VALUES ('current_package_enterprise', 700);
INSERT INTO tconfig (token, value) VALUES ('post_process_custom_values', '{"0.00000038580247":"Seconds&#x20;to&#x20;months","0.00000165343915":"Seconds&#x20;to&#x20;weeks","0.00001157407407":"Seconds&#x20;to&#x20;days","0.01666666666667":"Seconds&#x20;to&#x20;minutes","0.00000000093132":"Bytes&#x20;to&#x20;Gigabytes","0.00000095367432":"Bytes&#x20;to&#x20;Megabytes","0.0009765625":"Bytes&#x20;to&#x20;Kilobytes","0.00000001653439":"Timeticks&#x20;to&#x20;weeks","0.00000011574074":"Timeticks&#x20;to&#x20;days"}');
COMMIT;
@ -1442,3 +1443,378 @@ INSERT INTO tupdate_settings VALUES ('proxy_pass', '');
COMMIT;
END;;
BEGIN
LOCK TABLE tmodule IN EXCLUSIVE MODE;
EXECUTE IMMEDIATE 'ALTER TRIGGER tmodule_inc DISABLE';
INSERT INTO tmodule VALUES (7, 'Web module');
-- Update curr val of sequence
update_currval('tmodule', 'id_module');
EXECUTE IMMEDIATE 'ALTER TRIGGER tmodule_inc ENABLE';
COMMIT;
END;;
BEGIN
LOCK TABLE ttipo_modulo IN EXCLUSIVE MODE;
EXECUTE IMMEDIATE 'ALTER TRIGGER ttipo_modulo_inc DISABLE';
INSERT INTO ttipo_modulo VALUES (30,'web_data',9,'Remote HTTP module to check latency','mod_web_data.png');
INSERT INTO ttipo_modulo VALUES (31,'web_proc',9,'Remote HTTP module to check server response','mod_web_proc.png');
INSERT INTO ttipo_modulo VALUES (32,'web_content_data',9,'Remote HTTP module to retrieve numeric data','mod_web_data.png');
INSERT INTO ttipo_modulo VALUES (33,'web_content_string',9,'Remote HTTP module to retrieve string data','mod_web_data.png');
-- Update curr val of sequence
update_currval('ttipo_modulo', 'id_tipo');
EXECUTE IMMEDIATE 'ALTER TRIGGER ttipo_modulo_inc ENABLE';
COMMIT;
END;;
-- Some inserts to this table are divided cause oracle cannot perform an insert of a string with a length above the 4000 characters
BEGIN
LOCK TABLE tmodule_inventory IN EXCLUSIVE MODE;
EXECUTE IMMEDIATE 'ALTER TRIGGER tmodule_inventory_inc DISABLE';
INSERT INTO tmodule_inventory (id_module_inventory, id_os, name, description, interpreter, data_format, code, block_mode) VALUES (1,1,'CPU','CPU','/usr/bin/perl','Model;Company;Speed','IyEvdXNyL2Jpbi9wZXJsDQojIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIw0KIyBwYW5kb3JhX2NwdS5wbA0KIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMNCiMgQ29weXJpZ2h0IChjKSAyMDA4IFJhbW9uIE5vdm9hLCBybm92b2FAYXJ0aWNhLmVzDQojICAgICAgICAgICAoYykgMjAwOCBBcnRpY2EgU29sdWNpb25lcyBUZWNub2xvZ2ljYXMgUy5MDQojDQojIFRoaXMg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2giOw0KaWYgKHN5c3RlbSgiJHNzaF9jbGllbnQgLXYgPiAvZGV2L251bGwgMj4mMSIpID4+IDggIT0gMjU1KSB7DQoJcHJpbnQgIltlcnJvcl0gJHNzaF9jbGllbnQgbm90IGZvdW5kLlxuIjsNCglleGl0IDE7DQp9DQoNCmlmICgkI0FSR1YgPCAxKSB7DQoJcHJpbnQgIlVzYWdlOiAkMCA8dGFyZ2V0IGlwPiA8dXNlcm5hbWU+XG4iOw0KCWV4aXQgMTsNCn0NCg0KbXkgJHRhcmdldF9pcCA9ICRBUkdWWzBdOw0KbXkgJHVzZXJuYW1lID0gJEFSR1ZbMV07DQoNCiMgUmV0cmlldmUgQ1BVIGRhdGENCm15ICgkbW9kZWwsICR2ZW5kb3IsICRzcGVlZCk7DQpteSBAY3B1X2luZm8gPSBgJHNzaF9jbGllbnQgJHVzZXJuYW1lXEAkdGFyZ2V0X2lwICJjYXQgL3Byb2MvY3B1aW5mbyJgOw0KZm9yZWFjaCBteSAkbGluZSAoQGNwdV9pbmZvKSB7DQoJaWYgKCRsaW5lID1+IC9tb2RlbCBuYW1lXHMrOlxzKyguKikvKSB7DQoJCSRtb2RlbCA9ICQxOw0KCX0gZWxzaWYgKCRsaW5lID1+IC92ZW5kb3JfaWRccys6XHMrKC4qKS8pIHsNCgkJJHZlbmRvciA9ICQxOw0KCX0gZWxzaWYgKCRsaW5lID1+IC9jcHUgTUh6XHMrOlxzKyguKikvKSB7DQoJCSRzcGVlZCA9ICQxOw0KCX0NCn0NCiANCnJldHVybiAxIGlmICgkbW9kZWwgZXEgJycgfHwgJHZlbmRvciBlcSAnJyB8fCAkc3BlZWQgZXEgJycpOw0KcHJpbnQgIiRtb2RlbDskdmVuZG9yOyIgLiBzcHJpbnRmICgiJS4wZiIsICRzcGVlZCkgLiAiIE1IelxuIjsNCg0KZXhpdCAwOw0K',0);
INSERT INTO tmodule_inventory (id_module_inventory, id_os, name, description, interpreter, data_format, code, block_mode) VALUES (2,9,'CPU','CPU','/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TmFtZSIsICJNYXhDbG9ja1NwZWVkIiwgIkRlc2NyaXB0aW9uIiwgXEByZXN1bHQpOw0KZXhpdCAwOw0K' WHERE id_module_inventory = 2;
INSERT INTO tmodule_inventory (id_module_inventory, id_os, name, description, interpreter, data_format, code, block_mode) VALUES (3,1,'RAM','Memory modules','','Model;Size','',0);
INSERT INTO tmodule_inventory (id_module_inventory, id_os, name, description, interpreter, data_format, code, block_mode) VALUES (4,9,'RAM','Memory modules','/usr/bin/perl','Tag;Capacity;Name','IyEvdXNyL2Jpbi9wZXJsCiMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMj IyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjCiMgcGFuZG9yYV9yYW0ucGwKIyMjIyMj IyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMj IyMjIyMjIyMjIyMKIyBDb3B5cmlnaHQgKGMpIDIwMDggUmFtb24gTm92b2EsIHJub3ZvYUBhcnRp Y2EuZXMKIyAgICAgICAgICAgKGMpIDIwMDggQXJ0aWNhIFNvbHVjaW9uZXMgVGVjbm9sb2dpY2Fz IFMuTAojCiMgVGhpcyBwcm9ncmFtIGlzIGZyZWUgc29mdHdhcmU7IHlvdSBjYW4gcmVkaXN0cmli dXRlIGl0IGFuZC9vcgojIG1vZGlmeSBpdCB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEdOVSBHZW5l cmFsIFB1YmxpYyBMaWNlbnNlCiMgYXMgcHVibGlzaGVkIGJ5IHRoZSBGcmVlIFNvZnR3YXJlIEZv dW5kYXRpb247IHZlcnNpb24gMi4KIwojIFRoaXMgcHJvZ3JhbSBpcyBkaXN0cmlidXRlZCBpbiB0 aGUgaG9wZSB0aGF0IGl0IHdpbGwgYmUgdXNlZnVsLAojIGJ1dCBXSVRIT1VUIEFOWSBXQVJSQU5U WTsgd2l0aG91d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J1 bl9xdWVyeSgiU0VMRUNUIFRhZywgQ2FwYWNpdHksIE5hbWUgRlJPTSBXaW4zMl9QaHlzaWNhbE1l bW9yeSIpOwpwcmludF9tb2R1bGVkYXRhICgiVGFnIiwgIkNhcGFjaXR5IiwgIk5hbWUiLCBcQHJl c3VsdCk7CmV4aXQgMDsK' WHERE id_module_inventory = 4;
INSERT INTO tmodule_inventory (id_module_inventory, id_os, name, description, interpreter, data_format, code, block_mode) VALUES (5,1,'Video','Video cards','','Controller;Model;Company','',0);
INSERT INTO tmodule_inventory (id_module_inventory, id_os, name, description, interpreter, data_format, code, block_mode) VALUES (6,9,'Video','Video cards','/usr/bin/perl','Caption;AdapterRAM;VideoProcessor','IyEvdXNyL2Jpbi9wZXJsCiMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMj IyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjCiMgcGFuZG9yYV92aWRlby5wbAojIyMj IyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMj IyMjIyMjIyMjIyMjIwojIENvcHlyaWdodCAoYykgMjAwOCBSYW1vbiBOb3ZvYSwgcm5vdm9hQGFy dGljYS5lcwojICAgICAgICAgICAoYykgMjAwOCBBcnRpY2EgU29sdWNpb25lcyBUZWNub2xvZ2lj YXMgUy5MCiMKIyBUaGlzIHByb2dyYW0gaXMgZnJlZSBzb2Z0d2FyZTsgeW91IGNhbiByZWRpc3Ry aWJ1dGUgaXQgYW5kL29yCiMgbW9kaWZ5IGl0IHVuZGVyIHRoZSB0ZXJtcyBvZiB0aGUgR05VIEdl bmVyYWwgUHVibGljIExpY2Vuc2UKIyBhcyBwdWJsaXNoZWQgYnkgdGhlIEZyZWUgU29mdHdhcmUg Rm91bmRhdGlvbjsgdmVyc2lvbiAyLgojCiMgVGhpcyBwcm9ncmFtIGlzIGRpc3RyaWJ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jIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjCgpteSBAcmVz dWx0ID0gcnVuX3F1ZXJ5KCJTRUxFQ1QgQ2FwdGlvbiwgQWRhcHRlclJBTSwgVmlkZW9Qcm9jZXNz b3IgRlJPTSBXaW4zMl9WaWRlb0NvbnRyb2xsZXIiKTsKcHJpbnRfbW9kdWxlZGF0YSAoIkNhcHRp b24iLCAiQWRhcHRlclJBTSIsICJWaWRlb1Byb2Nlc3NvciIsIFxAcmVzdWx0KTsKZXhpdCAwOwo=' WHERE id_module_inventory = 6;
INSERT INTO tmodule_inventory (id_module_inventory, id_os, name, description, interpreter, data_format, code, block_mode) VALUES (7,1,'NIC','Network Interface Cards','','Device;Model;Company;MACAddress','',0);
INSERT INTO tmodule_inventory (id_module_inventory, id_os, name, description, interpreter, data_format, code, block_mode) VALUES (8,9,'NIC','Network Interface Cards','/usr/bin/perl','Caption;MACAddress;IPAddress','IyEvdXNyL2Jpbi9wZXJsCiMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMj IyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjCiMgcGFuZG9yYV9uaWMucGwKIyMjIyMj IyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMj IyMjIyMjIyMjIyMKIyBDb3B5cmlnaHQgKGMpIDIwMDggUmFtb24gTm92b2EsIHJub3ZvYUBhcnRp Y2EuZXMKIyAgICAgICAgICAgKGMpIDIwMDggQXJ0aWNhIFNvbHVjaW9uZXMgVGVjbm9sb2dpY2Fz IFMuTAojCiMgVGhpcyBwcm9ncmFtIGlzIGZyZWUgc29mdHdhcmU7IHlvdSBjYW4gcmVkaXN0cmli dXRlIGl0IGFuZC9vcgojIG1vZGlmeSBpdCB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEdOVSBHZW5l cmFsIFB1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MjIyMjIyMj IyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMKIyBNYWluCiMjIyMjIyMjIyMjIyMjIyMj IyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMj CgpteSBAcmVzdWx0ID0gcnVuX3F1ZXJ5KCJTRUxFQ1QgQ2FwdGlvbiwgTUFDQWRkcmVzcywgSVBB ZGRyZXNzIEZST00gV2luMzJfTmV0d29ya0FkYXB0ZXJDb25maWd1cmF0aW9uIik7CnByaW50X21v ZHVsZWRhdGEgKCJDYXB0aW9uIiwgIk1BQ0FkZHJlc3MiLCAiSVBBZGRyZXNzIiwgXEByZXN1bHQp OwpleGl0IDA7Cg==' WHERE id_module_inventory = 8;
INSERT INTO tmodule_inventory (id_module_inventory, id_os, name, description, interpreter, data_format, code, block_mode) VALUES (9,1,'HD','Hard drives','','Type;Model;Size','',0);
INSERT INTO tmodule_inventory (id_module_inventory, id_os, name, description, interpreter, data_format, code, block_mode) VALUES (10,9,'HD','Hard drives','/usr/bin/perl','Model;Size;SystemName','IyEvdXNyL2Jpbi9wZXJsCiMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMj IyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjCiMgcGFuZG9yYV9oZC5wbAojIyMjIyMj IyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMj IyMjIyMjIyMjIwojIENvcHlyaWdodCAoYykgMjAwOCBSYW1vbiBOb3ZvYSwgcm5vdm9hQGFydGlj YS5lcwojICAgICAgICAgICAoYykgMjAwOCBBcnRpY2EgU29sdWNpb25lcyBUZWNub2xvZ2ljYXMg Uy5MCiMKIyBUaGlzIHByb2dyYW0gaXMgZnJlZSBzb2Z0d2FyZTsgeW91IGNhbiByZWRpc3Ry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V9kZXNjcmlwdGlvbn0gLiAiKSI7CgkJfQoKCQlwcmludCAkcmVzdWx0IC4g IlxuIjsJCgl9Cn0KCiMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMj IyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjCiMgTWFpbgojIyMjIyMjIyMjIyMjIyMjIyMj IyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIwoK bXkgQHJlc3VsdCA9IHJ1bl9xdWVyeSgiU0VMRUNUIE1vZGVsLCBTaXplLCBTeXN0ZW1OYW1lIEZS T00gV2luMzJfRGlza0RyaXZlIik7CnByaW50X21vZHVsZWRhdGEgKCJNb2RlbCIsICJTaXplIiwg IlN5c3RlbU5hbWUiLCBcQHJlc3VsdCk7CQpleGl0IDA7Cg==' WHERE id_module_inventory = 10;
INSERT INTO tmodule_inventory (id_module_inventory, id_os, name, description, interpreter, data_format, code, block_mode) VALUES (11,1,'CDROM','CD-ROM drives','','Type;Model;Features','',0);
INSERT INTO tmodule_inventory (id_module_inventory, id_os, name, description, interpreter, data_format, code, block_mode) VALUES (12,9,'CDROM','CD-ROM drives','/usr/bin/perl','Name;Description;Drive','IyEvdXNyL2Jpbi9wZXJsCiMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMj IyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjCiMgcGFuZG9yYV9jZHJvbS5wbAojIyMj IyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMj IyMjIyMjIyMjIyMjIwojIENvcHlyaWdodCAoYykgMjAwOCBSYW1vbiBOb3ZvYSwgcm5vdm9hQGFy dGljYS5lcwojICAgICAgICAgICAoYykgMjAwOCBBcnRpY2EgU29sdWNpb25lc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PSAkZWxlbWVudC0+eyRtb2R1bGVfZGVzY3JpcHRpb259OwoJCX0KCgkJcHJpbnQgJHJlc3Vs dCAuICJcbiI7CQoJfQp9CgojIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMj IyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIwojIE1haW4KIyMjIyMjIyMjIyMjIyMj IyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMj IyMKCm15IEByZXN1bHQgPSBydW5fcXVlcnkoIlNFTEVDVCBOYW1lLCBEZXNjcmlwdGlvbiwgRHJp dmUgRlJPTSBXaW4zMl9DRFJPTURyaXZlIik7CnByaW50X21vZHVsZWRhdGEgKCJOYW1lIiwgIkRl c2NyaXB0aW9uIiwgIkRyaXZlIiwgXEByZXN1bHQpOwpleGl0IDA7Cg==' WHERE id_module_inventory = 12;
INSERT INTO tmodule_inventory (id_module_inventory, id_os, name, description, interpreter, data_format, code, block_mode) VALUES (13,1,'Software','Installed software packages','','Name;Version;Description','',0);
INSERT INTO tmodule_inventory (id_module_inventory, id_os, name, description, interpreter, data_format, code, block_mode) VALUES (14,9,'Software','Installed software packages','/usr/bin/perl','Name;Version;InstallDate;Size','IyEvdXNyL2Jpbi9wZXJsCiMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMj IyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjCiMgcGFuZG9yYV9zb2Z0d2FyZS5wbAoj IyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMj IyMjIyMjIyMjIyMjIyMjIwojIENvcHlyaWdodCAoYykgMjAwOCBSYW1vbiBOb3ZvYSwgcm5vdm9h QGFydGljYS5lcwojICAgICAgICAgICAoYykgMjAwOCBBc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IyMjIyMj IyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjCiMgTWFpbgojIyMjIyMjIyMjIyMjIyMjIyMjIyMj IyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIwoKbXkg QHJlc3VsdCA9IHJ1bl9xdWVyeSgiU0VMRUNUIE5hbWUsIFZlcnNpb24gRlJPTSBXaW4zMl9Qcm9k dWN0Iik7CnByaW50X21vZHVsZWRhdGEgKCJOYW1lIiwgIlZlcnNpb24iLCAiIiwgXEByZXN1bHQp OwpleGl0IDA7Cg==' WHERE id_module_inventory = 14;
INSERT INTO tmodule_inventory (id_module_inventory, id_os, name, description, interpreter, data_format, code, block_mode) VALUES (15,9,'Patches','Installed patches','/usr/bin/perl','HotFixID;Description;FixComments;ServicePackInEffect','IyEvdXNyL2Jpbi9wZXJsDQojIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIw0KIyBwYW5kb3JhX3BhdGNoLnBsDQojIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIw0KIyBDb3B5cmlnaHQgKGMpIDIwMDggUmFtb24gTm92b2EsIHJub3ZvYUBhcnRpY2EuZXMNCiMgICAgICAgICAgIChjKSAyMDA4IEFydGljYSBTb2x1Y2lvbmVzIFRlY25vbG9naWNhcyBTLkwNCiMNCiMgVGhpcyBwcm9ncmFtIGlzIGZyZWUgc29mdHdhcmU7IHlvdSBjYW4gcmVkaXN0cmlidXRlIGl0IGFuZC9vcg0KIyBtb2RpZnkgaXQgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZQ0KIyBhcyBwdWJsaXNoZWQgYnkg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aXB0aW9ufSkpIHsNCgkJCSRyZXN1bHQgLj0gJGVsZW1lbnQtPnskbW9kdWxlX2Rlc2NyaXB0aW9ufSAuICc7JzsNCgkJfQ0KDQoJCSMgU2VydmljZSBwYWNrDQoJCWlmIChkZWZpbmVkKCRlbGVtZW50LT57JG1vZHVsZV9zZXJ2aWNlcGFja30pKSB7DQoJCQkkcmVzdWx0IC49ICRlbGVtZW50LT57JG1vZHVsZV9zZXJ2aWNlcGFja307DQoJCX0NCg0KCQlwcmludCAkcmVzdWx0IC4gIlxuIjsJDQoJfQ0KfQ0KDQojIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIw0KIyBNYWluDQojIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIw0KDQpteSBAcmVzdWx0ID0gcnVuX3F1ZXJ5KCJTRUxFQ1QgSG90Rml4SUQsIERlc2NyaXB0aW9uLCBGaXhDb21tZW50cywgU2VydmljZVBhY2tJbkVmZmVjdCBGUk9NIFdpbjMyX1F1aWNrRml4RW5naW5lZXJpbmciKTsNCnByaW50X21vZHVsZWRhdGEgKCJIb3RGaXhJRCIsICJEZXNjcmlwdGlvbiIsICJGaXhDb21tZW50cyIsICJTZXJ2aWNlUGFja0luRWZmZWN0IiwgXEByZXN1bHQpOw0KZXhpdCAwOw0K' WHERE id_module_inventory = 15;
INSERT INTO tmodule_inventory (id_module_inventory, id_os, name, description, interpreter, data_format, code, block_mode) VALUES (16,1,'Init services','Services programmed to lauch in Unix','','Service','',0);
INSERT INTO tmodule_inventory (id_module_inventory, id_os, name, description, interpreter, data_format, code, block_mode) VALUES (17,9,'Init services','Windows services','/usr/bin/perl','Name;PathName;State','IyEvdXNyL2Jpbi9wZXJsCiMjIyMjIyMjIyMjIyMj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X2l0ZW19KSkg ewoJCQkkcmVzdWx0IC49ICRlbGVtZW50LT57JG1vZHVsZV9pdGVtfSAuICc7JzsKCQl9CgoJCSMg RGF0YQoJCWlmIChkZWZpbmVkKCRlbGVtZW50LT57JG1vZHVsZV9kYXRhfSkpIHsKCQkJJHJlc3Vs dCAuPSAkZWxlbWVudC0+eyRtb2R1bGVfZGF0YX0gLiAnOyc7CgkJfQoKCQkjIERlc2NyaXB0aW9u CgkJaWYgKGRlZmluZWQoJGVsZW1lbnQtPnskbW9kdWxlX2Rlc2NyaXB0aW9ufSkpIHsKCQkJJHJl c3VsdCAuPSAkZWxlbWVudC0+eyRtb2R1bGVfZGVzY3JpcHRpb259OwoJCX0KCgkJcHJpbnQgJHJl c3VsdCAuICJcbiI7CQoJfQp9CgojIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMj IyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIwojIE1haW4KIyMjIyMjIyMjIyMj IyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMj IyMjIyMKCm15IEByZXN1bHQgPSBydW5fcXVlcnkoIlNFTEVDVCBOYW1lLCBQYXRoTmFtZSwgU3Rh dGUgRlJPTSBXaW4zMl9TZXJ2aWNlIik7CnByaW50X21vZHVsZWRhdGEgKCJOYW1lIiwgIlBhdGhO YW1lIiwgIlN0YXRlIiwgXEByZXN1bHQpOwpleGl0IDA7Cg==' WHERE id_module_inventory = 17;
INSERT INTO tmodule_inventory (id_module_inventory, id_os, name, description, interpreter, data_format, code, block_mode) VALUES (18,1,'File system','UNIX filesystem mounted on system','','Device;Free size;Total size;Mount point','',0);
INSERT INTO tmodule_inventory (id_module_inventory, id_os, name, description, interpreter, data_format, code, block_mode) VALUES (19,9,'File system','Disk drives','','Device;Total size;Free size;Mount point','',0);
INSERT INTO tmodule_inventory (id_module_inventory, id_os, name, description, interpreter, data_format, code, block_mode) VALUES (20,1,'Process','Process running on system','','Process output from ps','',0);
INSERT INTO tmodule_inventory (id_module_inventory, id_os, name, description, interpreter, data_format, code, block_mode) VALUES (21,9,'Process','Process running on system','/usr/bin/perl','Name;PathName;State','IyEvdXNyL2Jpbi9wZXJsCiMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMj IyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjCiMgcGFuZG9yYV9wcm9jZXNzZXMucGwK IyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMj IyMjIyMjIyMjIyMjIyMjIyMKIyBDb3B5cmlnaHQgKGMpIDIwMDggUmFtb24gTm92b2EsIHJub3Zv YUBhcnRpY2EuZXMKIyAgICAgICAgICAgKGMpIDIwMDggQXJ0aWNhIFNvbHVjaW9uZXMgVGVjbm9s b2dpY2FzIFMuTAojCiMgVGhpcyBwcm9ncmFtIGlzIGZyZWUgc29mdHdhcmU7IHlvdSBjYW4gcmVk aXN0cmlidXRlIGl0IGFuZC9vcgojIG1vZGlmeSBpdCB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEdO VSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlCiMgYXMgcHVibGlzaGVkIGJ5IHRoZSBGcmVlIFNvZnR3 YXJlIEZvdW5kYXRpb247IHZlcnNpb24gMi4KIwojIFRoaXMgcHJvZ3JhbSBpcyBkaXN0cmlidXRl ZCBpbiB0aGUgaG9wZSB0aGF0IGl0IHdpbGwgYmUgdXNlZnVsLAojIGJ1dCBXSVRIT1VUIEFOWSBX QVJSQU5UWTsgd2l0aG91dCBldmVuIHRoZSBpbXBsaWVkIHdhcnJhbnR5IG9mCiMgTUVSQ0hBTlRB QklMSVRZIG9yIEZJVE5FU1MgRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NFLiAgU2VlIH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id_module_inventory = 21;
INSERT INTO tmodule_inventory (id_module_inventory, id_os, name, description, interpreter, data_format, code, block_mode) VALUES (22,1,'Users','User list','','Username','',0);
INSERT INTO tmodule_inventory (id_module_inventory, id_os, name, description, interpreter, data_format, code, block_mode) VALUES (23,9,'Users','User list','/usr/bin/perl','Name;FullName;Status','IyEvdXNyL2Jpbi9wZXJsCiMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMj IyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjCiMgcGFuZG9yYV91c2Vycy5wbAojIyMj IyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMj IyMjIyMjIyMjIyMjIwojIENvcHlyaWdodCAoYykgMjAwOCBSYW1vbiBOb3ZvYSwgcm5vdm9hQGFy dGljYS5lcwojICAgICAgICAgICAoYykgMjAwOCBBcnRpY2EgU29sdWNpb25lcyBUZWNub2xvZ2lj YXMgUy5MCiMKIyBUaGlzIHByb2dyYW0gaXMgZnJlZSBzb2Z0d2FyZTsgeW91IGNhbiByZWRpc3Ry aWJ1dGUgaXQgYW5kL29yCiMgbW9kaWZ5IGl0IHVuZGVyIHRoZSB0ZXJtcyBvZiB0aGUgR05VIEdl bmVyYWwgUHVibGljIExpY2Vuc2UKIyBhcyBwdWJsaXNoZWQgYnkgdGhlIEZyZWUgU29mdHdhcmUg Rm91bmRhdGlvbjsgdmVyc2lvbiAyLgojCiMgVGhpcyBwcm9ncmFtIGlzIGRpc3RyaWJ1dGVkIGlu IHRoZSBob3BlIHRoYXQgaXQgd2lsbCBiZSB1c2VmdWwsCiMgYnV0IFdJVEhPVVQgQU5ZIFdBUlJB TlRZOyB3aXRob3V0IGV2ZW4gdGhlIGltcGxpZWQgd2FycmFudHkgb2YKIyBNRVJDSEFOVEFCSUxJ VFkgb3IgRklUTkVTUyBGT1IgQSBQQVJUSUNVTEF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INSERT INTO tmodule_inventory (id_module_inventory, id_os, name, description, interpreter, data_format, code, block_mode) VALUES (24,9,'Services','Services&#x20;installed','','Name;Command;Status','',0);
INSERT INTO tmodule_inventory (id_module_inventory, id_os, name, description, interpreter, data_format, code, block_mode) VALUES (25,15,'Software','Installed&#x20;software&#x20;applications','','Name;Version;Description','',0);
INSERT INTO tmodule_inventory (id_module_inventory, id_os, name, description, interpreter, data_format, code, block_mode) VALUES (26,7,'Cisco&#x20;Interface&#x20;Remote&#x20;Inventory','Remote&#x20;inventory&#x20;module&#x20;to&#x20;get&#x20;all&#x20;cards&#x20;in&#x20;a&#x20;Cisco','/usr/bin/perl','Name;Card&#x20;Name;ID/Serial','IyEvdXNyL2Jpbi9wZXJsDQojSW52ZW50YXJpbyBkZSBUYXJqZXRhcw0KI1Nsb3Q7UGFydE51bWJlcjtTZXJpYWxOdW1iZXINCg0KIyEvdXNyL2Jpbi9wZXJsIC13DQoNCm15ICR0YXJnZXRfaXAgPSAkQVJHVlswXTsNCm15ICRjb21tdW5pdHkgPSAkQVJHVlsxXTsNCg0KI34gRXhlY3V0ZSBjb21tYW5kDQokY29tbWFuZCA9IGBzbm1wd2FsayAtdjJjIC1jICRjb21tdW5pdHkgJHRhcmdldF9pcCBtaWItMi40Ny4xLjEuMS4xLjJgOw0KDQojfiBTcGxpdCB0aGUgb3V0cHV0IGluIGxpbmVzDQpAdGVtcCA9IHNwbGl0ICgiXG4iLCAkY29tbWFuZCk7DQpteSBAdmFsdWVzOw0KDQojfiBFYWNoIGxpbmUNCmZvcmVhY2ggKEB0ZW1wKSB7DQoJI34gc3dhcCBkb3RzIGJ5IHNwYWNlcw0KCSRfID1+IHMvXC4vIC9nOw0KCSN+IHNwbGl0IHRoZSBsaW5lIGJ5IHNwYWNlcw0KCUBsaW5lID0gc3BsaXQgKC8gLywgJF8pOw0KCSN+IHNhdmUgdGhlIDd0aCB2YWx1ZQ0KCXB1c2ggKEB2YWx1ZXMsICRsaW5lWzddKTsNCn0N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CAwOw0K',0);
INSERT INTO tmodule_inventory (id_module_inventory, id_os, name, description, interpreter, data_format, code, block_mode) VALUES (27,7,'Cisco&#x20;Inventory','Get&#x20;remote&#x20;device&#x20;information&#x20;about&#x20;the&#x20;cisco&#x20;device','/usr/bin/perl','IP;Hardware;SerialNumber;IOS','IyEvdXNyL2Jpbi9wZXJsDQoNCiNJbmZvcm1hY2lvbiBkZWwgRXF1aXBvDQojSVA7SGFyZHdhcmU7U2VyaWFsTnVtYmVyO0lPUw0KDQpteSAkdGFyZ2V0X2lwID0gJEFSR1ZbMF07DQpteSAkY29tbXVuaXR5ID0gJEFSR1ZbMV07DQoNCiRyZXN1bHQgPSAnJzsNCiMkcmVzdWx0IC49IGBzbm1wZ2V0IC12MmMgLWMgJGNvbW11bml0eSAtT3ZxICR0YXJnZXRfaXAgc3lzTmFtZS4wYCAuICc7JzsNCiRyZXN1bHQgLj0gJHRhcmdldF9pcCAuICc7JzsNCiRlcnJvciA9ICcnOw0KJGVycm9yIC49IGBzbm1wZ2V0IC12MmMgLWMgJGNvbW11bml0eSAtT3ZxICR0YXJnZXRfaXAgbWliLTIuNDcuMS4xLjEuMS4yLjEgfCBncmVwIGV4aXN0c2A7DQokc2VyaWFsID0gJyc7DQokc2VyaWFsIC49IGBzbm1wZ2V0IC12MmMgLWMgJGNvbW11bml0eSAtT3ZxICR0YXJnZXRfaXAgbWliLTIuNDcuMS4xLjEuMS4xMS4xYDsNCiRzZXJpYWwgPX4gcy9cInxcbnxcPHxcPnxcJnxcW3xcXS8vZzsNCg0KaWYgKCRlcnJvciBlcSAiIiAmJiAkc2VyaWFsIG5lICIiKXsNCiAgICAkcmVzdWx0IC49IGBzbm1wZ2V0IC12MmMgLWMgJGNvbW11bml0eSAtT3ZxICR0YXJnZXRfaXAgbWliLTIuNDcuMS4xLjEuMS4yLjFgIC4gJzsnOw0KICAgICRyZXN1bHQgLj0gYHNubXBnZXQgLXYyYyAtYyAkY29tbXVuaXR5IC1PdnEgJHRhcmdldF9pcCBtaWItMi40Ny4xLjEuMS4xLjExLjFgIC4gJzsnOw0KDQp9IGVsc2Ugew0KICAgICRWU1MgPSAnJzsNCiAgICAkVlNTIC49IGBzbm1wZ2V0IC12MmMgLWMgJGNvbW11bml0eSAtT3ZxICR0YXJnZXRfaXAgbWliLTIuNDcuMS4xLjEuMS4yLjEgfCBncmVwIFZpcnR1YWxgOw0KICAgIGlmICgkVlNTIGVxICIiKSB7DQogICAgICAgICRyZXN1bHQgLj0gYHNubXBnZXQgLXYyYyAtYyAkY29tbXVuaXR5IC1PdnEgJHRhcmdldF9pcCBtaWItMi40Ny4xLjEuMS4xLjIuMTAwMWAgLiAnOyc7DQogICAgICAgICRyZXN1bHQgLj0gYHNubXBnZXQgLXYyYyAtYyAkY29tbXVuaXR5IC1PdnEgJHRhcmdldF9pcCBtaWItMi40Ny4xLjEuMS4xLjExLjEwMDFgIC4gJzsnOw0KICAgIH0gZWxzZSB7DQogICAgICAgICRyZXN1bHQgLj0gYHNubXBnZXQgLXYyYyAtYyAkY29tbXVuaXR5IC1PdnEgJHRhcmdldF9pcCBtaWItMi40Ny4xLjEuMS4xLjIuMWAgLiAnOyc7DQogICAgICAgICRyZXN1bHQgLj0gYHNubXBnZXQgLXYyYyAtYyAkY29tbXVuaXR5IC1PdnEgJHRhcmdldF9pcCBtaWItMi40Ny4xLjEuMS4xLjExLjJgIC4gJzsnOw0KICAgIH0NCn0NCg0KJHJlc3VsdCAuPSBgc25tcGdldCAtdjJjIC1jICRjb21tdW5pdHkgLU92cSAkdGFyZ2V0X2lwIHN5c0Rlc2NyLjAgfCBncmVwIElPU2A7DQokcmVzdWx0ID1+IHMvXCJ8XG58XDx8XD58XCZ8XFt8XF0vL2c7DQpwcmludCAkcmVzdWx0IC4gIlxuIjsNCmV4aXQgMDsNCg==',0);
INSERT INTO tmodule_inventory (id_module_inventory, id_os, name, description, interpreter, data_format, code, block_mode) VALUES (28,1,'IP','IP&#x20;address','','Interface;Address','',0);
INSERT INTO tmodule_inventory (id_module_inventory, id_os, name, description, interpreter, data_format, code, block_mode) VALUES (29,1,'Routes','Routes&#x20;table','','Destination;Gateway;Mask;Flags;Metric;Use;Interface','',0);
INSERT INTO tmodule_inventory (id_module_inventory, id_os, name, description, interpreter, data_format, code, block_mode) VALUES (30,7,'Cisco&#x20;Configuration','This&#x20;script&#x20;will&#x20;collect&#x20;a&#x20;remote&#x20;CISCO&#x20;configuration','/usr/bin/perl','Configuration&#x20;dump','IyEvdXNyL2Jpbi9wZXJsIAojCiMgKGMpIEFydGljYSAyMDE0CiMgVGhpcyBpcyBhbiBFbnRlcnByaXNlIGludmVudG9yeSBzY3JpcHQgZm9yIFBhbmRvcmEgRk1TIDUKIyBUaGlzIHNjcmlwdCB3aWxsIGNvbGxlY3QgYSByZW1vdGUgQ0lTQ08gY29uZmlndXJhdGlvbgojIFJFTUVNQkVSIFRPIEFDVElWQVRFIElUIEFTIEJMT0NLIE1PREUgISEhCgp1c2Ugd2FybmluZ3M7CnVzZSBzdHJpY3Q7CnVzZSBOZXQ6OlRlbG5ldDsKCm15ICR0YXJnZXQgPSAiIjsKbXkgJGxvZ2luX3Bhc3MgPSAiIjsKbXkgJGVuYWJsZV9wYXNzID0gIiI7Cm15ICRvdXRwdXRfZmlsZSA9ICIvdG1wL2Npc2NvIi4kJDsKbXkgJFRJTUVPVVQ9NTsKCiMgTG9hZCBjb25maWcgZmlsZSBmcm9tIGNvbW1hbmQgbGluZQppZiAoJCNBUkdWIDwgMiAgKXsKICAgICAgICBwcmludCAiSSBuZWVkIHNldmVyYWwgcGFyYW1ldGVycyBpbiB0aGlzIGZvcm1hdDogXG5cbiI7CglwcmludCAiICAgICAgZ2V0X2NvbmZpZy5wbCA8aXBfYWRkcmVzcz4gPGxvZ2luX3Bhc3M+IDxlbmFibGVfcGFzcz4gXG5cbiI7CiAgICAgICAgZXhpdDsKfQoKJHRhcmdldCA9ICRBUkdWWzBdOwokbG9naW5fcGFzcyA9ICRBUkdWWzFdOwokZW5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E IMMEDIATE 'ALTER TRIGGER tmodule_inventory_inc ENABLE';
COMMIT;
END;;
-- PLSQL for update curr val of sequence
-- BEGIN
-- DECLARE key_max NUMBER := 0;
-- key_currval NUMBER := 0;
-- BEGIN
-- SELECT MAX(ID_SG) INTO key_max FROM tnetwork_component_group;
-- EXECUTE IMMEDIATE 'ALTER SEQUENCE TNETWORK_COMPONENT_GROUP_S INCREMENT BY ' || key_max;
-- SELECT TNETWORK_COMPONENT_GROUP_S.NEXTVAL INTO key_currval FROM dual;
-- EXECUTE IMMEDIATE 'ALTER SEQUENCE TNETWORK_COMPONENT_GROUP_S INCREMENT BY 1';
-- END;
-- END;;
--
-- Dumping data for table `tlocal_component`
--
BEGIN
LOCK TABLE tlocal_component IN EXCLUSIVE MODE;
EXECUTE IMMEDIATE 'ALTER TRIGGER tlocal_component_inc DISABLE';
INSERT INTO tlocal_component (id, name, data, description, id_os, os_version, id_network_component_group, type, max, min, module_interval, id_module_group, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, post_process, unit, wizard_level, macros, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, tags, disabled_types_event, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (1,'Event&#x20;1000','module_begin\r\nmodule_name Event_1000-Citrix\r\nmodule_description\r\nmodule_type async_string\r\nmodule_logevent\r\nmodule_source application\r\nmodule_eventtype\r\nmodule_eventcode 1000\r\nmodule_application\r\nmodule_end ','',9,'',25,23,0,0,0,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,0.000000000000000,NULL,'basic',NULL,'','','',0,0,0,'','',0,0,0,0,0,0,0,0,0,0,0);
INSERT INTO tlocal_component (id, name, data, description, id_os, os_version, id_network_component_group, type, max, min, module_interval, id_module_group, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, post_process, unit, wizard_level, macros, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, tags, disabled_types_event, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (2,'Event&#x20;1004','module_begin\r\nmodule_name Event_1004-Citrix\r\nmodule_description\r\nmodule_type async_string\r\nmodule_logevent\r\nmodule_source application\r\nmodule_eventtype\r\nmodule_eventcode 1004\r\nmodule_application\r\nmodule_end ','',9,'',25,23,0,0,0,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,0.000000000000000,NULL,'basic',NULL,'','','',0,0,0,'','',0,0,0,0,0,0,0,0,0,0,0);
INSERT INTO tlocal_component (id, name, data, description, id_os, os_version, id_network_component_group, type, max, min, module_interval, id_module_group, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, post_process, unit, wizard_level, macros, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, tags, disabled_types_event, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (3,'Event&#x20;1202','module_begin\r\nmodule_name Event_1202-Citrix\r\nmodule_description\r\nmodule_type async_string\r\nmodule_logevent\r\nmodule_source application\r\nmodule_eventtype\r\nmodule_eventcode 1202\r\nmodule_application\r\nmodule_end\r\nn ','',9,'',25,23,0,0,0,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,0.000000000000000,NULL,'basic',NULL,'','','',0,0,0,'','',0,0,0,0,0,0,0,0,0,0,0);
INSERT INTO tlocal_component (id, name, data, description, id_os, os_version, id_network_component_group, type, max, min, module_interval, id_module_group, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, post_process, unit, wizard_level, macros, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, tags, disabled_types_event, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (4,'Event&#x20;3621','module_begin\r\nmodule_name Event_3621\nr\nmodule_description Citrix cannot connect SQL server\r\nmodule_type async_string\r\nmodule_logevent\r\nmodule_source application\r\nmodule_eventtype Error\r\nmodule_eventcode 3621\r\nmodule_application\r\nmodule_end ','Citrix cannot connect SQL server',9,'',25,23,0,0,0,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,0.000000000000000,NULL,'basic',NULL,'','','',0,0,0,'','',0,0,0,0,0,0,0,0,0,0,0);
INSERT INTO tlocal_component (id, name, data, description, id_os, os_version, id_network_component_group, type, max, min, module_interval, id_module_group, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, post_process, unit, wizard_level, macros, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, tags, disabled_types_event, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (5,'Event&#x20;9014','module_begin\r\nmodule_name Event_9014\nr\nmodule_description Invalid licence\r\nmodule_type async_string\r\nmodule_logevent\r\nmodule_source system\r\nmodule_eventtype Error\r\nmodule_eventcode 9014\r\nmodule_application MetaFrame\r\nmodule_end ','Invalid licence',9,'',25,23,0,0,0,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,0.000000000000000,NULL,'basic',NULL,'','','',0,0,0,'','',0,0,0,0,0,0,0,0,0,0,0);
INSERT INTO tlocal_component (id, name, data, description, id_os, os_version, id_network_component_group, type, max, min, module_interval, id_module_group, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, post_process, unit, wizard_level, macros, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, tags, disabled_types_event, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (6,'Event&#x20;5774','module_begin\r\nmodule_name Event_5774\nr\nmodule_description Server goes to grace period (Not enough licences)\r\ndurante 96hr).\r\nmodule_type async_string\r\nmodule_logevent\r\nmodule_source system\r\nmodule_eventtype Error\r\n\nmodule_eventcode 5774\r\nmodule_application MetaFrame\r\nmodule_end ','Server goes to grace period (Not enough licences)',9,'',25,23,0,0,0,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,0.000000000000000,NULL,'basic',NULL,'','','',0,0,0,'','',0,0,0,0,0,0,0,0,0,0,0);
INSERT INTO tlocal_component (id, name, data, description, id_os, os_version, id_network_component_group, type, max, min, module_interval, id_module_group, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, post_process, unit, wizard_level, macros, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, tags, disabled_types_event, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (7,'Event&#x20;1388','module_begin\r\nmodule_name Event_1388\nr\nmodule_description Citrix internal monitoring\r\nmodule_type async_string\r\nmodule_logevent\r\nmodule_source application\r\nmodule_eventtype\r\nmodule_eventcode 1388\r\nmodule_application HCAService\r\nmodule_end ','Citrix internal monitoring',9,'',25,23,0,0,0,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,0.000000000000000,NULL,'basic',NULL,'','','',0,0,0,'','',0,0,0,0,0,0,0,0,0,0,0);
INSERT INTO tlocal_component (id, name, data, description, id_os, os_version, id_network_component_group, type, max, min, module_interval, id_module_group, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, post_process, unit, wizard_level, macros, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, tags, disabled_types_event, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (8,'Event&#x20;3961','module_begin\r\nmodule_name Event_3961\nr\nmodule_description The Data Collector is out of memory, and the Dynamic Store data might be out of sync. Please elect a new Data Collector and make sure you have enough memory on the new Data Collector\r\nmodule_type async_string\r\nmodule_logevent\r\nmodule_source System\r\nmodule_eventtype\r\nmodule_eventcode 3961\r\nmodule_application\r\nmodule_end ','The Data Collector is out of memory, and the Dynamic Store data might be out of sync. Please elect a new Data Collector and make sure you have enough memory on the new Data Collector',9,'',25,23,0,0,0,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,0.000000000000000,NULL,'basic',NULL,'','','',0,0,0,'','',0,0,0,0,0,0,0,0,0,0,0);
INSERT INTO tlocal_component (id, name, data, description, id_os, os_version, id_network_component_group, type, max, min, module_interval, id_module_group, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, post_process, unit, wizard_level, macros, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, tags, disabled_types_event, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (9,'Serv_HCA','module_begin\r\nmodule_name Serv_HCA\r\nmodule_description\r\nmodule_type generic_proc\r\nmodule_service HCAService\r\nmodule_end ','',9,'',25,2,0,0,0,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,0.000000000000000,NULL,'basic',NULL,'','','',0,0,0,'','',0,0,0,0,0,0,0,0,0,0,0);
INSERT INTO tlocal_component (id, name, data, description, id_os, os_version, id_network_component_group, type, max, min, module_interval, id_module_group, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, post_process, unit, wizard_level, macros, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, tags, disabled_types_event, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (10,'Serv_CTXcpusvnc','module_begin\r\nmodule_name Serv_CTXcpusvnc\r\nmodule_description\r\nmodule_type generic_proc\r\nmodule_service CTXCpuusync\r\n\nmodule_end ','',9,'',25,2,0,0,0,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,0.000000000000000,NULL,'basic',NULL,'','','',0,0,0,'','',0,0,0,0,0,0,0,0,0,0,0);
INSERT INTO tlocal_component (id, name, data, description, id_os, os_version, id_network_component_group, type, max, min, module_interval, id_module_group, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, post_process, unit, wizard_level, macros, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, tags, disabled_types_event, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (11,'Serv_IMA','module_begin\r\nmodule_name Serv_IMA\r\n\nmodule_description\r\nmodule_type generic_proc\r\nmodule_service IMAService\r\nmodule_end ','',9,'',25,2,0,0,0,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,0.000000000000000,NULL,'basic',NULL,'','','',0,0,0,'','',0,0,0,0,0,0,0,0,0,0,0);
INSERT INTO tlocal_component (id, name, data, description, id_os, os_version, id_network_component_group, type, max, min, module_interval, id_module_group, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, post_process, unit, wizard_level, macros, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, tags, disabled_types_event, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (13,'Serv_CTXSMA','module_begin\r\nmodule_name Serv_CTXSMA\r\nmodule_description\r\nmodule_type generic_proc\r\nmodule_service Citrix SMA Service\r\nmodule_end','',9,'',25,2,0,0,0,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,0.000000000000000,NULL,'basic',NULL,'','','',0,0,0,'','',0,0,0,0,0,0,0,0,0,0,0);
INSERT INTO tlocal_component (id, name, data, description, id_os, os_version, id_network_component_group, type, max, min, module_interval, id_module_group, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, post_process, unit, wizard_level, macros, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, tags, disabled_types_event, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (14,'Citrix_Sessions','module_begin\r\nmodule_name Citrix_Sessions\r\nmodule_description Opened active sessions on server\r\nmodule_type generic_data\r\nmodule_exec query session | grep Active | wc -l\r\nmodule_end ','Opened active sessions on server',9,'',25,1,0,0,0,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,0.000000000000000,NULL,'basic',NULL,'','','',0,0,0,'','',0,0,0,0,0,0,0,0,0,0,0);
INSERT INTO tlocal_component (id, name, data, description, id_os, os_version, id_network_component_group, type, max, min, module_interval, id_module_group, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, post_process, unit, wizard_level, macros, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, tags, disabled_types_event, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (15,'Users_Connected','module_begin\r\nmodule_name Users_Connected\r\nmodule_description Users connected to this server\r\nmodule_type generic_data\r\nmodule_exec quser | grep Active | wc -l\r\nmodule_interval 2\r\nmodule_end\r\n ','Users connected to this server',9,'',25,1,0,0,0,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,0.000000000000000,NULL,'basic',NULL,'','','',0,0,0,'','',0,0,0,0,0,0,0,0,0,0,0);
INSERT INTO tlocal_component (id, name, data, description, id_os, os_version, id_network_component_group, type, max, min, module_interval, id_module_group, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, post_process, unit, wizard_level, macros, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, tags, disabled_types_event, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (16,'Busy&#x20;XML&#x20;Threads','module_begin\r\nmodule_name Busy XML Threads\r\nmodule_description Total threads in the manager who manage the sessions. If there are more than XX, service fails. NOTE: Run this module only in managers\r\nmodule_type generic_data\r\nmodule_exec Typeperf &#039;&#92;&#92;MAQUINA&#92;Citrix Metaframe Presentation Server&#92;Number of busy XML threads&#039; -sc 1\r\nmodule_end\r\n','Total threads in the manager who manage the sessions. If there are more than XX, service fails. NOTE: Run this module only in managers',9,'',25,1,0,0,0,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,0.000000000000000,NULL,'basic',NULL,'','','',0,0,0,'','',0,0,0,0,0,0,0,0,0,0,0);
INSERT INTO tlocal_component (id, name, data, description, id_os, os_version, id_network_component_group, type, max, min, module_interval, id_module_group, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, post_process, unit, wizard_level, macros, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, tags, disabled_types_event, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (17,'CPU&#x20;Load','module_begin&#x0d;&#x0a;module_name&#x20;CPU&#x20;Load&#x0d;&#x0a;module_type&#x20;generic_data&#x0d;&#x0a;module_wmiquery&#x20;SELECT&#x20;LoadPercentage&#x20;FROM&#x20;Win32_Processor&#x0d;&#x0a;module_wmicolumn&#x20;LoadPercentage&#x0d;&#x0a;module_description&#x20;CPU&#x20;Load&#x20;&#40;%&#41;&#x0d;&#x0a;module_min_warning&#x20;80&#x0d;&#x0a;module_max_warning&#x20;90&#x0d;&#x0a;module_min_critical&#x20;91&#x0d;&#x0a;module_max_critical&#x20;100&#x0d;&#x0a;module_end','CPU&#x20;Load&#x20;&#40;using&#x20;WMI&#41;',9,'',11,1,0,0,0,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,0.000000000000000,NULL,'basic',NULL,'','','',0,0,0,'','',0,0,0,0,0,0,0,0,0,0,0);
INSERT INTO tlocal_component (id, name, data, description, id_os, os_version, id_network_component_group, type, max, min, module_interval, id_module_group, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, post_process, unit, wizard_level, macros, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, tags, disabled_types_event, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (18,'FreeMemory','#&#x20;Free&#x20;Memory&#x0d;&#x0a;module_begin&#x0d;&#x0a;module_name&#x20;FreeMemory&#x0d;&#x0a;module_type&#x20;generic_data&#x0d;&#x0a;module_freepercentmemory&#x0d;&#x0a;module_description&#x20;Free&#x20;memory&#x20;&#40;%&#41;.&#x0d;&#x0a;module_min_warning&#x20;21&#x0d;&#x0a;module_max_warning&#x20;30&#x0d;&#x0a;module_min_critical&#x20;0&#x0d;&#x0a;module_max_critical&#x20;20&#x0d;&#x0a;module_end','Free&#x20;memory&#x20;&#40;%&#41;.',9,'',11,1,0,0,0,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,0.000000000000000,NULL,'basic',NULL,'','','',0,0,0,'','',0,0,0,0,0,0,0,0,0,0,0);
INSERT INTO tlocal_component (id, name, data, description, id_os, os_version, id_network_component_group, type, max, min, module_interval, id_module_group, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, post_process, unit, wizard_level, macros, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, tags, disabled_types_event, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (19,'Microsoft&#x20;Antivirus','module_begin&#x0d;&#x0a;module_name&#x20;Microsoft&#x20;Antivirus&#x0d;&#x0a;module_type&#x20;generic_proc&#x0d;&#x0a;module_service&#x20;MsMpSvc&#x0d;&#x0a;module_description&#x20;Check&#x20;if&#x20;microsoft&#x20;antivirus/malware&#x20;service&#x20;is&#x20;running&#x0d;&#x0a;module_end','Check&#x20;if&#x20;microsoft&#x20;antivirus/malware&#x20;service&#x20;is&#x20;running',9,'',11,2,0,0,0,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,0.000000000000000,NULL,'basic',NULL,'','','',0,0,0,'','',0,0,0,0,0,0,0,0,0,0,0);
INSERT INTO tlocal_component (id, name, data, description, id_os, os_version, id_network_component_group, type, max, min, module_interval, id_module_group, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, post_process, unit, wizard_level, macros, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, tags, disabled_types_event, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (21,'Microsoft&#x20;Firewall','module_begin&#x0d;&#x0a;module_name&#x20;Microsoft&#x20;Firewall&#x0d;&#x0a;module_type&#x20;generic_proc&#x0d;&#x0a;module_service&#x20;MpsSvc&#x0d;&#x0a;module_description&#x20;Microsoft&#x20;windows&#x20;firewall&#x20;status.&#x0d;&#x0a;module_end','Microsoft&#x20;windows&#x20;firewall&#x20;status.',9,'',11,2,0,0,0,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,0.000000000000000,NULL,'basic',NULL,'','','',0,0,0,'','',0,0,0,0,0,0,0,0,0,0,0);
INSERT INTO tlocal_component (id, name, data, description, id_os, os_version, id_network_component_group, type, max, min, module_interval, id_module_group, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, post_process, unit, wizard_level, macros, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, tags, disabled_types_event, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (22,'Kaspersky&#x20;Antivirus','module_begin&#x0d;&#x0a;module_name&#x20;Kaspersky&#x20;Antivirus&#x0d;&#x0a;module_type&#x20;generic_proc&#x0d;&#x0a;module_service&#x20;AVP&#x0d;&#x0a;module_description&#x20;Kaspersky&#x20;Antivirus&#x0d;&#x0a;module_end','Checks&#x20;Karspersky&#x20;Antivirus&#x20;service&#x20;status',9,'',11,2,0,0,0,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,0.000000000000000,NULL,'basic',NULL,'','','',0,0,0,'','',0,0,0,0,0,0,0,0,0,0,0);
INSERT INTO tlocal_component (id, name, data, description, id_os, os_version, id_network_component_group, type, max, min, module_interval, id_module_group, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, post_process, unit, wizard_level, macros, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, tags, disabled_types_event, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (23,'CPU&#x20;Free','module_begin&#x20;&#x0d;&#x0a;module_name&#x20;&#x20;CPU&#x20;Free&#x0d;&#x0a;module_type&#x20;generic_data&#x0d;&#x0a;module_exec&#x20;echo&#x20;$&#40;&#40;&#x20;100-vmstat&#x20;1&#x20;2&#x20;|&#x20;tail&#x20;-1&#x20;|&#x20;awk&#x20;&#039;{&#x20;print&#x20;$15&#x20;}&#039;&#41;&#41;&#x0d;&#x0a;module_max&#x20;100&#x0d;&#x0a;module_min&#x20;0&#x0d;&#x0a;module_description&#x20;Percentage&#x20;CPU&#x20;Free&#x0d;&#x0a;module_end','Percentage&#x20;of&#x20;free&#x20;CPU',1,'',43,1,0,0,0,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,0.000000000000000,NULL,'basic',NULL,'','','',0,0,0,'','',0,0,0,0,0,0,0,0,0,0,0);
INSERT INTO tlocal_component (id, name, data, description, id_os, os_version, id_network_component_group, type, max, min, module_interval, id_module_group, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, post_process, unit, wizard_level, macros, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, tags, disabled_types_event, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (24,'Load&#x20;Average','module_begin&#x0d;&#x0a;module_name&#x20;Load&#x20;Average&#x0d;&#x0a;module_type&#x20;generic_data&#x0d;&#x0a;module_exec&#x20;uptime&#x20;|&#x20;awk&#x20;-F&#x20;&quot;,&quot;&#x20;&#039;{print&#x20;$3}&#039;&#x20;|&#x20;awk&#x20;&#039;{print&#x20;$3}&#039;&#x20;|&#x20;tr&#x20;&shy;d&#x20;&quot;&#92;n&quot;&#x0d;&#x0a;module_description&#x20;Average&#x20;load&#x20;last&#x20;minute&#x0d;&#x0a;module_end&#x0d;&#x0a;','Load&#x20;average&#x20;for&#x20;last&#x20;minute',1,'',43,1,0,0,0,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,0.000000000000000,NULL,'basic',NULL,'','','',0,0,0,'','',0,0,0,0,0,0,0,0,0,0,0);
INSERT INTO tlocal_component (id, name, data, description, id_os, os_version, id_network_component_group, type, max, min, module_interval, id_module_group, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, post_process, unit, wizard_level, macros, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, tags, disabled_types_event, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (25,'Memory&#x20;Free','module_begin&#x0d;&#x0a;module_name&#x20;Memory&#x20;Free&#x0d;&#x0a;module_type&#x20;generic_data&#x0d;&#x0a;module_freepercentmemory&#x0d;&#x0a;module_description&#x20;Percentage&#x20;Mem&#x20;Free&#x0d;&#x0a;module_end&#x0d;&#x0a;','Percentage&#x20;of&#x20;free&#x20;memory',1,'',43,1,0,0,0,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,0.000000000000000,NULL,'basic',NULL,'','','',0,0,0,'','',0,0,0,0,0,0,0,0,0,0,0);
INSERT INTO tlocal_component (id, name, data, description, id_os, os_version, id_network_component_group, type, max, min, module_interval, id_module_group, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, post_process, unit, wizard_level, macros, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, tags, disabled_types_event, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (26,'Disk&#x20;Free','module_begin&#x0d;&#x0a;module_name&#x20;Disk&#x20;Free&#x0d;&#x0a;module_type&#x20;generic_data&#x0d;&#x0a;module_freepercentdisk&#x20;/&#x0d;&#x0a;module_description&#x20;&#x20;Percentage&#x20;Free&#x20;Disk&#x0d;&#x0a;module_end&#x0d;&#x0a;','Percentage&#x20;of&#x20;free&#x20;disk',1,'',43,1,0,0,0,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,0.000000000000000,NULL,'basic',NULL,'','','',0,0,0,'','',0,0,0,0,0,0,0,0,0,0,0);
INSERT INTO tlocal_component (id, name, data, description, id_os, os_version, id_network_component_group, type, max, min, module_interval, id_module_group, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, post_process, unit, wizard_level, macros, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, tags, disabled_types_event, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (27,'SSH&#x20;Status','module_begin&#x0d;&#x0a;module_name&#x20;SSH&#x20;Status&#x0d;&#x0a;module_type&#x20;generic_proc&#x0d;&#x0a;module_exec&#x20;ps&#x20;-Af&#x20;|&#x20;grep&#x20;sshd&#x20;|&#x20;grep&#x20;-v&#x20;&quot;grep&quot;&#x20;|&#x20;wc&#x20;-l&#x0d;&#x0a;module_description&#x20;Check&#x20;ssh&#x20;service&#x0d;&#x0a;module_end','Monitors&#x20;SSH&#x20;server&#x20;status',1,'',43,2,0,0,0,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,0.000000000000000,NULL,'basic',NULL,'','','',0,0,0,'','',0,0,0,0,0,0,0,0,0,0,0);
INSERT INTO tlocal_component (id, name, data, description, id_os, os_version, id_network_component_group, type, max, min, module_interval, id_module_group, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, post_process, unit, wizard_level, macros, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, tags, disabled_types_event, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (28,'Free&#x20;i-nodes','module_begin&#x0d;&#x0a;module_name&#x20;Free&#x20;i-nodes&#x0d;&#x0a;module_type&#x20;generic_data&#x0d;&#x0a;module_exec&#x20;df&#x20;-i&#x20;|&#x20;grep&#x20;-E&#x20;&quot;/$&quot;&#x20;|&#x20;tail&#x20;-1&#x20;|&#x20;awk&#x20;&#039;{print&#x20;100-&#40;&#40;$3/$2&#41;*100&#41;}&#039;&#x0d;&#x0a;module_max&#x20;100&#x0d;&#x0a;module_min&#x20;0&#x0d;&#x0a;module_description&#x20;Percentage&#x20;Free&#x20;i-nodes&#x0d;&#x0a;module_end&#x0d;&#x0a;','Percentage&#x20;of&#x20;free&#x20;i-nodes',1,'',43,1,0,0,0,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,0.000000000000000,NULL,'basic',NULL,'','','',0,0,0,'','',0,0,0,0,0,0,0,0,0,0,0);
INSERT INTO tlocal_component (id, name, data, description, id_os, os_version, id_network_component_group, type, max, min, module_interval, id_module_group, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, post_process, unit, wizard_level, macros, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, tags, disabled_types_event, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (29,'FreeDiskC','module_begin&#x0d;&#x0a;module_name&#x20;FreeDiskC&#x0d;&#x0a;module_type&#x20;generic_data&#x0d;&#x0a;module_freepercentdisk&#x20;C:&#x0d;&#x0a;module_description&#x20;Free&#x20;space&#x20;on&#x20;drive&#x20;C:&#x20;&#40;%&#41;&#x0d;&#x0a;module_min_warning&#x20;31&#x0d;&#x0a;module_max_warning&#x20;40&#x0d;&#x0a;module_min_critical&#x20;0&#x0d;&#x0a;module_max_critical&#x20;30&#x0d;&#x0a;module_end&#x0d;&#x0a;','Free&#x20;space&#x20;on&#x20;disk&#x20;C:&#x20;&#40;%&#41;',9,'',11,1,0,0,0,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,0.000000000000000,NULL,'basic',NULL,'','','',0,0,0,'','',0,0,0,0,0,0,0,0,0,0,0);
INSERT INTO tlocal_component (id, name, data, description, id_os, os_version, id_network_component_group, type, max, min, module_interval, id_module_group, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, post_process, unit, wizard_level, macros, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, tags, disabled_types_event, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (30,'Windows_Update_LastRun','module_begin&#x0d;&#x0a;module_name&#x20;Windows_Update_LastRun&#x0d;&#x0a;module_type&#x20;generic_data_string&#x0d;&#x0a;module_exec&#x20;getreg&#x20;LM&#x20;&quot;SOFTWARE&#92;Microsoft&#92;Windows&#92;CurrentVersion&#92;WindowsUpdate&#92;Auto&#x20;Update&quot;&#x20;SetupWizardLaunchTime&#x0d;&#x0a;module_description&#x20;Last&#x20;date&#x20;and&#x20;time&#x20;user&#x20;launch&#x20;microsoft&#x20;Windows&#x20;update&#x0d;&#x0a;module_end','Last&#x20;date&#x20;and&#x20;time&#x20;user&#x20;launch&#x20;microsoft&#x20;Windows&#x20;update',9,'',11,1,0,0,0,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,0.000000000000000,NULL,'basic',NULL,'','','',0,0,0,'','',0,0,0,0,0,0,0,0,0,0,0);
INSERT INTO tlocal_component (id, name, data, description, id_os, os_version, id_network_component_group, type, max, min, module_interval, id_module_group, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, post_process, unit, wizard_level, macros, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, tags, disabled_types_event, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (31,'cpu_user','module_begin&#x0d;&#x0a;module_name&#x20;cpu_user&#x0d;&#x0a;module_type&#x20;generic_data&#x0d;&#x0a;module_interval&#x20;1&#x0d;&#x0a;module_exec&#x20;vmstat&#x20;-n0&#x20;1&#x20;2&#x20;|&#x20;tail&#x20;-1&#x20;|&#x20;awk&#x20;&#039;{&#x20;print&#x20;$15&#x20;}&#039;&#x0d;&#x0a;module_max&#x20;100&#x0d;&#x0a;module_min&#x20;0&#x0d;&#x0a;module_description&#x20;User&#x20;CPU&#x20;Usage&#x20;&#40;%&#41;&#x0d;&#x0a;module_end','User&#x20;CPU&#x20;Usage&#x20;&#40;%&#41;',4,'',47,1,0,0,0,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,0.000000000000000,NULL,'basic',NULL,'','','',0,0,0,'','',0,0,0,0,0,0,0,0,0,0,0);
INSERT INTO tlocal_component (id, name, data, description, id_os, os_version, id_network_component_group, type, max, min, module_interval, id_module_group, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, post_process, unit, wizard_level, macros, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, tags, disabled_types_event, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (32,'cpu_system','module_begin&#x0d;&#x0a;module_name&#x20;cpu_system&#x0d;&#x0a;module_type&#x20;generic_data&#x0d;&#x0a;module_interval&#x20;1&#x0d;&#x0a;module_exec&#x20;vmstat&#x20;-n0&#x20;1&#x20;2&#x20;|&#x20;tail&#x20;-1&#x20;|&#x20;awk&#x20;&#039;{&#x20;print&#x20;$16&#x20;}&#039;&#x0d;&#x0a;module_max&#x20;100&#x0d;&#x0a;module_min&#x20;0&#x0d;&#x0a;module_description&#x20;System&#x20;CPU&#x20;Usage&#x20;&#40;%&#41;&#x0d;&#x0a;module_end','System&#x20;CPU&#x20;Usage&#x20;&#40;%&#41;',4,'',47,1,0,0,0,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,0.000000000000000,NULL,'basic',NULL,'','','',0,0,0,'','',0,0,0,0,0,0,0,0,0,0,0);
INSERT INTO tlocal_component (id, name, data, description, id_os, os_version, id_network_component_group, type, max, min, module_interval, id_module_group, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, post_process, unit, wizard_level, macros, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, tags, disabled_types_event, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (33,'Load&#x20;Average','module_begin&#x0d;&#x0a;module_name&#x20;Load&#x20;Average&#x0d;&#x0a;module_type&#x20;generic_data&#x0d;&#x0a;module_exec&#x20;uptime&#x20;|&#x20;cut&#x20;-d&#x20;&quot;,&quot;&#x20;-f&#x20;4&#x20;|&#x20;cut&#x20;-d&#x20;&quot;:&quot;&#x20;-f&#x20;2&#x20;|&#x20;sed&#x20;&quot;s/&#x20;//g&quot;&#x0d;&#x0a;module_description&#x20;Average&#x20;process&#x20;in&#x20;CPU&#x20;&#40;Last&#x20;minute&#41;&#x0d;&#x0a;module_end&#x0d;&#x0a;','Average&#x20;process&#x20;in&#x20;CPU&#x20;&#40;Last&#x20;minute&#41;',4,'',47,1,0,0,0,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,0.000000000000000,NULL,'basic',NULL,'','','',0,0,0,'','',0,0,0,0,0,0,0,0,0,0,0);
INSERT INTO tlocal_component (id, name, data, description, id_os, os_version, id_network_component_group, type, max, min, module_interval, id_module_group, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, post_process, unit, wizard_level, macros, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, tags, disabled_types_event, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (34,'disk_root_free','module_begin&#x0d;&#x0a;module_name&#x20;disk_root_free&#x0d;&#x0a;module_type&#x20;generic_data&#x0d;&#x0a;module_exec&#x20;df&#x20;-kh&#x20;/&#x20;|&#x20;tail&#x20;-1&#x20;|&#x20;awk&#x20;&#039;{&#x20;print&#x20;100-$5&#x20;}&#039;&#x0d;&#x0a;module_max&#x20;100&#x0d;&#x0a;module_min&#x20;0&#x0d;&#x0a;module_description&#x20;Free&#x20;disk&#x20;Percentage&#x20;of&#x20;root&#x20;partition&#x0d;&#x0a;module_end','Free&#x20;disk&#x20;Percentage&#x20;of&#x20;root&#x20;partition',4,'',47,1,0,0,0,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,0.000000000000000,NULL,'basic',NULL,'','','',0,0,0,'','',0,0,0,0,0,0,0,0,0,0,0);
INSERT INTO tlocal_component (id, name, data, description, id_os, os_version, id_network_component_group, type, max, min, module_interval, id_module_group, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, post_process, unit, wizard_level, macros, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, tags, disabled_types_event, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (35,'memfree','module_begin&#x0d;&#x0a;module_name&#x20;memfree&#x0d;&#x0a;module_type&#x20;generic_data&#x0d;&#x0a;module_exec&#x20;vmstat&#x20;-H&#x20;1&#x20;2&#x20;|&#x20;tail&#x20;-1&#x20;|&#x20;awk&#x20;&#039;{print&#x20;$5}&#039;&#x0d;&#x0a;module_description&#x20;Unused&#x20;RAM&#x20;memory&#x0d;&#x0a;module_end&#x0d;&#x0a;','Free&#x20;memory&#x20;on&#x20;system',4,'',47,1,0,0,0,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,0.000000000000000,NULL,'basic',NULL,'','','',0,0,0,'','',0,0,0,0,0,0,0,0,0,0,0);
INSERT INTO tlocal_component (id, name, data, description, id_os, os_version, id_network_component_group, type, max, min, module_interval, id_module_group, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, post_process, unit, wizard_level, macros, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, tags, disabled_types_event, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (36,'sshDaemon','module_begin&#x0d;&#x0a;module_name&#x20;sshDaemon&#x0d;&#x0a;module_type&#x20;generic_proc&#x0d;&#x0a;module_exec&#x20;ps&#x20;-Af&#x20;|&#x20;grep&#x20;sshd&#x20;|&#x20;grep&#x20;-v&#x20;&quot;grep&quot;&#x20;|&#x20;wc&#x20;-l&#x20;|&#x20;sed&#x20;&quot;s/&#x20;//g&quot;&#x0d;&#x0a;module_end&#x0d;&#x0a;','Check&#x20;if&#x20;SSH&#x20;daemon&#x20;is&#x20;running',4,'',47,2,0,0,0,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,0.000000000000000,NULL,'basic',NULL,'','','',0,0,0,'','',0,0,0,0,0,0,0,0,0,0,0);
INSERT INTO tlocal_component (id, name, data, description, id_os, os_version, id_network_component_group, type, max, min, module_interval, id_module_group, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, post_process, unit, wizard_level, macros, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, tags, disabled_types_event, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (37,'cpu_user','module_begin&#x0d;&#x0a;module_name&#x20;cpu_user&#x0d;&#x0a;module_type&#x20;generic_data&#x0d;&#x0a;module_interval&#x20;1&#x0d;&#x0a;module_exec&#x20;sar&#x20;1&#x20;2&#x20;|&#x20;tail&#x20;-1&#x20;|&#x20;awk&#x20;&#039;{&#x20;print&#x20;$2&#x20;}&#039;&#x0d;&#x0a;module_max&#x20;100&#x0d;&#x0a;module_min&#x20;0&#x0d;&#x0a;module_description&#x20;User&#x20;CPU&#x20;Usage&#x20;&#40;%&#41;&#x0d;&#x0a;module_min_warning&#x20;70&#x0d;&#x0a;module_max_warning&#x20;90&#x0d;&#x0a;module_min_critical&#x20;91&#x0d;&#x0a;module_max_critical&#x20;100&#x0d;&#x0a;module_end','User&#x20;CPU&#x20;Usage&#x20;&#40;%&#41;',8,'',48,1,0,0,0,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,0.000000000000000,NULL,'basic',NULL,'','','',0,0,0,'','',0,0,0,0,0,0,0,0,0,0,0);
INSERT INTO tlocal_component (id, name, data, description, id_os, os_version, id_network_component_group, type, max, min, module_interval, id_module_group, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, post_process, unit, wizard_level, macros, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, tags, disabled_types_event, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (38,'Load&#x20;Average','module_begin&#x0d;&#x0a;module_name&#x20;Load&#x20;Average&#x0d;&#x0a;module_type&#x20;generic_data&#x0d;&#x0a;module_exec&#x20;uptime&#x20;|&#x20;sed&#x20;&#039;s/.*load&#x20;averages:&#x20;//&#039;|awk&#x20;&#039;{print&#x20;$1}&#039;&#x0d;&#x0a;module_description&#x20;Average&#x20;process&#x20;in&#x20;CPU&#x20;&#40;Last&#x20;minute&#41;&#x0d;&#x0a;module_end&#x0d;&#x0a;','Average&#x20;process&#x20;in&#x20;CPU&#x20;&#40;Last&#x20;minute&#41;',8,'',48,1,0,0,0,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,0.000000000000000,NULL,'basic',NULL,'','','',0,0,0,'','',0,0,0,0,0,0,0,0,0,0,0);
INSERT INTO tlocal_component (id, name, data, description, id_os, os_version, id_network_component_group, type, max, min, module_interval, id_module_group, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, post_process, unit, wizard_level, macros, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, tags, disabled_types_event, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (39,'Cache&#x20;mem&#x20;free','module_begin&#x0d;&#x0a;module_name&#x20;Cache&#x20;mem&#x20;free&#x0d;&#x0a;module_type&#x20;generic_data&#x0d;&#x0a;module_exec&#x20;vm_stat&#x20;|&#x20;grep&#x20;&#039;Pages&#x20;free&#039;|&#x20;awk&#x20;&#039;{print&#x20;$3/256}&#039;&#x0d;&#x0a;module_description&#x20;Free&#x20;cache&#x20;memory&#x20;in&#x20;MB&#x0d;&#x0a;module_min_warning&#x20;500&#x0d;&#x0a;module_max_warning&#x20;600&#x0d;&#x0a;module_min_critical&#x20;100&#x0d;&#x0a;module_max_critical&#x20;499&#x0d;&#x0a;module_end&#x0d;&#x0a;','Free&#x20;cache&#x20;memory&#x20;in&#x20;MB',8,'',48,1,0,0,0,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,0.000000000000000,NULL,'basic',NULL,'','','',0,0,0,'','',0,0,0,0,0,0,0,0,0,0,0);
INSERT INTO tlocal_component (id, name, data, description, id_os, os_version, id_network_component_group, type, max, min, module_interval, id_module_group, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, post_process, unit, wizard_level, macros, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, tags, disabled_types_event, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (40,'Free&#x20;disk&#x20;Percentage&#x20;of&#x20;root&#x20;partition','module_begin&#x0d;&#x0a;module_name&#x20;disk_root_free&#x0d;&#x0a;module_type&#x20;generic_data&#x0d;&#x0a;module_exec&#x20;df&#x20;-kh&#x20;/&#x20;|&#x20;tail&#x20;-1&#x20;|&#x20;awk&#x20;&#039;{&#x20;print&#x20;100-$5&#x20;}&#039;&#x0d;&#x0a;module_max&#x20;100&#x0d;&#x0a;module_min&#x20;0&#x0d;&#x0a;module_description&#x20;Free&#x20;disk&#x20;Percentage&#x20;of&#x20;root&#x20;partition&#x0d;&#x0a;module_min_warning&#x20;70&#x0d;&#x0a;module_max_warning&#x20;90&#x0d;&#x0a;module_min_critical&#x20;91&#x0d;&#x0a;module_max_critical&#x20;100&#x0d;&#x0a;module_end','Free&#x20;disk&#x20;Percentage&#x20;of&#x20;root&#x20;partition',8,'',48,1,0,0,0,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,0.000000000000000,NULL,'basic',NULL,'','','',0,0,0,'','',0,0,0,0,0,0,0,0,0,0,0);
INSERT INTO tlocal_component (id, name, data, description, id_os, os_version, id_network_component_group, type, max, min, module_interval, id_module_group, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, post_process, unit, wizard_level, macros, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, tags, disabled_types_event, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (41,'disk_usage_/','module_begin&#x0d;&#x0a;module_name&#x20;disk_usage_/&#x0d;&#x0a;module_type&#x20;generic_data&#x0d;&#x0a;module_exec&#x20;df&#x20;-P&#x20;|&#x20;grep&#x20;-e&#x20;&quot;/$&quot;&#x20;|&#x20;awk&#x20;&#039;{print&#x20;$5}&#039;&#x20;|&#x20;tr&#x20;-d&#x20;%&#x0d;&#x0a;module_description&#x20;&#x20;Disk&#x20;usage&#x20;on&#x20;/&#x20;&#40;%&#41;&#x0d;&#x0a;module_end','Disk&#x20;usage&#x20;on&#x20;/&#x20;&#40;%&#41;',5,'',44,1,0,0,0,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,0.000000000000000,NULL,'basic',NULL,'','','',0,0,0,'','',0,0,0,0,0,0,0,0,0,0,0);
INSERT INTO tlocal_component (id, name, data, description, id_os, os_version, id_network_component_group, type, max, min, module_interval, id_module_group, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, post_process, unit, wizard_level, macros, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, tags, disabled_types_event, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (42,'Swap_Free','module_begin&#x0d;&#x0a;module_name&#x20;Swap_Free&#x0d;&#x0a;module_type&#x20;generic_data&#x0d;&#x0a;module_exec&#x20;/usr/sbin/swapinfo&#x20;-t&#x20;|&#x20;grep&#x20;memory&#x20;|&#x20;tr&#x20;-d&#x20;&quot;%&quot;&#x20;|&#x20;awk&#x20;&#039;{&#x20;print&#x20;100-$5&#x20;}&#039;&#x0d;&#x0a;module_description&#x20;Unused&#x20;swap&#x20;memory&#x0d;&#x0a;module_end&#x0d;&#x0a;','Unused&#x20;swap&#x20;memory',5,'',44,1,0,0,0,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,0.000000000000000,NULL,'basic',NULL,'','','',0,0,0,'','',0,0,0,0,0,0,0,0,0,0,0);
INSERT INTO tlocal_component (id, name, data, description, id_os, os_version, id_network_component_group, type, max, min, module_interval, id_module_group, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, post_process, unit, wizard_level, macros, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, tags, disabled_types_event, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (43,'RAM_Free','module_begin&#x0d;&#x0a;module_name&#x20;RAM_Free&#x0d;&#x0a;module_type&#x20;generic_data&#x0d;&#x0a;module_exec&#x20;/usr/sbin/swapinfo&#x20;-t&#x20;|&#x20;grep&#x20;memory&#x20;|&#x20;awk&#x20;&#039;{print&#x20;$4}&#039;&#x0d;&#x0a;module_description&#x20;Unused&#x20;RAM&#x20;memory&#x0d;&#x0a;module_end&#x0d;&#x0a;','Unused&#x20;RAM&#x20;memory',5,'',44,1,0,0,0,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,0.000000000000000,NULL,'basic',NULL,'','','',0,0,0,'','',0,0,0,0,0,0,0,0,0,0,0);
INSERT INTO tlocal_component (id, name, data, description, id_os, os_version, id_network_component_group, type, max, min, module_interval, id_module_group, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, post_process, unit, wizard_level, macros, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, tags, disabled_types_event, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (44,'CPU_User','module_begin&#x0d;&#x0a;module_name&#x20;CPU_User&#x0d;&#x0a;module_type&#x20;generic_data&#x0d;&#x0a;module_exec&#x20;vmstat&#x20;1&#x20;2&#x20;|&#x20;tail&#x20;-1&#x20;|&#x20;awk&#x20;&#039;{&#x20;print&#x20;$16&#x20;}&#039;&#x0d;&#x0a;module_description&#x20;%&#x20;of&#x20;USER&#x20;CPU&#x0d;&#x0a;module_end','%&#x20;of&#x20;USER&#x20;CPU',5,'',44,1,0,0,0,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,0.000000000000000,NULL,'basic',NULL,'','','',0,0,0,'','',0,0,0,0,0,0,0,0,0,0,0);
INSERT INTO tlocal_component (id, name, data, description, id_os, os_version, id_network_component_group, type, max, min, module_interval, id_module_group, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, post_process, unit, wizard_level, macros, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, tags, disabled_types_event, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (45,'CPU_System','module_begin&#x0d;&#x0a;module_name&#x20;CPU_System&#x0d;&#x0a;module_type&#x20;generic_data&#x0d;&#x0a;module_exec&#x20;vmstat&#x20;1&#x20;2&#x20;|&#x20;tail&#x20;-1&#x20;|&#x20;awk&#x20;&#039;{&#x20;print&#x20;$17&#x20;}&#039;&#x0d;&#x0a;module_description&#x20;%&#x20;of&#x20;system&#x20;CPU&#x0d;&#x0a;module_end&#x0d;&#x0a;','%&#x20;of&#x20;system&#x20;CPU',5,'',44,1,0,0,0,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,0.000000000000000,NULL,'basic',NULL,'','','',0,0,0,'','',0,0,0,0,0,0,0,0,0,0,0);
INSERT INTO tlocal_component (id, name, data, description, id_os, os_version, id_network_component_group, type, max, min, module_interval, id_module_group, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, post_process, unit, wizard_level, macros, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, tags, disabled_types_event, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (46,'disk_root_free','module_begin&#x0d;&#x0a;module_name&#x20;disk_root_free&#x0d;&#x0a;module_type&#x20;generic_data&#x0d;&#x0a;module_exec&#x20;df&#x20;-k&#x20;/&#x20;|&#x20;tail&#x20;-1&#x20;|&#x20;tr&#x20;-d&#x20;&quot;%&quot;&#x20;|&#x20;awk&#x20;&#039;{&#x20;print&#x20;100-$5&#x20;}&#039;&#x0d;&#x0a;module_max&#x20;100&#x0d;&#x0a;module_min&#x20;0&#x0d;&#x0a;module_description&#x20;Free&#x20;disk&#x20;Percentage&#x20;of&#x20;root&#x20;partition&#x0d;&#x0a;module_end','Free&#x20;disk&#x20;Percentage&#x20;of&#x20;root&#x20;partition',2,'',45,1,0,0,0,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,0.000000000000000,NULL,'basic',NULL,'','','',0,0,0,'','',0,0,0,0,0,0,0,0,0,0,0);
INSERT INTO tlocal_component (id, name, data, description, id_os, os_version, id_network_component_group, type, max, min, module_interval, id_module_group, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, post_process, unit, wizard_level, macros, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, tags, disabled_types_event, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (47,'Swap_Free','module_begin&#x0d;&#x0a;module_name&#x20;Swap_Free&#x0d;&#x0a;module_type&#x20;generic_data&#x0d;&#x0a;module_exec&#x20;vmstat&#x20;1&#x20;2&#x20;|&#x20;tail&#x20;-1&#x20;|&#x20;awk&#x20;&#039;{&#x20;print&#x20;$4&#x20;}&#039;&#x0d;&#x0a;module_description&#x20;Unused&#x20;swap&#x20;memory&#x0d;&#x0a;module_end','Unused&#x20;swap&#x20;memory',2,'',45,1,0,0,0,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,0.000000000000000,NULL,'basic',NULL,'','','',0,0,0,'','',0,0,0,0,0,0,0,0,0,0,0);
INSERT INTO tlocal_component (id, name, data, description, id_os, os_version, id_network_component_group, type, max, min, module_interval, id_module_group, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, post_process, unit, wizard_level, macros, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, tags, disabled_types_event, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (48,'RAM_Free','module_begin&#x0d;&#x0a;module_name&#x20;RAM_Free&#x0d;&#x0a;module_type&#x20;generic_data&#x0d;&#x0a;module_exec&#x20;vmstat&#x20;1&#x20;2&#x20;|&#x20;tail&#x20;-1&#x20;|&#x20;awk&#x20;&#039;{&#x20;print&#x20;$5&#x20;}&#039;&#x0d;&#x0a;module_description&#x20;Unused&#x20;RAM&#x20;memory&#x0d;&#x0a;module_end','Unused&#x20;RAM&#x20;memory',2,'',45,1,0,0,0,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,0.000000000000000,NULL,'basic',NULL,'','','',0,0,0,'','',0,0,0,0,0,0,0,0,0,0,0);
INSERT INTO tlocal_component (id, name, data, description, id_os, os_version, id_network_component_group, type, max, min, module_interval, id_module_group, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, post_process, unit, wizard_level, macros, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, tags, disabled_types_event, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (49,'CPU_System','module_begin&#x0d;&#x0a;module_name&#x20;CPU_System&#x0d;&#x0a;module_type&#x20;generic_data&#x0d;&#x0a;module_exec&#x20;vmstat&#x20;1&#x20;2&#x20;|&#x20;tail&#x20;-1&#x20;|&#x20;awk&#x20;&#039;{&#x20;print&#x20;$21&#x20;}&#039;&#x0d;&#x0a;module_description&#x20;%&#x20;of&#x20;system&#x20;CPU&#x0d;&#x0a;module_end','%&#x20;of&#x20;system&#x20;CPU',2,'',45,1,0,0,0,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,0.000000000000000,NULL,'basic',NULL,'','','',0,0,0,'','',0,0,0,0,0,0,0,0,0,0,0);
INSERT INTO tlocal_component (id, name, data, description, id_os, os_version, id_network_component_group, type, max, min, module_interval, id_module_group, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, post_process, unit, wizard_level, macros, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, tags, disabled_types_event, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (50,'Disk_Seek_Operations','module_begin&#x0d;&#x0a;module_name&#x20;Disk_Seek_Operations&#x0d;&#x0a;module_type&#x20;generic_data&#x0d;&#x0a;module_exec&#x20;vmstat&#x20;1&#x20;2&#x20;|&#x20;tail&#x20;-1&#x20;|&#x20;awk&#x20;&#039;{&#x20;print&#x20;$14&#x20;}&#039;&#x0d;&#x0a;module_description&#x20;Disk&#x20;Seek&#x20;operations&#x0d;&#x0a;module_end','Disk&#x20;Seek&#x20;operations',2,'',45,1,0,0,0,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,0.000000000000000,NULL,'basic',NULL,'','','',0,0,0,'','',0,0,0,0,0,0,0,0,0,0,0);
INSERT INTO tlocal_component (id, name, data, description, id_os, os_version, id_network_component_group, type, max, min, module_interval, id_module_group, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, post_process, unit, wizard_level, macros, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, tags, disabled_types_event, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (51,'Pandora_Agent_RAM','module_begin&#x0d;&#x0a;module_name&#x20;Pandora_Agent_RAM&#x0d;&#x0a;module_type&#x20;generic_data&#x0d;&#x0a;module_exec&#x20;ps&#x20;-Afly&#x20;|&#x20;grep&#x20;perl&#x20;|&#x20;grep&#x20;-v&#x20;grep&#x20;|&#x20;awk&#x20;&#039;{&#x20;print&#x20;$9&#x20;}&#039;&#x0d;&#x0a;module_description&#x20;Return&#x20;size&#x20;in&#x20;KB&#x20;of&#x20;memory&#x20;used&#x20;by&#x20;process&#x20;Pandora&#x0d;&#x0a;module_end&#x0d;&#x0a;','Return&#x20;size&#x20;in&#x20;KB&#x20;of&#x20;memory&#x20;used&#x20;by&#x20;process&#x20;Pandora',2,'',45,1,0,0,0,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,0.000000000000000,NULL,'basic',NULL,'','','',0,0,0,'','',0,0,0,0,0,0,0,0,0,0,0);
INSERT INTO tlocal_component (id, name, data, description, id_os, os_version, id_network_component_group, type, max, min, module_interval, id_module_group, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, post_process, unit, wizard_level, macros, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, tags, disabled_types_event, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (52,'InetdDaemon','module_begin&#x0d;&#x0a;module_name&#x20;InetdDaemon&#x0d;&#x0a;module_type&#x20;generic_proc&#x0d;&#x0a;module_exec&#x20;ps&#x20;-Af&#x20;|&#x20;grep&#x20;inetd&#x20;|&#x20;grep&#x20;-v&#x20;&quot;grep&quot;&#x20;|&#x20;wc&#x20;-l&#x20;|&#x20;&#x20;awk&#x20;&#039;{&#x20;print&#x20;$1&#x20;}&#039;&#x0d;&#x0a;module_end','Check&#x20;inetd&#x20;daemon&#x20;running',2,'',45,2,0,0,0,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,0.000000000000000,NULL,'basic',NULL,'','','',0,0,0,'','',0,0,0,0,0,0,0,0,0,0,0);
INSERT INTO tlocal_component (id, name, data, description, id_os, os_version, id_network_component_group, type, max, min, module_interval, id_module_group, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, post_process, unit, wizard_level, macros, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, tags, disabled_types_event, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (53,'Pandora_Agent_RAM','module_begin&#x0d;&#x0a;module_name&#x20;Pandora_Agent_RAM&#x0d;&#x0a;module_type&#x20;generic_data&#x0d;&#x0a;module_exec&#x20;ps&#x20;axu&#x20;|&#x20;grep&#x20;perl&#x20;|&#x20;grep&#x20;-v&#x20;grep&#x20;|&#x20;awk&#x20;&#039;{&#x20;print&#x20;$4&#x20;}&#039;&#x20;|&#x20;tr&#x20;&quot;,&quot;&#x20;&quot;.&quot;&#x0d;&#x0a;module_end&#x0d;&#x0a;','Return&#x20;RAM&#x20;used&#x20;by&#x20;pandora&#x20;fms&#x20;agent.',3,'',46,1,0,0,0,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,0.000000000000000,NULL,'basic',NULL,'','','',0,0,0,'','',0,0,0,0,0,0,0,0,0,0,0);
INSERT INTO tlocal_component (id, name, data, description, id_os, os_version, id_network_component_group, type, max, min, module_interval, id_module_group, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, post_process, unit, wizard_level, macros, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, tags, disabled_types_event, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (54,'InetdDaemon','module_begin&#x0d;&#x0a;module_name&#x20;InetdDaemon&#x0d;&#x0a;module_type&#x20;generic_proc&#x0d;&#x0a;module_exec&#x20;ps&#x20;-Af&#x20;|&#x20;grep&#x20;inetd&#x20;|&#x20;grep&#x20;-v&#x20;&quot;grep&quot;&#x20;|&#x20;wc&#x20;-l&#x20;|&#x20;&#x20;awk&#x20;&#039;{&#x20;print&#x20;$1&#x20;}&#039;&#x0d;&#x0a;module_end&#x0d;&#x0a;','Check&#x20;inetddaemon&#x20;running&#x20;in&#x20;system',3,'',46,2,0,0,0,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,0.000000000000000,NULL,'basic',NULL,'','','',0,0,0,'','',0,0,0,0,0,0,0,0,0,0,0);
INSERT INTO tlocal_component (id, name, data, description, id_os, os_version, id_network_component_group, type, max, min, module_interval, id_module_group, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, post_process, unit, wizard_level, macros, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, tags, disabled_types_event, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (55,'disk_root_free','module_begin&#x0d;&#x0a;module_name&#x20;disk_root_free&#x0d;&#x0a;module_type&#x20;generic_data&#x0d;&#x0a;module_exec&#x20;df&#x20;-k&#x20;/&#x20;|&#x20;tail&#x20;-1&#x20;|&#x20;awk&#x20;&#039;{&#x20;print&#x20;100-$4&#x20;}&#039;&#x0d;&#x0a;module_max&#x20;100&#x0d;&#x0a;module_min&#x20;0&#x0d;&#x0a;module_description&#x20;Free&#x20;disk&#x20;Percentage&#x20;of&#x20;root&#x20;partition&#x0d;&#x0a;module_end','Free&#x20;disk&#x20;Percentage&#x20;of&#x20;root&#x20;partition',3,'',46,1,0,0,0,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,0.000000000000000,NULL,'basic',NULL,'','','',0,0,0,'','',0,0,0,0,0,0,0,0,0,0,0);
INSERT INTO tlocal_component (id, name, data, description, id_os, os_version, id_network_component_group, type, max, min, module_interval, id_module_group, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, post_process, unit, wizard_level, macros, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, tags, disabled_types_event, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (56,'OpenedFiles&#x20;','module_begin&#x20;&#x0d;&#x0a;module_name&#x20;OpenedFiles&#x20;&#x0d;&#x0a;module_type&#x20;generic_data&#x20;&#x0d;&#x0a;module_exec&#x20;lsof&#x20;|&#x20;wc&#x20;-l&#x20;&#x0d;&#x0a;module_description&#x20;Total&#x20;files&#x20;opened&#x20;in&#x20;system&#x20;&#x0d;&#x0a;module_end&#x20;','Total&#x20;files&#x20;opened&#x20;in&#x20;system&#x20;',1,'',43,1,0,0,0,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,0.000000000000000,NULL,'basic',NULL,'','','',0,0,0,'','',0,0,0,0,0,0,0,0,0,0,0);
INSERT INTO tlocal_component (id, name, data, description, id_os, os_version, id_network_component_group, type, max, min, module_interval, id_module_group, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, post_process, unit, wizard_level, macros, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, tags, disabled_types_event, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (57,'Zombie&#x20;processes','module_begin&#x20;&#x0d;&#x0a;module_name&#x20;Zombie&#x20;processes&#x20;&#x0d;&#x0a;module_type&#x20;generic_data&#x20;&#x0d;&#x0a;module_exec&#x20;ps&#x20;&shy;eos&#x20;|&#x20;grep&#x20;Z&#x20;|&#x20;wc&#x20;&shy;l&#x20;|&#x20;tr&#x20;&shy;d&#x20;&ldquo;&#92;n&rdquo;&#x20;&#x0d;&#x0a;module_description&#x20;Number&#x20;of&#x20;zombie&#x20;processes&#x20;&#x0d;&#x0a;module_end&#x20;','Number&#x20;of&#x20;zombie&#x20;processes&#x20;',1,'',43,1,0,0,0,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,0.000000000000000,NULL,'basic',NULL,'','','',0,0,0,'','',0,0,0,0,0,0,0,0,0,0,0);
INSERT INTO tlocal_component (id, name, data, description, id_os, os_version, id_network_component_group, type, max, min, module_interval, id_module_group, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, post_process, unit, wizard_level, macros, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, tags, disabled_types_event, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (58,'Disk_IO_Wait','module_begin&#x20;&#x0d;&#x0a;module_name&#x20;Disk_IO_Wait&#x20;&#x0d;&#x0a;module_type&#x20;generic_data&#x20;&#x0d;&#x0a;module_exec&#x20;top&#x20;-n&#x20;3&#x20;-c&#x20;|&#x20;grep&#x20;&quot;Cpu&quot;&#x20;|&#x20;awk&#x20;&#039;{&#x20;print&#x20;$6&#x20;}&#039;&#x20;|&#x20;grep&#x20;-o&#x20;&quot;[0-9]*&quot;&#x20;|&#x20;tail&#x20;-1&#x20;&#x0d;&#x0a;module_description&#x20;Simple&#x20;approach&#x20;to&#x20;IO/Wait&#x20;monitoring.&#x20;&#x0d;&#x0a;module_end&#x20;','Simple&#x20;approach&#x20;to&#x20;IO/Wait&#x20;monitoring.&#x20;',1,'',43,1,0,0,0,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,0.000000000000000,NULL,'basic',NULL,'','','',0,0,0,'','',0,0,0,0,0,0,0,0,0,0,0);
-- Update curr val of sequence
update_currval('tlocal_component', 'id');
EXECUTE IMMEDIATE 'ALTER TRIGGER tlocal_component_inc ENABLE';
COMMIT;
END;;
--
-- Dumping data for table `tskin`
--
BEGIN
LOCK TABLE tskin IN EXCLUSIVE MODE;
EXECUTE IMMEDIATE 'ALTER TRIGGER tskin_inc DISABLE';
INSERT INTO tskin VALUES (1, 'skin&#x20;default', 'skin_default', 'Default&#x20;skin&#x20;for&#x20;Pandora&#x20;FMS&#x20;web&#x20;console', 1);
INSERT INTO tskin VALUES (2,'Legacy', 'legacy', 'Skin&#x20;of&#x20;the&#x20;visual&#x20;style&#x20;of&#x20;Pandora&#x20;FMS&#x20;4.x&#x20;and&#x20;previous&#x20;versions', 1);
-- Update curr val of sequence
update_currval('tskin', 'id');
EXECUTE IMMEDIATE 'ALTER TRIGGER tskin_inc ENABLE';
COMMIT;
END;;
---
--- Dumping data for table `tcollection`
---
BEGIN
LOCK TABLE tcollection IN EXCLUSIVE MODE;
EXECUTE IMMEDIATE 'ALTER TRIGGER tcollection_inc DISABLE';
INSERT INTO tcollection VALUES (1,'Apache&#x20;Enterprise&#x20;Plugin','apache_plugin',0,'Apache&#x20;Enterprise&#x20;Plugin&#x20;to&#x20;monitor&#x20;Apache&#x20;web&#x20;server&#x20;using&#x20;a&#x20;Perl&#x20;script.',0);
-- Update curr val of sequence
update_currval('tcollection', 'id');
EXECUTE IMMEDIATE 'ALTER TRIGGER tcollection_inc ENABLE';
COMMIT;
END;;
--- Example policies
BEGIN
LOCK TABLE tpolicies IN EXCLUSIVE MODE;
EXECUTE IMMEDIATE 'ALTER TRIGGER tpolicies_inc DISABLE';
INSERT INTO tpolicies VALUES (1,'Basic&#x20;Web&#x20;Checks','Basic&#x20;checks&#x20;to&#x20;monitoring&#x20;webs',13,0);
INSERT INTO tpolicies VALUES (2,'Basic&#x20;Windows&#x20;Local&#x20;Monitoring','Basic&#x20;checks&#x20;to&#x20;monitoring&#x20;Windows&#x20;Systems',2,0);
INSERT INTO tpolicies VALUES (3,'Basic&#x20;Centos/RedHat&#x20;Local&#x20;Monitoring','Basic&#x20;local&#x20;checks&#x20;to&#x20;monitoring&#x20;Centos/RedHat&#x20;systems',2,0);
INSERT INTO tpolicies VALUES (4,'Basic&#x20;SuSe&#x20;Local&#x20;Monitoring','Basic&#x20;local&#x20;checks&#x20;to&#x20;monitoring&#x20;SuSe&#x20;systems',2,0);
INSERT INTO tpolicies VALUES (5,'Basic&#x20;Debian/Ubuntu&#x20;Local&#x20;Monitoring','Basic&#x20;local&#x20;checks&#x20;to&#x20;monitoring&#x20;Debian/Ubuntu&#x20;systems',2,0);
INSERT INTO tpolicies VALUES (6,'Basic&#x20;AIX&#x20;Local&#x20;Monitoring','Basic&#x20;local&#x20;checks&#x20;to&#x20;monitoring&#x20;AIX&#x20;systems',2,0);
INSERT INTO tpolicies VALUES (7,'Basic&#x20;HP-UX&#x20;Local&#x20;Monitoring','Basic&#x20;local&#x20;checks&#x20;to&#x20;monitoring&#x20;HP/UX&#x20;systems',2,0);
INSERT INTO tpolicies VALUES (8,'Basic&#x20;Solaris&#x20;Local&#x20;Monitoring','Basic&#x20;local&#x20;checks&#x20;to&#x20;monitoring&#x20;Solaris&#x20;systems',2,0);
INSERT INTO tpolicies VALUES (9,'Basic&#x20;Remote&#x20;Checks','Basic&#x20;Remote&#x20;Checks&#x20;&#40;ping,&#x20;latency,&#x20;ports..&#41;',2,0);
-- Update curr val of sequence
update_currval('tpolicies', 'id');
EXECUTE IMMEDIATE 'ALTER TRIGGER tpolicies_inc ENABLE';
COMMIT;
END;;
BEGIN
LOCK TABLE tpolicy_modules IN EXCLUSIVE MODE;
EXECUTE IMMEDIATE 'ALTER TRIGGER tpolicy_modules_inc DISABLE';
INSERT INTO tpolicy_modules (id, id_policy, configuration_data, id_tipo_modulo, description, name, unit, max, min, module_interval, tcp_port, tcp_send, tcp_rcv, snmp_community, snmp_oid, id_module_group, flag, id_module, disabled, id_export, plugin_user, plugin_pass, plugin_parameter, id_plugin, post_process, prediction_module, max_timeout, max_retries, custom_id, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, custom_string_1, custom_string_2, custom_string_3, custom_integer_1, custom_integer_2, pending_delete, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, module_ff_interval, quiet, cron_interval, macros, disabled_types_event, module_macros, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (1, 1,'',9,'','Check&#x20;80&#x20;port','',0,0,300,80,'','','public','',1,1,2,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,'',NULL,'','',0,0,0,0,0,0,0,0,0,0,0);
INSERT INTO tpolicy_modules (id, id_policy, configuration_data, id_tipo_modulo, description, name, unit, max, min, module_interval, tcp_port, tcp_send, tcp_rcv, snmp_community, snmp_oid, id_module_group, flag, id_module, disabled, id_export, plugin_user, plugin_pass, plugin_parameter, id_plugin, post_process, prediction_module, max_timeout, max_retries, custom_id, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, custom_string_1, custom_string_2, custom_string_3, custom_integer_1, custom_integer_2, pending_delete, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, module_ff_interval, quiet, cron_interval, macros, disabled_types_event, module_macros, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (2, 1,'',9,'','Check&#x20;443&#x20;port','',0,0,300,80,'','','public','',1,1,2,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,'',NULL,'','',0,0,0,0,0,0,0,0,0,0,0);
INSERT INTO tpolicy_modules (id, id_policy, configuration_data, id_tipo_modulo, description, name, unit, max, min, module_interval, tcp_port, tcp_send, tcp_rcv, snmp_community, snmp_oid, id_module_group, flag, id_module, disabled, id_export, plugin_user, plugin_pass, plugin_parameter, id_plugin, post_process, prediction_module, max_timeout, max_retries, custom_id, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, custom_string_1, custom_string_2, custom_string_3, custom_integer_1, custom_integer_2, pending_delete, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, module_ff_interval, quiet, cron_interval, macros, disabled_types_event, module_macros, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (3, 1,'',30,'','Check&#x20;Web&#x20;Latency','',0,0,0,0,'','','public','',1,1,7,0,0,'Pandora&#x20;FMS&#x20;3.0&#x20;/&#x20;Webcheck','1','task_begin&#x0d;&#x0a;get&#x20;http://www.google.com&#x0d;&#x0a;check_string&#x20;iGoogle&#x0d;&#x0a;task_end',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,'','',0,0,0,0,0,0,0,0,0,0,0);
INSERT INTO tpolicy_modules (id, id_policy, configuration_data, id_tipo_modulo, description, name, unit, max, min, module_interval, tcp_port, tcp_send, tcp_rcv, snmp_community, snmp_oid, id_module_group, flag, id_module, disabled, id_export, plugin_user, plugin_pass, plugin_parameter, id_plugin, post_process, prediction_module, max_timeout, max_retries, custom_id, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, custom_string_1, custom_string_2, custom_string_3, custom_integer_1, custom_integer_2, pending_delete, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, module_ff_interval, quiet, cron_interval, macros, disabled_types_event, module_macros, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (4, 1,'',31,'','Check&#x20;Web&#x20;Content','',0,0,0,0,'','','public','',1,1,7,0,0,'Pandora&#x20;FMS&#x20;3.0&#x20;/&#x20;Webcheck','1','task_begin&#x0d;&#x0a;get&#x20;http://www.google.com&#x0d;&#x0a;check_string&#x20;iGoogle&#x0d;&#x0a;task_end',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,'','',0,0,0,0,0,0,0,0,0,0,0);
INSERT INTO tpolicy_modules (id, id_policy, configuration_data, id_tipo_modulo, description, name, unit, max, min, module_interval, tcp_port, tcp_send, tcp_rcv, snmp_community, snmp_oid, id_module_group, flag, id_module, disabled, id_export, plugin_user, plugin_pass, plugin_parameter, id_plugin, post_process, prediction_module, max_timeout, max_retries, custom_id, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, custom_string_1, custom_string_2, custom_string_3, custom_integer_1, custom_integer_2, pending_delete, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, module_ff_interval, quiet, cron_interval, macros, disabled_types_event, module_macros, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (5, 2,'module_begin&#x0d;&#x0a;module_name&#x20;WMI&#x20;Service&#x0d;&#x0a;module_type&#x20;generic_proc&#x0d;&#x0a;module_service&#x20;winmgmt&#x0d;&#x0a;module_description&#x20;WMI&#x20;Service&#x20;enabled&#x0d;&#x0a;module_end&#x0d;&#x0a;',2,'','WMI&#x20;Service','',0,0,1,0,'','','','',3,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);
INSERT INTO tpolicy_modules (id, id_policy, configuration_data, id_tipo_modulo, description, name, unit, max, min, module_interval, tcp_port, tcp_send, tcp_rcv, snmp_community, snmp_oid, id_module_group, flag, id_module, disabled, id_export, plugin_user, plugin_pass, plugin_parameter, id_plugin, post_process, prediction_module, max_timeout, max_retries, custom_id, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, custom_string_1, custom_string_2, custom_string_3, custom_integer_1, custom_integer_2, pending_delete, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, module_ff_interval, quiet, cron_interval, macros, disabled_types_event, module_macros, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (6, 2,'module_begin&#x20;&#x0d;&#x0a;module_name&#x20;Account&#x20;deleted&#x0d;&#x0a;module_type&#x20;async_string&#x0d;&#x0a;module_logevent&#x0d;&#x0a;module_source&#x20;Security&#x0d;&#x0a;module_eventcode&#x20;4726&#x0d;&#x0a;module_description&#x20;Account&#x20;deleted&#x0d;&#x0a;module_end&#x0d;&#x0a;',23,'','Account&#x20;deleted','',0,0,1,0,'','','','',4,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);
INSERT INTO tpolicy_modules (id, id_policy, configuration_data, id_tipo_modulo, description, name, unit, max, min, module_interval, tcp_port, tcp_send, tcp_rcv, snmp_community, snmp_oid, id_module_group, flag, id_module, disabled, id_export, plugin_user, plugin_pass, plugin_parameter, id_plugin, post_process, prediction_module, max_timeout, max_retries, custom_id, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, custom_string_1, custom_string_2, custom_string_3, custom_integer_1, custom_integer_2, pending_delete, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, module_ff_interval, quiet, cron_interval, macros, disabled_types_event, module_macros, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (7, 8,'module_begin&#x0d;&#x0a;module_name&#x20;CPU&#x20;%&#x0d;&#x0a;module_type&#x20;generic_data&#x0d;&#x0a;module_exec&#x20;vmstat&#x20;1&#x20;1&#x20;|&#x20;tail&#x20;-1|&#x20;awk&#x20;&#039;{print&#x20;&#40;100-$NF&#41;}&#039;&#x0d;&#x0a;module_description&#x20;CPU&#x20;usage&#x20;%&#x0d;&#x0a;module_unit&#x20;%&#x0d;&#x0a;module_end',1,'','CPU&#x20;%','%',0,0,1,0,'','','','',4,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);
INSERT INTO tpolicy_modules (id, id_policy, configuration_data, id_tipo_modulo, description, name, unit, max, min, module_interval, tcp_port, tcp_send, tcp_rcv, snmp_community, snmp_oid, id_module_group, flag, id_module, disabled, id_export, plugin_user, plugin_pass, plugin_parameter, id_plugin, post_process, prediction_module, max_timeout, max_retries, custom_id, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, custom_string_1, custom_string_2, custom_string_3, custom_integer_1, custom_integer_2, pending_delete, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, module_ff_interval, quiet, cron_interval, macros, disabled_types_event, module_macros, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (8, 8,'module_begin&#x0d;&#x0a;module_name&#x20;CPU&#x20;User&#x0d;&#x0a;module_type&#x20;generic_data&#x0d;&#x0a;module_exec&#x20;vmstat&#x20;1&#x20;1&#x20;|&#x20;tail&#x20;-1|&#x20;awk&#x20;&#039;{print&#x20;$&#40;NF-2&#41;}&#039;&#x0d;&#x0a;module_description&#x20;CPU&#x20;user&#x20;usage&#x20;%&#x0d;&#x0a;module_unit&#x20;%&#x0d;&#x0a;module_end&#x0d;&#x0a;&#x0d;&#x0a;&#x0d;&#x0a;',1,'','CPU&#x20;User','%',0,0,1,0,'','','','',4,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);
INSERT INTO tpolicy_modules (id, id_policy, configuration_data, id_tipo_modulo, description, name, unit, max, min, module_interval, tcp_port, tcp_send, tcp_rcv, snmp_community, snmp_oid, id_module_group, flag, id_module, disabled, id_export, plugin_user, plugin_pass, plugin_parameter, id_plugin, post_process, prediction_module, max_timeout, max_retries, custom_id, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, custom_string_1, custom_string_2, custom_string_3, custom_integer_1, custom_integer_2, pending_delete, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, module_ff_interval, quiet, cron_interval, macros, disabled_types_event, module_macros, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (9, 8,'module_begin&#x0d;&#x0a;module_name&#x20;Load&#x20;Average&#x0d;&#x0a;module_type&#x20;generic_data&#x0d;&#x0a;module_exec&#x20;uptime&#x20;|&#x20;awk&#x20;&#039;{print&#x20;$&#40;NF-2&#41;}&#039;&#x20;|&#x20;tr&#x20;-d&#x20;&#039;,&#039;&#x0d;&#x0a;module_description&#x20;Load&#x20;average&#x0d;&#x0a;module_end',1,'','Load&#x20;Average','',0,0,1,0,'','','','',4,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);
INSERT INTO tpolicy_modules (id, id_policy, configuration_data, id_tipo_modulo, description, name, unit, max, min, module_interval, tcp_port, tcp_send, tcp_rcv, snmp_community, snmp_oid, id_module_group, flag, id_module, disabled, id_export, plugin_user, plugin_pass, plugin_parameter, id_plugin, post_process, prediction_module, max_timeout, max_retries, custom_id, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, custom_string_1, custom_string_2, custom_string_3, custom_integer_1, custom_integer_2, pending_delete, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, module_ff_interval, quiet, cron_interval, macros, disabled_types_event, module_macros, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (10, 8,'module_begin&#x0d;&#x0a;module_name&#x20;Memory&#x20;Free&#x20;%&#x0d;&#x0a;module_type&#x20;generic_data&#x0d;&#x0a;module_freepercentmemory&#x0d;&#x0a;module_description&#x20;Percentage&#x20;Mem&#x20;Free&#x0d;&#x0a;module_end&#x0d;&#x0a;&#x0d;&#x0a;&#x0d;&#x0a;&#x0d;&#x0a;',1,'','Memory&#x20;Free&#x20;%','%',0,0,1,0,'','','','',4,1,1,0,0,'','','',0,0.000000000000000,0,0,0,'',1,8.00,15.00,'0',0.00,7.00,'0',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);
INSERT INTO tpolicy_modules (id, id_policy, configuration_data, id_tipo_modulo, description, name, unit, max, min, module_interval, tcp_port, tcp_send, tcp_rcv, snmp_community, snmp_oid, id_module_group, flag, id_module, disabled, id_export, plugin_user, plugin_pass, plugin_parameter, id_plugin, post_process, prediction_module, max_timeout, max_retries, custom_id, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, custom_string_1, custom_string_2, custom_string_3, custom_integer_1, custom_integer_2, pending_delete, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, module_ff_interval, quiet, cron_interval, macros, disabled_types_event, module_macros, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (11, 8,'module_begin&#x0d;&#x0a;module_name&#x20;Total&#x20;processes&#x0d;&#x0a;module_type&#x20;generic_data&#x0d;&#x0a;module_exec&#x20;ps&#x20;-A&#x20;|&#x20;wc&#x20;-l&#x20;|&#x20;awk&#x20;&#039;{print&#x20;$1}&#039;&#x0d;&#x0a;module_description&#x20;Total&#x20;processes&#x0d;&#x0a;module_end&#x0d;&#x0a;&#x0d;&#x0a;&#x0d;&#x0a;&#x0d;&#x0a;&#x0d;&#x0a;',1,'','Total&#x20;processes','',0,0,1,0,'','','','',4,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);
INSERT INTO tpolicy_modules (id, id_policy, configuration_data, id_tipo_modulo, description, name, unit, max, min, module_interval, tcp_port, tcp_send, tcp_rcv, snmp_community, snmp_oid, id_module_group, flag, id_module, disabled, id_export, plugin_user, plugin_pass, plugin_parameter, id_plugin, post_process, prediction_module, max_timeout, max_retries, custom_id, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, custom_string_1, custom_string_2, custom_string_3, custom_integer_1, custom_integer_2, pending_delete, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, module_ff_interval, quiet, cron_interval, macros, disabled_types_event, module_macros, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (12, 8,'module_begin&#x0d;&#x0a;module_name&#x20;Uptime&#x0d;&#x0a;module_type&#x20;generic_data_string&#x0d;&#x0a;module_exec&#x20;uptime&#x20;|sed&#x20;s/us&#92;.*$//g&#x20;|&#x20;sed&#x20;s/,&#92;.*$//g&#x0d;&#x0a;module_description&#x20;Host&#x20;Up&#x20;time&#x0d;&#x0a;module_end&#x0d;&#x0a;',1,'','Uptime','',0,0,1,0,'','','','',4,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);
INSERT INTO tpolicy_modules (id, id_policy, configuration_data, id_tipo_modulo, description, name, unit, max, min, module_interval, tcp_port, tcp_send, tcp_rcv, snmp_community, snmp_oid, id_module_group, flag, id_module, disabled, id_export, plugin_user, plugin_pass, plugin_parameter, id_plugin, post_process, prediction_module, max_timeout, max_retries, custom_id, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, custom_string_1, custom_string_2, custom_string_3, custom_integer_1, custom_integer_2, pending_delete, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, module_ff_interval, quiet, cron_interval, macros, disabled_types_event, module_macros, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (13, 8,'module_begin&#x0d;&#x0a;module_name&#x20;Swap&#x20;Free&#x20;%&#x0d;&#x0a;module_type&#x20;generic_data&#x0d;&#x0a;module_exec&#x20;swap&#x20;-l&#x20;|tail&#x20;-1&#x20;|&#x20;awk&#x20;&#039;{print&#x20;$NF&#x20;/&#x20;$&#40;NF-1&#41;&#x20;*&#x20;100}&#039;&#x0d;&#x0a;module_unit&#x20;%&#x0d;&#x0a;module_description&#x20;Swap&#x20;memory&#x20;available&#x20;in&#x20;%&#x0d;&#x0a;module_end&#x0d;&#x0a;',1,'','Swap&#x20;Free&#x20;%','%',0,0,1,0,'','','','',4,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);
INSERT INTO tpolicy_modules (id, id_policy, configuration_data, id_tipo_modulo, description, name, unit, max, min, module_interval, tcp_port, tcp_send, tcp_rcv, snmp_community, snmp_oid, id_module_group, flag, id_module, disabled, id_export, plugin_user, plugin_pass, plugin_parameter, id_plugin, post_process, prediction_module, max_timeout, max_retries, custom_id, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, custom_string_1, custom_string_2, custom_string_3, custom_integer_1, custom_integer_2, pending_delete, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, module_ff_interval, quiet, cron_interval, macros, disabled_types_event, module_macros, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (14, 8,'module_begin&#x0d;&#x0a;module_name&#x20;Service&#x20;sshd&#x20;status&#x0d;&#x0a;module_type&#x20;generic_proc&#x0d;&#x0a;module_exec&#x20;netstat&#x20;-anu&#x20;|&#x20;grep&#x20;LISTEN&#x20;&#x20;|&#x20;grep&#x20;sshd&#x20;|&#x20;wc&#x20;-l&#x20;|&#x20;awk&#x20;&#039;{print&#x20;$1}&#039;&#x0d;&#x0a;module_end',2,'','Service&#x20;sshd&#x20;status','',0,0,1,0,'','','','',3,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);
INSERT INTO tpolicy_modules (id, id_policy, configuration_data, id_tipo_modulo, description, name, unit, max, min, module_interval, tcp_port, tcp_send, tcp_rcv, snmp_community, snmp_oid, id_module_group, flag, id_module, disabled, id_export, plugin_user, plugin_pass, plugin_parameter, id_plugin, post_process, prediction_module, max_timeout, max_retries, custom_id, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, custom_string_1, custom_string_2, custom_string_3, custom_integer_1, custom_integer_2, pending_delete, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, module_ff_interval, quiet, cron_interval, macros, disabled_types_event, module_macros, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (15, 9,'',6,'','Host&#x20;Alive','',0,0,300,0,'','','','',2,1,2,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);
INSERT INTO tpolicy_modules (id, id_policy, configuration_data, id_tipo_modulo, description, name, unit, max, min, module_interval, tcp_port, tcp_send, tcp_rcv, snmp_community, snmp_oid, id_module_group, flag, id_module, disabled, id_export, plugin_user, plugin_pass, plugin_parameter, id_plugin, post_process, prediction_module, max_timeout, max_retries, custom_id, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, custom_string_1, custom_string_2, custom_string_3, custom_integer_1, custom_integer_2, pending_delete, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, module_ff_interval, quiet, cron_interval, macros, disabled_types_event, module_macros, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (16, 9,'',9,'','Check&#x20;HTTP&#x20;Server','',0,0,300,80,'','','','',3,1,2,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);
INSERT INTO tpolicy_modules (id, id_policy, configuration_data, id_tipo_modulo, description, name, unit, max, min, module_interval, tcp_port, tcp_send, tcp_rcv, snmp_community, snmp_oid, id_module_group, flag, id_module, disabled, id_export, plugin_user, plugin_pass, plugin_parameter, id_plugin, post_process, prediction_module, max_timeout, max_retries, custom_id, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, custom_string_1, custom_string_2, custom_string_3, custom_integer_1, custom_integer_2, pending_delete, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, module_ff_interval, quiet, cron_interval, macros, disabled_types_event, module_macros, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (17, 9,'',9,'','Check&#x20;SSH&#x20;Server','',0,0,300,22,'','','','',2,1,2,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);
INSERT INTO tpolicy_modules (id, id_policy, configuration_data, id_tipo_modulo, description, name, unit, max, min, module_interval, tcp_port, tcp_send, tcp_rcv, snmp_community, snmp_oid, id_module_group, flag, id_module, disabled, id_export, plugin_user, plugin_pass, plugin_parameter, id_plugin, post_process, prediction_module, max_timeout, max_retries, custom_id, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, custom_string_1, custom_string_2, custom_string_3, custom_integer_1, custom_integer_2, pending_delete, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, module_ff_interval, quiet, cron_interval, macros, disabled_types_event, module_macros, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (18, 9,'',7,'','Host&#x20;Latency','',0,0,300,0,'','','','',2,1,2,0,0,'','','',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,'* * * * *','','{\"going_unknown\":0}','W10=',0,0,0,0,0,0,0,0,0,0,0);
INSERT INTO tpolicy_modules (id, id_policy, configuration_data, id_tipo_modulo, description, name, unit, max, min, module_interval, tcp_port, tcp_send, tcp_rcv, snmp_community, snmp_oid, id_module_group, flag, id_module, disabled, id_export, plugin_user, plugin_pass, plugin_parameter, id_plugin, post_process, prediction_module, max_timeout, max_retries, custom_id, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, custom_string_1, custom_string_2, custom_string_3, custom_integer_1, custom_integer_2, pending_delete, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, module_ff_interval, quiet, cron_interval, macros, disabled_types_event, module_macros, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (19, 2,'module_begin&#x0d;&#x0a;module_name&#x20;Free&#x20;percent&#x20;disk&#x20;C:&#x0d;&#x0a;module_type&#x20;generic_data&#x0d;&#x0a;module_freepercentdisk&#x20;C:&#x0d;&#x0a;module_end&#x0d;&#x0a;&#x0d;&#x0a;&#x0d;&#x0a;',1,'','Free&#x20;percent&#x20;disk&#x20;C:','',0,0,1,0,'','','','',4,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);
INSERT INTO tpolicy_modules (id, id_policy, configuration_data, id_tipo_modulo, description, name, unit, max, min, module_interval, tcp_port, tcp_send, tcp_rcv, snmp_community, snmp_oid, id_module_group, flag, id_module, disabled, id_export, plugin_user, plugin_pass, plugin_parameter, id_plugin, post_process, prediction_module, max_timeout, max_retries, custom_id, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, custom_string_1, custom_string_2, custom_string_3, custom_integer_1, custom_integer_2, pending_delete, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, module_ff_interval, quiet, cron_interval, macros, disabled_types_event, module_macros, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (20, 2,'module_begin&#x0d;&#x0a;module_name&#x20;Memory&#x20;Free&#x20;%&#x0d;&#x0a;module_type&#x20;generic_data&#x0d;&#x0a;module_freepercentmemory&#x0d;&#x0a;module_description&#x20;Percentage&#x20;Mem&#x20;Free&#x0d;&#x0a;module_end&#x0d;&#x0a;&#x0d;&#x0a;&#x0d;&#x0a;&#x0d;&#x0a;',1,'','Memory&#x20;Free&#x20;%','%',0,0,1,0,'','','','',4,1,1,0,0,'','','',0,0.000000000000000,0,0,0,'',1,8.00,15.00,'0',0.00,7.00,'0',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);
INSERT INTO tpolicy_modules (id, id_policy, configuration_data, id_tipo_modulo, description, name, unit, max, min, module_interval, tcp_port, tcp_send, tcp_rcv, snmp_community, snmp_oid, id_module_group, flag, id_module, disabled, id_export, plugin_user, plugin_pass, plugin_parameter, id_plugin, post_process, prediction_module, max_timeout, max_retries, custom_id, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, custom_string_1, custom_string_2, custom_string_3, custom_integer_1, custom_integer_2, pending_delete, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, module_ff_interval, quiet, cron_interval, macros, disabled_types_event, module_macros, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (21, 2,'module_begin&#x0d;&#x0a;module_name&#x20;CPU&#x20;%&#x0d;&#x0a;module_type&#x20;generic_data&#x0d;&#x0a;module_cpuusage&#x20;all&#x0d;&#x0a;module_unit&#x20;%&#x0d;&#x0a;module_end&#x0d;&#x0a;&#x0d;&#x0a;&#x0d;&#x0a;',1,'','CPU&#x20;%','%',0,0,1,0,'','','','',4,1,1,0,0,'','','',0,0.000000000000000,0,0,0,'',1,80.00,90.00,'',91.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);
INSERT INTO tpolicy_modules (id, id_policy, configuration_data, id_tipo_modulo, description, name, unit, max, min, module_interval, tcp_port, tcp_send, tcp_rcv, snmp_community, snmp_oid, id_module_group, flag, id_module, disabled, id_export, plugin_user, plugin_pass, plugin_parameter, id_plugin, post_process, prediction_module, max_timeout, max_retries, custom_id, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, custom_string_1, custom_string_2, custom_string_3, custom_integer_1, custom_integer_2, pending_delete, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, module_ff_interval, quiet, cron_interval, macros, disabled_types_event, module_macros, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (22, 2,'module_begin&#x0d;&#x0a;module_name&#x20;Processor&#x20;User&#x20;Time&#x20;%&#x0d;&#x0a;module_type&#x20;generic_data&#x0d;&#x0a;module_perfcounter&#x20;&#92;Processor&#x20;Information&#40;_Total&#41;&#92;%&#x20;User&#x20;Time&#x0d;&#x0a;module_cooked&#x20;1&#x0d;&#x0a;module_description&#x20;Processor_User_Time&#x20;&#40;%&#41;&#x0d;&#x0a;module_end&#x0d;&#x0a;&#x0d;&#x0a;&#x0d;&#x0a;&#x0d;&#x0a;&#x0d;&#x0a;',1,'','Processor&#x20;User&#x20;Time&#x20;%','',0,0,1,0,'','','','',4,1,1,0,0,'','','',0,0.001000000000000,0,0,0,'',1,75.00,84.00,'',85.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);
INSERT INTO tpolicy_modules (id, id_policy, configuration_data, id_tipo_modulo, description, name, unit, max, min, module_interval, tcp_port, tcp_send, tcp_rcv, snmp_community, snmp_oid, id_module_group, flag, id_module, disabled, id_export, plugin_user, plugin_pass, plugin_parameter, id_plugin, post_process, prediction_module, max_timeout, max_retries, custom_id, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, custom_string_1, custom_string_2, custom_string_3, custom_integer_1, custom_integer_2, pending_delete, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, module_ff_interval, quiet, cron_interval, macros, disabled_types_event, module_macros, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (23, 2,'module_begin&#x0d;&#x0a;module_name&#x20;Total&#x20;processes&#x0d;&#x0a;module_type&#x20;generic_data&#x0d;&#x0a;module_exec&#x20;tasklist&#x20;|&#x20;wc&#x20;-l&#x20;|&#x20;gawk&#x20;&quot;{print&#x20;$1}&quot;&#x0d;&#x0a;module_end&#x0d;&#x0a;&#x0d;&#x0a;&#x0d;&#x0a;',1,'','Total&#x20;processes','',0,0,1,0,'','','','',4,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);
INSERT INTO tpolicy_modules (id, id_policy, configuration_data, id_tipo_modulo, description, name, unit, max, min, module_interval, tcp_port, tcp_send, tcp_rcv, snmp_community, snmp_oid, id_module_group, flag, id_module, disabled, id_export, plugin_user, plugin_pass, plugin_parameter, id_plugin, post_process, prediction_module, max_timeout, max_retries, custom_id, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, custom_string_1, custom_string_2, custom_string_3, custom_integer_1, custom_integer_2, pending_delete, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, module_ff_interval, quiet, cron_interval, macros, disabled_types_event, module_macros, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (24, 2,'module_begin&#x0d;&#x0a;module_name&#x20;Load&#x20;Average&#x0d;&#x0a;module_type&#x20;generic_data&#x0d;&#x0a;module_perfcounter&#x20;&#92;System&#40;_Total&#41;&#92;Processor&#x20;Queue&#x20;Length&#x0d;&#x0a;module_end&#x0d;&#x0a;',1,'','Load&#x20;Average','',0,0,1,0,'','','','',4,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);
INSERT INTO tpolicy_modules (id, id_policy, configuration_data, id_tipo_modulo, description, name, unit, max, min, module_interval, tcp_port, tcp_send, tcp_rcv, snmp_community, snmp_oid, id_module_group, flag, id_module, disabled, id_export, plugin_user, plugin_pass, plugin_parameter, id_plugin, post_process, prediction_module, max_timeout, max_retries, custom_id, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, custom_string_1, custom_string_2, custom_string_3, custom_integer_1, custom_integer_2, pending_delete, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, module_ff_interval, quiet, cron_interval, macros, disabled_types_event, module_macros, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (25, 2,'module_begin&#x0d;&#x0a;module_name&#x20;Uptime&#x0d;&#x0a;module_type&#x20;generic_data_string&#x0d;&#x0a;module_exec&#x20;net&#x20;statistics&#x20;server&#x20;|&#x20;grep&#x20;since&#x20;|&#x20;gawk&#x20;&quot;{print&#x20;&#92;&quot;Up&#x20;since&#x20;&#92;&quot;$3&#92;&quot;&#x20;&#92;&quot;$4&#92;&quot;&#x20;&#92;&quot;$5}&quot;&#x0d;&#x0a;module_end&#x0d;&#x0a;&#x0d;&#x0a;&#x0d;&#x0a;',1,'','Uptime','',0,0,1,0,'','','','',4,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);
INSERT INTO tpolicy_modules (id, id_policy, configuration_data, id_tipo_modulo, description, name, unit, max, min, module_interval, tcp_port, tcp_send, tcp_rcv, snmp_community, snmp_oid, id_module_group, flag, id_module, disabled, id_export, plugin_user, plugin_pass, plugin_parameter, id_plugin, post_process, prediction_module, max_timeout, max_retries, custom_id, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, custom_string_1, custom_string_2, custom_string_3, custom_integer_1, custom_integer_2, pending_delete, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, module_ff_interval, quiet, cron_interval, macros, disabled_types_event, module_macros, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (26, 7,'module_begin&#x0d;&#x0a;module_name&#x20;Memory&#x20;Free&#x20;%&#x0d;&#x0a;module_type&#x20;generic_data&#x0d;&#x0a;module_exec&#x20;echo&#x20;&quot;&quot;&#x20;&gt;&#x20;/tmp/hpvm_toptest;&#x20;top&#x20;-d&#x20;1&#x20;-f&#x20;/tmp/hpvm_toptest&#x20;2&gt;/dev/null&#x20;1&gt;/dev/null;&#x20;cat&#x20;/tmp/hpvm_toptest&#x20;|&#x20;grep&#x20;-i&#x20;Memory&#x20;|&#x20;head&#x20;-1&#x20;|&#x20;awk&#x20;&#039;{print&#x20;$8/&#40;$2+$5&#41;&#x20;*&#x20;100}&#039;&#x0d;&#x0a;module_end&#x0d;&#x0a;&#x0d;&#x0a;&#x0d;&#x0a;',1,'','Memory&#x20;Free&#x20;%','',0,0,1,0,'','','','',4,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);
INSERT INTO tpolicy_modules (id, id_policy, configuration_data, id_tipo_modulo, description, name, unit, max, min, module_interval, tcp_port, tcp_send, tcp_rcv, snmp_community, snmp_oid, id_module_group, flag, id_module, disabled, id_export, plugin_user, plugin_pass, plugin_parameter, id_plugin, post_process, prediction_module, max_timeout, max_retries, custom_id, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, custom_string_1, custom_string_2, custom_string_3, custom_integer_1, custom_integer_2, pending_delete, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, module_ff_interval, quiet, cron_interval, macros, disabled_types_event, module_macros, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (27, 7,'module_begin&#x0d;&#x0a;module_name&#x20;CPU&#x20;%&#x0d;&#x0a;module_type&#x20;generic_data&#x0d;&#x0a;module_cpuusage&#x20;all&#x0d;&#x0a;module_unit&#x20;%&#x0d;&#x0a;module_end&#x0d;&#x0a;',1,'','CPU&#x20;%','',0,0,1,0,'','','','',4,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);
INSERT INTO tpolicy_modules (id, id_policy, configuration_data, id_tipo_modulo, description, name, unit, max, min, module_interval, tcp_port, tcp_send, tcp_rcv, snmp_community, snmp_oid, id_module_group, flag, id_module, disabled, id_export, plugin_user, plugin_pass, plugin_parameter, id_plugin, post_process, prediction_module, max_timeout, max_retries, custom_id, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, custom_string_1, custom_string_2, custom_string_3, custom_integer_1, custom_integer_2, pending_delete, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, module_ff_interval, quiet, cron_interval, macros, disabled_types_event, module_macros, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (28, 7,'module_begin&#x0d;&#x0a;module_name&#x20;CPU&#x20;User&#x0d;&#x0a;module_type&#x20;generic_data&#x0d;&#x0a;module_exec&#x20;vmstat&#x20;1&#x20;2&#x20;|&#x20;tail&#x20;-1&#x20;|&#x20;awk&#x20;&#039;{&#x20;print&#x20;$&#40;16&#41;&#x20;}&#039;&#x0d;&#x0a;module_description&#x20;%&#x20;of&#x20;User&#x20;CPU&#x0d;&#x0a;module_unit&#x20;%&#x0d;&#x0a;module_end&#x0d;&#x0a;&#x0d;&#x0a;',1,'','CPU&#x20;User','%',0,0,1,0,'','','','',4,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);
INSERT INTO tpolicy_modules (id, id_policy, configuration_data, id_tipo_modulo, description, name, unit, max, min, module_interval, tcp_port, tcp_send, tcp_rcv, snmp_community, snmp_oid, id_module_group, flag, id_module, disabled, id_export, plugin_user, plugin_pass, plugin_parameter, id_plugin, post_process, prediction_module, max_timeout, max_retries, custom_id, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, custom_string_1, custom_string_2, custom_string_3, custom_integer_1, custom_integer_2, pending_delete, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, module_ff_interval, quiet, cron_interval, macros, disabled_types_event, module_macros, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (29, 7,'module_begin&#x0d;&#x0a;module_name&#x20;Total&#x20;processes&#x0d;&#x0a;module_type&#x20;generic_data&#x0d;&#x0a;module_exec&#x20;echo&#x20;$&#40;&#40;&#40;ps&#x20;-e&#x20;|&#x20;wc&#x20;-l&#41;-1&#41;&#41;&#x20;|&#x20;tr&#x20;-d&#x20;&ldquo;&#92;n&rdquo;&#x0d;&#x0a;module_description&#x20;Total&#x20;processes&#x0d;&#x0a;module_end&#x0d;&#x0a;&#x0d;&#x0a;',1,'','Total&#x20;processes','',0,0,1,0,'','','','',4,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);
INSERT INTO tpolicy_modules (id, id_policy, configuration_data, id_tipo_modulo, description, name, unit, max, min, module_interval, tcp_port, tcp_send, tcp_rcv, snmp_community, snmp_oid, id_module_group, flag, id_module, disabled, id_export, plugin_user, plugin_pass, plugin_parameter, id_plugin, post_process, prediction_module, max_timeout, max_retries, custom_id, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, custom_string_1, custom_string_2, custom_string_3, custom_integer_1, custom_integer_2, pending_delete, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, module_ff_interval, quiet, cron_interval, macros, disabled_types_event, module_macros, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (30, 7,'module_begin&#x0d;&#x0a;module_name&#x20;Zombie&#x20;processes&#x0d;&#x0a;module_type&#x20;generic_data&#x0d;&#x0a;module_exec&#x20;ps&#x20;-&shy;elf&#x20;|&#x20;awk&#x20;&#039;$2~/&#039;Z&#039;/{print&#x20;$2}&#039;&#x20;|&#x20;wc&#x20;-l&#x20;|&#x20;tr&#x20;-d&#x20;&quot;&#92;n&quot;&#x0d;&#x0a;module_description&#x20;Zombie&#x20;processes&#x0d;&#x0a;module_end&#x0d;&#x0a;',1,'','Zombie&#x20;processes','',0,0,1,0,'','','','',4,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);
INSERT INTO tpolicy_modules (id, id_policy, configuration_data, id_tipo_modulo, description, name, unit, max, min, module_interval, tcp_port, tcp_send, tcp_rcv, snmp_community, snmp_oid, id_module_group, flag, id_module, disabled, id_export, plugin_user, plugin_pass, plugin_parameter, id_plugin, post_process, prediction_module, max_timeout, max_retries, custom_id, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, custom_string_1, custom_string_2, custom_string_3, custom_integer_1, custom_integer_2, pending_delete, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, module_ff_interval, quiet, cron_interval, macros, disabled_types_event, module_macros, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (31, 7,'module_begin&#x0d;&#x0a;module_name&#x20;&#x20;Service&#x20;sshd&#x20;status&#x0d;&#x0a;module_type&#x20;generic_proc&#x0d;&#x0a;module_exec&#x20;ps&#x20;-ef&#x20;|&#x20;grep&#x20;&#x20;-v&#x20;grep&#x20;|&#x20;grep&#x20;&quot;/opt/ssh/sbin/sshd&quot;&#x20;|&#x20;wc&#x20;-l&#x0d;&#x0a;module_description&#x20;SSH&#x20;running&#x0d;&#x0a;module_end&#x0d;&#x0a;&#x0d;&#x0a;',2,'','Service&#x20;sshd&#x20;status','',0,0,1,0,'','','','',3,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);
INSERT INTO tpolicy_modules (id, id_policy, configuration_data, id_tipo_modulo, description, name, unit, max, min, module_interval, tcp_port, tcp_send, tcp_rcv, snmp_community, snmp_oid, id_module_group, flag, id_module, disabled, id_export, plugin_user, plugin_pass, plugin_parameter, id_plugin, post_process, prediction_module, max_timeout, max_retries, custom_id, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, custom_string_1, custom_string_2, custom_string_3, custom_integer_1, custom_integer_2, pending_delete, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, module_ff_interval, quiet, cron_interval, macros, disabled_types_event, module_macros, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (32, 6,'module_begin&#x0d;&#x0a;module_name&#x20;CPU&#x20;%&#x0d;&#x0a;module_type&#x20;generic_data&#x0d;&#x0a;module_exec&#x20;sar&#x20;1&#x20;|&#x20;tail&#x20;-1&#x20;|&#x20;awk&#x20;&#039;{print&#x20;100&#x20;-&#x20;$5}&#039;&#x0d;&#x0a;module_description&#x20;CPU&#x20;usage&#x20;in&#x20;%&#x0d;&#x0a;module_unit&#x20;%&#x0d;&#x0a;module_end',1,'','CPU&#x20;%','%',0,0,1,0,'','','','',4,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);
INSERT INTO tpolicy_modules (id, id_policy, configuration_data, id_tipo_modulo, description, name, unit, max, min, module_interval, tcp_port, tcp_send, tcp_rcv, snmp_community, snmp_oid, id_module_group, flag, id_module, disabled, id_export, plugin_user, plugin_pass, plugin_parameter, id_plugin, post_process, prediction_module, max_timeout, max_retries, custom_id, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, custom_string_1, custom_string_2, custom_string_3, custom_integer_1, custom_integer_2, pending_delete, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, module_ff_interval, quiet, cron_interval, macros, disabled_types_event, module_macros, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (33, 6,'module_begin&#x0d;&#x0a;module_name&#x20;Memory&#x20;Free&#x20;%&#x0d;&#x0a;module_type&#x20;generic_data&#x0d;&#x0a;module_exec&#x20;svmon&#x20;-G|grep&#x20;memory&#x20;|&#x20;awk&#x20;&#039;{print&#x20;&#40;1-&#x20;$3/$2&#x20;&#41;*100}&#039;&#x0d;&#x0a;module_description&#x20;Percentage&#x20;Mem&#x20;Free&#x0d;&#x0a;module_end&#x0d;&#x0a;',1,'','Memory&#x20;Free&#x20;%','',0,0,1,0,'','','','',4,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);
INSERT INTO tpolicy_modules (id, id_policy, configuration_data, id_tipo_modulo, description, name, unit, max, min, module_interval, tcp_port, tcp_send, tcp_rcv, snmp_community, snmp_oid, id_module_group, flag, id_module, disabled, id_export, plugin_user, plugin_pass, plugin_parameter, id_plugin, post_process, prediction_module, max_timeout, max_retries, custom_id, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, custom_string_1, custom_string_2, custom_string_3, custom_integer_1, custom_integer_2, pending_delete, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, module_ff_interval, quiet, cron_interval, macros, disabled_types_event, module_macros, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (34, 6,'module_begin&#x0d;&#x0a;module_name&#x20;CPU&#x20;User&#x0d;&#x0a;module_type&#x20;generic_data&#x0d;&#x0a;module_exec&#x20;sar&#x20;1&#x20;|&#x20;tail&#x20;-1&#x20;|&#x20;awk&#x20;&#039;{print&#x20;$2}&#039;&#x0d;&#x0a;module_description&#x20;CPU&#x20;usage&#x20;in&#x20;%&#x0d;&#x0a;module_unit&#x20;%&#x0d;&#x0a;module_end',1,'','CPU&#x20;User','%',0,0,1,0,'','','','',4,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);
INSERT INTO tpolicy_modules (id, id_policy, configuration_data, id_tipo_modulo, description, name, unit, max, min, module_interval, tcp_port, tcp_send, tcp_rcv, snmp_community, snmp_oid, id_module_group, flag, id_module, disabled, id_export, plugin_user, plugin_pass, plugin_parameter, id_plugin, post_process, prediction_module, max_timeout, max_retries, custom_id, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, custom_string_1, custom_string_2, custom_string_3, custom_integer_1, custom_integer_2, pending_delete, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, module_ff_interval, quiet, cron_interval, macros, disabled_types_event, module_macros, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (35, 6,'module_begin&#x20;&#x0d;&#x0a;module_name&#x20;Load&#x20;Average&#x0d;&#x0a;module_type&#x20;generic_data&#x0d;&#x0a;module_exec&#x20;uptime&#x20;|&#x20;awk&#x20;&#039;{print&#x20;$&#40;NF-2&#41;*1}&#039;&#x20;&#x0d;&#x0a;module_description&#x20;Average&#x20;process&#x20;in&#x20;CPU&#x20;&#40;Last&#x20;minute&#41;&#x20;&#x0d;&#x0a;module_end',1,'','Load&#x20;Average','',0,0,1,0,'','','','',4,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);
INSERT INTO tpolicy_modules (id, id_policy, configuration_data, id_tipo_modulo, description, name, unit, max, min, module_interval, tcp_port, tcp_send, tcp_rcv, snmp_community, snmp_oid, id_module_group, flag, id_module, disabled, id_export, plugin_user, plugin_pass, plugin_parameter, id_plugin, post_process, prediction_module, max_timeout, max_retries, custom_id, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, custom_string_1, custom_string_2, custom_string_3, custom_integer_1, custom_integer_2, pending_delete, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, module_ff_interval, quiet, cron_interval, macros, disabled_types_event, module_macros, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (36, 6,'module_begin&#x0d;&#x0a;module_name&#x20;Uptime&#x0d;&#x0a;module_type&#x20;generic_data_string&#x0d;&#x0a;module_exec&#x20;uptime&#x20;|sed&#x20;&quot;s/us&#92;.*$//g&quot;&#x20;|&#x20;sed&#x20;&quot;s/,&#92;.*$//g&quot;&#x0d;&#x0a;module_description&#x20;Host&#x20;Up&#x20;time&#x0d;&#x0a;module_end&#x0d;&#x0a;',1,'','Uptime','',0,0,1,0,'','','','',4,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);
INSERT INTO tpolicy_modules (id, id_policy, configuration_data, id_tipo_modulo, description, name, unit, max, min, module_interval, tcp_port, tcp_send, tcp_rcv, snmp_community, snmp_oid, id_module_group, flag, id_module, disabled, id_export, plugin_user, plugin_pass, plugin_parameter, id_plugin, post_process, prediction_module, max_timeout, max_retries, custom_id, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, custom_string_1, custom_string_2, custom_string_3, custom_integer_1, custom_integer_2, pending_delete, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, module_ff_interval, quiet, cron_interval, macros, disabled_types_event, module_macros, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (37, 6,'module_begin&#x0d;&#x0a;module_name&#x20;Pagination&#x20;use&#x0d;&#x0a;module_type&#x20;generic_data&#x0d;&#x0a;module_exec&#x20;&#x20;lsps&#x20;-s&#x20;|&#x20;tail&#x20;-1&#x20;|&#x20;awk&#x20;&#039;{print&#x20;$2+0}&#039;&#x0d;&#x0a;module_end',1,'','Pagination&#x20;use','',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);
INSERT INTO tpolicy_modules (id, id_policy, configuration_data, id_tipo_modulo, description, name, unit, max, min, module_interval, tcp_port, tcp_send, tcp_rcv, snmp_community, snmp_oid, id_module_group, flag, id_module, disabled, id_export, plugin_user, plugin_pass, plugin_parameter, id_plugin, post_process, prediction_module, max_timeout, max_retries, custom_id, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, custom_string_1, custom_string_2, custom_string_3, custom_integer_1, custom_integer_2, pending_delete, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, module_ff_interval, quiet, cron_interval, macros, disabled_types_event, module_macros, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (38, 6,'module_begin&#x0d;&#x0a;module_name&#x20;Service&#x20;sshd&#x20;status&#x0d;&#x0a;module_type&#x20;generic_proc&#x0d;&#x0a;module_exec&#x20;lssrc&#x20;-a&#x20;|&#x20;grep&#x20;ssh&#x20;|&#x20;grep&#x20;active&#x0d;&#x0a;module_end',2,'','Service&#x20;sshd&#x20;status','',0,0,1,0,'','','','',3,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);
INSERT INTO tpolicy_modules (id, id_policy, configuration_data, id_tipo_modulo, description, name, unit, max, min, module_interval, tcp_port, tcp_send, tcp_rcv, snmp_community, snmp_oid, id_module_group, flag, id_module, disabled, id_export, plugin_user, plugin_pass, plugin_parameter, id_plugin, post_process, prediction_module, max_timeout, max_retries, custom_id, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, custom_string_1, custom_string_2, custom_string_3, custom_integer_1, custom_integer_2, pending_delete, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, module_ff_interval, quiet, cron_interval, macros, disabled_types_event, module_macros, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (39, 4,'module_begin&#x0d;&#x0a;module_name&#x20;Blocks&#x20;in&#x0d;&#x0a;module_type&#x20;generic_data&#x0d;&#x0a;module_exec&#x20;vmstat&#x20;1&#x20;1&#x20;|&#x20;tail&#x20;-1&#x20;|&#x20;awk&#x20;&#039;{print&#x20;$9}&#039;&#x0d;&#x0a;module_description&#x20;Blocks&#x20;in.&#x20;i.e&#x20;blocks&#x20;received&#x20;from&#x20;device&#x0d;&#x0a;module_end',1,'','Blocks&#x20;in','',0,0,1,0,'','','','',4,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);
INSERT INTO tpolicy_modules (id, id_policy, configuration_data, id_tipo_modulo, description, name, unit, max, min, module_interval, tcp_port, tcp_send, tcp_rcv, snmp_community, snmp_oid, id_module_group, flag, id_module, disabled, id_export, plugin_user, plugin_pass, plugin_parameter, id_plugin, post_process, prediction_module, max_timeout, max_retries, custom_id, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, custom_string_1, custom_string_2, custom_string_3, custom_integer_1, custom_integer_2, pending_delete, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, module_ff_interval, quiet, cron_interval, macros, disabled_types_event, module_macros, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (40, 4,'module_begin&#x0d;&#x0a;module_name&#x20;Blocks&#x20;out&#x0d;&#x0a;module_type&#x20;generic_data&#x0d;&#x0a;module_exec&#x20;vmstat&#x20;1&#x20;1&#x20;|&#x20;tail&#x20;-1&#x20;|&#x20;awk&#x20;&#039;{print&#x20;$&#40;10&#41;}&#039;&#x0d;&#x0a;module_description&#x20;Blocks&#x20;out.&#x20;i.e&#x20;blocks&#x20;sent&#x20;from&#x20;device&#x0d;&#x0a;module_end',1,'','Blocks&#x20;out','',0,0,1,0,'','','','',4,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);
INSERT INTO tpolicy_modules (id, id_policy, configuration_data, id_tipo_modulo, description, name, unit, max, min, module_interval, tcp_port, tcp_send, tcp_rcv, snmp_community, snmp_oid, id_module_group, flag, id_module, disabled, id_export, plugin_user, plugin_pass, plugin_parameter, id_plugin, post_process, prediction_module, max_timeout, max_retries, custom_id, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, custom_string_1, custom_string_2, custom_string_3, custom_integer_1, custom_integer_2, pending_delete, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, module_ff_interval, quiet, cron_interval, macros, disabled_types_event, module_macros, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (41, 4,'module_begin&#x0d;&#x0a;module_name&#x20;CPU&#x20;%&#x0d;&#x0a;module_type&#x20;generic_data&#x0d;&#x0a;module_cpuusage&#x20;all&#x0d;&#x0a;module_unit&#x20;%&#x0d;&#x0a;module_end',1,'','CPU&#x20;%','',0,0,1,0,'','','','',4,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);
INSERT INTO tpolicy_modules (id, id_policy, configuration_data, id_tipo_modulo, description, name, unit, max, min, module_interval, tcp_port, tcp_send, tcp_rcv, snmp_community, snmp_oid, id_module_group, flag, id_module, disabled, id_export, plugin_user, plugin_pass, plugin_parameter, id_plugin, post_process, prediction_module, max_timeout, max_retries, custom_id, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, custom_string_1, custom_string_2, custom_string_3, custom_integer_1, custom_integer_2, pending_delete, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, module_ff_interval, quiet, cron_interval, macros, disabled_types_event, module_macros, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (42, 4,'module_begin&#x0d;&#x0a;module_name&#x20;Memory&#x20;Free&#x20;%&#x0d;&#x0a;module_type&#x20;generic_data&#x0d;&#x0a;module_exec&#x20;free&#x20;|&#x20;grep&#x20;-i&#x20;mem&#x20;|&#x20;awk&#x20;&#039;{print&#x20;&#40;$4+$NF&#41;/$2&#x20;*&#x20;100}&#039;&#x0d;&#x0a;module_description&#x20;Percentage&#x20;Mem&#x20;Free&#x0d;&#x0a;module_end',1,'','Memory&#x20;Free&#x20;%','',0,0,1,0,'','','','',4,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);
INSERT INTO tpolicy_modules (id, id_policy, configuration_data, id_tipo_modulo, description, name, unit, max, min, module_interval, tcp_port, tcp_send, tcp_rcv, snmp_community, snmp_oid, id_module_group, flag, id_module, disabled, id_export, plugin_user, plugin_pass, plugin_parameter, id_plugin, post_process, prediction_module, max_timeout, max_retries, custom_id, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, custom_string_1, custom_string_2, custom_string_3, custom_integer_1, custom_integer_2, pending_delete, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, module_ff_interval, quiet, cron_interval, macros, disabled_types_event, module_macros, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (43, 4,'module_begin&#x0d;&#x0a;module_name&#x20;I/O&#x20;Lock&#x0d;&#x0a;module_type&#x20;generic_data&#x0d;&#x0a;module_exec&#x20;vmstat&#x20;1&#x20;1&#x20;|&#x20;tail&#x20;-1&#x20;|&#x20;awk&#x20;&#039;{print&#x20;$&#40;16&#41;}&#039;&#x0d;&#x0a;module_description&#x20;I/O&#x20;Wait&#x20;Disk&#x0d;&#x0a;module_end',1,'','I/O&#x20;Lock','',0,0,1,0,'','','','',4,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);
INSERT INTO tpolicy_modules (id, id_policy, configuration_data, id_tipo_modulo, description, name, unit, max, min, module_interval, tcp_port, tcp_send, tcp_rcv, snmp_community, snmp_oid, id_module_group, flag, id_module, disabled, id_export, plugin_user, plugin_pass, plugin_parameter, id_plugin, post_process, prediction_module, max_timeout, max_retries, custom_id, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, custom_string_1, custom_string_2, custom_string_3, custom_integer_1, custom_integer_2, pending_delete, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, module_ff_interval, quiet, cron_interval, macros, disabled_types_event, module_macros, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (44, 4,'module_begin&#x0d;&#x0a;module_name&#x20;Total&#x20;processes&#x0d;&#x0a;module_type&#x20;generic_data&#x0d;&#x0a;module_exec&#x20;&#x20;ps&#x20;ax&#x20;|&#x20;tail&#x20;-n&#x20;+2&#x20;|&#x20;wc&#x20;-l&#x0d;&#x0a;module_description&#x20;Total&#x20;processes&#x0d;&#x0a;module_end',1,'','Total&#x20;processes','',0,0,1,0,'','','','',4,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);
INSERT INTO tpolicy_modules (id, id_policy, configuration_data, id_tipo_modulo, description, name, unit, max, min, module_interval, tcp_port, tcp_send, tcp_rcv, snmp_community, snmp_oid, id_module_group, flag, id_module, disabled, id_export, plugin_user, plugin_pass, plugin_parameter, id_plugin, post_process, prediction_module, max_timeout, max_retries, custom_id, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, custom_string_1, custom_string_2, custom_string_3, custom_integer_1, custom_integer_2, pending_delete, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, module_ff_interval, quiet, cron_interval, macros, disabled_types_event, module_macros, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (45, 4,'module_begin&#x20;&#x0d;&#x0a;module_name&#x20;Load&#x20;Average&#x0d;&#x0a;module_type&#x20;generic_data&#x0d;&#x0a;module_exec&#x20;uptime&#x20;|&#x20;awk&#x20;&#039;{print&#x20;$&#40;NF-2&#41;*1}&#039;&#x0d;&#x0a;module_description&#x20;Average&#x20;process&#x20;in&#x20;CPU&#x20;&#40;Last&#x20;minute&#41;&#x20;&#x0d;&#x0a;module_end',1,'','Load&#x20;Average','',0,0,1,0,'','','','',4,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);
INSERT INTO tpolicy_modules (id, id_policy, configuration_data, id_tipo_modulo, description, name, unit, max, min, module_interval, tcp_port, tcp_send, tcp_rcv, snmp_community, snmp_oid, id_module_group, flag, id_module, disabled, id_export, plugin_user, plugin_pass, plugin_parameter, id_plugin, post_process, prediction_module, max_timeout, max_retries, custom_id, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, custom_string_1, custom_string_2, custom_string_3, custom_integer_1, custom_integer_2, pending_delete, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, module_ff_interval, quiet, cron_interval, macros, disabled_types_event, module_macros, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (46, 4,'module_begin&#x0d;&#x0a;module_name&#x20;Service&#x20;sshd&#x20;status&#x0d;&#x0a;module_type&#x20;generic_proc&#x0d;&#x0a;module_exec&#x20;rcsshd&#x20;status&#x20;|&#x20;grep&#x20;running&#x20;|&#x20;wc&#x20;-l&#x0d;&#x0a;module_end',2,'','Service&#x20;sshd&#x20;status','',0,0,1,0,'','','','',3,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);
INSERT INTO tpolicy_modules (id, id_policy, configuration_data, id_tipo_modulo, description, name, unit, max, min, module_interval, tcp_port, tcp_send, tcp_rcv, snmp_community, snmp_oid, id_module_group, flag, id_module, disabled, id_export, plugin_user, plugin_pass, plugin_parameter, id_plugin, post_process, prediction_module, max_timeout, max_retries, custom_id, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, custom_string_1, custom_string_2, custom_string_3, custom_integer_1, custom_integer_2, pending_delete, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, module_ff_interval, quiet, cron_interval, macros, disabled_types_event, module_macros, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (47, 7,'module_begin&#x0d;&#x0a;module_name&#x20;Load&#x20;Average&#x0d;&#x0a;module_type&#x20;generic_data&#x0d;&#x0a;module_exec&#x20;uptime&#x20;|&#x20;awk&#x20;&#039;{print&#x20;$&#40;NF-2&#41;}&#039;&#x20;|&#x20;tr&#x20;-d&#x20;&#039;,&#039;&#x0d;&#x0a;module_description&#x20;System&#x20;load&#x20;average&#x0d;&#x0a;module_end&#x0d;&#x0a;',1,'','Load&#x20;Average','',0,0,1,0,'','','','',4,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);
INSERT INTO tpolicy_modules (id, id_policy, configuration_data, id_tipo_modulo, description, name, unit, max, min, module_interval, tcp_port, tcp_send, tcp_rcv, snmp_community, snmp_oid, id_module_group, flag, id_module, disabled, id_export, plugin_user, plugin_pass, plugin_parameter, id_plugin, post_process, prediction_module, max_timeout, max_retries, custom_id, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, custom_string_1, custom_string_2, custom_string_3, custom_integer_1, custom_integer_2, pending_delete, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, module_ff_interval, quiet, cron_interval, macros, disabled_types_event, module_macros, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (48, 7,'module_begin&#x0d;&#x0a;module_name&#x20;Uptime&#x0d;&#x0a;module_type&#x20;generic_data_string&#x0d;&#x0a;module_exec&#x20;uptime&#x20;|sed&#x20;s/us&#92;.*$//g&#x20;|&#x20;sed&#x20;s/,&#92;.*$//g&#x0d;&#x0a;module_description&#x20;Host&#x20;Up&#x20;time&#x0d;&#x0a;module_end&#x0d;&#x0a;',3,'','Uptime','',0,0,1,0,'','','','',4,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);
INSERT INTO tpolicy_modules (id, id_policy, configuration_data, id_tipo_modulo, description, name, unit, max, min, module_interval, tcp_port, tcp_send, tcp_rcv, snmp_community, snmp_oid, id_module_group, flag, id_module, disabled, id_export, plugin_user, plugin_pass, plugin_parameter, id_plugin, post_process, prediction_module, max_timeout, max_retries, custom_id, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, custom_string_1, custom_string_2, custom_string_3, custom_integer_1, custom_integer_2, pending_delete, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, module_ff_interval, quiet, cron_interval, macros, disabled_types_event, module_macros, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (49, 4,'module_begin&#x0d;&#x0a;module_name&#x20;Uptime&#x0d;&#x0a;module_type&#x20;generic_data_string&#x0d;&#x0a;module_exec&#x20;uptime&#x20;|sed&#x20;s/us&#92;.*$//g&#x20;|&#x20;sed&#x20;s/,&#92;.*$//g&#x0d;&#x0a;module_description&#x20;Host&#x20;Up&#x20;time&#x0d;&#x0a;module_end',3,'','Uptime','',0,0,1,0,'','','','',4,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);
INSERT INTO tpolicy_modules (id, id_policy, configuration_data, id_tipo_modulo, description, name, unit, max, min, module_interval, tcp_port, tcp_send, tcp_rcv, snmp_community, snmp_oid, id_module_group, flag, id_module, disabled, id_export, plugin_user, plugin_pass, plugin_parameter, id_plugin, post_process, prediction_module, max_timeout, max_retries, custom_id, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, custom_string_1, custom_string_2, custom_string_3, custom_integer_1, custom_integer_2, pending_delete, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, module_ff_interval, quiet, cron_interval, macros, disabled_types_event, module_macros, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (50, 5,'module_begin&#x0d;&#x0a;module_name&#x20;Blocks&#x20;in&#x0d;&#x0a;module_type&#x20;generic_data&#x0d;&#x0a;module_exec&#x20;vmstat&#x20;1&#x20;1&#x20;|&#x20;tail&#x20;-1&#x20;|&#x20;awk&#x20;&#039;{print&#x20;$9}&#039;&#x0d;&#x0a;module_description&#x20;Blocks&#x20;in.&#x20;i.e&#x20;blocks&#x20;received&#x20;from&#x20;device&#x0d;&#x0a;module_end&#x0d;&#x0a;',1,'','Blocks&#x20;in','',0,0,1,0,'','','','',4,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);
INSERT INTO tpolicy_modules (id, id_policy, configuration_data, id_tipo_modulo, description, name, unit, max, min, module_interval, tcp_port, tcp_send, tcp_rcv, snmp_community, snmp_oid, id_module_group, flag, id_module, disabled, id_export, plugin_user, plugin_pass, plugin_parameter, id_plugin, post_process, prediction_module, max_timeout, max_retries, custom_id, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, custom_string_1, custom_string_2, custom_string_3, custom_integer_1, custom_integer_2, pending_delete, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, module_ff_interval, quiet, cron_interval, macros, disabled_types_event, module_macros, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (51, 5,'module_begin&#x0d;&#x0a;module_name&#x20;Blocks&#x20;out&#x0d;&#x0a;module_type&#x20;generic_data&#x0d;&#x0a;module_exec&#x20;vmstat&#x20;1&#x20;1&#x20;|&#x20;tail&#x20;-1&#x20;|&#x20;awk&#x20;&#039;{print&#x20;$&#40;10&#41;}&#039;&#x0d;&#x0a;module_description&#x20;Blocks&#x20;out.&#x20;i.e&#x20;blocks&#x20;sent&#x20;from&#x20;device&#x0d;&#x0a;module_end',1,'','Blocks&#x20;out','',0,0,1,0,'','','','',4,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);
INSERT INTO tpolicy_modules (id, id_policy, configuration_data, id_tipo_modulo, description, name, unit, max, min, module_interval, tcp_port, tcp_send, tcp_rcv, snmp_community, snmp_oid, id_module_group, flag, id_module, disabled, id_export, plugin_user, plugin_pass, plugin_parameter, id_plugin, post_process, prediction_module, max_timeout, max_retries, custom_id, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, custom_string_1, custom_string_2, custom_string_3, custom_integer_1, custom_integer_2, pending_delete, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, module_ff_interval, quiet, cron_interval, macros, disabled_types_event, module_macros, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (52, 5,'module_begin&#x0d;&#x0a;module_name&#x20;CPU&#x20;%&#x0d;&#x0a;module_type&#x20;generic_data&#x0d;&#x0a;module_cpuusage&#x20;all&#x0d;&#x0a;module_unit&#x20;%&#x0d;&#x0a;module_end',1,'','CPU&#x20;%','',0,0,1,0,'','','','',4,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);
INSERT INTO tpolicy_modules (id, id_policy, configuration_data, id_tipo_modulo, description, name, unit, max, min, module_interval, tcp_port, tcp_send, tcp_rcv, snmp_community, snmp_oid, id_module_group, flag, id_module, disabled, id_export, plugin_user, plugin_pass, plugin_parameter, id_plugin, post_process, prediction_module, max_timeout, max_retries, custom_id, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, custom_string_1, custom_string_2, custom_string_3, custom_integer_1, custom_integer_2, pending_delete, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, module_ff_interval, quiet, cron_interval, macros, disabled_types_event, module_macros, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (53, 5,'module_begin&#x0d;&#x0a;module_name&#x20;Memory&#x20;Free&#x20;%&#x0d;&#x0a;module_type&#x20;generic_data&#x0d;&#x0a;module_exec&#x20;free&#x20;|&#x20;grep&#x20;-i&#x20;mem&#x20;|&#x20;awk&#x20;&#039;{print&#x20;&#40;$4+$NF&#41;/$2&#x20;*&#x20;100}&#039;&#x0d;&#x0a;module_description&#x20;Percentage&#x20;Mem&#x20;Free&#x0d;&#x0a;module_unit&#x20;%&#x0d;&#x0a;module_end',1,'','Memory&#x20;Free&#x20;%','%',0,0,1,0,'','','','',4,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);
INSERT INTO tpolicy_modules (id, id_policy, configuration_data, id_tipo_modulo, description, name, unit, max, min, module_interval, tcp_port, tcp_send, tcp_rcv, snmp_community, snmp_oid, id_module_group, flag, id_module, disabled, id_export, plugin_user, plugin_pass, plugin_parameter, id_plugin, post_process, prediction_module, max_timeout, max_retries, custom_id, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, custom_string_1, custom_string_2, custom_string_3, custom_integer_1, custom_integer_2, pending_delete, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, module_ff_interval, quiet, cron_interval, macros, disabled_types_event, module_macros, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (54, 5,'module_begin&#x0d;&#x0a;module_name&#x20;I/O&#x20;Lock&#x0d;&#x0a;module_type&#x20;generic_data&#x0d;&#x0a;module_exec&#x20;vmstat&#x20;1&#x20;1&#x20;|&#x20;tail&#x20;-1&#x20;|&#x20;awk&#x20;&#039;{print&#x20;$&#40;16&#41;}&#039;&#x0d;&#x0a;module_description&#x20;I/O&#x20;Wait&#x20;Disk&#x0d;&#x0a;module_end',1,'','I/O&#x20;Lock','',0,0,1,0,'','','','',4,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);
INSERT INTO tpolicy_modules (id, id_policy, configuration_data, id_tipo_modulo, description, name, unit, max, min, module_interval, tcp_port, tcp_send, tcp_rcv, snmp_community, snmp_oid, id_module_group, flag, id_module, disabled, id_export, plugin_user, plugin_pass, plugin_parameter, id_plugin, post_process, prediction_module, max_timeout, max_retries, custom_id, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, custom_string_1, custom_string_2, custom_string_3, custom_integer_1, custom_integer_2, pending_delete, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, module_ff_interval, quiet, cron_interval, macros, disabled_types_event, module_macros, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (55, 5,'module_begin&#x0d;&#x0a;module_name&#x20;Total&#x20;processes&#x0d;&#x0a;module_type&#x20;generic_data&#x0d;&#x0a;module_exec&#x20;ps&#x20;ax&#x20;|&#x20;tail&#x20;-n&#x20;+2&#x20;|&#x20;wc&#x20;-l&#x0d;&#x0a;module_description&#x20;Total&#x20;processes&#x0d;&#x0a;module_end',1,'','Total&#x20;processes','',0,0,1,0,'','','','',4,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);
INSERT INTO tpolicy_modules (id, id_policy, configuration_data, id_tipo_modulo, description, name, unit, max, min, module_interval, tcp_port, tcp_send, tcp_rcv, snmp_community, snmp_oid, id_module_group, flag, id_module, disabled, id_export, plugin_user, plugin_pass, plugin_parameter, id_plugin, post_process, prediction_module, max_timeout, max_retries, custom_id, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, custom_string_1, custom_string_2, custom_string_3, custom_integer_1, custom_integer_2, pending_delete, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, module_ff_interval, quiet, cron_interval, macros, disabled_types_event, module_macros, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (56, 5,'module_begin&#x0d;&#x0a;module_name&#x20;Uptime&#x0d;&#x0a;module_type&#x20;generic_data_string&#x0d;&#x0a;module_exec&#x20;uptime&#x20;|sed&#x20;s/us&#92;.*$//g&#x20;|&#x20;sed&#x20;s/,&#92;.*$//g&#x0d;&#x0a;module_description&#x20;Host&#x20;Up&#x20;time&#x0d;&#x0a;module_end',3,'','Uptime','',0,0,1,0,'','','','',4,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);
INSERT INTO tpolicy_modules (id, id_policy, configuration_data, id_tipo_modulo, description, name, unit, max, min, module_interval, tcp_port, tcp_send, tcp_rcv, snmp_community, snmp_oid, id_module_group, flag, id_module, disabled, id_export, plugin_user, plugin_pass, plugin_parameter, id_plugin, post_process, prediction_module, max_timeout, max_retries, custom_id, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, custom_string_1, custom_string_2, custom_string_3, custom_integer_1, custom_integer_2, pending_delete, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, module_ff_interval, quiet, cron_interval, macros, disabled_types_event, module_macros, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (57, 5,'module_begin&#x20;&#x0d;&#x0a;module_name&#x20;Load&#x20;Average&#x0d;&#x0a;module_type&#x20;generic_data&#x0d;&#x0a;module_exec&#x20;uptime&#x20;|&#x20;awk&#x20;&#039;{print&#x20;$&#40;NF-2&#41;*1}&#039;&#x0d;&#x0a;module_description&#x20;Average&#x20;process&#x20;in&#x20;CPU&#x20;&#40;Last&#x20;minute&#41;&#x20;&#x0d;&#x0a;module_end',1,'','Load&#x20;Average','',0,0,1,0,'','','','',4,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);
INSERT INTO tpolicy_modules (id, id_policy, configuration_data, id_tipo_modulo, description, name, unit, max, min, module_interval, tcp_port, tcp_send, tcp_rcv, snmp_community, snmp_oid, id_module_group, flag, id_module, disabled, id_export, plugin_user, plugin_pass, plugin_parameter, id_plugin, post_process, prediction_module, max_timeout, max_retries, custom_id, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, custom_string_1, custom_string_2, custom_string_3, custom_integer_1, custom_integer_2, pending_delete, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, module_ff_interval, quiet, cron_interval, macros, disabled_types_event, module_macros, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (58, 5,'module_begin&#x0d;&#x0a;module_name&#x20;Service&#x20;sshd&#x20;status&#x0d;&#x0a;module_type&#x20;generic_proc&#x0d;&#x0a;module_exec&#x20;netstat&#x20;-lptn&#x20;|&#x20;grep&#x20;sshd&#x20;|&#x20;wc&#x20;-l&#x0d;&#x0a;module_end&#x0d;&#x0a;',2,'','Service&#x20;sshd&#x20;status','',0,0,1,0,'','','','',3,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);
INSERT INTO tpolicy_modules (id, id_policy, configuration_data, id_tipo_modulo, description, name, unit, max, min, module_interval, tcp_port, tcp_send, tcp_rcv, snmp_community, snmp_oid, id_module_group, flag, id_module, disabled, id_export, plugin_user, plugin_pass, plugin_parameter, id_plugin, post_process, prediction_module, max_timeout, max_retries, custom_id, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, custom_string_1, custom_string_2, custom_string_3, custom_integer_1, custom_integer_2, pending_delete, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, module_ff_interval, quiet, cron_interval, macros, disabled_types_event, module_macros, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (59, 3,'module_begin&#x0d;&#x0a;module_name&#x20;Blocks&#x20;in&#x0d;&#x0a;module_type&#x20;generic_data&#x0d;&#x0a;module_exec&#x20;vmstat&#x20;1&#x20;1&#x20;|&#x20;tail&#x20;-1&#x20;|&#x20;awk&#x20;&#039;{print&#x20;$9}&#039;&#x0d;&#x0a;module_description&#x20;Blocks&#x20;in.&#x20;i.e&#x20;blocks&#x20;received&#x20;from&#x20;device&#x0d;&#x0a;module_end',1,'','Blocks&#x20;in','',0,0,1,0,'','','','',4,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);
INSERT INTO tpolicy_modules (id, id_policy, configuration_data, id_tipo_modulo, description, name, unit, max, min, module_interval, tcp_port, tcp_send, tcp_rcv, snmp_community, snmp_oid, id_module_group, flag, id_module, disabled, id_export, plugin_user, plugin_pass, plugin_parameter, id_plugin, post_process, prediction_module, max_timeout, max_retries, custom_id, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, custom_string_1, custom_string_2, custom_string_3, custom_integer_1, custom_integer_2, pending_delete, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, module_ff_interval, quiet, cron_interval, macros, disabled_types_event, module_macros, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (60, 3,'module_begin&#x0d;&#x0a;module_name&#x20;Blocks&#x20;out&#x0d;&#x0a;module_type&#x20;generic_data&#x0d;&#x0a;module_exec&#x20;vmstat&#x20;1&#x20;1&#x20;|&#x20;tail&#x20;-1&#x20;|&#x20;awk&#x20;&#039;{print&#x20;$&#40;10&#41;}&#039;&#x0d;&#x0a;module_description&#x20;Blocks&#x20;out.&#x20;i.e&#x20;blocks&#x20;sent&#x20;from&#x20;device&#x0d;&#x0a;module_end',1,'','Blocks&#x20;out','',0,0,1,0,'','','','',4,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);
INSERT INTO tpolicy_modules (id, id_policy, configuration_data, id_tipo_modulo, description, name, unit, max, min, module_interval, tcp_port, tcp_send, tcp_rcv, snmp_community, snmp_oid, id_module_group, flag, id_module, disabled, id_export, plugin_user, plugin_pass, plugin_parameter, id_plugin, post_process, prediction_module, max_timeout, max_retries, custom_id, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, custom_string_1, custom_string_2, custom_string_3, custom_integer_1, custom_integer_2, pending_delete, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, module_ff_interval, quiet, cron_interval, macros, disabled_types_event, module_macros, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (61, 3,'module_begin&#x0d;&#x0a;module_name&#x20;CPU&#x20;%&#x0d;&#x0a;module_type&#x20;generic_data&#x0d;&#x0a;module_cpuusage&#x20;all&#x0d;&#x0a;module_unit&#x20;%&#x0d;&#x0a;module_end',1,'','CPU&#x20;%','',0,0,1,0,'','','','',4,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);
INSERT INTO tpolicy_modules (id, id_policy, configuration_data, id_tipo_modulo, description, name, unit, max, min, module_interval, tcp_port, tcp_send, tcp_rcv, snmp_community, snmp_oid, id_module_group, flag, id_module, disabled, id_export, plugin_user, plugin_pass, plugin_parameter, id_plugin, post_process, prediction_module, max_timeout, max_retries, custom_id, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, custom_string_1, custom_string_2, custom_string_3, custom_integer_1, custom_integer_2, pending_delete, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, module_ff_interval, quiet, cron_interval, macros, disabled_types_event, module_macros, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (62, 3,'module_begin&#x0d;&#x0a;module_name&#x20;Memory&#x20;Free&#x20;%&#x0d;&#x0a;module_type&#x20;generic_data&#x0d;&#x0a;module_exec&#x20;free&#x20;|&#x20;grep&#x20;-i&#x20;mem&#x20;|&#x20;awk&#x20;&#039;{print&#x20;&#40;$4+$NF&#41;/$2&#x20;*&#x20;100}&#039;&#x0d;&#x0a;module_description&#x20;Percentage&#x20;Mem&#x20;Free&#x0d;&#x0a;module_unit&#x20;%&#x0d;&#x0a;module_end',1,'','Memory&#x20;Free&#x20;%','%',0,0,1,0,'','','','',4,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);
INSERT INTO tpolicy_modules (id, id_policy, configuration_data, id_tipo_modulo, description, name, unit, max, min, module_interval, tcp_port, tcp_send, tcp_rcv, snmp_community, snmp_oid, id_module_group, flag, id_module, disabled, id_export, plugin_user, plugin_pass, plugin_parameter, id_plugin, post_process, prediction_module, max_timeout, max_retries, custom_id, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, custom_string_1, custom_string_2, custom_string_3, custom_integer_1, custom_integer_2, pending_delete, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, module_ff_interval, quiet, cron_interval, macros, disabled_types_event, module_macros, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (63, 3,'module_begin&#x0d;&#x0a;module_name&#x20;I/O&#x20;Lock&#x0d;&#x0a;module_type&#x20;generic_data&#x0d;&#x0a;module_exec&#x20;vmstat&#x20;1&#x20;1&#x20;|&#x20;tail&#x20;-1&#x20;|&#x20;awk&#x20;&#039;{print&#x20;$&#40;16&#41;}&#039;&#x0d;&#x0a;module_description&#x20;I/O&#x20;Wait&#x20;Disk&#x0d;&#x0a;module_end',1,'','I/O&#x20;Lock','',0,0,1,0,'','','','',4,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);
INSERT INTO tpolicy_modules (id, id_policy, configuration_data, id_tipo_modulo, description, name, unit, max, min, module_interval, tcp_port, tcp_send, tcp_rcv, snmp_community, snmp_oid, id_module_group, flag, id_module, disabled, id_export, plugin_user, plugin_pass, plugin_parameter, id_plugin, post_process, prediction_module, max_timeout, max_retries, custom_id, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, custom_string_1, custom_string_2, custom_string_3, custom_integer_1, custom_integer_2, pending_delete, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, module_ff_interval, quiet, cron_interval, macros, disabled_types_event, module_macros, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (64, 3,'module_begin&#x0d;&#x0a;module_name&#x20;Total&#x20;processes&#x0d;&#x0a;module_type&#x20;generic_data&#x0d;&#x0a;module_exec&#x20;ps&#x20;ax&#x20;|&#x20;tail&#x20;-n&#x20;+2&#x20;|&#x20;wc&#x20;-l&#x0d;&#x0a;module_description&#x20;Total&#x20;processes&#x0d;&#x0a;module_end',1,'','Total&#x20;processes','',0,0,1,0,'','','','',4,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);
INSERT INTO tpolicy_modules (id, id_policy, configuration_data, id_tipo_modulo, description, name, unit, max, min, module_interval, tcp_port, tcp_send, tcp_rcv, snmp_community, snmp_oid, id_module_group, flag, id_module, disabled, id_export, plugin_user, plugin_pass, plugin_parameter, id_plugin, post_process, prediction_module, max_timeout, max_retries, custom_id, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, custom_string_1, custom_string_2, custom_string_3, custom_integer_1, custom_integer_2, pending_delete, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, module_ff_interval, quiet, cron_interval, macros, disabled_types_event, module_macros, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (65, 3,'module_begin&#x0d;&#x0a;module_name&#x20;Uptime&#x0d;&#x0a;module_type&#x20;generic_data_string&#x0d;&#x0a;module_exec&#x20;uptime&#x20;|sed&#x20;s/us&#92;.*$//g&#x20;|&#x20;sed&#x20;s/,&#92;.*$//g&#x0d;&#x0a;module_description&#x20;Host&#x20;Up&#x20;time&#x0d;&#x0a;module_end',3,'','Uptime','',0,0,1,0,'','','','',4,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);
INSERT INTO tpolicy_modules (id, id_policy, configuration_data, id_tipo_modulo, description, name, unit, max, min, module_interval, tcp_port, tcp_send, tcp_rcv, snmp_community, snmp_oid, id_module_group, flag, id_module, disabled, id_export, plugin_user, plugin_pass, plugin_parameter, id_plugin, post_process, prediction_module, max_timeout, max_retries, custom_id, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, custom_string_1, custom_string_2, custom_string_3, custom_integer_1, custom_integer_2, pending_delete, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, module_ff_interval, quiet, cron_interval, macros, disabled_types_event, module_macros, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (66, 3,'module_begin&#x20;&#x0d;&#x0a;module_name&#x20;Load&#x20;Average&#x0d;&#x0a;module_type&#x20;generic_data&#x0d;&#x0a;module_exec&#x20;uptime&#x20;|&#x20;awk&#x20;&#039;{print&#x20;$&#40;NF-2&#41;*1}&#039;&#x0d;&#x0a;module_description&#x20;Average&#x20;process&#x20;in&#x20;CPU&#x20;&#40;Last&#x20;minute&#41;&#x20;&#x0d;&#x0a;module_end',1,'','Load&#x20;Average','',0,0,1,0,'','','','',4,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);
INSERT INTO tpolicy_modules (id, id_policy, configuration_data, id_tipo_modulo, description, name, unit, max, min, module_interval, tcp_port, tcp_send, tcp_rcv, snmp_community, snmp_oid, id_module_group, flag, id_module, disabled, id_export, plugin_user, plugin_pass, plugin_parameter, id_plugin, post_process, prediction_module, max_timeout, max_retries, custom_id, history_data, min_warning, max_warning, str_warning, min_critical, max_critical, str_critical, min_ff_event, custom_string_1, custom_string_2, custom_string_3, custom_integer_1, custom_integer_2, pending_delete, critical_instructions, warning_instructions, unknown_instructions, critical_inverse, warning_inverse, id_category, module_ff_interval, quiet, cron_interval, macros, disabled_types_event, module_macros, min_ff_event_normal, min_ff_event_warning, min_ff_event_critical, each_ff, ff_timeout, dynamic_interval, dynamic_max, dynamic_min, prediction_sample_window, prediction_samples, prediction_threshold) VALUES (67, 3,'module_begin&#x0d;&#x0a;module_name&#x20;Service&#x20;sshd&#x20;status&#x0d;&#x0a;module_type&#x20;generic_proc&#x0d;&#x0a;module_exec&#x20;netstat&#x20;-lptn&#x20;|&#x20;grep&#x20;sshd&#x20;|&#x20;wc&#x20;-l&#x0d;&#x0a;module_end',2,'','Service&#x20;sshd&#x20;status','',0,0,1,0,'','','','',3,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);
-- Update curr val of sequence
update_currval('tpolicy_modules', 'id');
EXECUTE IMMEDIATE 'ALTER TRIGGER tpolicy_modules_inc ENABLE';
COMMIT;
END;;
BEGIN
LOCK TABLE tpolicy_alerts IN EXCLUSIVE MODE;
EXECUTE IMMEDIATE 'ALTER TRIGGER tpolicy_alerts_inc DISABLE';
INSERT INTO tpolicy_alerts VALUES (1,1,2,1,'',0,0,0);
INSERT INTO tpolicy_alerts VALUES (2,1,1,1,'',0,0,0);
INSERT INTO tpolicy_alerts VALUES (3,1,4,1,'',0,0,0);
-- Update curr val of sequence
update_currval('tpolicy_alerts', 'id');
EXECUTE IMMEDIATE 'ALTER TRIGGER tpolicy_alerts_inc ENABLE';
COMMIT;
END;;
--
-- Dumping data for table `tprofile_view`
--
BEGIN
LOCK TABLE tpolicy_alerts IN EXCLUSIVE MODE;
EXECUTE IMMEDIATE 'ALTER TRIGGER tprofile_view_inc DISABLE';
INSERT INTO tprofile_view (id, id_profile, sec, sec2, sec3) VALUES (1, 5, '*', '*', '*');
-- Update curr val of sequence
update_currval('tprofile_view', 'id');
EXECUTE IMMEDIATE 'ALTER TRIGGER tprofile_view_inc ENABLE';
COMMIT;
END;;

File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show More