2008-07-30 20:39:40 +02:00
-- Pandora FMS - the Flexible Monitoring System
-- ============================================
2020-11-27 13:52:35 +01:00
-- Copyright (c) 2005-2021 Artica Soluciones Tecnológicas, http://www.artica.es
2008-04-07 00:18:33 +02:00
-- Please see http://pandora.sourceforge.net for full contribution list
2008-02-21 16:16:54 +01:00
2008-04-07 00:18:33 +02:00
-- 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.
2019-05-03 14:09:23 +02:00
-- PLEASE NO NOT USE MULTILINE COMMENTS
2008-04-07 00:18:33 +02:00
-- Because Pandora Installer don't understand them
-- and fails creating database !!!
2007-03-12 18:58:52 +01:00
2012-08-21 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.oracle.sql, operation/agentes/estado_generalagente.php,
operation/agentes/estado_agente.php,
operation/agentes/ver_agente.php,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
godmode/agentes/agent_manager.php,
godmode/agentes/modificar_agente.php,
godmode/agentes/configurar_agente.php, pandoradb.sql,
pandoradb.postgreSQL.sql: added the feature to set a agent in
"Quiet" mode.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6896 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-08-21 19:12:02 +02:00
-- Priority : 0 - Maintance (grey)
-- Priority : 1 - Low (green)
-- Priority : 2 - Normal (blue)
-- Priority : 3 - Warning (yellow)
-- Priority : 4 - Critical (red)
2014-05-27 Miguel de Dios <miguel.dedios@artica.es>
* extras/pandoradb_migrate_5.0.x_to_5.1.postgreSQL.sql,
extras/pandoradb_migrate_5.0.x_to_5.1.oracle.sql,
extras/pandoradb_migrate_5.0.x_to_5.1.mysql.sql,
godmode/reporting/visual_console_builder.editor.js,
include/functions_custom_graphs.php,
include/ajax/visual_console_builder.ajax.php,
include/functions_graph.php, include/functions_visual_map.php,
include/functions_visual_map_editor.php, pandoradb.sql,
pandoradb.postgreSQL.sql, pandoradb.oracle.sql,
operation/reporting/graph_viewer.php, pandoradb_data.sql: added the
custom graphs into the visualmaps.
Incident: #367
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10018 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-05-27 14:59:56 +02:00
-- ---------------------------------------------------------------------
2012-07-30 Miguel de Dios <miguel.dedios@artica.es>
* godmode/agentes/module_manager_editor_plugin.php,
godmode/agentes/module_manager_editor_network.php,
godmode/agentes/module_manager_editor_wmi.php,
godmode/alerts/alert_list.php, godmode/menu.php,
godmode/snmpconsole/snmp_filters.php, godmode/tag/edit_tag.php,
include/functions_alerts.php, include/functions_html.php,
pandoradb.sql, index.php: cleaned source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6828 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-30 10:45:40 +02:00
-- Table `taddress`
2014-05-27 Miguel de Dios <miguel.dedios@artica.es>
* extras/pandoradb_migrate_5.0.x_to_5.1.postgreSQL.sql,
extras/pandoradb_migrate_5.0.x_to_5.1.oracle.sql,
extras/pandoradb_migrate_5.0.x_to_5.1.mysql.sql,
godmode/reporting/visual_console_builder.editor.js,
include/functions_custom_graphs.php,
include/ajax/visual_console_builder.ajax.php,
include/functions_graph.php, include/functions_visual_map.php,
include/functions_visual_map_editor.php, pandoradb.sql,
pandoradb.postgreSQL.sql, pandoradb.oracle.sql,
operation/reporting/graph_viewer.php, pandoradb_data.sql: added the
custom graphs into the visualmaps.
Incident: #367
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10018 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-05-27 14:59:56 +02:00
-- ---------------------------------------------------------------------
2008-08-05 13:42:08 +02:00
CREATE TABLE IF NOT EXISTS ` taddress ` (
2022-02-01 13:49:32 +01:00
` id_a ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` ip ` VARCHAR ( 60 ) NOT NULL DEFAULT ' ' ,
` ip_pack ` INT UNSIGNED NOT NULL DEFAULT 0 ,
PRIMARY KEY ( ` id_a ` ) ,
KEY ` ip ` ( ` ip ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2008-08-05 13:42:08 +02:00
2014-05-27 Miguel de Dios <miguel.dedios@artica.es>
* extras/pandoradb_migrate_5.0.x_to_5.1.postgreSQL.sql,
extras/pandoradb_migrate_5.0.x_to_5.1.oracle.sql,
extras/pandoradb_migrate_5.0.x_to_5.1.mysql.sql,
godmode/reporting/visual_console_builder.editor.js,
include/functions_custom_graphs.php,
include/ajax/visual_console_builder.ajax.php,
include/functions_graph.php, include/functions_visual_map.php,
include/functions_visual_map_editor.php, pandoradb.sql,
pandoradb.postgreSQL.sql, pandoradb.oracle.sql,
operation/reporting/graph_viewer.php, pandoradb_data.sql: added the
custom graphs into the visualmaps.
Incident: #367
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10018 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-05-27 14:59:56 +02:00
-- ---------------------------------------------------------------------
2012-07-30 Miguel de Dios <miguel.dedios@artica.es>
* godmode/agentes/module_manager_editor_plugin.php,
godmode/agentes/module_manager_editor_network.php,
godmode/agentes/module_manager_editor_wmi.php,
godmode/alerts/alert_list.php, godmode/menu.php,
godmode/snmpconsole/snmp_filters.php, godmode/tag/edit_tag.php,
include/functions_alerts.php, include/functions_html.php,
pandoradb.sql, index.php: cleaned source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6828 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-30 10:45:40 +02:00
-- Table `taddress_agent`
2014-05-27 Miguel de Dios <miguel.dedios@artica.es>
* extras/pandoradb_migrate_5.0.x_to_5.1.postgreSQL.sql,
extras/pandoradb_migrate_5.0.x_to_5.1.oracle.sql,
extras/pandoradb_migrate_5.0.x_to_5.1.mysql.sql,
godmode/reporting/visual_console_builder.editor.js,
include/functions_custom_graphs.php,
include/ajax/visual_console_builder.ajax.php,
include/functions_graph.php, include/functions_visual_map.php,
include/functions_visual_map_editor.php, pandoradb.sql,
pandoradb.postgreSQL.sql, pandoradb.oracle.sql,
operation/reporting/graph_viewer.php, pandoradb_data.sql: added the
custom graphs into the visualmaps.
Incident: #367
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10018 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-05-27 14:59:56 +02:00
-- ---------------------------------------------------------------------
2008-08-05 13:42:08 +02:00
CREATE TABLE IF NOT EXISTS ` taddress_agent ` (
2022-02-01 13:49:32 +01:00
` id_ag ` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT ,
` id_a ` BIGINT UNSIGNED NOT NULL DEFAULT 0 ,
` id_agent ` MEDIUMINT UNSIGNED NOT NULL DEFAULT 0 ,
2023-01-24 12:10:40 +01:00
PRIMARY KEY ( ` id_ag ` ) ,
INDEX ` taddress_agent_agent ` ( ` id_agent ` )
2022-02-01 13:49:32 +01:00
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2007-03-12 18:58:52 +01:00
2014-05-27 Miguel de Dios <miguel.dedios@artica.es>
* extras/pandoradb_migrate_5.0.x_to_5.1.postgreSQL.sql,
extras/pandoradb_migrate_5.0.x_to_5.1.oracle.sql,
extras/pandoradb_migrate_5.0.x_to_5.1.mysql.sql,
godmode/reporting/visual_console_builder.editor.js,
include/functions_custom_graphs.php,
include/ajax/visual_console_builder.ajax.php,
include/functions_graph.php, include/functions_visual_map.php,
include/functions_visual_map_editor.php, pandoradb.sql,
pandoradb.postgreSQL.sql, pandoradb.oracle.sql,
operation/reporting/graph_viewer.php, pandoradb_data.sql: added the
custom graphs into the visualmaps.
Incident: #367
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10018 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-05-27 14:59:56 +02:00
-- ---------------------------------------------------------------------
2012-07-30 Miguel de Dios <miguel.dedios@artica.es>
* godmode/agentes/module_manager_editor_plugin.php,
godmode/agentes/module_manager_editor_network.php,
godmode/agentes/module_manager_editor_wmi.php,
godmode/alerts/alert_list.php, godmode/menu.php,
godmode/snmpconsole/snmp_filters.php, godmode/tag/edit_tag.php,
include/functions_alerts.php, include/functions_html.php,
pandoradb.sql, index.php: cleaned source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6828 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-30 10:45:40 +02:00
-- Table `tagente`
2014-05-27 Miguel de Dios <miguel.dedios@artica.es>
* extras/pandoradb_migrate_5.0.x_to_5.1.postgreSQL.sql,
extras/pandoradb_migrate_5.0.x_to_5.1.oracle.sql,
extras/pandoradb_migrate_5.0.x_to_5.1.mysql.sql,
godmode/reporting/visual_console_builder.editor.js,
include/functions_custom_graphs.php,
include/ajax/visual_console_builder.ajax.php,
include/functions_graph.php, include/functions_visual_map.php,
include/functions_visual_map_editor.php, pandoradb.sql,
pandoradb.postgreSQL.sql, pandoradb.oracle.sql,
operation/reporting/graph_viewer.php, pandoradb_data.sql: added the
custom graphs into the visualmaps.
Incident: #367
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10018 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-05-27 14:59:56 +02:00
-- ---------------------------------------------------------------------
2008-08-05 13:42:08 +02:00
CREATE TABLE IF NOT EXISTS ` tagente ` (
2022-02-01 13:49:32 +01:00
` id_agente ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` nombre ` VARCHAR ( 600 ) NOT NULL DEFAULT ' ' ,
` direccion ` VARCHAR ( 100 ) DEFAULT NULL ,
` comentarios ` VARCHAR ( 255 ) DEFAULT ' ' ,
` id_grupo ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` ultimo_contacto ` DATETIME NOT NULL DEFAULT ' 1970-01-01 00:00:00 ' ,
` modo ` TINYINT NOT NULL DEFAULT 0 ,
` intervalo ` INT UNSIGNED NOT NULL DEFAULT 300 ,
` id_os ` INT UNSIGNED DEFAULT 0 ,
` os_version ` VARCHAR ( 100 ) DEFAULT ' ' ,
` agent_version ` VARCHAR ( 100 ) DEFAULT ' ' ,
` ultimo_contacto_remoto ` DATETIME DEFAULT ' 1970-01-01 00:00:00 ' ,
` disabled ` TINYINT NOT NULL DEFAULT 0 ,
` remote ` TINYINT NOT NULL DEFAULT 0 ,
` id_parent ` INT UNSIGNED DEFAULT 0 ,
` custom_id ` VARCHAR ( 255 ) DEFAULT ' ' ,
` server_name ` VARCHAR ( 100 ) DEFAULT ' ' ,
` cascade_protection ` TINYINT NOT NULL DEFAULT 0 ,
` cascade_protection_module ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` timezone_offset ` TINYINT NULL DEFAULT 0 COMMENT ' nuber of hours of diference with the server timezone ' ,
` icon_path ` VARCHAR ( 127 ) NULL DEFAULT NULL COMMENT ' path in the server to the image of the icon representing the agent ' ,
` update_gis_data ` TINYINT NOT NULL DEFAULT 1 COMMENT ' set it to one to update the position data (altitude, longitude, latitude) when getting information from the agent or to 0 to keep the last value and do not update it ' ,
2022-02-02 12:30:02 +01:00
` url_address ` MEDIUMTEXT NULL ,
2022-02-01 13:49:32 +01:00
` quiet ` TINYINT NOT NULL DEFAULT 0 ,
` normal_count ` BIGINT NOT NULL DEFAULT 0 ,
` warning_count ` BIGINT NOT NULL DEFAULT 0 ,
` critical_count ` BIGINT NOT NULL DEFAULT 0 ,
` unknown_count ` BIGINT NOT NULL DEFAULT 0 ,
` notinit_count ` BIGINT NOT NULL DEFAULT 0 ,
` total_count ` BIGINT NOT NULL DEFAULT 0 ,
` fired_count ` BIGINT NOT NULL DEFAULT 0 ,
` update_module_count ` TINYINT NOT NULL DEFAULT 0 ,
` update_alert_count ` TINYINT NOT NULL DEFAULT 0 ,
` update_secondary_groups ` TINYINT NOT NULL DEFAULT 0 ,
` alias ` VARCHAR ( 600 ) NOT NULL DEFAULT ' ' ,
` transactional_agent ` TINYINT NOT NULL DEFAULT 0 ,
` alias_as_name ` TINYINT NOT NULL DEFAULT 0 ,
` safe_mode_module ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` cps ` INT NOT NULL DEFAULT 0 ,
2022-06-08 13:10:01 +02:00
` satellite_server ` INT NOT NULL DEFAULT 0 ,
2022-07-15 13:40:54 +02:00
` fixed_ip ` TINYINT NOT NULL DEFAULT 0 ,
2022-02-01 13:49:32 +01:00
PRIMARY KEY ( ` id_agente ` ) ,
KEY ` nombre ` ( ` nombre ` ( 255 ) ) ,
KEY ` direccion ` ( ` direccion ` ) ,
KEY ` disabled ` ( ` disabled ` ) ,
KEY ` id_grupo ` ( ` id_grupo ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2007-03-12 18:58:52 +01:00
2014-05-27 Miguel de Dios <miguel.dedios@artica.es>
* extras/pandoradb_migrate_5.0.x_to_5.1.postgreSQL.sql,
extras/pandoradb_migrate_5.0.x_to_5.1.oracle.sql,
extras/pandoradb_migrate_5.0.x_to_5.1.mysql.sql,
godmode/reporting/visual_console_builder.editor.js,
include/functions_custom_graphs.php,
include/ajax/visual_console_builder.ajax.php,
include/functions_graph.php, include/functions_visual_map.php,
include/functions_visual_map_editor.php, pandoradb.sql,
pandoradb.postgreSQL.sql, pandoradb.oracle.sql,
operation/reporting/graph_viewer.php, pandoradb_data.sql: added the
custom graphs into the visualmaps.
Incident: #367
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10018 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-05-27 14:59:56 +02:00
-- ---------------------------------------------------------------------
2012-07-30 Miguel de Dios <miguel.dedios@artica.es>
* godmode/agentes/module_manager_editor_plugin.php,
godmode/agentes/module_manager_editor_network.php,
godmode/agentes/module_manager_editor_wmi.php,
godmode/alerts/alert_list.php, godmode/menu.php,
godmode/snmpconsole/snmp_filters.php, godmode/tag/edit_tag.php,
include/functions_alerts.php, include/functions_html.php,
pandoradb.sql, index.php: cleaned source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6828 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-30 10:45:40 +02:00
-- Table `tagente_datos`
2014-05-27 Miguel de Dios <miguel.dedios@artica.es>
* extras/pandoradb_migrate_5.0.x_to_5.1.postgreSQL.sql,
extras/pandoradb_migrate_5.0.x_to_5.1.oracle.sql,
extras/pandoradb_migrate_5.0.x_to_5.1.mysql.sql,
godmode/reporting/visual_console_builder.editor.js,
include/functions_custom_graphs.php,
include/ajax/visual_console_builder.ajax.php,
include/functions_graph.php, include/functions_visual_map.php,
include/functions_visual_map_editor.php, pandoradb.sql,
pandoradb.postgreSQL.sql, pandoradb.oracle.sql,
operation/reporting/graph_viewer.php, pandoradb_data.sql: added the
custom graphs into the visualmaps.
Incident: #367
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10018 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-05-27 14:59:56 +02:00
-- ---------------------------------------------------------------------
2008-08-05 13:42:08 +02:00
CREATE TABLE IF NOT EXISTS ` tagente_datos ` (
2022-02-01 13:49:32 +01:00
` id_agente_modulo ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` datos ` DOUBLE DEFAULT NULL ,
` utimestamp ` BIGINT DEFAULT 0 ,
KEY ` data_index1 ` ( ` id_agente_modulo ` , ` utimestamp ` ) ,
KEY ` idx_utimestamp ` USING BTREE ( ` utimestamp ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2007-03-12 18:58:52 +01:00
2014-05-27 Miguel de Dios <miguel.dedios@artica.es>
* extras/pandoradb_migrate_5.0.x_to_5.1.postgreSQL.sql,
extras/pandoradb_migrate_5.0.x_to_5.1.oracle.sql,
extras/pandoradb_migrate_5.0.x_to_5.1.mysql.sql,
godmode/reporting/visual_console_builder.editor.js,
include/functions_custom_graphs.php,
include/ajax/visual_console_builder.ajax.php,
include/functions_graph.php, include/functions_visual_map.php,
include/functions_visual_map_editor.php, pandoradb.sql,
pandoradb.postgreSQL.sql, pandoradb.oracle.sql,
operation/reporting/graph_viewer.php, pandoradb_data.sql: added the
custom graphs into the visualmaps.
Incident: #367
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10018 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-05-27 14:59:56 +02:00
-- ---------------------------------------------------------------------
2012-07-30 Miguel de Dios <miguel.dedios@artica.es>
* godmode/agentes/module_manager_editor_plugin.php,
godmode/agentes/module_manager_editor_network.php,
godmode/agentes/module_manager_editor_wmi.php,
godmode/alerts/alert_list.php, godmode/menu.php,
godmode/snmpconsole/snmp_filters.php, godmode/tag/edit_tag.php,
include/functions_alerts.php, include/functions_html.php,
pandoradb.sql, index.php: cleaned source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6828 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-30 10:45:40 +02:00
-- Table `tagente_datos_inc`
2014-05-27 Miguel de Dios <miguel.dedios@artica.es>
* extras/pandoradb_migrate_5.0.x_to_5.1.postgreSQL.sql,
extras/pandoradb_migrate_5.0.x_to_5.1.oracle.sql,
extras/pandoradb_migrate_5.0.x_to_5.1.mysql.sql,
godmode/reporting/visual_console_builder.editor.js,
include/functions_custom_graphs.php,
include/ajax/visual_console_builder.ajax.php,
include/functions_graph.php, include/functions_visual_map.php,
include/functions_visual_map_editor.php, pandoradb.sql,
pandoradb.postgreSQL.sql, pandoradb.oracle.sql,
operation/reporting/graph_viewer.php, pandoradb_data.sql: added the
custom graphs into the visualmaps.
Incident: #367
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10018 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-05-27 14:59:56 +02:00
-- ---------------------------------------------------------------------
2008-08-05 13:42:08 +02:00
CREATE TABLE IF NOT EXISTS ` tagente_datos_inc ` (
2022-02-01 13:49:32 +01:00
` id_agente_modulo ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` datos ` DOUBLE DEFAULT NULL ,
` utimestamp ` INT UNSIGNED DEFAULT 0 ,
KEY ` data_inc_index_1 ` ( ` id_agente_modulo ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2007-03-12 18:58:52 +01:00
2014-05-27 Miguel de Dios <miguel.dedios@artica.es>
* extras/pandoradb_migrate_5.0.x_to_5.1.postgreSQL.sql,
extras/pandoradb_migrate_5.0.x_to_5.1.oracle.sql,
extras/pandoradb_migrate_5.0.x_to_5.1.mysql.sql,
godmode/reporting/visual_console_builder.editor.js,
include/functions_custom_graphs.php,
include/ajax/visual_console_builder.ajax.php,
include/functions_graph.php, include/functions_visual_map.php,
include/functions_visual_map_editor.php, pandoradb.sql,
pandoradb.postgreSQL.sql, pandoradb.oracle.sql,
operation/reporting/graph_viewer.php, pandoradb_data.sql: added the
custom graphs into the visualmaps.
Incident: #367
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10018 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-05-27 14:59:56 +02:00
-- ---------------------------------------------------------------------
2012-07-30 Miguel de Dios <miguel.dedios@artica.es>
* godmode/agentes/module_manager_editor_plugin.php,
godmode/agentes/module_manager_editor_network.php,
godmode/agentes/module_manager_editor_wmi.php,
godmode/alerts/alert_list.php, godmode/menu.php,
godmode/snmpconsole/snmp_filters.php, godmode/tag/edit_tag.php,
include/functions_alerts.php, include/functions_html.php,
pandoradb.sql, index.php: cleaned source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6828 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-30 10:45:40 +02:00
-- Table `tagente_datos_string`
2014-05-27 Miguel de Dios <miguel.dedios@artica.es>
* extras/pandoradb_migrate_5.0.x_to_5.1.postgreSQL.sql,
extras/pandoradb_migrate_5.0.x_to_5.1.oracle.sql,
extras/pandoradb_migrate_5.0.x_to_5.1.mysql.sql,
godmode/reporting/visual_console_builder.editor.js,
include/functions_custom_graphs.php,
include/ajax/visual_console_builder.ajax.php,
include/functions_graph.php, include/functions_visual_map.php,
include/functions_visual_map_editor.php, pandoradb.sql,
pandoradb.postgreSQL.sql, pandoradb.oracle.sql,
operation/reporting/graph_viewer.php, pandoradb_data.sql: added the
custom graphs into the visualmaps.
Incident: #367
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10018 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-05-27 14:59:56 +02:00
-- ---------------------------------------------------------------------
2008-08-05 13:42:08 +02:00
CREATE TABLE IF NOT EXISTS ` tagente_datos_string ` (
2022-02-01 13:49:32 +01:00
` id_agente_modulo ` INT UNSIGNED NOT NULL DEFAULT 0 ,
2022-02-02 12:30:02 +01:00
` datos ` MEDIUMTEXT ,
2022-02-01 13:49:32 +01:00
` utimestamp ` INT UNSIGNED NOT NULL DEFAULT 0 ,
KEY ` data_string_index_1 ` ( ` id_agente_modulo ` , ` utimestamp ` ) ,
KEY ` idx_utimestamp ` USING BTREE ( ` utimestamp ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2006-03-27 05:37:27 +02:00
2012-07-30 Miguel de Dios <miguel.dedios@artica.es>
* godmode/agentes/module_manager_editor_plugin.php,
godmode/agentes/module_manager_editor_network.php,
godmode/agentes/module_manager_editor_wmi.php,
godmode/alerts/alert_list.php, godmode/menu.php,
godmode/snmpconsole/snmp_filters.php, godmode/tag/edit_tag.php,
include/functions_alerts.php, include/functions_html.php,
pandoradb.sql, index.php: cleaned source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6828 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-30 10:45:40 +02:00
-- -----------------------------------------------------
-- Table `tagente_datos_log4x`
-- -----------------------------------------------------
2010-02-15 14:07:52 +01:00
CREATE TABLE IF NOT EXISTS ` tagente_datos_log4x ` (
2022-02-01 13:49:32 +01:00
` id_tagente_datos_log4x ` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT ,
` id_agente_modulo ` INT UNSIGNED NOT NULL DEFAULT 0 ,
2022-02-01 15:11:59 +01:00
` severity ` TEXT ,
` message ` TEXT ,
` stacktrace ` TEXT ,
2022-02-01 13:49:32 +01:00
` utimestamp ` INT UNSIGNED NOT NULL DEFAULT 0 ,
PRIMARY KEY ( ` id_tagente_datos_log4x ` ) ,
KEY ` data_log4x_index_1 ` ( ` id_agente_modulo ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2010-02-15 14:07:52 +01:00
2012-07-30 Miguel de Dios <miguel.dedios@artica.es>
* godmode/agentes/module_manager_editor_plugin.php,
godmode/agentes/module_manager_editor_network.php,
godmode/agentes/module_manager_editor_wmi.php,
godmode/alerts/alert_list.php, godmode/menu.php,
godmode/snmpconsole/snmp_filters.php, godmode/tag/edit_tag.php,
include/functions_alerts.php, include/functions_html.php,
pandoradb.sql, index.php: cleaned source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6828 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-30 10:45:40 +02:00
-- -----------------------------------------------------
-- Table `tagente_estado`
-- -----------------------------------------------------
2015-03-05 05:21:05 +01:00
CREATE TABLE IF NOT EXISTS ` tagente_estado ` (
2022-02-01 13:49:32 +01:00
` id_agente_estado ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` id_agente_modulo ` INT NOT NULL DEFAULT 0 ,
2022-02-02 12:30:02 +01:00
` datos ` MEDIUMTEXT ,
2022-02-01 13:49:32 +01:00
` timestamp ` DATETIME NOT NULL DEFAULT ' 1970-01-01 00:00:00 ' ,
` estado ` INT NOT NULL DEFAULT 0 ,
` known_status ` TINYINT DEFAULT 0 ,
` id_agente ` INT NOT NULL DEFAULT 0 ,
` last_try ` DATETIME DEFAULT NULL ,
` utimestamp ` BIGINT NOT NULL DEFAULT 0 ,
` current_interval ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` running_by ` SMALLINT UNSIGNED DEFAULT 0 ,
` last_execution_try ` BIGINT NOT NULL DEFAULT 0 ,
` status_changes ` TINYINT UNSIGNED DEFAULT 0 ,
` last_status ` TINYINT DEFAULT 0 ,
` last_known_status ` TINYINT DEFAULT 0 ,
` last_error ` INT NOT NULL DEFAULT 0 ,
` ff_start_utimestamp ` BIGINT DEFAULT 0 ,
` ff_normal ` INT UNSIGNED DEFAULT 0 ,
` ff_warning ` INT UNSIGNED DEFAULT 0 ,
` ff_critical ` INT UNSIGNED DEFAULT 0 ,
` last_dynamic_update ` BIGINT NOT NULL DEFAULT 0 ,
` last_unknown_update ` BIGINT NOT NULL DEFAULT 0 ,
` last_status_change ` BIGINT NOT NULL DEFAULT 0 ,
2022-10-26 08:51:51 +02:00
` warning_count ` INT UNSIGNED DEFAULT 0 ,
2022-02-01 13:49:32 +01:00
PRIMARY KEY ( ` id_agente_estado ` ) ,
KEY ` status_index_1 ` ( ` id_agente_modulo ` ) ,
KEY ` idx_agente ` ( ` id_agente ` ) ,
KEY ` running_by ` ( ` running_by ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2009-01-12 Sancho Lerena <slerena@artica.es>
* pandoradb.sql: Removed fields "timestamp" and "id_agente" (and altered
some indexes) on tagente_datos, tagente_datos_string and
tagente_datos_inc.
tagente_estado table: removed cambio, added status_changes, last_status.
tagente_modulo: added five new fields (warning,critical mgmt., flipflop
detection, history module and delete_pending bit.
* agent_manager.php: Group ALL not shown anymore.
* configurar_agente.php: Support for new options. Delete a module now
mark for deletion the module, not delete data (It's VERY slow!).
* modificar_agente.php: Delete agent now uses the global function,
minor fixes.
* module_manager_editor.php: New fields initializacion.
* module_manager_editor_network.php: At this time, the first module
editor who implements the new fields and improve old ones (tcp data).
* setup.php: Added support for new token: event_view_hr (Filter of max
old (in hr) for the event viewer. Removed old tokens show_unknown and
show_lastalert.
* functions.php: format_for_graph() has an important BUG that makes
all units rendered without the "K" !!!!. Fixed.
* delete_agent.php: Delete remote config (if present). Also mark
for deletion modules instead delete them (and let the data without
being deleted, because it's a HUGE consuming time, and it's left
for the daily db maintance process).
* estado_agente.php: Updated code for view new status.
* estado_generalagente.php: Total packets are removed from this view,
this was a huge time consuming SQL operation that don't give important
infomation. Groupname is now visualized.
* estado_ultimopaquete.php,
* estado_monitores.php,
* estado_grupo.php: Rewritten much code to view new status and other
minor changes.
* ver_agente.php: Data view now works under the tabs and other minor
changes.
* events.php: Support for the new events and status. Added filter for
username and for a max. hours old events. Some boxes are now hidden
by default.
* fgraph.php: Some graphs are now fixed and uses tagente_datos and
tagent_access with utimestamp and without id_agent index. Works faster
* images/*: Updated icons (module types) and two new bulb colors.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1326 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-01-12 04:53:33 +01:00
-- Probably last_execution_try index is not useful and loads more than benefits
2008-03-06 Sancho Lerena <slerena@gmail.com>
Pandora FMS 2.0 development first commit. 1.4 version is now 2.0
* pandoradb_data.sql: Added correct tnetwork_components, fixed
ttipo_modulo (categoria values).
* include/styles/pandora.css: Added some server icons, tab style
for module editor has been improved.
* include/functions_db.php: added new functions, lang_string and
check_login, and a first review of several functions that currently
need change for new config session parameters in array $config[]
* include/javascript/pandora.js: Added a new global include for
spare javascript functions before included into a few pages.
* include/languages/language_en.php: New tokens.
* include/help*: New contextual help system.
* include/config_process.php: New way to manage config.
* include/functions.php: Added new functions to manage global
* operation/agentes/estado_ultimopaquete.php: removed old javascript
code from there.
* operation/agentes/estado_agente.php: Removed references to deprecated
field "agent_type".
* operation/agentes/tactical.php: Some code cleanup and progressbar
issues merged from 1.3.1 branch. Need to add support to new server
types and new module types.
* operation/servers/view_server.php: Added support to new servers, code
cleanup.
* reporting/fgraph.php: Code cleanup, changes to use new config method,
and a lot of style change.
* general/pandora_help.php: New source for contextual help in the way
of moodle.
* general/footer.php, general/noaccess.php: Code cleanup and uses of
new config.
* module_manager_editor: New editors for each module family. Need
finish and implement EDITION of data, now only inserts data.
* godmode/agentes/agent_manager.php: Implemented new server assigment
and edition.
* godmode/agentes/configurar_agente.php: Small changes that affects
module management, visualization and agent management.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@739 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-03-07 17:22:16 +01:00
2012-08-20 Miguel de Dios <miguel.dedios@artica.es>
* godmode/reporting/reporting_builder.main.php,
godmode/reporting/reporting_builder.php,
include/functions_reports.php, pandoradb.sql,
pandoradb.postgreSQL.sql, pandoradb.oracle.sql,
operation/reporting/reporting_xml.php,
operation/reporting/reporting_viewer.php,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql: now the reports
can set the group can edit or private edition.
* include/functions_users.php: cleaned source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6889 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-08-20 15:12:53 +02:00
-- -----------------------------------------------------
-- Table `tagente_modulo`
-- -----------------------------------------------------
2008-08-05 13:42:08 +02:00
-- id_modulo now uses tmodule
-- ---------------------------
-- 1 - Data server modules (agent related modules)
-- 2 - Network server modules
-- 4 - Plugin server
-- 5 - Predictive server
-- 6 - WMI server
2009-04-02 Sancho Lerena <slerena@artica.es>
* pandoradb.sql: Final DB changes proposed for closing this month the DB
scheme. tagente-> new server_name field to assign server (old fields will
be removed). talert_templates has two new types (warning, critical).
tevento has "user_comment" new field. Tserver has three new fields,
server_type (so some old fields will be deleted), threads and queued_modules
this last two are for statistical options. Tusuario add language type to
override global language.
* update_manager/main.php: Minor changes for correct ACL usage. Non PM
users could see in what revision it the system, but only that.
* pandoradb_migrate_v2.x_to_v3.0.sql: Updated script for new DB changes.
* general/noaccess.php: Added footer and ending div. Page was very ugly
when showing noaccess errors, nobody see it ???.
* godmode/menu.php: A LOT of ACL fixes on several options.
* godmode/agentes/agent_manager.php: Fixed a crazy floating icon.
* godmode/agentes/manage_config_remote.php: A LOT of changes, rewriting
stuff, because was not working. This also adds a lot of ACL checks.
* godmode/agentes/massive_config.php, massive*: ACL changes.
* godmode/agentes/modificar_agente.php: Fixed ACL problems.
* godmode/agentes/module_manager_editor.php: Fixed bad module categories for
some types (data, plugin and prediction).
* godmode/alerts/alert_list.php: Fixed ACL problem.
* godmode/reporting/graph_builder.php: Added ACl restriction for
non-viewable agents for current user. Seems to be a problem with data
with more than 2 sources.
* godmode/reporting/map_builder.php: ACL checks improved.
* godmode/reporting/reporting_builder.php: ACL checks added (was missing),
some code ported from 2.1, other is new. New fields shown in list.
* include/functions.php: Fixed the annoying bug of "bad counters" in
function human_time_description_raw(). Function used,format_numeric() should
not be used never to calculate nothing, only to print formatted strings.
* include/functions_db.php: Added function user_access_to_agent() to know
if a given user has access to a given agent.
* include/functioins_report.php: get_report() should let admin to watch any
report. Fixed.
* agentes/alerts_status.php: Fixed ACL problem for view alert.
* operation/incidents/incident.php: Bad call for pagination() was giving
problems to pagination call. Somebody changes pagination() interface and
make this broken. Please if you change any interface, be sure that is compatible
with old code or make a post in the list about this !
* godmode/users/user_edit.php: Additional ACL check to do not let anybody
to watch non accesible users. Even for see the username or description.
* reporting/pchart_graph.php:Progress bar shown text in white when > 60%.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1594 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-04-02 21:16:59 +02:00
-- 7 - WEB Server (enteprise)
2007-04-18 11:58:26 +02:00
2008-08-05 13:42:08 +02:00
CREATE TABLE IF NOT EXISTS ` tagente_modulo ` (
2022-02-01 13:49:32 +01:00
` id_agente_modulo ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` id_agente ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` id_tipo_modulo ` SMALLINT NOT NULL DEFAULT 0 ,
2022-02-01 15:11:59 +01:00
` descripcion ` TEXT ,
` extended_info ` TEXT ,
` nombre ` TEXT ,
2022-02-01 13:49:32 +01:00
` unit ` TEXT ,
` id_policy_module ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` max ` BIGINT DEFAULT 0 ,
` min ` BIGINT DEFAULT 0 ,
` module_interval ` INT UNSIGNED DEFAULT 0 ,
` cron_interval ` VARCHAR ( 100 ) DEFAULT ' ' ,
` module_ff_interval ` INT UNSIGNED DEFAULT 0 ,
` tcp_port ` INT UNSIGNED DEFAULT 0 ,
` tcp_send ` TEXT ,
` tcp_rcv ` TEXT ,
` snmp_community ` VARCHAR ( 100 ) DEFAULT ' ' ,
` snmp_oid ` VARCHAR ( 255 ) DEFAULT ' 0 ' ,
` ip_target ` VARCHAR ( 100 ) DEFAULT ' ' ,
` id_module_group ` INT UNSIGNED DEFAULT 0 ,
` flag ` TINYINT UNSIGNED DEFAULT 1 ,
` id_modulo ` INT UNSIGNED DEFAULT 0 ,
` disabled ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
` id_export ` SMALLINT UNSIGNED DEFAULT 0 ,
` plugin_user ` TEXT ,
` plugin_pass ` TEXT ,
` plugin_parameter ` TEXT ,
` id_plugin ` INT DEFAULT 0 ,
` post_process ` DOUBLE DEFAULT 0 ,
` prediction_module ` BIGINT DEFAULT 0 ,
` max_timeout ` INT UNSIGNED DEFAULT 0 ,
` max_retries ` INT UNSIGNED DEFAULT 0 ,
` custom_id ` VARCHAR ( 255 ) DEFAULT ' ' ,
` history_data ` TINYINT UNSIGNED DEFAULT 1 ,
` min_warning ` DOUBLE DEFAULT 0 ,
` max_warning ` DOUBLE DEFAULT 0 ,
` str_warning ` TEXT ,
` min_critical ` DOUBLE DEFAULT 0 ,
` max_critical ` DOUBLE DEFAULT 0 ,
` str_critical ` TEXT ,
` min_ff_event ` INT UNSIGNED DEFAULT 0 ,
` delete_pending ` INT UNSIGNED DEFAULT 0 ,
` policy_linked ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
` policy_adopted ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
2022-02-02 12:30:02 +01:00
` custom_string_1 ` MEDIUMTEXT ,
2022-02-01 13:49:32 +01:00
` custom_string_2 ` TEXT ,
` custom_string_3 ` TEXT ,
` custom_integer_1 ` INT DEFAULT 0 ,
` custom_integer_2 ` INT DEFAULT 0 ,
` wizard_level ` ENUM ( ' basic ' , ' advanced ' , ' nowizard ' ) DEFAULT ' nowizard ' ,
` macros ` TEXT ,
2022-02-01 15:11:59 +01:00
` critical_instructions ` TEXT ,
` warning_instructions ` TEXT ,
` unknown_instructions ` TEXT ,
2022-02-01 13:49:32 +01:00
` quiet ` TINYINT NOT NULL DEFAULT 0 ,
` critical_inverse ` TINYINT UNSIGNED DEFAULT 0 ,
` warning_inverse ` TINYINT UNSIGNED DEFAULT 0 ,
` id_category ` INT DEFAULT 0 ,
2022-02-01 15:11:59 +01:00
` disabled_types_event ` TEXT ,
` module_macros ` TEXT ,
2022-02-01 13:49:32 +01:00
` min_ff_event_normal ` INT UNSIGNED DEFAULT 0 ,
` min_ff_event_warning ` INT UNSIGNED DEFAULT 0 ,
` min_ff_event_critical ` INT UNSIGNED DEFAULT 0 ,
` ff_type ` TINYINT UNSIGNED DEFAULT 0 ,
` each_ff ` TINYINT UNSIGNED DEFAULT 0 ,
` ff_timeout ` INT UNSIGNED DEFAULT 0 ,
` dynamic_interval ` INT UNSIGNED DEFAULT 0 ,
` dynamic_max ` INT DEFAULT 0 ,
` dynamic_min ` INT DEFAULT 0 ,
` dynamic_next ` BIGINT NOT NULL DEFAULT 0 ,
` dynamic_two_tailed ` TINYINT UNSIGNED DEFAULT 0 ,
` prediction_sample_window ` INT DEFAULT 0 ,
` prediction_samples ` INT DEFAULT 0 ,
` prediction_threshold ` INT DEFAULT 0 ,
` parent_module_id ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` cps ` INT NOT NULL DEFAULT 0 ,
` debug_content ` TEXT ,
` percentage_critical ` TINYINT UNSIGNED DEFAULT 0 ,
` percentage_warning ` TINYINT UNSIGNED DEFAULT 0 ,
2022-10-21 13:10:12 +02:00
` warning_time ` INT UNSIGNED DEFAULT 0 ,
2022-02-01 13:49:32 +01:00
PRIMARY KEY ( ` id_agente_modulo ` ) ,
KEY ` main_idx ` ( ` id_agente_modulo ` , ` id_agente ` ) ,
KEY ` tam_agente ` ( ` id_agente ` ) ,
KEY ` id_tipo_modulo ` ( ` id_tipo_modulo ` ) ,
KEY ` disabled ` ( ` disabled ` ) ,
KEY ` module ` ( ` id_modulo ` ) ,
KEY ` nombre ` ( ` nombre ` ( 255 ) ) ,
KEY ` module_group ` ( ` id_module_group ` ) using btree
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2008-03-06 Sancho Lerena <slerena@gmail.com>
Pandora FMS 2.0 development first commit. 1.4 version is now 2.0
* pandoradb_data.sql: Added correct tnetwork_components, fixed
ttipo_modulo (categoria values).
* include/styles/pandora.css: Added some server icons, tab style
for module editor has been improved.
* include/functions_db.php: added new functions, lang_string and
check_login, and a first review of several functions that currently
need change for new config session parameters in array $config[]
* include/javascript/pandora.js: Added a new global include for
spare javascript functions before included into a few pages.
* include/languages/language_en.php: New tokens.
* include/help*: New contextual help system.
* include/config_process.php: New way to manage config.
* include/functions.php: Added new functions to manage global
* operation/agentes/estado_ultimopaquete.php: removed old javascript
code from there.
* operation/agentes/estado_agente.php: Removed references to deprecated
field "agent_type".
* operation/agentes/tactical.php: Some code cleanup and progressbar
issues merged from 1.3.1 branch. Need to add support to new server
types and new module types.
* operation/servers/view_server.php: Added support to new servers, code
cleanup.
* reporting/fgraph.php: Code cleanup, changes to use new config method,
and a lot of style change.
* general/pandora_help.php: New source for contextual help in the way
of moodle.
* general/footer.php, general/noaccess.php: Code cleanup and uses of
new config.
* module_manager_editor: New editors for each module family. Need
finish and implement EDITION of data, now only inserts data.
* godmode/agentes/agent_manager.php: Implemented new server assigment
and edition.
* godmode/agentes/configurar_agente.php: Small changes that affects
module management, visualization and agent management.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@739 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-03-07 17:22:16 +01:00
-- snmp_oid is also used for WMI query
2006-03-27 05:37:27 +02:00
2012-08-20 Miguel de Dios <miguel.dedios@artica.es>
* godmode/reporting/reporting_builder.main.php,
godmode/reporting/reporting_builder.php,
include/functions_reports.php, pandoradb.sql,
pandoradb.postgreSQL.sql, pandoradb.oracle.sql,
operation/reporting/reporting_xml.php,
operation/reporting/reporting_viewer.php,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql: now the reports
can set the group can edit or private edition.
* include/functions_users.php: cleaned source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6889 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-08-20 15:12:53 +02:00
-- -----------------------------------------------------
-- Table `tagent_access`
-- -----------------------------------------------------
2008-08-05 13:42:08 +02:00
CREATE TABLE IF NOT EXISTS ` tagent_access ` (
2022-02-01 13:49:32 +01:00
` id_agent ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` utimestamp ` BIGINT NOT NULL DEFAULT 0 ,
KEY ` agent_index ` ( ` id_agent ` ) ,
KEY ` idx_utimestamp ` USING BTREE ( ` utimestamp ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2008-08-05 13:42:08 +02:00
2012-08-20 Miguel de Dios <miguel.dedios@artica.es>
* godmode/reporting/reporting_builder.main.php,
godmode/reporting/reporting_builder.php,
include/functions_reports.php, pandoradb.sql,
pandoradb.postgreSQL.sql, pandoradb.oracle.sql,
operation/reporting/reporting_xml.php,
operation/reporting/reporting_viewer.php,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql: now the reports
can set the group can edit or private edition.
* include/functions_users.php: cleaned source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6889 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-08-20 15:12:53 +02:00
-- -----------------------------------------------------
-- Table `talert_snmp`
-- -----------------------------------------------------
2008-08-05 13:42:08 +02:00
CREATE TABLE IF NOT EXISTS ` talert_snmp ` (
2022-02-01 13:49:32 +01:00
` id_as ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` id_alert ` INT UNSIGNED NOT NULL DEFAULT 0 ,
2022-02-01 15:11:59 +01:00
` al_field1 ` TEXT ,
` al_field2 ` TEXT ,
` al_field3 ` TEXT ,
` al_field4 ` TEXT ,
` al_field5 ` TEXT ,
` al_field6 ` TEXT ,
` al_field7 ` TEXT ,
` al_field8 ` TEXT ,
` al_field9 ` TEXT ,
` al_field10 ` TEXT ,
` al_field11 ` TEXT ,
` al_field12 ` TEXT ,
` al_field13 ` TEXT ,
` al_field14 ` TEXT ,
` al_field15 ` TEXT ,
` al_field16 ` TEXT ,
` al_field17 ` TEXT ,
` al_field18 ` TEXT ,
` al_field19 ` TEXT ,
` al_field20 ` TEXT ,
2022-02-01 13:49:32 +01:00
` description ` VARCHAR ( 255 ) DEFAULT ' ' ,
` alert_type ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` agent ` VARCHAR ( 100 ) DEFAULT ' ' ,
` custom_oid ` TEXT ,
` oid ` VARCHAR ( 255 ) NOT NULL DEFAULT ' ' ,
` time_threshold ` INT NOT NULL DEFAULT 0 ,
` times_fired ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` last_fired ` DATETIME NOT NULL DEFAULT ' 1970-01-01 00:00:00 ' ,
` max_alerts ` INT NOT NULL DEFAULT 1 ,
` min_alerts ` INT NOT NULL DEFAULT 1 ,
` internal_counter ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` priority ` TINYINT DEFAULT 0 ,
` _snmp_f1_ ` TEXT ,
` _snmp_f2_ ` TEXT ,
` _snmp_f3_ ` TEXT ,
` _snmp_f4_ ` TEXT ,
` _snmp_f5_ ` TEXT ,
` _snmp_f6_ ` TEXT ,
` _snmp_f7_ ` TEXT ,
` _snmp_f8_ ` TEXT ,
` _snmp_f9_ ` TEXT ,
` _snmp_f10_ ` TEXT ,
` _snmp_f11_ ` TEXT ,
` _snmp_f12_ ` TEXT ,
` _snmp_f13_ ` TEXT ,
` _snmp_f14_ ` TEXT ,
` _snmp_f15_ ` TEXT ,
` _snmp_f16_ ` TEXT ,
` _snmp_f17_ ` TEXT ,
` _snmp_f18_ ` TEXT ,
` _snmp_f19_ ` TEXT ,
` _snmp_f20_ ` TEXT ,
` trap_type ` INT NOT NULL DEFAULT - 1 ,
` single_value ` VARCHAR ( 255 ) DEFAULT ' ' ,
` position ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` disable_event ` TINYINT DEFAULT 0 ,
` id_group ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` order_1 ` INT UNSIGNED NOT NULL DEFAULT 1 ,
` order_2 ` INT UNSIGNED NOT NULL DEFAULT 2 ,
` order_3 ` INT UNSIGNED NOT NULL DEFAULT 3 ,
` order_4 ` INT UNSIGNED NOT NULL DEFAULT 4 ,
` order_5 ` INT UNSIGNED NOT NULL DEFAULT 5 ,
` order_6 ` INT UNSIGNED NOT NULL DEFAULT 6 ,
` order_7 ` INT UNSIGNED NOT NULL DEFAULT 7 ,
` order_8 ` INT UNSIGNED NOT NULL DEFAULT 8 ,
` order_9 ` INT UNSIGNED NOT NULL DEFAULT 9 ,
` order_10 ` INT UNSIGNED NOT NULL DEFAULT 10 ,
` order_11 ` INT UNSIGNED NOT NULL DEFAULT 11 ,
` order_12 ` INT UNSIGNED NOT NULL DEFAULT 12 ,
` order_13 ` INT UNSIGNED NOT NULL DEFAULT 13 ,
` order_14 ` INT UNSIGNED NOT NULL DEFAULT 14 ,
` order_15 ` INT UNSIGNED NOT NULL DEFAULT 15 ,
` order_16 ` INT UNSIGNED NOT NULL DEFAULT 16 ,
` order_17 ` INT UNSIGNED NOT NULL DEFAULT 17 ,
` order_18 ` INT UNSIGNED NOT NULL DEFAULT 18 ,
` order_19 ` INT UNSIGNED NOT NULL DEFAULT 19 ,
` order_20 ` INT UNSIGNED NOT NULL DEFAULT 20 ,
PRIMARY KEY ( ` id_as ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2006-03-27 05:37:27 +02:00
2012-08-20 Miguel de Dios <miguel.dedios@artica.es>
* godmode/reporting/reporting_builder.main.php,
godmode/reporting/reporting_builder.php,
include/functions_reports.php, pandoradb.sql,
pandoradb.postgreSQL.sql, pandoradb.oracle.sql,
operation/reporting/reporting_xml.php,
operation/reporting/reporting_viewer.php,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql: now the reports
can set the group can edit or private edition.
* include/functions_users.php: cleaned source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6889 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-08-20 15:12:53 +02:00
-- -----------------------------------------------------
-- Table `talert_commands`
-- -----------------------------------------------------
2009-01-12 Esteban Sanchez <estebans@artica.es>
* godmode/agentes/alert_manager.php: Complete rewritten of the alert
system when assigned alerts to an agent.
* pandoradb.sql: New tables for alert system. These are:
talert_commands, talert_actions, talert_templates,
talert_template_modules, talert_template_module_actions. No migration
tool is available yet.
* godmode/alerts/configure_alert_template.php,
godmode/alerts/configure_alert_action.php,
godmode/alerts/alert_templates.php,
godmode/alerts/configure_alert_command.php,
godmode/alerts/alert_actions.php: Added to repository. Administration
interface to new alert system.
* godmode/alerts/modify_alert.php: Deleted from repository.
* godmode/setup/setup.php: Added an example of the date format. Main
table has now percentage width.
* godmode/menu.php, operation/menu.php: Added new alert options.
Removed refr value when it's not neccesary.
* include/styles/pandora.css: Added width to textarea elements. Style
correction and cleanup. Tables doesn't have a odd-even pattern, but
the hovered row now changes its colour. New styles for alert pages.
* include/functions_custom_graphs.php: Added to repository. custom
graphs functions moved here.
* include/functions_incidents.php, include/functions_events.php: Moved
to LGPL. Style comment corrections.
* include/functions_html.php: Documentation style correction. Added
print_input_file() and print_label().
* include/functions_ui.php: Doc style correction.
* operation/reporting/graph_viewer.php: Include new function file with
custom graphs. Use generic functions.
* index.php: Unset pass from POST and REQUEST arrays.
* include/functions_db.php: Some documentation updated to new format.
Added format_array_to_update_sql() to generate SQL sentences for
updates. Style correction.
* godmode/agentes/configurar_agente.php: Variables renamed to have a
meaning.
* extensions/update_manager/main.php: Mark an string translatable.
* extensions/update_manager/lib/libupdate_manager_client.php,
godmode/alerts/configure_alert.php, include/functions.php,
godmode/agentes/module_manager.php, operation/agentes/networkmap.php,
operation/reporting/reporting_viewer.php,
godmode/agentes/manage_config.php: Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1331 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-01-12 15:31:01 +01:00
CREATE TABLE IF NOT EXISTS ` talert_commands ` (
2022-02-01 13:49:32 +01:00
` id ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` name ` VARCHAR ( 100 ) NOT NULL DEFAULT ' ' ,
` command ` TEXT ,
` id_group ` MEDIUMINT UNSIGNED NULL DEFAULT 0 ,
` description ` TEXT ,
` internal ` TINYINT DEFAULT 0 ,
` fields_descriptions ` TEXT ,
` fields_values ` TEXT ,
` fields_hidden ` TEXT ,
` previous_name ` TEXT ,
PRIMARY KEY ( ` id ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2009-01-12 Esteban Sanchez <estebans@artica.es>
* godmode/agentes/alert_manager.php: Complete rewritten of the alert
system when assigned alerts to an agent.
* pandoradb.sql: New tables for alert system. These are:
talert_commands, talert_actions, talert_templates,
talert_template_modules, talert_template_module_actions. No migration
tool is available yet.
* godmode/alerts/configure_alert_template.php,
godmode/alerts/configure_alert_action.php,
godmode/alerts/alert_templates.php,
godmode/alerts/configure_alert_command.php,
godmode/alerts/alert_actions.php: Added to repository. Administration
interface to new alert system.
* godmode/alerts/modify_alert.php: Deleted from repository.
* godmode/setup/setup.php: Added an example of the date format. Main
table has now percentage width.
* godmode/menu.php, operation/menu.php: Added new alert options.
Removed refr value when it's not neccesary.
* include/styles/pandora.css: Added width to textarea elements. Style
correction and cleanup. Tables doesn't have a odd-even pattern, but
the hovered row now changes its colour. New styles for alert pages.
* include/functions_custom_graphs.php: Added to repository. custom
graphs functions moved here.
* include/functions_incidents.php, include/functions_events.php: Moved
to LGPL. Style comment corrections.
* include/functions_html.php: Documentation style correction. Added
print_input_file() and print_label().
* include/functions_ui.php: Doc style correction.
* operation/reporting/graph_viewer.php: Include new function file with
custom graphs. Use generic functions.
* index.php: Unset pass from POST and REQUEST arrays.
* include/functions_db.php: Some documentation updated to new format.
Added format_array_to_update_sql() to generate SQL sentences for
updates. Style correction.
* godmode/agentes/configurar_agente.php: Variables renamed to have a
meaning.
* extensions/update_manager/main.php: Mark an string translatable.
* extensions/update_manager/lib/libupdate_manager_client.php,
godmode/alerts/configure_alert.php, include/functions.php,
godmode/agentes/module_manager.php, operation/agentes/networkmap.php,
operation/reporting/reporting_viewer.php,
godmode/agentes/manage_config.php: Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1331 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-01-12 15:31:01 +01:00
2012-08-20 Miguel de Dios <miguel.dedios@artica.es>
* godmode/reporting/reporting_builder.main.php,
godmode/reporting/reporting_builder.php,
include/functions_reports.php, pandoradb.sql,
pandoradb.postgreSQL.sql, pandoradb.oracle.sql,
operation/reporting/reporting_xml.php,
operation/reporting/reporting_viewer.php,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql: now the reports
can set the group can edit or private edition.
* include/functions_users.php: cleaned source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6889 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-08-20 15:12:53 +02:00
-- -----------------------------------------------------
-- Table `talert_actions`
-- -----------------------------------------------------
2009-01-12 Esteban Sanchez <estebans@artica.es>
* godmode/agentes/alert_manager.php: Complete rewritten of the alert
system when assigned alerts to an agent.
* pandoradb.sql: New tables for alert system. These are:
talert_commands, talert_actions, talert_templates,
talert_template_modules, talert_template_module_actions. No migration
tool is available yet.
* godmode/alerts/configure_alert_template.php,
godmode/alerts/configure_alert_action.php,
godmode/alerts/alert_templates.php,
godmode/alerts/configure_alert_command.php,
godmode/alerts/alert_actions.php: Added to repository. Administration
interface to new alert system.
* godmode/alerts/modify_alert.php: Deleted from repository.
* godmode/setup/setup.php: Added an example of the date format. Main
table has now percentage width.
* godmode/menu.php, operation/menu.php: Added new alert options.
Removed refr value when it's not neccesary.
* include/styles/pandora.css: Added width to textarea elements. Style
correction and cleanup. Tables doesn't have a odd-even pattern, but
the hovered row now changes its colour. New styles for alert pages.
* include/functions_custom_graphs.php: Added to repository. custom
graphs functions moved here.
* include/functions_incidents.php, include/functions_events.php: Moved
to LGPL. Style comment corrections.
* include/functions_html.php: Documentation style correction. Added
print_input_file() and print_label().
* include/functions_ui.php: Doc style correction.
* operation/reporting/graph_viewer.php: Include new function file with
custom graphs. Use generic functions.
* index.php: Unset pass from POST and REQUEST arrays.
* include/functions_db.php: Some documentation updated to new format.
Added format_array_to_update_sql() to generate SQL sentences for
updates. Style correction.
* godmode/agentes/configurar_agente.php: Variables renamed to have a
meaning.
* extensions/update_manager/main.php: Mark an string translatable.
* extensions/update_manager/lib/libupdate_manager_client.php,
godmode/alerts/configure_alert.php, include/functions.php,
godmode/agentes/module_manager.php, operation/agentes/networkmap.php,
operation/reporting/reporting_viewer.php,
godmode/agentes/manage_config.php: Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1331 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-01-12 15:31:01 +01:00
CREATE TABLE IF NOT EXISTS ` talert_actions ` (
2022-02-01 13:49:32 +01:00
` id ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` name ` TEXT ,
` id_alert_command ` INT UNSIGNED NULL DEFAULT 0 ,
2022-02-01 15:11:59 +01:00
` field1 ` TEXT ,
` field2 ` TEXT ,
` field3 ` TEXT ,
` field4 ` TEXT ,
` field5 ` TEXT ,
` field6 ` TEXT ,
` field7 ` TEXT ,
` field8 ` TEXT ,
` field9 ` TEXT ,
` field10 ` TEXT ,
` field11 ` TEXT ,
` field12 ` TEXT ,
` field13 ` TEXT ,
` field14 ` TEXT ,
` field15 ` TEXT ,
` field16 ` TEXT ,
` field17 ` TEXT ,
` field18 ` TEXT ,
` field19 ` TEXT ,
` field20 ` TEXT ,
2022-02-01 13:49:32 +01:00
` id_group ` MEDIUMINT UNSIGNED NULL DEFAULT 0 ,
` action_threshold ` INT NOT NULL DEFAULT 0 ,
2022-02-01 15:11:59 +01:00
` field1_recovery ` TEXT ,
` field2_recovery ` TEXT ,
` field3_recovery ` TEXT ,
` field4_recovery ` TEXT ,
` field5_recovery ` TEXT ,
` field6_recovery ` TEXT ,
` field7_recovery ` TEXT ,
` field8_recovery ` TEXT ,
` field9_recovery ` TEXT ,
` field10_recovery ` TEXT ,
` field11_recovery ` TEXT ,
` field12_recovery ` TEXT ,
` field13_recovery ` TEXT ,
` field14_recovery ` TEXT ,
` field15_recovery ` TEXT ,
` field16_recovery ` TEXT ,
` field17_recovery ` TEXT ,
` field18_recovery ` TEXT ,
` field19_recovery ` TEXT ,
` field20_recovery ` TEXT ,
2022-02-01 13:49:32 +01:00
` previous_name ` TEXT ,
` create_wu_integria ` TINYINT DEFAULT NULL ,
PRIMARY KEY ( ` id ` ) ,
FOREIGN KEY ( ` id_alert_command ` ) REFERENCES talert_commands ( ` id ` )
ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2009-01-12 Esteban Sanchez <estebans@artica.es>
* godmode/agentes/alert_manager.php: Complete rewritten of the alert
system when assigned alerts to an agent.
* pandoradb.sql: New tables for alert system. These are:
talert_commands, talert_actions, talert_templates,
talert_template_modules, talert_template_module_actions. No migration
tool is available yet.
* godmode/alerts/configure_alert_template.php,
godmode/alerts/configure_alert_action.php,
godmode/alerts/alert_templates.php,
godmode/alerts/configure_alert_command.php,
godmode/alerts/alert_actions.php: Added to repository. Administration
interface to new alert system.
* godmode/alerts/modify_alert.php: Deleted from repository.
* godmode/setup/setup.php: Added an example of the date format. Main
table has now percentage width.
* godmode/menu.php, operation/menu.php: Added new alert options.
Removed refr value when it's not neccesary.
* include/styles/pandora.css: Added width to textarea elements. Style
correction and cleanup. Tables doesn't have a odd-even pattern, but
the hovered row now changes its colour. New styles for alert pages.
* include/functions_custom_graphs.php: Added to repository. custom
graphs functions moved here.
* include/functions_incidents.php, include/functions_events.php: Moved
to LGPL. Style comment corrections.
* include/functions_html.php: Documentation style correction. Added
print_input_file() and print_label().
* include/functions_ui.php: Doc style correction.
* operation/reporting/graph_viewer.php: Include new function file with
custom graphs. Use generic functions.
* index.php: Unset pass from POST and REQUEST arrays.
* include/functions_db.php: Some documentation updated to new format.
Added format_array_to_update_sql() to generate SQL sentences for
updates. Style correction.
* godmode/agentes/configurar_agente.php: Variables renamed to have a
meaning.
* extensions/update_manager/main.php: Mark an string translatable.
* extensions/update_manager/lib/libupdate_manager_client.php,
godmode/alerts/configure_alert.php, include/functions.php,
godmode/agentes/module_manager.php, operation/agentes/networkmap.php,
operation/reporting/reporting_viewer.php,
godmode/agentes/manage_config.php: Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1331 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-01-12 15:31:01 +01:00
2012-08-20 Miguel de Dios <miguel.dedios@artica.es>
* godmode/reporting/reporting_builder.main.php,
godmode/reporting/reporting_builder.php,
include/functions_reports.php, pandoradb.sql,
pandoradb.postgreSQL.sql, pandoradb.oracle.sql,
operation/reporting/reporting_xml.php,
operation/reporting/reporting_viewer.php,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql: now the reports
can set the group can edit or private edition.
* include/functions_users.php: cleaned source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6889 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-08-20 15:12:53 +02:00
-- -----------------------------------------------------
-- Table `talert_templates`
-- -----------------------------------------------------
2009-01-12 Esteban Sanchez <estebans@artica.es>
* godmode/agentes/alert_manager.php: Complete rewritten of the alert
system when assigned alerts to an agent.
* pandoradb.sql: New tables for alert system. These are:
talert_commands, talert_actions, talert_templates,
talert_template_modules, talert_template_module_actions. No migration
tool is available yet.
* godmode/alerts/configure_alert_template.php,
godmode/alerts/configure_alert_action.php,
godmode/alerts/alert_templates.php,
godmode/alerts/configure_alert_command.php,
godmode/alerts/alert_actions.php: Added to repository. Administration
interface to new alert system.
* godmode/alerts/modify_alert.php: Deleted from repository.
* godmode/setup/setup.php: Added an example of the date format. Main
table has now percentage width.
* godmode/menu.php, operation/menu.php: Added new alert options.
Removed refr value when it's not neccesary.
* include/styles/pandora.css: Added width to textarea elements. Style
correction and cleanup. Tables doesn't have a odd-even pattern, but
the hovered row now changes its colour. New styles for alert pages.
* include/functions_custom_graphs.php: Added to repository. custom
graphs functions moved here.
* include/functions_incidents.php, include/functions_events.php: Moved
to LGPL. Style comment corrections.
* include/functions_html.php: Documentation style correction. Added
print_input_file() and print_label().
* include/functions_ui.php: Doc style correction.
* operation/reporting/graph_viewer.php: Include new function file with
custom graphs. Use generic functions.
* index.php: Unset pass from POST and REQUEST arrays.
* include/functions_db.php: Some documentation updated to new format.
Added format_array_to_update_sql() to generate SQL sentences for
updates. Style correction.
* godmode/agentes/configurar_agente.php: Variables renamed to have a
meaning.
* extensions/update_manager/main.php: Mark an string translatable.
* extensions/update_manager/lib/libupdate_manager_client.php,
godmode/alerts/configure_alert.php, include/functions.php,
godmode/agentes/module_manager.php, operation/agentes/networkmap.php,
operation/reporting/reporting_viewer.php,
godmode/agentes/manage_config.php: Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1331 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-01-12 15:31:01 +01:00
CREATE TABLE IF NOT EXISTS ` talert_templates ` (
2022-02-01 13:49:32 +01:00
` id ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` name ` TEXT ,
2022-02-02 12:30:02 +01:00
` description ` MEDIUMTEXT ,
2022-02-01 13:49:32 +01:00
` id_alert_action ` INT UNSIGNED NULL ,
2022-02-01 15:11:59 +01:00
` field1 ` TEXT ,
` field2 ` TEXT ,
` field3 ` TEXT ,
` field4 ` TEXT ,
` field5 ` TEXT ,
` field6 ` TEXT ,
` field7 ` TEXT ,
` field8 ` TEXT ,
` field9 ` TEXT ,
` field10 ` TEXT ,
` field11 ` TEXT ,
` field12 ` TEXT ,
` field13 ` TEXT ,
` field14 ` TEXT ,
` field15 ` TEXT ,
` field16 ` TEXT ,
` field17 ` TEXT ,
` field18 ` TEXT ,
` field19 ` TEXT ,
` field20 ` TEXT ,
2022-02-01 13:49:32 +01:00
` type ` ENUM ( ' regex ' , ' max_min ' , ' max ' , ' min ' , ' equal ' , ' not_equal ' , ' warning ' , ' critical ' , ' onchange ' , ' unknown ' , ' always ' , ' not_normal ' ) ,
` value ` VARCHAR ( 255 ) DEFAULT ' ' ,
` matches_value ` TINYINT DEFAULT 0 ,
` max_value ` DOUBLE DEFAULT NULL ,
` min_value ` DOUBLE DEFAULT NULL ,
` time_threshold ` INT NOT NULL DEFAULT 0 ,
` max_alerts ` INT UNSIGNED NOT NULL DEFAULT 1 ,
` min_alerts ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` time_from ` time DEFAULT ' 00:00:00 ' ,
` time_to ` time DEFAULT ' 00:00:00 ' ,
` monday ` TINYINT DEFAULT 1 ,
` tuesday ` TINYINT DEFAULT 1 ,
` wednesday ` TINYINT DEFAULT 1 ,
` thursday ` TINYINT DEFAULT 1 ,
` friday ` TINYINT DEFAULT 1 ,
` saturday ` TINYINT DEFAULT 1 ,
` sunday ` TINYINT DEFAULT 1 ,
` recovery_notify ` TINYINT DEFAULT 0 ,
2022-02-01 15:11:59 +01:00
` field1_recovery ` TEXT ,
` field2_recovery ` TEXT ,
` field3_recovery ` TEXT ,
` field4_recovery ` TEXT ,
` field5_recovery ` TEXT ,
` field6_recovery ` TEXT ,
` field7_recovery ` TEXT ,
` field8_recovery ` TEXT ,
` field9_recovery ` TEXT ,
` field10_recovery ` TEXT ,
` field11_recovery ` TEXT ,
` field12_recovery ` TEXT ,
` field13_recovery ` TEXT ,
` field14_recovery ` TEXT ,
` field15_recovery ` TEXT ,
` field16_recovery ` TEXT ,
` field17_recovery ` TEXT ,
` field18_recovery ` TEXT ,
` field19_recovery ` TEXT ,
` field20_recovery ` TEXT ,
2022-02-01 13:49:32 +01:00
` priority ` TINYINT DEFAULT 0 ,
` id_group ` MEDIUMINT UNSIGNED NULL DEFAULT 0 ,
` special_day ` TINYINT DEFAULT 0 ,
` wizard_level ` ENUM ( ' basic ' , ' advanced ' , ' nowizard ' ) DEFAULT ' nowizard ' ,
` min_alerts_reset_counter ` TINYINT DEFAULT 0 ,
` disable_event ` TINYINT DEFAULT 0 ,
` previous_name ` TEXT ,
2022-02-08 13:02:22 +01:00
` schedule ` TEXT ,
2022-02-01 13:49:32 +01:00
PRIMARY KEY ( ` id ` ) ,
KEY ` idx_template_action ` ( ` id_alert_action ` ) ,
FOREIGN KEY ( ` id_alert_action ` ) REFERENCES talert_actions ( ` id ` )
ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2009-01-12 Esteban Sanchez <estebans@artica.es>
* godmode/agentes/alert_manager.php: Complete rewritten of the alert
system when assigned alerts to an agent.
* pandoradb.sql: New tables for alert system. These are:
talert_commands, talert_actions, talert_templates,
talert_template_modules, talert_template_module_actions. No migration
tool is available yet.
* godmode/alerts/configure_alert_template.php,
godmode/alerts/configure_alert_action.php,
godmode/alerts/alert_templates.php,
godmode/alerts/configure_alert_command.php,
godmode/alerts/alert_actions.php: Added to repository. Administration
interface to new alert system.
* godmode/alerts/modify_alert.php: Deleted from repository.
* godmode/setup/setup.php: Added an example of the date format. Main
table has now percentage width.
* godmode/menu.php, operation/menu.php: Added new alert options.
Removed refr value when it's not neccesary.
* include/styles/pandora.css: Added width to textarea elements. Style
correction and cleanup. Tables doesn't have a odd-even pattern, but
the hovered row now changes its colour. New styles for alert pages.
* include/functions_custom_graphs.php: Added to repository. custom
graphs functions moved here.
* include/functions_incidents.php, include/functions_events.php: Moved
to LGPL. Style comment corrections.
* include/functions_html.php: Documentation style correction. Added
print_input_file() and print_label().
* include/functions_ui.php: Doc style correction.
* operation/reporting/graph_viewer.php: Include new function file with
custom graphs. Use generic functions.
* index.php: Unset pass from POST and REQUEST arrays.
* include/functions_db.php: Some documentation updated to new format.
Added format_array_to_update_sql() to generate SQL sentences for
updates. Style correction.
* godmode/agentes/configurar_agente.php: Variables renamed to have a
meaning.
* extensions/update_manager/main.php: Mark an string translatable.
* extensions/update_manager/lib/libupdate_manager_client.php,
godmode/alerts/configure_alert.php, include/functions.php,
godmode/agentes/module_manager.php, operation/agentes/networkmap.php,
operation/reporting/reporting_viewer.php,
godmode/agentes/manage_config.php: Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1331 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-01-12 15:31:01 +01:00
2012-08-20 Miguel de Dios <miguel.dedios@artica.es>
* godmode/reporting/reporting_builder.main.php,
godmode/reporting/reporting_builder.php,
include/functions_reports.php, pandoradb.sql,
pandoradb.postgreSQL.sql, pandoradb.oracle.sql,
operation/reporting/reporting_xml.php,
operation/reporting/reporting_viewer.php,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql: now the reports
can set the group can edit or private edition.
* include/functions_users.php: cleaned source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6889 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-08-20 15:12:53 +02:00
-- -----------------------------------------------------
-- Table `talert_template_modules`
-- -----------------------------------------------------
2009-01-12 Esteban Sanchez <estebans@artica.es>
* godmode/agentes/alert_manager.php: Complete rewritten of the alert
system when assigned alerts to an agent.
* pandoradb.sql: New tables for alert system. These are:
talert_commands, talert_actions, talert_templates,
talert_template_modules, talert_template_module_actions. No migration
tool is available yet.
* godmode/alerts/configure_alert_template.php,
godmode/alerts/configure_alert_action.php,
godmode/alerts/alert_templates.php,
godmode/alerts/configure_alert_command.php,
godmode/alerts/alert_actions.php: Added to repository. Administration
interface to new alert system.
* godmode/alerts/modify_alert.php: Deleted from repository.
* godmode/setup/setup.php: Added an example of the date format. Main
table has now percentage width.
* godmode/menu.php, operation/menu.php: Added new alert options.
Removed refr value when it's not neccesary.
* include/styles/pandora.css: Added width to textarea elements. Style
correction and cleanup. Tables doesn't have a odd-even pattern, but
the hovered row now changes its colour. New styles for alert pages.
* include/functions_custom_graphs.php: Added to repository. custom
graphs functions moved here.
* include/functions_incidents.php, include/functions_events.php: Moved
to LGPL. Style comment corrections.
* include/functions_html.php: Documentation style correction. Added
print_input_file() and print_label().
* include/functions_ui.php: Doc style correction.
* operation/reporting/graph_viewer.php: Include new function file with
custom graphs. Use generic functions.
* index.php: Unset pass from POST and REQUEST arrays.
* include/functions_db.php: Some documentation updated to new format.
Added format_array_to_update_sql() to generate SQL sentences for
updates. Style correction.
* godmode/agentes/configurar_agente.php: Variables renamed to have a
meaning.
* extensions/update_manager/main.php: Mark an string translatable.
* extensions/update_manager/lib/libupdate_manager_client.php,
godmode/alerts/configure_alert.php, include/functions.php,
godmode/agentes/module_manager.php, operation/agentes/networkmap.php,
operation/reporting/reporting_viewer.php,
godmode/agentes/manage_config.php: Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1331 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-01-12 15:31:01 +01:00
CREATE TABLE IF NOT EXISTS ` talert_template_modules ` (
2022-02-01 13:49:32 +01:00
` id ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` id_agent_module ` INT UNSIGNED NOT NULL ,
` id_alert_template ` INT UNSIGNED NOT NULL ,
` id_policy_alerts ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` internal_counter ` INT DEFAULT 0 ,
` last_fired ` BIGINT NOT NULL DEFAULT 0 ,
` last_reference ` BIGINT NOT NULL DEFAULT 0 ,
` times_fired ` INT NOT NULL DEFAULT 0 ,
` disabled ` TINYINT DEFAULT 0 ,
` standby ` TINYINT DEFAULT 0 ,
` priority ` TINYINT DEFAULT 0 ,
` force_execution ` TINYINT DEFAULT 0 ,
PRIMARY KEY ( ` id ` ) ,
KEY ` idx_template_module ` ( ` id_agent_module ` ) ,
FOREIGN KEY ( ` id_agent_module ` ) REFERENCES tagente_modulo ( ` id_agente_modulo ` )
ON DELETE CASCADE ON UPDATE CASCADE ,
FOREIGN KEY ( ` id_alert_template ` ) REFERENCES talert_templates ( ` id ` )
ON DELETE CASCADE ON UPDATE CASCADE ,
2022-10-20 16:42:26 +02:00
UNIQUE ( ` id_agent_module ` , ` id_alert_template ` , ` id_policy_alerts ` ) ,
2023-02-23 12:58:33 +01:00
INDEX force_execution ( ` force_execution ` ) ,
INDEX idx_disabled ( disabled )
2022-02-01 13:49:32 +01:00
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2009-01-12 Esteban Sanchez <estebans@artica.es>
* godmode/agentes/alert_manager.php: Complete rewritten of the alert
system when assigned alerts to an agent.
* pandoradb.sql: New tables for alert system. These are:
talert_commands, talert_actions, talert_templates,
talert_template_modules, talert_template_module_actions. No migration
tool is available yet.
* godmode/alerts/configure_alert_template.php,
godmode/alerts/configure_alert_action.php,
godmode/alerts/alert_templates.php,
godmode/alerts/configure_alert_command.php,
godmode/alerts/alert_actions.php: Added to repository. Administration
interface to new alert system.
* godmode/alerts/modify_alert.php: Deleted from repository.
* godmode/setup/setup.php: Added an example of the date format. Main
table has now percentage width.
* godmode/menu.php, operation/menu.php: Added new alert options.
Removed refr value when it's not neccesary.
* include/styles/pandora.css: Added width to textarea elements. Style
correction and cleanup. Tables doesn't have a odd-even pattern, but
the hovered row now changes its colour. New styles for alert pages.
* include/functions_custom_graphs.php: Added to repository. custom
graphs functions moved here.
* include/functions_incidents.php, include/functions_events.php: Moved
to LGPL. Style comment corrections.
* include/functions_html.php: Documentation style correction. Added
print_input_file() and print_label().
* include/functions_ui.php: Doc style correction.
* operation/reporting/graph_viewer.php: Include new function file with
custom graphs. Use generic functions.
* index.php: Unset pass from POST and REQUEST arrays.
* include/functions_db.php: Some documentation updated to new format.
Added format_array_to_update_sql() to generate SQL sentences for
updates. Style correction.
* godmode/agentes/configurar_agente.php: Variables renamed to have a
meaning.
* extensions/update_manager/main.php: Mark an string translatable.
* extensions/update_manager/lib/libupdate_manager_client.php,
godmode/alerts/configure_alert.php, include/functions.php,
godmode/agentes/module_manager.php, operation/agentes/networkmap.php,
operation/reporting/reporting_viewer.php,
godmode/agentes/manage_config.php: Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1331 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-01-12 15:31:01 +01:00
2012-08-20 Miguel de Dios <miguel.dedios@artica.es>
* godmode/reporting/reporting_builder.main.php,
godmode/reporting/reporting_builder.php,
include/functions_reports.php, pandoradb.sql,
pandoradb.postgreSQL.sql, pandoradb.oracle.sql,
operation/reporting/reporting_xml.php,
operation/reporting/reporting_viewer.php,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql: now the reports
can set the group can edit or private edition.
* include/functions_users.php: cleaned source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6889 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-08-20 15:12:53 +02:00
-- -----------------------------------------------------
-- Table `talert_template_module_actions`
-- -----------------------------------------------------
2010-09-15 11:54:48 +02:00
CREATE TABLE IF NOT EXISTS ` talert_template_module_actions ` (
2022-02-01 13:49:32 +01:00
` id ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` id_alert_template_module ` INT UNSIGNED NOT NULL ,
` id_alert_action ` INT UNSIGNED NOT NULL ,
` fires_min ` INT UNSIGNED DEFAULT 0 ,
` fires_max ` INT UNSIGNED DEFAULT 0 ,
` module_action_threshold ` INT NOT NULL DEFAULT 0 ,
` last_execution ` BIGINT NOT NULL DEFAULT 0 ,
PRIMARY KEY ( ` id ` ) ,
FOREIGN KEY ( ` id_alert_template_module ` ) REFERENCES talert_template_modules ( ` id ` )
ON DELETE CASCADE ON UPDATE CASCADE ,
FOREIGN KEY ( ` id_alert_action ` ) REFERENCES talert_actions ( ` id ` )
ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2007-03-12 18:58:52 +01:00
2021-11-02 17:49:45 +01:00
-- -----------------------------------------------------
-- Table `talert_calendar`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS ` talert_calendar ` (
2022-02-01 13:49:32 +01:00
` id ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` name ` VARCHAR ( 100 ) NOT NULL DEFAULT ' ' ,
` id_group ` INT NOT NULL DEFAULT 0 ,
` description ` TEXT ,
PRIMARY KEY ( ` id ` ) ,
UNIQUE ( ` name ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2021-11-02 17:49:45 +01:00
2012-08-21 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.oracle.sql, operation/agentes/estado_generalagente.php,
operation/agentes/estado_agente.php,
operation/agentes/ver_agente.php,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
godmode/agentes/agent_manager.php,
godmode/agentes/modificar_agente.php,
godmode/agentes/configurar_agente.php, pandoradb.sql,
pandoradb.postgreSQL.sql: added the feature to set a agent in
"Quiet" mode.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6896 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-08-21 19:12:02 +02:00
-- -----------------------------------------------------
-- Table `talert_special_days`
-- -----------------------------------------------------
2012-01-25 Junichi Satoh <junichi@rworks.jp>
* godmode/menu.php, godmode/alerts/alert_special_days.php,
godmode/alerts/configure_alert_special_days.php,
godmode/alerts/configure_alert_template.php,
extras/pandoradb_migrate_4.0.x_to_4.1.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_4.1.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_4.1.postgreSQL.sql,
pandoradb.oracle.sql, pandoradb.postgreSQL.sql, pandoradb.sql,
include/functions_alerts.php: Added special days feature. It allows
to define special days (holidays and special working days) for
alert templates.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5421 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-01-25 07:13:43 +01:00
CREATE TABLE IF NOT EXISTS ` talert_special_days ` (
2022-02-01 13:49:32 +01:00
` id ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` id_calendar ` INT UNSIGNED NOT NULL DEFAULT 1 ,
` id_group ` INT NOT NULL DEFAULT 0 ,
` date ` date NOT NULL DEFAULT ' 1970-01-01 ' ,
` day_code ` TINYINT NOT NULL ,
` description ` TEXT ,
PRIMARY KEY ( ` id ` ) ,
FOREIGN KEY ( ` id_calendar ` ) REFERENCES talert_calendar ( ` id ` )
ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2012-01-25 Junichi Satoh <junichi@rworks.jp>
* godmode/menu.php, godmode/alerts/alert_special_days.php,
godmode/alerts/configure_alert_special_days.php,
godmode/alerts/configure_alert_template.php,
extras/pandoradb_migrate_4.0.x_to_4.1.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_4.1.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_4.1.postgreSQL.sql,
pandoradb.oracle.sql, pandoradb.postgreSQL.sql, pandoradb.sql,
include/functions_alerts.php: Added special days feature. It allows
to define special days (holidays and special working days) for
alert templates.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5421 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-01-25 07:13:43 +01:00
2021-06-29 18:27:10 +02:00
-- -----------------------------------------------------
-- Table `talert_execution_queue`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS ` talert_execution_queue ` (
2022-02-01 13:49:32 +01:00
` id ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
2022-02-02 13:37:45 +01:00
` data ` LONGTEXT ,
2022-02-01 13:49:32 +01:00
` utimestamp ` BIGINT NOT NULL DEFAULT 0 ,
PRIMARY KEY ( ` id ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2021-06-29 18:27:10 +02:00
2012-08-21 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.oracle.sql, operation/agentes/estado_generalagente.php,
operation/agentes/estado_agente.php,
operation/agentes/ver_agente.php,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
godmode/agentes/agent_manager.php,
godmode/agentes/modificar_agente.php,
godmode/agentes/configurar_agente.php, pandoradb.sql,
pandoradb.postgreSQL.sql: added the feature to set a agent in
"Quiet" mode.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6896 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-08-21 19:12:02 +02:00
-- -----------------------------------------------------
-- Table `tattachment`
-- -----------------------------------------------------
2008-08-05 13:42:08 +02:00
CREATE TABLE IF NOT EXISTS ` tattachment ` (
2022-02-01 13:49:32 +01:00
` id_attachment ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` id_incidencia ` INT UNSIGNED NOT NULL DEFAULT 0 ,
2022-06-08 11:49:48 +02:00
` id_usuario ` VARCHAR ( 255 ) NOT NULL DEFAULT ' ' ,
2022-02-01 13:49:32 +01:00
` filename ` VARCHAR ( 255 ) NOT NULL DEFAULT ' ' ,
` description ` VARCHAR ( 150 ) DEFAULT ' ' ,
` size ` BIGINT UNSIGNED NOT NULL DEFAULT 0 ,
PRIMARY KEY ( ` id_attachment ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2007-03-12 18:58:52 +01:00
2012-08-21 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.oracle.sql, operation/agentes/estado_generalagente.php,
operation/agentes/estado_agente.php,
operation/agentes/ver_agente.php,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
godmode/agentes/agent_manager.php,
godmode/agentes/modificar_agente.php,
godmode/agentes/configurar_agente.php, pandoradb.sql,
pandoradb.postgreSQL.sql: added the feature to set a agent in
"Quiet" mode.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6896 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-08-21 19:12:02 +02:00
-- -----------------------------------------------------
-- Table `tconfig`
-- -----------------------------------------------------
2008-08-05 13:42:08 +02:00
CREATE TABLE IF NOT EXISTS ` tconfig ` (
2022-02-01 13:49:32 +01:00
` id_config ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` token ` VARCHAR ( 100 ) NOT NULL DEFAULT ' ' ,
2022-02-01 15:11:59 +01:00
` value ` TEXT ,
2022-02-01 13:49:32 +01:00
PRIMARY KEY ( ` id_config ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2006-03-27 05:37:27 +02:00
2012-08-21 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.oracle.sql, operation/agentes/estado_generalagente.php,
operation/agentes/estado_agente.php,
operation/agentes/ver_agente.php,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
godmode/agentes/agent_manager.php,
godmode/agentes/modificar_agente.php,
godmode/agentes/configurar_agente.php, pandoradb.sql,
pandoradb.postgreSQL.sql: added the feature to set a agent in
"Quiet" mode.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6896 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-08-21 19:12:02 +02:00
-- -----------------------------------------------------
-- Table `tconfig_os`
-- -----------------------------------------------------
2008-08-05 13:42:08 +02:00
CREATE TABLE IF NOT EXISTS ` tconfig_os ` (
2022-02-01 13:49:32 +01:00
` id_os ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` name ` VARCHAR ( 100 ) NOT NULL DEFAULT ' ' ,
` description ` VARCHAR ( 250 ) DEFAULT ' ' ,
` icon_name ` VARCHAR ( 100 ) DEFAULT ' ' ,
` previous_name ` TEXT NULL ,
PRIMARY KEY ( ` id_os ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2007-03-12 18:58:52 +01:00
2017-05-23 17:13:47 +02:00
-- -----------------------------------------------------
-- Table `tcontainer`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS ` tcontainer ` (
2022-02-01 13:49:32 +01:00
` id_container ` MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT ,
` name ` VARCHAR ( 100 ) NOT NULL DEFAULT ' ' ,
` parent ` MEDIUMINT UNSIGNED NOT NULL DEFAULT 0 ,
` disabled ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
` id_group ` MEDIUMINT UNSIGNED NULL DEFAULT 0 ,
2022-02-01 15:11:59 +01:00
` description ` TEXT ,
2022-02-01 13:49:32 +01:00
PRIMARY KEY ( ` id_container ` ) ,
KEY ` parent_index ` ( ` parent ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2017-05-23 17:13:47 +02:00
-- ---------------------------------------------------------------------
-- Table `tcontainer_item`
-- ---------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS ` tcontainer_item ` (
2022-02-01 13:49:32 +01:00
` id_ci ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` id_container ` MEDIUMINT UNSIGNED NOT NULL DEFAULT 0 ,
` type ` VARCHAR ( 30 ) DEFAULT ' simple_graph ' ,
` id_agent ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` id_agent_module ` BIGINT UNSIGNED NULL DEFAULT NULL ,
` time_lapse ` INT NOT NULL DEFAULT 0 ,
` id_graph ` INT UNSIGNED DEFAULT 0 ,
` only_average ` TINYINT UNSIGNED DEFAULT 0 NOT NULL ,
` id_group ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` id_module_group ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` agent ` VARCHAR ( 100 ) NOT NULL DEFAULT ' ' ,
` module ` VARCHAR ( 100 ) NOT NULL DEFAULT ' ' ,
` id_tag ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` type_graph ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
` fullscale ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
PRIMARY KEY ( ` id_ci ` ) ,
FOREIGN KEY ( ` id_container ` ) REFERENCES ` tcontainer ` ( ` id_container ` )
ON DELETE CASCADE
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2017-05-23 17:13:47 +02:00
2012-11-07 18:49:31 +01:00
-- ---------------------------------------------------------------------
2012-08-21 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.oracle.sql, operation/agentes/estado_generalagente.php,
operation/agentes/estado_agente.php,
operation/agentes/ver_agente.php,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
godmode/agentes/agent_manager.php,
godmode/agentes/modificar_agente.php,
godmode/agentes/configurar_agente.php, pandoradb.sql,
pandoradb.postgreSQL.sql: added the feature to set a agent in
"Quiet" mode.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6896 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-08-21 19:12:02 +02:00
-- Table `tevento`
2012-11-07 18:49:31 +01:00
-- ---------------------------------------------------------------------
2008-08-05 13:42:08 +02:00
CREATE TABLE IF NOT EXISTS ` tevento ` (
2022-02-01 13:49:32 +01:00
` id_evento ` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT ,
` id_agente ` INT NOT NULL DEFAULT 0 ,
2022-06-08 11:49:48 +02:00
` id_usuario ` VARCHAR ( 255 ) NOT NULL DEFAULT ' 0 ' ,
2022-02-01 13:49:32 +01:00
` id_grupo ` MEDIUMINT NOT NULL DEFAULT 0 ,
` estado ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
` timestamp ` DATETIME NOT NULL DEFAULT ' 1970-01-01 00:00:00 ' ,
2022-02-01 15:11:59 +01:00
` evento ` TEXT ,
2022-02-01 13:49:32 +01:00
` utimestamp ` BIGINT NOT NULL DEFAULT 0 ,
` event_type ` 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 ' , ' ncm ' ) DEFAULT ' unknown ' ,
` id_agentmodule ` INT NOT NULL DEFAULT 0 ,
` id_alert_am ` INT NOT NULL DEFAULT 0 ,
` criticity ` INT UNSIGNED NOT NULL DEFAULT 0 ,
2022-02-01 15:11:59 +01:00
` user_comment ` TEXT ,
` tags ` TEXT ,
` source ` TINYTEXT ,
` id_extra ` TINYTEXT ,
` critical_instructions ` TEXT ,
` warning_instructions ` TEXT ,
` unknown_instructions ` TEXT ,
2022-02-01 13:49:32 +01:00
` owner_user ` VARCHAR ( 100 ) NOT NULL DEFAULT ' ' ,
` ack_utimestamp ` BIGINT NOT NULL DEFAULT 0 ,
2022-02-01 15:11:59 +01:00
` custom_data ` TEXT ,
2022-02-01 13:49:32 +01:00
` data ` TINYTEXT ,
` module_status ` INT NOT NULL DEFAULT 0 ,
PRIMARY KEY ( ` id_evento ` ) ,
KEY ` idx_agente ` ( ` id_agente ` ) ,
KEY ` idx_agentmodule ` ( ` id_agentmodule ` ) ,
2023-02-23 12:58:33 +01:00
KEY ` idx_utimestamp ` USING BTREE ( ` utimestamp ` ) ,
INDEX ` agente_modulo_estado ` ( ` estado ` , ` id_agentmodule ` )
2022-02-01 13:49:32 +01:00
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2008-06-13 Sancho Lerena <slerena@gmail.com>
* index.php: Added pure (Fullscreen). HTML code cleanup and user session.
* pandoradb.sql: talert_snmp: Added priority field.
* pandoradb_data.sql: Changes default values in talerta. tconfig_os, tgrupo
and some links.
* header.php: Fixed some user session management.
* logon_ok.php: New design for welcome screen, odometer is over.
* menu.php, godmode/menu.php: Some ACL improvements.
* agent_disk_conf_editor.php: Minor fix in view link.
* configurar_agente.php, agent_manager.php: Added parent combo and better
ACL checks. New remote configuration control for get timestamp info of
config file.
* modify_alert.php: Changes to use new internal Mail alert.
* config.php: Some items moved to config_process. (font, attachment and
default style).
* functions.php: Added form_agent_combo(), form_event_type_combo(),
form_priority() and return_priority() functions.
* functions_db.php: Added smal_event_table() to render a variable table
with latest events (filtered).
* pandora.css. Added pure and priority colors.
* estado_alertas.php: Fixed ACL problems.
* stado_generalagente.php: Graph of modules now represents modules that
has generated events. Old graph is not used anymore. Also display parent.
* estado_grupo.php: Border of boxes is now thicker.
* tactical.php: New screen, almost all code changed. Odometer is not used
anymore, added some new items, like module LAG meter, module sanity, and
other general metrics.
* ver_agente.php: Now renders also event for each agent view. Alert manual
validation generate a new event.
* events.php: New event system. 90% new code. A LOT of new features,
including full screen, coloured (by priority) and filters by six fields.
* snmp_alert.php: Added support for alert priority.
* operation/users/user.php: No longer a user with UM privileges could
see any other user.
* render_view.php: Added fullscreen support for visual maps.
* fgraph.php: Added support for session checking in graphs (at least!).
New graphics for events (some changed it's function like events by group),
and feature added to progress GD implementation.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@860 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-13 18:59:54 +02:00
-- Criticity: 0 - Maintance (grey)
2009-01-12 Sancho Lerena <slerena@artica.es>
* pandoradb.sql: Removed fields "timestamp" and "id_agente" (and altered
some indexes) on tagente_datos, tagente_datos_string and
tagente_datos_inc.
tagente_estado table: removed cambio, added status_changes, last_status.
tagente_modulo: added five new fields (warning,critical mgmt., flipflop
detection, history module and delete_pending bit.
* agent_manager.php: Group ALL not shown anymore.
* configurar_agente.php: Support for new options. Delete a module now
mark for deletion the module, not delete data (It's VERY slow!).
* modificar_agente.php: Delete agent now uses the global function,
minor fixes.
* module_manager_editor.php: New fields initializacion.
* module_manager_editor_network.php: At this time, the first module
editor who implements the new fields and improve old ones (tcp data).
* setup.php: Added support for new token: event_view_hr (Filter of max
old (in hr) for the event viewer. Removed old tokens show_unknown and
show_lastalert.
* functions.php: format_for_graph() has an important BUG that makes
all units rendered without the "K" !!!!. Fixed.
* delete_agent.php: Delete remote config (if present). Also mark
for deletion modules instead delete them (and let the data without
being deleted, because it's a HUGE consuming time, and it's left
for the daily db maintance process).
* estado_agente.php: Updated code for view new status.
* estado_generalagente.php: Total packets are removed from this view,
this was a huge time consuming SQL operation that don't give important
infomation. Groupname is now visualized.
* estado_ultimopaquete.php,
* estado_monitores.php,
* estado_grupo.php: Rewritten much code to view new status and other
minor changes.
* ver_agente.php: Data view now works under the tabs and other minor
changes.
* events.php: Support for the new events and status. Added filter for
username and for a max. hours old events. Some boxes are now hidden
by default.
* fgraph.php: Some graphs are now fixed and uses tagente_datos and
tagent_access with utimestamp and without id_agent index. Works faster
* images/*: Updated icons (module types) and two new bulb colors.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1326 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-01-12 04:53:33 +01:00
-- Criticity: 1 - Informational (blue)
-- Criticity: 2 - Normal (green) (status 0)
-- Criticity: 3 - Warning (yellow) (status 2)
-- Criticity: 4 - Critical (red) (status 1)
2007-03-12 18:58:52 +01:00
2019-02-08 13:59:48 +01:00
-- ---------------------------------------------------------------------
-- Table `tevent_extended`
-- ---------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS ` tevent_extended ` (
2022-02-01 13:49:32 +01:00
` id ` serial PRIMARY KEY ,
` id_evento ` BIGINT UNSIGNED NOT NULL ,
` external_id ` BIGINT UNSIGNED ,
` utimestamp ` BIGINT NOT NULL DEFAULT 0 ,
` description ` TEXT ,
FOREIGN KEY ` tevent_ext_fk ` ( ` id_evento ` ) REFERENCES ` tevento ` ( ` id_evento ` )
ON UPDATE CASCADE ON DELETE CASCADE
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2019-02-08 13:59:48 +01:00
2012-11-07 18:49:31 +01:00
-- ---------------------------------------------------------------------
2012-08-21 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.oracle.sql, operation/agentes/estado_generalagente.php,
operation/agentes/estado_agente.php,
operation/agentes/ver_agente.php,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
godmode/agentes/agent_manager.php,
godmode/agentes/modificar_agente.php,
godmode/agentes/configurar_agente.php, pandoradb.sql,
pandoradb.postgreSQL.sql: added the feature to set a agent in
"Quiet" mode.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6896 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-08-21 19:12:02 +02:00
-- Table `tgrupo`
2012-11-07 18:49:31 +01:00
-- ---------------------------------------------------------------------
2008-08-05 13:42:08 +02:00
CREATE TABLE IF NOT EXISTS ` tgrupo ` (
2022-02-01 13:49:32 +01:00
` id_grupo ` MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT ,
` nombre ` VARCHAR ( 100 ) NOT NULL DEFAULT ' ' ,
` icon ` VARCHAR ( 50 ) DEFAULT ' world ' ,
` parent ` MEDIUMINT UNSIGNED NOT NULL DEFAULT 0 ,
` propagate ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
` disabled ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
` custom_id ` VARCHAR ( 255 ) DEFAULT ' ' ,
` id_skin ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` description ` TEXT ,
` contact ` TEXT ,
` other ` TEXT ,
` password ` VARCHAR ( 45 ) DEFAULT ' ' ,
` max_agents ` INT UNSIGNED NOT NULL DEFAULT 0 ,
PRIMARY KEY ( ` id_grupo ` ) ,
KEY ` parent_index ` ( ` parent ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2007-03-12 18:58:52 +01:00
2019-06-21 12:03:25 +02:00
-- ---------------------------------------------------------------------
-- Table `tcredential_store`
-- ---------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS ` tcredential_store ` (
2022-02-01 13:49:32 +01:00
` identifier ` VARCHAR ( 100 ) NOT NULL ,
` id_group ` MEDIUMINT UNSIGNED NOT NULL DEFAULT 0 ,
2022-10-04 09:58:07 +02:00
` product ` ENUM ( ' CUSTOM ' , ' AWS ' , ' AZURE ' , ' GOOGLE ' , ' SAP ' , ' WMI ' , ' SNMP ' ) DEFAULT ' CUSTOM ' ,
2022-02-01 13:49:32 +01:00
` username ` TEXT ,
` password ` TEXT ,
` extra_1 ` TEXT ,
` extra_2 ` TEXT ,
PRIMARY KEY ( ` identifier ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2019-06-21 12:03:25 +02:00
2012-11-07 18:49:31 +01:00
-- ---------------------------------------------------------------------
2012-08-29 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.sql, pandoradb.postgreSQL.sql, pandoradb.oracle.sql,
include/db/mysql.php,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
godmode/agentes/planned_downtime.list.php,
godmode/agentes/planned_downtime.editor.php, godmode/menu.php,
include/ajax/planned_downtime.ajax.php: refactoriced the code for
planned downtime, now this have new feature such as set a downtime
with a periodicity each week, each month and set the agents and
the modules with Quiet state instead the old form (but the old still
is). And the page is more easy and quickly to set or config a
planned downtime.
* godmode/alerts/configure_alert_template.php,
include/javascript/pandora.js: cleaned source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6919 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-08-29 11:46:05 +02:00
-- Table `tincidencia`
2012-11-07 18:49:31 +01:00
-- ---------------------------------------------------------------------
2008-08-05 13:42:08 +02:00
CREATE TABLE IF NOT EXISTS ` tincidencia ` (
2022-02-01 13:49:32 +01:00
` id_incidencia ` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT ,
` inicio ` DATETIME NOT NULL DEFAULT ' 1970-01-01 00:00:00 ' ,
` cierre ` DATETIME NOT NULL DEFAULT ' 1970-01-01 00:00:00 ' ,
2022-02-01 15:11:59 +01:00
` titulo ` TEXT ,
` descripcion ` TEXT ,
2022-06-08 11:49:48 +02:00
` id_usuario ` VARCHAR ( 255 ) NOT NULL DEFAULT ' ' ,
2022-02-01 13:49:32 +01:00
` origen ` VARCHAR ( 100 ) NOT NULL DEFAULT ' ' ,
` estado ` INT NOT NULL DEFAULT 0 ,
` prioridad ` INT NOT NULL DEFAULT 0 ,
` id_grupo ` MEDIUMINT UNSIGNED NOT NULL DEFAULT 0 ,
` actualizacion ` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP ,
` id_creator ` VARCHAR ( 60 ) DEFAULT NULL ,
` id_lastupdate ` VARCHAR ( 60 ) DEFAULT NULL ,
` id_agente_modulo ` BIGINT NOT NULL ,
` notify_email ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
` id_agent ` INT UNSIGNED NULL DEFAULT 0 ,
PRIMARY KEY ( ` id_incidencia ` ) ,
KEY ` incident_index_1 ` ( ` id_usuario ` , ` id_incidencia ` ) ,
KEY ` id_agente_modulo ` ( ` id_agente_modulo ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2006-03-27 05:37:27 +02:00
2012-11-07 18:49:31 +01:00
-- ---------------------------------------------------------------------
2012-08-29 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.sql, pandoradb.postgreSQL.sql, pandoradb.oracle.sql,
include/db/mysql.php,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
godmode/agentes/planned_downtime.list.php,
godmode/agentes/planned_downtime.editor.php, godmode/menu.php,
include/ajax/planned_downtime.ajax.php: refactoriced the code for
planned downtime, now this have new feature such as set a downtime
with a periodicity each week, each month and set the agents and
the modules with Quiet state instead the old form (but the old still
is). And the page is more easy and quickly to set or config a
planned downtime.
* godmode/alerts/configure_alert_template.php,
include/javascript/pandora.js: cleaned source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6919 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-08-29 11:46:05 +02:00
-- Table `tlanguage`
2012-11-07 18:49:31 +01:00
-- ---------------------------------------------------------------------
2012-10-09 04:02:25 +02:00
CREATE TABLE IF NOT EXISTS ` tlanguage ` (
2022-02-01 13:49:32 +01:00
` id_language ` VARCHAR ( 6 ) NOT NULL DEFAULT ' ' ,
` name ` VARCHAR ( 100 ) NOT NULL DEFAULT ' ' ,
PRIMARY KEY ( ` id_language ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2007-03-12 18:58:52 +01:00
2012-08-29 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.sql, pandoradb.postgreSQL.sql, pandoradb.oracle.sql,
include/db/mysql.php,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
godmode/agentes/planned_downtime.list.php,
godmode/agentes/planned_downtime.editor.php, godmode/menu.php,
include/ajax/planned_downtime.ajax.php: refactoriced the code for
planned downtime, now this have new feature such as set a downtime
with a periodicity each week, each month and set the agents and
the modules with Quiet state instead the old form (but the old still
is). And the page is more easy and quickly to set or config a
planned downtime.
* godmode/alerts/configure_alert_template.php,
include/javascript/pandora.js: cleaned source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6919 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-08-29 11:46:05 +02:00
-- -----------------------------------------------------
-- Table `tlink`
-- -----------------------------------------------------
2008-08-05 13:42:08 +02:00
CREATE TABLE IF NOT EXISTS ` tlink ` (
2022-02-01 13:49:32 +01:00
` id_link ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` name ` VARCHAR ( 100 ) NOT NULL DEFAULT ' ' ,
` link ` VARCHAR ( 255 ) NOT NULL DEFAULT ' ' ,
PRIMARY KEY ( ` id_link ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2006-03-27 05:37:27 +02:00
2012-12-09 23:31:29 +01:00
-- ----------------------------------------------------------------------
2012-08-29 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.sql, pandoradb.postgreSQL.sql, pandoradb.oracle.sql,
include/db/mysql.php,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
godmode/agentes/planned_downtime.list.php,
godmode/agentes/planned_downtime.editor.php, godmode/menu.php,
include/ajax/planned_downtime.ajax.php: refactoriced the code for
planned downtime, now this have new feature such as set a downtime
with a periodicity each week, each month and set the agents and
the modules with Quiet state instead the old form (but the old still
is). And the page is more easy and quickly to set or config a
planned downtime.
* godmode/alerts/configure_alert_template.php,
include/javascript/pandora.js: cleaned source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6919 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-08-29 11:46:05 +02:00
-- Table `tmodule_group`
2012-12-09 23:31:29 +01:00
-- ----------------------------------------------------------------------
2008-08-05 13:42:08 +02:00
CREATE TABLE IF NOT EXISTS ` tmodule_group ` (
2022-09-13 08:30:37 +02:00
` id_mg ` SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT ,
2022-02-01 13:49:32 +01:00
` name ` VARCHAR ( 150 ) NOT NULL DEFAULT ' ' ,
PRIMARY KEY ( ` id_mg ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2007-03-12 18:58:52 +01:00
2015-07-02 12:03:20 +02:00
-- This table was moved cause the `tmodule_relationship` will add
-- a foreign key for the trecon_task(id_rt)
-- ----------------------------------------------------------------------
-- Table `trecon_task`
-- ----------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS ` trecon_task ` (
2022-02-01 13:49:32 +01:00
` id_rt ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` name ` VARCHAR ( 100 ) NOT NULL DEFAULT ' ' ,
` description ` VARCHAR ( 250 ) NOT NULL DEFAULT ' ' ,
2022-02-01 15:11:59 +01:00
` subnet ` TEXT ,
2022-02-01 13:49:32 +01:00
` id_network_profile ` TEXT ,
` review_mode ` TINYINT UNSIGNED NOT NULL DEFAULT 1 ,
` id_group ` INT UNSIGNED NOT NULL DEFAULT 1 ,
` utimestamp ` BIGINT UNSIGNED NOT NULL DEFAULT 0 ,
` status ` TINYINT NOT NULL DEFAULT 0 ,
` interval_sweep ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` id_recon_server ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` id_os ` TINYINT NOT NULL DEFAULT 0 ,
` recon_ports ` VARCHAR ( 250 ) NOT NULL DEFAULT ' ' ,
` snmp_community ` VARCHAR ( 64 ) NOT NULL DEFAULT ' public ' ,
` id_recon_script ` INT ,
2022-02-01 15:11:59 +01:00
` field1 ` TEXT ,
2022-02-01 13:49:32 +01:00
` field2 ` VARCHAR ( 250 ) NOT NULL DEFAULT ' ' ,
` field3 ` VARCHAR ( 250 ) NOT NULL DEFAULT ' ' ,
` field4 ` VARCHAR ( 250 ) NOT NULL DEFAULT ' ' ,
` os_detect ` TINYINT UNSIGNED DEFAULT 0 ,
` resolve_names ` TINYINT UNSIGNED DEFAULT 0 ,
` parent_detection ` TINYINT UNSIGNED DEFAULT 0 ,
` parent_recursion ` TINYINT UNSIGNED DEFAULT 0 ,
` disabled ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
` macros ` TEXT ,
` alias_as_name ` TINYINT NOT NULL DEFAULT 0 ,
` snmp_enabled ` TINYINT UNSIGNED DEFAULT 0 ,
` vlan_enabled ` TINYINT UNSIGNED DEFAULT 0 ,
` snmp_version ` VARCHAR ( 5 ) NOT NULL DEFAULT 1 ,
` snmp_auth_user ` VARCHAR ( 255 ) NOT NULL DEFAULT ' ' ,
` snmp_auth_pass ` VARCHAR ( 255 ) NOT NULL DEFAULT ' ' ,
` snmp_auth_method ` VARCHAR ( 25 ) NOT NULL DEFAULT ' ' ,
` snmp_privacy_method ` VARCHAR ( 25 ) NOT NULL DEFAULT ' ' ,
` snmp_privacy_pass ` VARCHAR ( 255 ) NOT NULL DEFAULT ' ' ,
` snmp_security_level ` VARCHAR ( 25 ) NOT NULL DEFAULT ' ' ,
` wmi_enabled ` TINYINT UNSIGNED DEFAULT 0 ,
` rcmd_enabled ` TINYINT UNSIGNED DEFAULT 0 ,
` auth_strings ` TEXT ,
` auto_monitor ` TINYINT UNSIGNED DEFAULT 1 ,
` autoconfiguration_enabled ` TINYINT UNSIGNED DEFAULT 0 ,
` summary ` TEXT ,
` type ` INT NOT NULL DEFAULT 0 ,
` subnet_csv ` TINYINT UNSIGNED DEFAULT 0 ,
2022-09-28 15:34:45 +02:00
` snmp_skip_non_enabled_ifs ` TINYINT UNSIGNED DEFAULT 1 ,
2022-02-01 13:49:32 +01:00
PRIMARY KEY ( ` id_rt ` ) ,
KEY ` recon_task_daemon ` ( ` id_recon_server ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2015-07-02 12:03:20 +02:00
2020-03-16 23:52:20 +01:00
-- ----------------------------------------------------------------------
-- Table `tdiscovery_tmp`
-- ----------------------------------------------------------------------
2022-02-01 13:49:32 +01:00
CREATE TABLE IF NOT EXISTS ` tdiscovery_tmp_agents ` (
` id ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` id_rt ` INT UNSIGNED NOT NULL ,
` label ` VARCHAR ( 600 ) NOT NULL DEFAULT ' ' ,
` data ` MEDIUMTEXT ,
` review_date ` DATETIME DEFAULT NULL ,
` created ` DATETIME DEFAULT NULL ,
PRIMARY KEY ( ` id ` ) ,
KEY ` id_rt ` ( ` id_rt ` ) ,
INDEX ` label ` ( ` label ` ) ,
CONSTRAINT ` tdta_trt ` FOREIGN KEY ( ` id_rt ` ) REFERENCES ` trecon_task ` ( ` id_rt ` ) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
CREATE TABLE IF NOT EXISTS ` tdiscovery_tmp_connections ` (
` id ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` id_rt ` INT UNSIGNED NOT NULL ,
` dev_1 ` TEXT ,
` dev_2 ` TEXT ,
` if_1 ` TEXT ,
` if_2 ` TEXT ,
2020-03-25 18:02:58 +01:00
PRIMARY KEY ( ` id ` )
2022-02-01 13:49:32 +01:00
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2020-03-16 23:52:20 +01:00
2014-03-18 Alejandro Gallardo <alejandro.gallardo@artica.es>
* pandoradb.data.oracle.sql,
pandoradb.data.postgreSQL.sql,
pandoradb.sql,
extras/pandoradb_migrate_5.0.x_to_5.1.mysql.sql,
extras/pandoradb_migrate_5.0.x_to_5.1.oracle.sql,
extras/pandoradb_migrate_5.0.x_to_5.1.postgreSQL.sql:
Added the table "tmodule_relationship".
* operation/agentes/estado_generalagente.php: Added a
new table to show the network interfaces of the agent.
Minor fixes.
* include/styles/pandora.css: Added properties for the
class transparent'.
* include/ajax/module.php: Fixed an error and added code
to retrieve a module autocomplete input or add, remove
or update a module relation via ajax.
* include/functions_modules.php: Added the functions
"modules_get_relations", "modules_relation_exists",
"modules_add_relation", "modules_delete_relation" and
"modules_change_relation_lock".
* godmode/agentes/module_manager_editor_common.php:
Added a table and control to show, add or delete
relations with other modules. Added the javascript
functions "change_modules_autocomplete_input",
"add_new_relation", "change_lock_relation" and
"delete_relation".
* godmode/agentes/module_manager_editor.php: Added a
line to show the module relations table and control.
* godmode/agentes/module_manager_editor_network.php:
Minor fix.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@9610 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-03-18 12:49:33 +01:00
-- ----------------------------------------------------------------------
-- Table `tmodule_relationship`
-- ----------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS ` tmodule_relationship ` (
2022-02-01 13:49:32 +01:00
` id ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` id_rt ` INT UNSIGNED DEFAULT NULL ,
` id_server ` VARCHAR ( 100 ) NOT NULL DEFAULT ' ' ,
` module_a ` INT UNSIGNED NOT NULL ,
` module_b ` INT UNSIGNED NOT NULL ,
` disable_update ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
` type ` ENUM ( ' direct ' , ' failover ' ) DEFAULT ' direct ' ,
PRIMARY KEY ( ` id ` ) ,
FOREIGN KEY ( ` module_a ` ) REFERENCES tagente_modulo ( ` id_agente_modulo ` )
ON DELETE CASCADE ,
FOREIGN KEY ( ` module_b ` ) REFERENCES tagente_modulo ( ` id_agente_modulo ` )
ON DELETE CASCADE ,
FOREIGN KEY ( ` id_rt ` ) REFERENCES trecon_task ( ` id_rt ` )
ON DELETE CASCADE
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2014-03-18 Alejandro Gallardo <alejandro.gallardo@artica.es>
* pandoradb.data.oracle.sql,
pandoradb.data.postgreSQL.sql,
pandoradb.sql,
extras/pandoradb_migrate_5.0.x_to_5.1.mysql.sql,
extras/pandoradb_migrate_5.0.x_to_5.1.oracle.sql,
extras/pandoradb_migrate_5.0.x_to_5.1.postgreSQL.sql:
Added the table "tmodule_relationship".
* operation/agentes/estado_generalagente.php: Added a
new table to show the network interfaces of the agent.
Minor fixes.
* include/styles/pandora.css: Added properties for the
class transparent'.
* include/ajax/module.php: Fixed an error and added code
to retrieve a module autocomplete input or add, remove
or update a module relation via ajax.
* include/functions_modules.php: Added the functions
"modules_get_relations", "modules_relation_exists",
"modules_add_relation", "modules_delete_relation" and
"modules_change_relation_lock".
* godmode/agentes/module_manager_editor_common.php:
Added a table and control to show, add or delete
relations with other modules. Added the javascript
functions "change_modules_autocomplete_input",
"add_new_relation", "change_lock_relation" and
"delete_relation".
* godmode/agentes/module_manager_editor.php: Added a
line to show the module relations table and control.
* godmode/agentes/module_manager_editor_network.php:
Minor fix.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@9610 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-03-18 12:49:33 +01:00
2012-12-09 23:31:29 +01:00
-- ----------------------------------------------------------------------
2012-09-24 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.sql, pandoradb.postgreSQL.sql, pandoradb.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql: added the fields
"text_filter" and "dont_show_subgroups" for to new filters to
generate the networkmap.
* operation/agentes/networkmap.topology.php,
operation/agentes/networkmap.groups.php,
include/functions_networkmap.php, include/functions_servers.php:
added the new filters for free text for agents and hidden the
subgroups of any group in the group networkmap.
* extensions/resource_registration.php,
operation/agentes/networkmap.php, general/header.php,
godmode/netflow/nf_report_form.php,
godmode/agentes/module_manager.php, include/functions_groups.php,
include/auth/ldap.php, operation/agentes/estado_ultimopaquete.php,
include/functions.php, include/functions_db.php: cleaned source code
style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6995 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-24 13:59:05 +02:00
-- Table `tnetwork_component`
2012-12-09 23:31:29 +01:00
-- ----------------------------------------------------------------------
2008-08-05 13:42:08 +02:00
CREATE TABLE IF NOT EXISTS ` tnetwork_component ` (
2022-02-01 13:49:32 +01:00
` id_nc ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
2022-02-01 15:11:59 +01:00
` name ` TEXT ,
` description ` TEXT ,
2022-02-01 13:49:32 +01:00
` id_group ` INT NOT NULL DEFAULT 1 ,
` type ` SMALLINT NOT NULL DEFAULT 6 ,
` max ` BIGINT NOT NULL DEFAULT 0 ,
` min ` BIGINT NOT NULL DEFAULT 0 ,
` module_interval ` MEDIUMINT UNSIGNED NOT NULL DEFAULT 0 ,
` tcp_port ` INT UNSIGNED NOT NULL DEFAULT 0 ,
2022-02-01 15:11:59 +01:00
` tcp_send ` TEXT ,
` tcp_rcv ` TEXT ,
2022-02-01 13:49:32 +01:00
` snmp_community ` VARCHAR ( 255 ) NOT NULL DEFAULT ' NULL ' ,
` snmp_oid ` VARCHAR ( 400 ) NOT NULL ,
` id_module_group ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
` id_modulo ` INT UNSIGNED DEFAULT 0 ,
` id_plugin ` INT unsigned DEFAULT 0 ,
` plugin_user ` TEXT ,
` plugin_pass ` TEXT ,
` plugin_parameter ` TEXT ,
` max_timeout ` INT UNSIGNED DEFAULT 0 ,
` max_retries ` INT UNSIGNED DEFAULT 0 ,
` history_data ` TINYINT UNSIGNED DEFAULT 1 ,
` min_warning ` DOUBLE DEFAULT 0 ,
` max_warning ` DOUBLE DEFAULT 0 ,
` str_warning ` TEXT ,
` min_critical ` DOUBLE DEFAULT 0 ,
` max_critical ` DOUBLE DEFAULT 0 ,
` str_critical ` TEXT ,
` min_ff_event ` INT UNSIGNED DEFAULT 0 ,
` custom_string_1 ` TEXT ,
` custom_string_2 ` TEXT ,
` custom_string_3 ` TEXT ,
` custom_integer_1 ` INT DEFAULT 0 ,
` custom_integer_2 ` INT DEFAULT 0 ,
` post_process ` DOUBLE DEFAULT 0 ,
` unit ` TEXT ,
` wizard_level ` ENUM ( ' basic ' , ' advanced ' , ' nowizard ' ) DEFAULT ' nowizard ' ,
` macros ` TEXT ,
2022-02-01 15:11:59 +01:00
` critical_instructions ` TEXT ,
` warning_instructions ` TEXT ,
` unknown_instructions ` TEXT ,
2022-02-01 13:49:32 +01:00
` critical_inverse ` TINYINT UNSIGNED DEFAULT 0 ,
` warning_inverse ` TINYINT UNSIGNED DEFAULT 0 ,
` id_category ` INT DEFAULT 0 ,
2022-02-01 15:11:59 +01:00
` tags ` TEXT ,
` disabled_types_event ` TEXT ,
` module_macros ` TEXT ,
2022-02-01 13:49:32 +01:00
` min_ff_event_normal ` INT UNSIGNED DEFAULT 0 ,
` min_ff_event_warning ` INT UNSIGNED DEFAULT 0 ,
` min_ff_event_critical ` INT UNSIGNED DEFAULT 0 ,
` ff_type ` TINYINT UNSIGNED DEFAULT 0 ,
` each_ff ` TINYINT UNSIGNED DEFAULT 0 ,
` dynamic_interval ` INT UNSIGNED DEFAULT 0 ,
` dynamic_max ` INT DEFAULT 0 ,
` dynamic_min ` INT DEFAULT 0 ,
` dynamic_next ` BIGINT NOT NULL DEFAULT 0 ,
` dynamic_two_tailed ` TINYINT UNSIGNED DEFAULT 0 ,
` module_type ` TINYINT UNSIGNED NOT NULL DEFAULT 1 ,
2022-02-01 15:11:59 +01:00
` protocol ` TINYTEXT ,
` manufacturer_id ` VARCHAR ( 200 ) ,
2022-02-01 13:49:32 +01:00
` execution_type ` TINYINT UNSIGNED NOT NULL DEFAULT 1 ,
` scan_type ` TINYINT UNSIGNED NOT NULL DEFAULT 1 ,
2022-02-01 15:11:59 +01:00
` value ` TEXT ,
` value_operations ` TEXT ,
2022-02-01 13:49:32 +01:00
` module_enabled ` TINYINT UNSIGNED DEFAULT 0 ,
2022-02-01 15:11:59 +01:00
` name_oid ` VARCHAR ( 255 ) DEFAULT ' ' ,
` query_class ` VARCHAR ( 200 ) DEFAULT ' ' ,
` query_key_field ` VARCHAR ( 200 ) DEFAULT ' ' ,
` scan_filters ` TEXT ,
` query_filters ` TEXT ,
2022-02-01 13:49:32 +01:00
` enabled ` TINYINT UNSIGNED DEFAULT 1 ,
` percentage_critical ` TINYINT UNSIGNED DEFAULT 0 ,
` percentage_warning ` TINYINT UNSIGNED DEFAULT 0 ,
2022-10-21 13:10:12 +02:00
` warning_time ` INT UNSIGNED DEFAULT 0 ,
2022-02-01 13:49:32 +01:00
PRIMARY KEY ( ` id_nc ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2007-03-12 18:58:52 +01:00
2012-12-09 23:31:29 +01:00
-- ----------------------------------------------------------------------
2012-09-24 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.sql, pandoradb.postgreSQL.sql, pandoradb.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql: added the fields
"text_filter" and "dont_show_subgroups" for to new filters to
generate the networkmap.
* operation/agentes/networkmap.topology.php,
operation/agentes/networkmap.groups.php,
include/functions_networkmap.php, include/functions_servers.php:
added the new filters for free text for agents and hidden the
subgroups of any group in the group networkmap.
* extensions/resource_registration.php,
operation/agentes/networkmap.php, general/header.php,
godmode/netflow/nf_report_form.php,
godmode/agentes/module_manager.php, include/functions_groups.php,
include/auth/ldap.php, operation/agentes/estado_ultimopaquete.php,
include/functions.php, include/functions_db.php: cleaned source code
style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6995 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-24 13:59:05 +02:00
-- Table `tnetwork_component_group`
2012-12-09 23:31:29 +01:00
-- ----------------------------------------------------------------------
2008-08-05 13:42:08 +02:00
CREATE TABLE IF NOT EXISTS ` tnetwork_component_group ` (
2022-02-01 13:49:32 +01:00
` id_sg ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` name ` VARCHAR ( 200 ) NOT NULL DEFAULT ' ' ,
` parent ` MEDIUMINT UNSIGNED NOT NULL DEFAULT 0 ,
PRIMARY KEY ( ` id_sg ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2007-03-12 18:58:52 +01:00
2012-12-09 23:31:29 +01:00
-- ----------------------------------------------------------------------
2012-09-24 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.sql, pandoradb.postgreSQL.sql, pandoradb.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql: added the fields
"text_filter" and "dont_show_subgroups" for to new filters to
generate the networkmap.
* operation/agentes/networkmap.topology.php,
operation/agentes/networkmap.groups.php,
include/functions_networkmap.php, include/functions_servers.php:
added the new filters for free text for agents and hidden the
subgroups of any group in the group networkmap.
* extensions/resource_registration.php,
operation/agentes/networkmap.php, general/header.php,
godmode/netflow/nf_report_form.php,
godmode/agentes/module_manager.php, include/functions_groups.php,
include/auth/ldap.php, operation/agentes/estado_ultimopaquete.php,
include/functions.php, include/functions_db.php: cleaned source code
style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6995 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-24 13:59:05 +02:00
-- Table `tnetwork_profile`
2012-12-09 23:31:29 +01:00
-- ----------------------------------------------------------------------
2008-08-05 13:42:08 +02:00
CREATE TABLE IF NOT EXISTS ` tnetwork_profile ` (
2022-02-01 13:49:32 +01:00
` id_np ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` name ` VARCHAR ( 100 ) NOT NULL DEFAULT ' ' ,
` description ` VARCHAR ( 250 ) DEFAULT ' ' ,
PRIMARY KEY ( ` id_np ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2007-03-12 18:58:52 +01:00
2012-12-09 23:31:29 +01:00
-- ----------------------------------------------------------------------
2012-09-24 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.sql, pandoradb.postgreSQL.sql, pandoradb.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql: added the fields
"text_filter" and "dont_show_subgroups" for to new filters to
generate the networkmap.
* operation/agentes/networkmap.topology.php,
operation/agentes/networkmap.groups.php,
include/functions_networkmap.php, include/functions_servers.php:
added the new filters for free text for agents and hidden the
subgroups of any group in the group networkmap.
* extensions/resource_registration.php,
operation/agentes/networkmap.php, general/header.php,
godmode/netflow/nf_report_form.php,
godmode/agentes/module_manager.php, include/functions_groups.php,
include/auth/ldap.php, operation/agentes/estado_ultimopaquete.php,
include/functions.php, include/functions_db.php: cleaned source code
style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6995 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-24 13:59:05 +02:00
-- Table `tnetwork_profile_component`
2012-12-09 23:31:29 +01:00
-- ----------------------------------------------------------------------
2008-08-05 13:42:08 +02:00
CREATE TABLE IF NOT EXISTS ` tnetwork_profile_component ` (
2022-02-01 13:49:32 +01:00
` id_nc ` MEDIUMINT UNSIGNED NOT NULL DEFAULT 0 ,
` id_np ` MEDIUMINT UNSIGNED NOT NULL DEFAULT 0 ,
KEY ` id_np ` ( ` id_np ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2007-03-12 18:58:52 +01:00
2020-03-30 17:48:09 +02:00
-- ----------------------------------------------------------------------
-- Table `tpen`
-- ----------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS ` tpen ` (
2022-02-01 13:49:32 +01:00
` pen ` INT UNSIGNED NOT NULL ,
2020-03-30 17:48:09 +02:00
` manufacturer ` TEXT ,
` description ` TEXT ,
PRIMARY KEY ( ` pen ` )
2022-02-01 13:49:32 +01:00
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2020-03-30 17:48:09 +02:00
2020-03-30 17:02:34 +02:00
-- ----------------------------------------------------------------------
-- Table `tnetwork_profile_pen`
-- ----------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS ` tnetwork_profile_pen ` (
2022-02-01 13:49:32 +01:00
` pen ` INT UNSIGNED NOT NULL ,
` id_np ` INT UNSIGNED NOT NULL ,
2020-03-30 17:02:34 +02:00
CONSTRAINT ` fk_network_profile_pen_pen ` FOREIGN KEY ( ` pen ` )
2022-02-01 13:49:32 +01:00
REFERENCES ` tpen ` ( ` pen ` ) ON DELETE CASCADE ON UPDATE CASCADE ,
2020-03-30 17:02:34 +02:00
CONSTRAINT ` fk_network_profile_pen_id_np ` FOREIGN KEY ( ` id_np ` )
2022-02-01 13:49:32 +01:00
REFERENCES ` tnetwork_profile ` ( ` id_np ` ) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2020-03-30 17:02:34 +02:00
2012-12-09 23:31:29 +01:00
-- ----------------------------------------------------------------------
2012-09-24 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.sql, pandoradb.postgreSQL.sql, pandoradb.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql: added the fields
"text_filter" and "dont_show_subgroups" for to new filters to
generate the networkmap.
* operation/agentes/networkmap.topology.php,
operation/agentes/networkmap.groups.php,
include/functions_networkmap.php, include/functions_servers.php:
added the new filters for free text for agents and hidden the
subgroups of any group in the group networkmap.
* extensions/resource_registration.php,
operation/agentes/networkmap.php, general/header.php,
godmode/netflow/nf_report_form.php,
godmode/agentes/module_manager.php, include/functions_groups.php,
include/auth/ldap.php, operation/agentes/estado_ultimopaquete.php,
include/functions.php, include/functions_db.php: cleaned source code
style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6995 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-24 13:59:05 +02:00
-- Table `tnota`
2012-12-09 23:31:29 +01:00
-- ----------------------------------------------------------------------
2008-08-05 13:42:08 +02:00
CREATE TABLE IF NOT EXISTS ` tnota ` (
2022-02-01 13:49:32 +01:00
` id_nota ` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT ,
` id_incident ` BIGINT UNSIGNED NOT NULL ,
2022-06-08 11:49:48 +02:00
` id_usuario ` VARCHAR ( 255 ) NOT NULL DEFAULT ' 0 ' ,
2022-02-01 13:49:32 +01:00
` timestamp ` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ,
2022-02-02 12:30:02 +01:00
` nota ` MEDIUMTEXT ,
2022-02-01 13:49:32 +01:00
PRIMARY KEY ( ` id_nota ` ) ,
KEY ` id_incident ` ( ` id_incident ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2006-03-27 05:37:27 +02:00
2012-12-09 23:31:29 +01:00
-- ----------------------------------------------------------------------
2012-08-20 Miguel de Dios <miguel.dedios@artica.es>
* index.php, extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
general/login_page.php, general/logon_failed.php,
godmode/users/configure_user.php, include/api.php,
include/auth/mysql.php, pandoradb.sql, pandoradb.postgreSQL.sql,
pandoradb.oracle.sql: added the feature to set any user with
"not login" for only the user can work across the API.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6891 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-08-20 20:06:04 +02:00
-- Table `torigen`
2012-12-09 23:31:29 +01:00
-- ----------------------------------------------------------------------
2008-08-05 13:42:08 +02:00
CREATE TABLE IF NOT EXISTS ` torigen ` (
2022-02-01 13:49:32 +01:00
` origen ` VARCHAR ( 100 ) NOT NULL DEFAULT ' '
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2006-03-27 05:37:27 +02:00
2012-12-09 23:31:29 +01:00
-- ----------------------------------------------------------------------
2012-08-20 Miguel de Dios <miguel.dedios@artica.es>
* index.php, extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
general/login_page.php, general/logon_failed.php,
godmode/users/configure_user.php, include/api.php,
include/auth/mysql.php, pandoradb.sql, pandoradb.postgreSQL.sql,
pandoradb.oracle.sql: added the feature to set any user with
"not login" for only the user can work across the API.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6891 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-08-20 20:06:04 +02:00
-- Table `tperfil`
2012-12-09 23:31:29 +01:00
-- ----------------------------------------------------------------------
2008-08-05 13:42:08 +02:00
CREATE TABLE IF NOT EXISTS ` tperfil ` (
2022-02-01 13:49:32 +01:00
` id_perfil ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
2022-02-01 15:11:59 +01:00
` name ` TEXT ,
2022-02-01 13:49:32 +01:00
` agent_view ` TINYINT NOT NULL DEFAULT 0 ,
` agent_edit ` TINYINT NOT NULL DEFAULT 0 ,
` alert_edit ` TINYINT NOT NULL DEFAULT 0 ,
` user_management ` TINYINT NOT NULL DEFAULT 0 ,
` db_management ` TINYINT NOT NULL DEFAULT 0 ,
` alert_management ` TINYINT NOT NULL DEFAULT 0 ,
` pandora_management ` TINYINT NOT NULL DEFAULT 0 ,
` report_view ` TINYINT NOT NULL DEFAULT 0 ,
` report_edit ` TINYINT NOT NULL DEFAULT 0 ,
` report_management ` TINYINT NOT NULL DEFAULT 0 ,
` event_view ` TINYINT NOT NULL DEFAULT 0 ,
` event_edit ` TINYINT NOT NULL DEFAULT 0 ,
` event_management ` TINYINT NOT NULL DEFAULT 0 ,
` agent_disable ` TINYINT NOT NULL DEFAULT 0 ,
` map_view ` TINYINT NOT NULL DEFAULT 0 ,
` map_edit ` TINYINT NOT NULL DEFAULT 0 ,
` map_management ` TINYINT NOT NULL DEFAULT 0 ,
` vconsole_view ` TINYINT NOT NULL DEFAULT 0 ,
` vconsole_edit ` TINYINT NOT NULL DEFAULT 0 ,
` vconsole_management ` TINYINT NOT NULL DEFAULT 0 ,
` network_config_view ` TINYINT NOT NULL DEFAULT 0 ,
` network_config_edit ` TINYINT NOT NULL DEFAULT 0 ,
` network_config_management ` TINYINT NOT NULL DEFAULT 0 ,
PRIMARY KEY ( ` id_perfil ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2007-03-12 18:58:52 +01:00
2012-12-09 23:31:29 +01:00
-- ----------------------------------------------------------------------
2012-08-20 Miguel de Dios <miguel.dedios@artica.es>
* index.php, extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
general/login_page.php, general/logon_failed.php,
godmode/users/configure_user.php, include/api.php,
include/auth/mysql.php, pandoradb.sql, pandoradb.postgreSQL.sql,
pandoradb.oracle.sql: added the feature to set any user with
"not login" for only the user can work across the API.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6891 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-08-20 20:06:04 +02:00
-- Table `trecon_script`
2012-12-09 23:31:29 +01:00
-- ----------------------------------------------------------------------
2010-10-15 15:03:03 +02:00
CREATE TABLE IF NOT EXISTS ` trecon_script ` (
2022-02-01 13:49:32 +01:00
` id_recon_script ` INT NOT NULL AUTO_INCREMENT ,
` name ` VARCHAR ( 100 ) DEFAULT ' ' ,
` description ` TEXT ,
` script ` VARCHAR ( 250 ) DEFAULT ' ' ,
` macros ` TEXT ,
` type ` INT NOT NULL DEFAULT 0 ,
PRIMARY KEY ( ` id_recon_script ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2010-10-15 15:03:03 +02:00
2012-12-09 23:31:29 +01:00
-- ----------------------------------------------------------------------
2012-08-20 Miguel de Dios <miguel.dedios@artica.es>
* index.php, extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
general/login_page.php, general/logon_failed.php,
godmode/users/configure_user.php, include/api.php,
include/auth/mysql.php, pandoradb.sql, pandoradb.postgreSQL.sql,
pandoradb.oracle.sql: added the feature to set any user with
"not login" for only the user can work across the API.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6891 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-08-20 20:06:04 +02:00
-- Table `tserver`
2012-12-09 23:31:29 +01:00
-- ----------------------------------------------------------------------
2008-08-05 13:42:08 +02:00
CREATE TABLE IF NOT EXISTS ` tserver ` (
2022-02-01 13:49:32 +01:00
` id_server ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` name ` VARCHAR ( 100 ) NOT NULL DEFAULT ' ' ,
` ip_address ` VARCHAR ( 100 ) NOT NULL DEFAULT ' ' ,
` status ` INT NOT NULL DEFAULT 0 ,
` laststart ` DATETIME NOT NULL DEFAULT ' 1970-01-01 00:00:00 ' ,
` keepalive ` DATETIME NOT NULL DEFAULT ' 1970-01-01 00:00:00 ' ,
` snmp_server ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
` network_server ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
` data_server ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
` master ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
` checksum ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
` description ` VARCHAR ( 255 ) DEFAULT NULL ,
` recon_server ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
` version ` VARCHAR ( 25 ) NOT NULL DEFAULT ' ' ,
` plugin_server ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
` prediction_server ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
` wmi_server ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
` export_server ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
` server_type ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
` queued_modules ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` threads ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` lag_time ` INT NOT NULL DEFAULT 0 ,
` lag_modules ` INT NOT NULL DEFAULT 0 ,
` total_modules_running ` INT NOT NULL DEFAULT 0 ,
` my_modules ` INT NOT NULL DEFAULT 0 ,
` server_keepalive ` INT NOT NULL DEFAULT 0 ,
` stat_utimestamp ` BIGINT NOT NULL DEFAULT 0 ,
` exec_proxy ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
` port ` INT UNSIGNED NOT NULL DEFAULT 0 ,
2023-01-20 13:11:49 +01:00
` server_keepalive_utimestamp ` BIGINT NOT NULL DEFAULT 0 ,
2022-02-01 13:49:32 +01:00
PRIMARY KEY ( ` id_server ` ) ,
KEY ` name ` ( ` name ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2009-09-25 02:21:00 +02:00
-- server types:
-- 0 data
-- 1 network
-- 2 snmp trap console
-- 3 recon
-- 4 plugin
-- 5 prediction
-- 6 wmi
-- 7 export
-- 8 inventory
-- 9 web
2009-09-04 20:41:27 +02:00
-- TODO: drop 2.x xxxx_server fields, unused since server_type exists.
2012-12-09 23:31:29 +01:00
-- ----------------------------------------------------------------------
2012-08-20 Miguel de Dios <miguel.dedios@artica.es>
* index.php, extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
general/login_page.php, general/logon_failed.php,
godmode/users/configure_user.php, include/api.php,
include/auth/mysql.php, pandoradb.sql, pandoradb.postgreSQL.sql,
pandoradb.oracle.sql: added the feature to set any user with
"not login" for only the user can work across the API.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6891 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-08-20 20:06:04 +02:00
-- Table `tsesion`
2012-12-09 23:31:29 +01:00
-- ----------------------------------------------------------------------
2008-08-05 13:42:08 +02:00
CREATE TABLE IF NOT EXISTS ` tsesion ` (
2022-02-01 13:49:32 +01:00
` id_sesion ` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT ,
2022-06-08 11:49:48 +02:00
` id_usuario ` VARCHAR ( 255 ) NOT NULL DEFAULT ' 0 ' ,
2022-02-01 13:49:32 +01:00
` ip_origen ` VARCHAR ( 100 ) NOT NULL DEFAULT ' ' ,
` accion ` VARCHAR ( 100 ) NOT NULL DEFAULT ' ' ,
2022-02-01 15:11:59 +01:00
` descripcion ` TEXT ,
2022-02-01 13:49:32 +01:00
` fecha ` DATETIME NOT NULL DEFAULT ' 1970-01-01 00:00:00 ' ,
` utimestamp ` BIGINT UNSIGNED NOT NULL DEFAULT 0 ,
PRIMARY KEY ( ` id_sesion ` ) ,
KEY ` idx_user ` ( ` id_usuario ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2007-03-12 18:58:52 +01:00
2012-12-09 23:31:29 +01:00
-- ----------------------------------------------------------------------
2012-08-20 Miguel de Dios <miguel.dedios@artica.es>
* index.php, extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
general/login_page.php, general/logon_failed.php,
godmode/users/configure_user.php, include/api.php,
include/auth/mysql.php, pandoradb.sql, pandoradb.postgreSQL.sql,
pandoradb.oracle.sql: added the feature to set any user with
"not login" for only the user can work across the API.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6891 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-08-20 20:06:04 +02:00
-- Table `ttipo_modulo`
2012-12-09 23:31:29 +01:00
-- ----------------------------------------------------------------------
2008-08-05 13:42:08 +02:00
CREATE TABLE IF NOT EXISTS ` ttipo_modulo ` (
2022-02-01 13:49:32 +01:00
` id_tipo ` SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT ,
` nombre ` VARCHAR ( 100 ) NOT NULL DEFAULT ' ' ,
` categoria ` INT NOT NULL DEFAULT 0 ,
` descripcion ` VARCHAR ( 100 ) NOT NULL DEFAULT ' ' ,
` icon ` VARCHAR ( 100 ) DEFAULT NULL ,
PRIMARY KEY ( ` id_tipo ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2007-03-12 18:58:52 +01:00
2012-12-09 23:31:29 +01:00
-- ----------------------------------------------------------------------
2012-08-20 Miguel de Dios <miguel.dedios@artica.es>
* index.php, extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
general/login_page.php, general/logon_failed.php,
godmode/users/configure_user.php, include/api.php,
include/auth/mysql.php, pandoradb.sql, pandoradb.postgreSQL.sql,
pandoradb.oracle.sql: added the feature to set any user with
"not login" for only the user can work across the API.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6891 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-08-20 20:06:04 +02:00
-- Table `ttrap`
2012-12-09 23:31:29 +01:00
-- ----------------------------------------------------------------------
2008-08-05 13:42:08 +02:00
CREATE TABLE IF NOT EXISTS ` ttrap ` (
2022-02-01 13:49:32 +01:00
` id_trap ` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT ,
` source ` VARCHAR ( 50 ) NOT NULL DEFAULT ' ' ,
2022-02-01 15:11:59 +01:00
` oid ` TEXT ,
2022-02-01 13:49:32 +01:00
` oid_custom ` TEXT ,
` type ` INT NOT NULL DEFAULT 0 ,
` type_custom ` VARCHAR ( 100 ) DEFAULT ' ' ,
` value ` TEXT ,
` value_custom ` TEXT ,
` alerted ` SMALLINT NOT NULL DEFAULT 0 ,
` status ` SMALLINT NOT NULL DEFAULT 0 ,
2022-06-08 11:49:48 +02:00
` id_usuario ` VARCHAR ( 255 ) DEFAULT ' ' ,
2022-02-01 13:49:32 +01:00
` timestamp ` DATETIME NOT NULL DEFAULT ' 1970-01-01 00:00:00 ' ,
` priority ` TINYINT UNSIGNED NOT NULL DEFAULT 2 ,
` text ` VARCHAR ( 255 ) DEFAULT ' ' ,
` description ` VARCHAR ( 255 ) DEFAULT ' ' ,
` severity ` TINYINT UNSIGNED NOT NULL DEFAULT 2 ,
PRIMARY KEY ( ` id_trap ` ) ,
INDEX timestamp ( ` timestamp ` ) ,
INDEX status ( ` status ` ) ,
INDEX source ( ` source ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2006-03-27 05:37:27 +02:00
2016-09-01 10:37:03 +02:00
-- ---------------------------------------------------------------------
-- Table `tevent_filter`
-- ---------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS ` tevent_filter ` (
2022-02-01 13:49:32 +01:00
` id_filter ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` id_group_filter ` INT NOT NULL DEFAULT 0 ,
` id_name ` VARCHAR ( 600 ) NOT NULL ,
` id_group ` INT NOT NULL DEFAULT 0 ,
2022-02-01 15:11:59 +01:00
` event_type ` TEXT ,
` severity ` TEXT ,
2022-02-01 13:49:32 +01:00
` status ` INT NOT NULL DEFAULT - 1 ,
` search ` TEXT ,
2022-11-18 14:04:54 +01:00
` not_search ` INT NOT NULL DEFAULT 0 ,
2022-02-01 13:49:32 +01:00
` text_agent ` TEXT ,
` id_agent ` INT DEFAULT 0 ,
` id_agent_module ` INT DEFAULT 0 ,
` pagination ` INT NOT NULL DEFAULT 25 ,
` event_view_hr ` INT NOT NULL DEFAULT 8 ,
` id_user_ack ` TEXT ,
` group_rep ` INT NOT NULL DEFAULT 0 ,
2022-02-01 15:11:59 +01:00
` tag_with ` TEXT ,
` tag_without ` TEXT ,
2022-02-01 13:49:32 +01:00
` filter_only_alert ` INT NOT NULL DEFAULT - 1 ,
2022-07-05 17:02:40 +02:00
` search_secondary_groups ` INT NOT NULL DEFAULT 0 ,
2022-09-29 12:54:46 +02:00
` search_recursive_groups ` INT NOT NULL DEFAULT 0 ,
2022-02-01 13:49:32 +01:00
` date_from ` date DEFAULT NULL ,
` date_to ` date DEFAULT NULL ,
2022-02-01 15:11:59 +01:00
` source ` TINYTEXT ,
` id_extra ` TINYTEXT ,
` user_comment ` TEXT ,
2022-02-01 13:49:32 +01:00
` id_source_event ` INT NULL DEFAULT 0 ,
2022-11-22 11:35:38 +01:00
` server_id ` TEXT ,
2022-02-01 13:49:32 +01:00
` time_from ` TIME NULL ,
` time_to ` TIME NULL ,
2022-03-29 18:09:19 +02:00
` custom_data ` VARCHAR ( 500 ) DEFAULT ' ' ,
` custom_data_filter_type ` TINYINT UNSIGNED DEFAULT 0 ,
2022-11-03 12:00:58 +01:00
` owner_user ` TEXT ,
2022-02-01 13:49:32 +01:00
PRIMARY KEY ( ` id_filter ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2016-09-01 10:37:03 +02:00
2012-12-09 23:31:29 +01:00
-- ----------------------------------------------------------------------
2012-08-20 Miguel de Dios <miguel.dedios@artica.es>
* index.php, extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
general/login_page.php, general/logon_failed.php,
godmode/users/configure_user.php, include/api.php,
include/auth/mysql.php, pandoradb.sql, pandoradb.postgreSQL.sql,
pandoradb.oracle.sql: added the feature to set any user with
"not login" for only the user can work across the API.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6891 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-08-20 20:06:04 +02:00
-- Table `tusuario`
2012-12-09 23:31:29 +01:00
-- ----------------------------------------------------------------------
2008-08-05 13:42:08 +02:00
CREATE TABLE IF NOT EXISTS ` tusuario ` (
2022-05-09 12:40:36 +02:00
` id_user ` VARCHAR ( 255 ) NOT NULL DEFAULT ' 0 ' ,
2022-02-01 13:49:32 +01:00
` fullname ` VARCHAR ( 255 ) NOT NULL ,
` firstname ` VARCHAR ( 255 ) NOT NULL ,
` lastname ` VARCHAR ( 255 ) NOT NULL ,
` middlename ` VARCHAR ( 255 ) NOT NULL ,
2022-12-20 12:27:58 +01:00
` password ` VARCHAR ( 60 ) DEFAULT NULL ,
2022-02-01 13:49:32 +01:00
` comments ` VARCHAR ( 200 ) DEFAULT NULL ,
` last_connect ` BIGINT NOT NULL DEFAULT 0 ,
` registered ` BIGINT NOT NULL DEFAULT 0 ,
` email ` VARCHAR ( 100 ) DEFAULT NULL ,
` phone ` VARCHAR ( 100 ) DEFAULT NULL ,
` is_admin ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
` language ` VARCHAR ( 10 ) DEFAULT NULL ,
` timezone ` VARCHAR ( 50 ) DEFAULT ' ' ,
` block_size ` INT NOT NULL DEFAULT 20 ,
` id_skin ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` disabled ` INT NOT NULL DEFAULT 0 ,
` shortcut ` TINYINT DEFAULT 0 ,
` shortcut_data ` TEXT ,
2022-02-01 15:11:59 +01:00
` section ` TEXT ,
` data_section ` TEXT ,
2022-02-01 13:49:32 +01:00
` force_change_pass ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
` last_pass_change ` DATETIME ,
` last_failed_login ` DATETIME ,
` failed_attempt ` INT NOT NULL DEFAULT 0 ,
` login_blocked ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
` metaconsole_access ` ENUM ( ' basic ' , ' advanced ' ) DEFAULT ' basic ' ,
` not_login ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
2022-02-18 09:26:55 +01:00
` local_user ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
2022-02-01 13:49:32 +01:00
` metaconsole_agents_manager ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
` metaconsole_access_node ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
` strict_acl ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
` id_filter ` INT UNSIGNED NULL DEFAULT NULL ,
` session_time ` INT signed NOT NULL DEFAULT 0 ,
` default_event_filter ` INT UNSIGNED NOT NULL DEFAULT 0 ,
2023-02-20 08:59:11 +01:00
` show_tips_startup ` TINYINT UNSIGNED NOT NULL DEFAULT 1 ,
2022-02-01 15:11:59 +01:00
` autorefresh_white_list ` TEXT ,
2022-02-01 13:49:32 +01:00
` time_autorefresh ` INT UNSIGNED NOT NULL DEFAULT 30 ,
` default_custom_view ` INT UNSIGNED NULL DEFAULT 0 ,
` ehorus_user_level_user ` VARCHAR ( 60 ) ,
` ehorus_user_level_pass ` VARCHAR ( 45 ) ,
` ehorus_user_level_enabled ` TINYINT ,
` integria_user_level_user ` VARCHAR ( 60 ) ,
` integria_user_level_pass ` VARCHAR ( 45 ) ,
2022-06-16 16:49:09 +02:00
` api_token ` VARCHAR ( 255 ) NOT NULL DEFAULT ' ' ,
2022-09-12 12:41:33 +02:00
` allowed_ip_active ` TINYINT UNSIGNED DEFAULT 0 ,
` allowed_ip_list ` TEXT ,
2022-10-04 18:00:47 +02:00
` auth_token_secret ` VARCHAR ( 45 ) DEFAULT NULL ,
2022-02-01 13:49:32 +01:00
CONSTRAINT ` fk_filter_id ` FOREIGN KEY ( ` id_filter ` ) REFERENCES tevent_filter ( ` id_filter ` ) ON DELETE SET NULL ,
UNIQUE KEY ` id_user ` ( ` id_user ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2007-03-12 18:58:52 +01:00
2012-12-09 23:31:29 +01:00
-- ----------------------------------------------------------------------
2012-09-24 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.sql, pandoradb.postgreSQL.sql, pandoradb.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql: added the fields
"text_filter" and "dont_show_subgroups" for to new filters to
generate the networkmap.
* operation/agentes/networkmap.topology.php,
operation/agentes/networkmap.groups.php,
include/functions_networkmap.php, include/functions_servers.php:
added the new filters for free text for agents and hidden the
subgroups of any group in the group networkmap.
* extensions/resource_registration.php,
operation/agentes/networkmap.php, general/header.php,
godmode/netflow/nf_report_form.php,
godmode/agentes/module_manager.php, include/functions_groups.php,
include/auth/ldap.php, operation/agentes/estado_ultimopaquete.php,
include/functions.php, include/functions_db.php: cleaned source code
style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6995 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-24 13:59:05 +02:00
-- Table `tusuario_perfil`
2012-12-09 23:31:29 +01:00
-- ----------------------------------------------------------------------
2008-08-05 13:42:08 +02:00
CREATE TABLE IF NOT EXISTS ` tusuario_perfil ` (
2022-02-01 13:49:32 +01:00
` id_up ` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT ,
2022-06-08 11:49:48 +02:00
` id_usuario ` VARCHAR ( 255 ) NOT NULL DEFAULT ' ' ,
2022-02-01 13:49:32 +01:00
` id_perfil ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` id_grupo ` INT NOT NULL DEFAULT 0 ,
` no_hierarchy ` TINYINT NOT NULL DEFAULT 0 ,
` assigned_by ` VARCHAR ( 100 ) NOT NULL DEFAULT ' ' ,
` id_policy ` INT UNSIGNED NOT NULL DEFAULT 0 ,
2022-02-01 15:11:59 +01:00
` tags ` TEXT ,
2023-01-24 12:10:40 +01:00
PRIMARY KEY ( ` id_up ` ) ,
INDEX ` tusuario_perfil_user ` ( ` id_usuario ` ) ,
INDEX ` tusuario_perfil_group ` ( ` id_grupo ` ) ,
INDEX ` tusuario_perfil_profile ` ( ` id_perfil ` )
2022-02-01 13:49:32 +01:00
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2007-03-12 18:58:52 +01:00
2014-12-11 16:11:21 +01:00
-- ----------------------------------------------------------------------
-- Table `tuser_double_auth`
-- ----------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS ` tuser_double_auth ` (
2022-02-01 13:49:32 +01:00
` id ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
2022-05-09 12:40:36 +02:00
` id_user ` VARCHAR ( 255 ) NOT NULL ,
2022-02-01 13:49:32 +01:00
` secret ` VARCHAR ( 20 ) NOT NULL ,
PRIMARY KEY ( ` id ` ) ,
UNIQUE ( ` id_user ` ) ,
FOREIGN KEY ( ` id_user ` ) REFERENCES tusuario ( ` id_user ` ) ON DELETE CASCADE
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2014-12-11 16:11:21 +01:00
2017-07-19 11:37:17 +02:00
-- ----------------------------------------------------------------------
-- Table `treset_pass_history`
-- ----------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS ` treset_pass_history ` (
2022-02-01 13:49:32 +01:00
` id ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
2022-06-08 11:49:48 +02:00
` id_user ` VARCHAR ( 255 ) NOT NULL ,
2022-02-01 13:49:32 +01:00
` reset_moment ` DATETIME NOT NULL ,
` success ` TINYINT NOT NULL ,
PRIMARY KEY ( ` id ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2017-07-19 11:37:17 +02:00
2019-01-30 11:56:21 +01:00
-- -----------------------------------------------------
-- Table `tnotification_source`
-- -----------------------------------------------------
2022-02-01 13:49:32 +01:00
CREATE TABLE IF NOT EXISTS ` tnotification_source ` (
` id ` SERIAL ,
` description ` VARCHAR ( 255 ) DEFAULT NULL ,
` icon ` TEXT ,
` max_postpone_time ` INT DEFAULT NULL ,
` enabled ` INT DEFAULT NULL ,
` user_editable ` INT DEFAULT NULL ,
` also_mail ` INT DEFAULT NULL ,
` subtype_blacklist ` TEXT ,
PRIMARY KEY ( ` id ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2019-01-30 11:56:21 +01:00
-- -----------------------------------------------------
-- Table `tmensajes`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS ` tmensajes ` (
2022-02-01 13:49:32 +01:00
` id_mensaje ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
2022-06-08 11:49:48 +02:00
` id_usuario_origen ` VARCHAR ( 255 ) NOT NULL DEFAULT ' ' ,
2022-02-01 15:11:59 +01:00
` mensaje ` TEXT ,
2022-02-01 13:49:32 +01:00
` timestamp ` BIGINT UNSIGNED NOT NULL DEFAULT 0 ,
` subject ` VARCHAR ( 255 ) NOT NULL DEFAULT ' ' ,
` estado ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` url ` TEXT ,
` response_mode ` VARCHAR ( 200 ) DEFAULT NULL ,
` citicity ` INT UNSIGNED DEFAULT 0 ,
` id_source ` BIGINT UNSIGNED NOT NULL ,
` subtype ` VARCHAR ( 255 ) DEFAULT ' ' ,
` hidden_sent ` TINYINT UNSIGNED DEFAULT 0 ,
PRIMARY KEY ( ` id_mensaje ` ) ,
UNIQUE KEY ` id_mensaje ` ( ` id_mensaje ` ) ,
KEY ` tsource_fk ` ( ` id_source ` ) ,
CONSTRAINT ` tsource_fk ` FOREIGN KEY ( ` id_source ` ) REFERENCES ` tnotification_source ` ( ` id ` ) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE = InnoDB AUTO_INCREMENT = 11 DEFAULT CHARSET = UTF8MB4 ;
2019-01-30 11:56:21 +01:00
-- ----------------------------------------------------------------------
-- Table `tnotification_user`
-- ----------------------------------------------------------------------
2022-02-01 13:49:32 +01:00
CREATE TABLE IF NOT EXISTS ` tnotification_user ` (
` id_mensaje ` INT UNSIGNED NOT NULL ,
2022-05-09 12:40:36 +02:00
` id_user ` VARCHAR ( 255 ) NOT NULL ,
2022-02-01 13:49:32 +01:00
` utimestamp_read ` BIGINT ,
` utimestamp_erased ` BIGINT ,
` postpone ` INT ,
PRIMARY KEY ( ` id_mensaje ` , ` id_user ` ) ,
FOREIGN KEY ( ` id_mensaje ` ) REFERENCES ` tmensajes ` ( ` id_mensaje ` )
ON UPDATE CASCADE ON DELETE CASCADE ,
FOREIGN KEY ( ` id_user ` ) REFERENCES ` tusuario ` ( ` id_user ` )
ON UPDATE CASCADE ON DELETE CASCADE
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2019-01-30 11:56:21 +01:00
-- ----------------------------------------------------------------------
-- Table `tnotification_group`
-- ----------------------------------------------------------------------
2022-02-01 13:49:32 +01:00
CREATE TABLE IF NOT EXISTS ` tnotification_group ` (
` id_mensaje ` INT UNSIGNED NOT NULL ,
` id_group ` MEDIUMINT UNSIGNED NOT NULL ,
PRIMARY KEY ( ` id_mensaje ` , ` id_group ` ) ,
FOREIGN KEY ( ` id_mensaje ` ) REFERENCES ` tmensajes ` ( ` id_mensaje ` )
ON UPDATE CASCADE ON DELETE CASCADE
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2019-01-30 11:56:21 +01:00
-- ----------------------------------------------------------------------
-- Table `tnotification_source_user`
-- ----------------------------------------------------------------------
2022-02-01 13:49:32 +01:00
CREATE TABLE IF NOT EXISTS ` tnotification_source_user ` (
` id_source ` BIGINT UNSIGNED NOT NULL ,
2022-05-09 12:40:36 +02:00
` id_user ` VARCHAR ( 255 ) ,
2022-02-01 13:49:32 +01:00
` enabled ` INT DEFAULT NULL ,
` also_mail ` INT DEFAULT NULL ,
PRIMARY KEY ( ` id_source ` , ` id_user ` ) ,
FOREIGN KEY ( ` id_source ` ) REFERENCES ` tnotification_source ` ( ` id ` )
ON UPDATE CASCADE ON DELETE CASCADE ,
FOREIGN KEY ( ` id_user ` ) REFERENCES ` tusuario ` ( ` id_user ` )
ON UPDATE CASCADE ON DELETE CASCADE
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2019-01-30 11:56:21 +01:00
-- ----------------------------------------------------------------------
-- Table `tnotification_source_group`
-- ----------------------------------------------------------------------
2022-02-01 13:49:32 +01:00
CREATE TABLE IF NOT EXISTS ` tnotification_source_group ` (
` id_source ` BIGINT UNSIGNED NOT NULL ,
` id_group ` MEDIUMINT UNSIGNED NOT NULL ,
PRIMARY KEY ( ` id_source ` , ` id_group ` ) ,
INDEX ( ` id_group ` ) ,
FOREIGN KEY ( ` id_source ` ) REFERENCES ` tnotification_source ` ( ` id ` )
ON UPDATE CASCADE ON DELETE CASCADE
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2019-01-30 11:56:21 +01:00
2019-01-31 16:27:55 +01:00
-- ----------------------------------------------------------------------
-- Table `tnotification_source_user`
-- ----------------------------------------------------------------------
2022-02-01 13:49:32 +01:00
CREATE TABLE IF NOT EXISTS ` tnotification_source_group_user ` (
` id_source ` BIGINT UNSIGNED NOT NULL ,
` id_group ` MEDIUMINT UNSIGNED NOT NULL ,
2022-05-09 12:40:36 +02:00
` id_user ` VARCHAR ( 255 ) ,
2022-02-01 13:49:32 +01:00
` enabled ` INT DEFAULT NULL ,
` also_mail ` INT DEFAULT NULL ,
PRIMARY KEY ( ` id_source ` , ` id_user ` ) ,
FOREIGN KEY ( ` id_source ` ) REFERENCES ` tnotification_source ` ( ` id ` )
ON UPDATE CASCADE ON DELETE CASCADE ,
FOREIGN KEY ( ` id_user ` ) REFERENCES ` tusuario ` ( ` id_user ` )
ON UPDATE CASCADE ON DELETE CASCADE ,
FOREIGN KEY ( ` id_group ` ) REFERENCES ` tnotification_source_group ` ( ` id_group ` )
ON UPDATE CASCADE ON DELETE CASCADE
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2019-01-31 16:27:55 +01:00
2012-12-09 23:31:29 +01:00
-- ----------------------------------------------------------------------
2012-09-24 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.sql, pandoradb.postgreSQL.sql, pandoradb.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql: added the fields
"text_filter" and "dont_show_subgroups" for to new filters to
generate the networkmap.
* operation/agentes/networkmap.topology.php,
operation/agentes/networkmap.groups.php,
include/functions_networkmap.php, include/functions_servers.php:
added the new filters for free text for agents and hidden the
subgroups of any group in the group networkmap.
* extensions/resource_registration.php,
operation/agentes/networkmap.php, general/header.php,
godmode/netflow/nf_report_form.php,
godmode/agentes/module_manager.php, include/functions_groups.php,
include/auth/ldap.php, operation/agentes/estado_ultimopaquete.php,
include/functions.php, include/functions_db.php: cleaned source code
style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6995 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-24 13:59:05 +02:00
-- Table `tnews`
2012-12-09 23:31:29 +01:00
-- ----------------------------------------------------------------------
2008-08-05 13:42:08 +02:00
CREATE TABLE IF NOT EXISTS ` tnews ` (
2022-02-01 13:49:32 +01:00
` id_news ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` author ` VARCHAR ( 255 ) NOT NULL DEFAULT ' ' ,
` subject ` VARCHAR ( 255 ) NOT NULL DEFAULT ' ' ,
2022-02-01 15:11:59 +01:00
` text ` TEXT ,
2022-02-01 13:49:32 +01:00
` timestamp ` DATETIME ,
` id_group ` INT NOT NULL DEFAULT 0 ,
` modal ` TINYINT DEFAULT 0 ,
` expire ` TINYINT DEFAULT 0 ,
` expire_timestamp ` DATETIME ,
PRIMARY KEY ( ` id_news ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2007-04-19 20:50:07 +02:00
2012-12-09 23:31:29 +01:00
-- ----------------------------------------------------------------------
2012-09-24 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.sql, pandoradb.postgreSQL.sql, pandoradb.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql: added the fields
"text_filter" and "dont_show_subgroups" for to new filters to
generate the networkmap.
* operation/agentes/networkmap.topology.php,
operation/agentes/networkmap.groups.php,
include/functions_networkmap.php, include/functions_servers.php:
added the new filters for free text for agents and hidden the
subgroups of any group in the group networkmap.
* extensions/resource_registration.php,
operation/agentes/networkmap.php, general/header.php,
godmode/netflow/nf_report_form.php,
godmode/agentes/module_manager.php, include/functions_groups.php,
include/auth/ldap.php, operation/agentes/estado_ultimopaquete.php,
include/functions.php, include/functions_db.php: cleaned source code
style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6995 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-24 13:59:05 +02:00
-- Table `tgraph`
2012-12-09 23:31:29 +01:00
-- ----------------------------------------------------------------------
2008-08-05 13:42:08 +02:00
CREATE TABLE IF NOT EXISTS ` tgraph ` (
2022-02-01 13:49:32 +01:00
` id_graph ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
2022-06-08 11:49:48 +02:00
` id_user ` VARCHAR ( 255 ) NOT NULL DEFAULT ' ' ,
2022-02-01 13:49:32 +01:00
` name ` VARCHAR ( 150 ) NOT NULL DEFAULT ' ' ,
2022-02-01 15:11:59 +01:00
` description ` TEXT ,
2022-02-01 13:49:32 +01:00
` period ` INT NOT NULL DEFAULT 0 ,
` width ` SMALLINT UNSIGNED NOT NULL DEFAULT 0 ,
` height ` SMALLINT UNSIGNED NOT NULL DEFAULT 0 ,
` private ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
` events ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
` stacked ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
` id_group ` MEDIUMINT UNSIGNED NULL DEFAULT 0 ,
` id_graph_template ` INT NOT NULL DEFAULT 0 ,
` percentil ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
` summatory_series ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
` average_series ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
` modules_series ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
` fullscale ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
PRIMARY KEY ( ` id_graph ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2007-04-19 20:50:07 +02:00
2012-12-09 23:31:29 +01:00
-- ----------------------------------------------------------------------
2012-09-24 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.sql, pandoradb.postgreSQL.sql, pandoradb.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql: added the fields
"text_filter" and "dont_show_subgroups" for to new filters to
generate the networkmap.
* operation/agentes/networkmap.topology.php,
operation/agentes/networkmap.groups.php,
include/functions_networkmap.php, include/functions_servers.php:
added the new filters for free text for agents and hidden the
subgroups of any group in the group networkmap.
* extensions/resource_registration.php,
operation/agentes/networkmap.php, general/header.php,
godmode/netflow/nf_report_form.php,
godmode/agentes/module_manager.php, include/functions_groups.php,
include/auth/ldap.php, operation/agentes/estado_ultimopaquete.php,
include/functions.php, include/functions_db.php: cleaned source code
style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6995 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-24 13:59:05 +02:00
-- Table `tgraph_source`
2012-12-09 23:31:29 +01:00
-- ----------------------------------------------------------------------
2008-08-05 13:42:08 +02:00
CREATE TABLE IF NOT EXISTS ` tgraph_source ` (
2022-02-01 13:49:32 +01:00
` id_gs ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` id_graph ` INT NOT NULL DEFAULT 0 ,
` id_server ` INT NOT NULL DEFAULT 0 ,
` id_agent_module ` INT NOT NULL DEFAULT 0 ,
` weight ` DOUBLE NOT NULL DEFAULT 0 ,
` label ` VARCHAR ( 150 ) DEFAULT ' ' ,
` field_order ` INT DEFAULT 0 ,
PRIMARY KEY ( ` id_gs ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2007-04-19 20:50:07 +02:00
2012-12-09 23:31:29 +01:00
-- ----------------------------------------------------------------------
2012-08-20 Miguel de Dios <miguel.dedios@artica.es>
* godmode/reporting/reporting_builder.main.php,
godmode/reporting/reporting_builder.php,
include/functions_reports.php, pandoradb.sql,
pandoradb.postgreSQL.sql, pandoradb.oracle.sql,
operation/reporting/reporting_xml.php,
operation/reporting/reporting_viewer.php,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql: now the reports
can set the group can edit or private edition.
* include/functions_users.php: cleaned source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6889 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-08-20 15:12:53 +02:00
-- Table `treport`
2012-12-09 23:31:29 +01:00
-- ----------------------------------------------------------------------
2008-08-05 13:42:08 +02:00
CREATE TABLE IF NOT EXISTS ` treport ` (
2022-02-01 13:49:32 +01:00
` id_report ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
2022-06-08 11:49:48 +02:00
` id_user ` VARCHAR ( 255 ) NOT NULL DEFAULT ' ' ,
2022-02-01 13:49:32 +01:00
` name ` VARCHAR ( 150 ) NOT NULL DEFAULT ' ' ,
2022-02-01 15:11:59 +01:00
` description ` TEXT ,
2022-02-01 13:49:32 +01:00
` private ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
` id_group ` MEDIUMINT UNSIGNED NULL DEFAULT NULL ,
` custom_logo ` VARCHAR ( 200 ) DEFAULT NULL ,
` header ` MEDIUMTEXT ,
` first_page ` MEDIUMTEXT ,
` footer ` MEDIUMTEXT ,
` custom_font ` VARCHAR ( 200 ) DEFAULT NULL ,
` id_template ` INT UNSIGNED DEFAULT 0 ,
` id_group_edit ` MEDIUMINT UNSIGNED NULL DEFAULT 0 ,
` metaconsole ` TINYINT DEFAULT 0 ,
` non_interactive ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
` hidden ` TINYINT DEFAULT 0 ,
` orientation ` VARCHAR ( 25 ) NOT NULL DEFAULT ' vertical ' ,
` cover_page_render ` TINYINT NOT NULL DEFAULT 1 ,
` index_render ` TINYINT NOT NULL DEFAULT 1 ,
PRIMARY KEY ( ` id_report ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2007-04-19 20:50:07 +02:00
2012-12-09 23:31:29 +01:00
-- ----------------------------------------------------------------------
2010-07-27 20:11:42 +02:00
-- Table `treport_content`
2012-12-09 23:31:29 +01:00
-- ----------------------------------------------------------------------
2008-08-05 13:42:08 +02:00
CREATE TABLE IF NOT EXISTS ` treport_content ` (
2022-02-01 13:49:32 +01:00
` id_rc ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` id_report ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` id_gs ` INT UNSIGNED NULL DEFAULT NULL ,
` id_agent_module ` BIGINT UNSIGNED NULL DEFAULT NULL ,
` type ` VARCHAR ( 30 ) DEFAULT ' simple_graph ' ,
` period ` INT NOT NULL DEFAULT 0 ,
` order ` INT NOT NULL DEFAULT 0 ,
` name ` VARCHAR ( 300 ) NULL ,
2022-02-02 12:30:02 +01:00
` description ` MEDIUMTEXT ,
2022-02-01 13:49:32 +01:00
` id_agent ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` text ` TEXT ,
2022-02-02 12:30:02 +01:00
` external_source ` MEDIUMTEXT ,
2022-02-01 13:49:32 +01:00
` treport_custom_sql_id ` INT UNSIGNED DEFAULT 0 ,
` header_definition ` TINYTEXT ,
` column_separator ` TINYTEXT ,
` line_separator ` TINYTEXT ,
` time_from ` time DEFAULT ' 00:00:00 ' ,
` time_to ` time DEFAULT ' 00:00:00 ' ,
` monday ` TINYINT DEFAULT 1 ,
` tuesday ` TINYINT DEFAULT 1 ,
` wednesday ` TINYINT DEFAULT 1 ,
` thursday ` TINYINT DEFAULT 1 ,
` friday ` TINYINT DEFAULT 1 ,
` saturday ` TINYINT DEFAULT 1 ,
` sunday ` TINYINT DEFAULT 1 ,
` only_display_wrong ` TINYINT unsigned DEFAULT 0 NOT NULL ,
` top_n ` INT NOT NULL DEFAULT 0 ,
` top_n_value ` INT NOT NULL DEFAULT 10 ,
` exception_condition ` INT NOT NULL DEFAULT 0 ,
` exception_condition_value ` DOUBLE NOT NULL DEFAULT 0 ,
` show_resume ` INT NOT NULL DEFAULT 0 ,
` order_uptodown ` INT NOT NULL DEFAULT 0 ,
` show_graph ` INT NOT NULL DEFAULT 0 ,
` group_by_agent ` INT NOT NULL DEFAULT 0 ,
2022-02-01 15:11:59 +01:00
` style ` TEXT ,
2022-02-01 13:49:32 +01:00
` id_group ` INT unsigned NOT NULL DEFAULT 0 ,
` id_module_group ` INT unsigned NOT NULL DEFAULT 0 ,
` server_name ` TEXT ,
` historical_db ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
` lapse_calc ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
` lapse ` INT UNSIGNED NOT NULL DEFAULT 300 ,
` visual_format ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
` hide_no_data ` TINYINT DEFAULT 0 ,
` recursion ` TINYINT DEFAULT NULL ,
` show_extended_events ` TINYINT DEFAULT 0 ,
` total_time ` TINYINT DEFAULT 1 ,
` time_failed ` TINYINT DEFAULT 1 ,
` time_in_ok_status ` TINYINT DEFAULT 1 ,
` time_in_warning_status ` TINYINT DEFAULT 0 ,
` time_in_unknown_status ` TINYINT DEFAULT 1 ,
` time_of_not_initialized_module ` TINYINT DEFAULT 1 ,
` time_of_downtime ` TINYINT DEFAULT 1 ,
` total_checks ` TINYINT DEFAULT 1 ,
` checks_failed ` TINYINT DEFAULT 1 ,
` checks_in_ok_status ` TINYINT DEFAULT 1 ,
` checks_in_warning_status ` TINYINT DEFAULT 0 ,
` unknown_checks ` TINYINT DEFAULT 1 ,
` agent_max_value ` TINYINT DEFAULT 1 ,
` agent_min_value ` TINYINT DEFAULT 1 ,
` current_month ` TINYINT DEFAULT 1 ,
` failover_mode ` TINYINT DEFAULT 1 ,
` failover_type ` TINYINT DEFAULT 1 ,
` uncompressed_module ` TINYINT DEFAULT 0 ,
` summary ` TINYINT DEFAULT 0 ,
` landscape ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
` pagebreak ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
` compare_work_time ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
` graph_render ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
` ipam_network_filter ` INT UNSIGNED DEFAULT 0 ,
` ipam_alive_ips ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
` ipam_ip_not_assigned_to_agent ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
2022-03-31 20:11:52 +02:00
` macros_definition ` TEXT ,
` render_definition ` TEXT ,
2022-10-26 18:25:16 +02:00
` use_prefix_notation ` TINYINT UNSIGNED NOT NULL DEFAULT 1 ,
2022-02-01 13:49:32 +01:00
PRIMARY KEY ( ` id_rc ` ) ,
FOREIGN KEY ( ` id_report ` ) REFERENCES treport ( ` id_report ` )
ON UPDATE CASCADE ON DELETE CASCADE
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2008-06-17 Esteban Sanchez <estebans@artica.es>
* ajax.php: Added to repository. AJAX interface for Pandora. A new
time is coming...
* pandoradb.sql: Added id_group to treport. A report is now assigned
to a group of agents. Changes in treport_content to add an order
field, drop sla fields and use an enum for the type. NOTE: This will
break all your current defined reports, update under your
responsabillity. Added table treport_content_sla_combined to define
SLAs in the SLA types reports.
* godmode/reporting/graph_builder.php: Use Pandora functions. Adde
javascript code to display the module icon when changing from the
dropdown menu.
* godmode/reporting/reporting_builder.php: Almost complet rewritten to
use Pandora HTML functions. Style correction.
* include/functions.php: Added new report types. Style correction.
* include/functions_db.php: Use Pandora database functions to get
simple values. Added functions get_agents_in_group(),
get_modules_in_agent(), get_simple_alerts_in_agent(),
get_combined_alerts_in_agent(), get_alerts_in_agent(),
get_monitor_downs_in_period(),
get_monitor_last_down_timestamp_in_period(),
get_alert_fires_in_period(),
get_alert_last_fire_timestamp_in_period(). Deleted debug output and
fixed calling to an inexistent function in
return_moduledata_sum_value().
* include/functions_html.php: Tab style correction. Thanks to Ramon
for the advice. Fixed some errors on print_table that was causing not
to work fine if rowclass or colspan was defined.
* include/functions_reporting.php: Adde date support to
return_module_SLA(), event_reporting(). Added alert_reporting(),
monitor_health_reporting(), general_group_reporting() and
agents_detailed_reporting() to implement new report types. Style
correction.
* include/javascript/pandora.js: Added html_entity_decode() function
to decode some AJAX results.
* javascript/jquery.js: Added to repository. jQuery version 1.2.4a
* include/javascript/jquery.timeentry.js: jQuery plugin to manage time
inputs.
* include/javascript/jquery.ui.datepicker.js: jQuery plugin to manage
date inputs in a dropdown calendar.
* include/languages/date_*.js, include/languages/time_*.js: Added to
repository. Translation of date and time strings for the new calendar
javascript support.
* include/languages/language_en.php: Added new strings relatives to
reports.
* include/languages/language_de.php,
include/languages/language_fr.php, include/languages/language_gl.php,
include/languages/language_pt_br.php: Fixed a variable name.
* godmode/groups/group_list.php: Avoid the use of an extra indentation
by returning if no success on comprueba_login().
* include/styles/pandora.css: Add some classes. Tab style correction.
* operation/agentes/ver_agente.php: Added AJAX support to agent
operations.
* operation/reporting/graph_viewer.php: Period dropdown selection
improved and printed with Pandora functions.
* operation/reporting/reporting_viewer.php: Massive rewritten.
Implemented date and time support, added new report types, use Pandora
functions...
* reporting/fgraph.php: Documentation fix. Added a new graphic to show
monitors health.
* godmode/agentes/agent_manager.php,
operation/reporting/custom_reporting.php: Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@869 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-17 16:30:44 +02:00
2012-12-09 23:31:29 +01:00
-- ----------------------------------------------------------------------
2012-09-24 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.sql, pandoradb.postgreSQL.sql, pandoradb.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql: added the fields
"text_filter" and "dont_show_subgroups" for to new filters to
generate the networkmap.
* operation/agentes/networkmap.topology.php,
operation/agentes/networkmap.groups.php,
include/functions_networkmap.php, include/functions_servers.php:
added the new filters for free text for agents and hidden the
subgroups of any group in the group networkmap.
* extensions/resource_registration.php,
operation/agentes/networkmap.php, general/header.php,
godmode/netflow/nf_report_form.php,
godmode/agentes/module_manager.php, include/functions_groups.php,
include/auth/ldap.php, operation/agentes/estado_ultimopaquete.php,
include/functions.php, include/functions_db.php: cleaned source code
style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6995 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-24 13:59:05 +02:00
-- Table `treport_content_sla_combined`
2012-12-09 23:31:29 +01:00
-- ----------------------------------------------------------------------
2008-08-05 13:42:08 +02:00
CREATE TABLE IF NOT EXISTS ` treport_content_sla_combined ` (
2022-02-01 13:49:32 +01:00
` id ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` id_report_content ` INT UNSIGNED NOT NULL ,
` id_agent_module ` INT UNSIGNED NOT NULL ,
` id_agent_module_failover ` INT UNSIGNED NOT NULL ,
` sla_max ` DOUBLE NOT NULL DEFAULT 0 ,
` sla_min ` DOUBLE NOT NULL DEFAULT 0 ,
` sla_limit ` DOUBLE NOT NULL DEFAULT 0 ,
` server_name ` TEXT ,
PRIMARY KEY ( ` id ` ) ,
FOREIGN KEY ( ` id_report_content ` ) REFERENCES treport_content ( ` id_rc ` )
ON UPDATE CASCADE ON DELETE CASCADE
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2007-04-19 20:50:07 +02:00
2012-12-09 23:31:29 +01:00
-- ----------------------------------------------------------------------
2012-09-24 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.sql, pandoradb.postgreSQL.sql, pandoradb.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql: added the fields
"text_filter" and "dont_show_subgroups" for to new filters to
generate the networkmap.
* operation/agentes/networkmap.topology.php,
operation/agentes/networkmap.groups.php,
include/functions_networkmap.php, include/functions_servers.php:
added the new filters for free text for agents and hidden the
subgroups of any group in the group networkmap.
* extensions/resource_registration.php,
operation/agentes/networkmap.php, general/header.php,
godmode/netflow/nf_report_form.php,
godmode/agentes/module_manager.php, include/functions_groups.php,
include/auth/ldap.php, operation/agentes/estado_ultimopaquete.php,
include/functions.php, include/functions_db.php: cleaned source code
style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6995 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-24 13:59:05 +02:00
-- Table `treport_content_item`
2012-12-09 23:31:29 +01:00
-- ----------------------------------------------------------------------
2011-03-23 13:57:26 +01:00
CREATE TABLE IF NOT EXISTS ` treport_content_item ` (
2022-02-01 13:49:32 +01:00
` id ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` id_report_content ` INT UNSIGNED NOT NULL ,
` id_agent_module ` INT UNSIGNED NOT NULL ,
` id_agent_module_failover ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` server_name ` TEXT ,
` operation ` TEXT ,
PRIMARY KEY ( ` id ` ) ,
FOREIGN KEY ( ` id_report_content ` ) REFERENCES treport_content ( ` id_rc ` )
ON UPDATE CASCADE ON DELETE CASCADE
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2011-03-23 13:57:26 +01:00
2013-01-24 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.postgreSQL.sql, pandoradb.oracle.sql, pandoradb.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql: changed in the
table "tlayout_data" the field "label" to text without limits.
* godmode/extensions.php, include/functions_tags.php,
include/functions_ui.php, include/functions_agents.php,
include/functions_config.php: cleaned source code style.
* godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.editor.php,
include/styles/pandora.css, include/styles/pandora_legacy.css,
include/functions_visual_map.php,
include/ajax/visual_console_builder.ajax.php,
include/functions_visual_map_editor.php: added the formatted label
into the item label with the help of tiny_mce.
* include/javascript/tiny_mce/*: update the last version of
tiny_mce.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7524 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-24 12:30:37 +01:00
-- ---------------------------------------------------------------------
2012-09-24 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.sql, pandoradb.postgreSQL.sql, pandoradb.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql: added the fields
"text_filter" and "dont_show_subgroups" for to new filters to
generate the networkmap.
* operation/agentes/networkmap.topology.php,
operation/agentes/networkmap.groups.php,
include/functions_networkmap.php, include/functions_servers.php:
added the new filters for free text for agents and hidden the
subgroups of any group in the group networkmap.
* extensions/resource_registration.php,
operation/agentes/networkmap.php, general/header.php,
godmode/netflow/nf_report_form.php,
godmode/agentes/module_manager.php, include/functions_groups.php,
include/auth/ldap.php, operation/agentes/estado_ultimopaquete.php,
include/functions.php, include/functions_db.php: cleaned source code
style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6995 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-24 13:59:05 +02:00
-- Table `treport_custom_sql`
2013-01-24 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.postgreSQL.sql, pandoradb.oracle.sql, pandoradb.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql: changed in the
table "tlayout_data" the field "label" to text without limits.
* godmode/extensions.php, include/functions_tags.php,
include/functions_ui.php, include/functions_agents.php,
include/functions_config.php: cleaned source code style.
* godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.editor.php,
include/styles/pandora.css, include/styles/pandora_legacy.css,
include/functions_visual_map.php,
include/ajax/visual_console_builder.ajax.php,
include/functions_visual_map_editor.php: added the formatted label
into the item label with the help of tiny_mce.
* include/javascript/tiny_mce/*: update the last version of
tiny_mce.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7524 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-24 12:30:37 +01:00
-- ---------------------------------------------------------------------
2010-04-22 Miguel de Dios <miguel.dedios@artica.es>
* include/ajax/reporting.ajax.php: added ajax respond to delete_sla_item and
add_sla actions.
* include/functions.php: added in the function "get_report_types" new types
of items/contents for reporting.
* pandoradb.sql: added columns custom_logo, header, first_page, footer,
custom_font into the table treport. And in the table treport_content have
new columns text, external_source, treport_custom_sql_id, header_definition,
row_separator, line_separator. Added new table treport_custom_sql.
* extras/pandoradb_migrate_v3.0_to_v3.1.sql: added changes for DB that it
same to pandoradb.sql.
* images/sort_none.png, images/sort_down.png, images/sort_up.png: added the
images for order list items for reports.
* godmode/reporting/reporting_builder.list_items.php,
godmode/reporting/reporting_builder.main.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php: made new forms to
manage the reporting, now Pandora have tabs and list of items. In the list
of items, you can order manually or automatically the items.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2595 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-04-22 21:01:47 +02:00
CREATE TABLE IF NOT EXISTS ` treport_custom_sql ` (
2022-02-01 13:49:32 +01:00
` id ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` name ` VARCHAR ( 150 ) NOT NULL DEFAULT ' ' ,
` sql ` TEXT ,
PRIMARY KEY ( ` id ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2010-04-22 Miguel de Dios <miguel.dedios@artica.es>
* include/ajax/reporting.ajax.php: added ajax respond to delete_sla_item and
add_sla actions.
* include/functions.php: added in the function "get_report_types" new types
of items/contents for reporting.
* pandoradb.sql: added columns custom_logo, header, first_page, footer,
custom_font into the table treport. And in the table treport_content have
new columns text, external_source, treport_custom_sql_id, header_definition,
row_separator, line_separator. Added new table treport_custom_sql.
* extras/pandoradb_migrate_v3.0_to_v3.1.sql: added changes for DB that it
same to pandoradb.sql.
* images/sort_none.png, images/sort_down.png, images/sort_up.png: added the
images for order list items for reports.
* godmode/reporting/reporting_builder.list_items.php,
godmode/reporting/reporting_builder.main.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php: made new forms to
manage the reporting, now Pandora have tabs and list of items. In the list
of items, you can order manually or automatically the items.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2595 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-04-22 21:01:47 +02:00
2013-01-24 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.postgreSQL.sql, pandoradb.oracle.sql, pandoradb.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql: changed in the
table "tlayout_data" the field "label" to text without limits.
* godmode/extensions.php, include/functions_tags.php,
include/functions_ui.php, include/functions_agents.php,
include/functions_config.php: cleaned source code style.
* godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.editor.php,
include/styles/pandora.css, include/styles/pandora_legacy.css,
include/functions_visual_map.php,
include/ajax/visual_console_builder.ajax.php,
include/functions_visual_map_editor.php: added the formatted label
into the item label with the help of tiny_mce.
* include/javascript/tiny_mce/*: update the last version of
tiny_mce.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7524 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-24 12:30:37 +01:00
-- ---------------------------------------------------------------------
2012-09-24 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.sql, pandoradb.postgreSQL.sql, pandoradb.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql: added the fields
"text_filter" and "dont_show_subgroups" for to new filters to
generate the networkmap.
* operation/agentes/networkmap.topology.php,
operation/agentes/networkmap.groups.php,
include/functions_networkmap.php, include/functions_servers.php:
added the new filters for free text for agents and hidden the
subgroups of any group in the group networkmap.
* extensions/resource_registration.php,
operation/agentes/networkmap.php, general/header.php,
godmode/netflow/nf_report_form.php,
godmode/agentes/module_manager.php, include/functions_groups.php,
include/auth/ldap.php, operation/agentes/estado_ultimopaquete.php,
include/functions.php, include/functions_db.php: cleaned source code
style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6995 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-24 13:59:05 +02:00
-- Table `tlayout`
2013-01-24 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.postgreSQL.sql, pandoradb.oracle.sql, pandoradb.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql: changed in the
table "tlayout_data" the field "label" to text without limits.
* godmode/extensions.php, include/functions_tags.php,
include/functions_ui.php, include/functions_agents.php,
include/functions_config.php: cleaned source code style.
* godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.editor.php,
include/styles/pandora.css, include/styles/pandora_legacy.css,
include/functions_visual_map.php,
include/ajax/visual_console_builder.ajax.php,
include/functions_visual_map_editor.php: added the formatted label
into the item label with the help of tiny_mce.
* include/javascript/tiny_mce/*: update the last version of
tiny_mce.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7524 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-24 12:30:37 +01:00
-- ---------------------------------------------------------------------
2008-08-05 13:42:08 +02:00
CREATE TABLE IF NOT EXISTS ` tlayout ` (
2022-02-01 13:49:32 +01:00
` id ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` name ` VARCHAR ( 600 ) NOT NULL ,
` id_group ` INT UNSIGNED NOT NULL ,
` background ` VARCHAR ( 200 ) NOT NULL ,
` height ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` width ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` background_color ` VARCHAR ( 50 ) NOT NULL DEFAULT ' #FFF ' ,
` is_favourite ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` auto_adjust ` INT UNSIGNED NOT NULL DEFAULT 0 ,
2022-10-13 13:44:39 +02:00
` maintenance_mode ` TEXT ,
2022-02-01 13:49:32 +01:00
PRIMARY KEY ( ` id ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2007-05-20 19:12:31 +02:00
2013-01-24 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.postgreSQL.sql, pandoradb.oracle.sql, pandoradb.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql: changed in the
table "tlayout_data" the field "label" to text without limits.
* godmode/extensions.php, include/functions_tags.php,
include/functions_ui.php, include/functions_agents.php,
include/functions_config.php: cleaned source code style.
* godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.editor.php,
include/styles/pandora.css, include/styles/pandora_legacy.css,
include/functions_visual_map.php,
include/ajax/visual_console_builder.ajax.php,
include/functions_visual_map_editor.php: added the formatted label
into the item label with the help of tiny_mce.
* include/javascript/tiny_mce/*: update the last version of
tiny_mce.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7524 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-24 12:30:37 +01:00
-- ---------------------------------------------------------------------
2012-08-20 Miguel de Dios <miguel.dedios@artica.es>
* index.php, extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
general/login_page.php, general/logon_failed.php,
godmode/users/configure_user.php, include/api.php,
include/auth/mysql.php, pandoradb.sql, pandoradb.postgreSQL.sql,
pandoradb.oracle.sql: added the feature to set any user with
"not login" for only the user can work across the API.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6891 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-08-20 20:06:04 +02:00
-- Table `tlayout_data`
2013-01-24 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.postgreSQL.sql, pandoradb.oracle.sql, pandoradb.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql: changed in the
table "tlayout_data" the field "label" to text without limits.
* godmode/extensions.php, include/functions_tags.php,
include/functions_ui.php, include/functions_agents.php,
include/functions_config.php: cleaned source code style.
* godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.editor.php,
include/styles/pandora.css, include/styles/pandora_legacy.css,
include/functions_visual_map.php,
include/ajax/visual_console_builder.ajax.php,
include/functions_visual_map_editor.php: added the formatted label
into the item label with the help of tiny_mce.
* include/javascript/tiny_mce/*: update the last version of
tiny_mce.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7524 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-24 12:30:37 +01:00
-- ---------------------------------------------------------------------
2008-08-05 13:42:08 +02:00
CREATE TABLE IF NOT EXISTS ` tlayout_data ` (
2022-02-01 13:49:32 +01:00
` id ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` id_layout ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` pos_x ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` pos_y ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` height ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` width ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` label ` TEXT ,
` image ` VARCHAR ( 200 ) DEFAULT ' ' ,
` type ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
` period ` INT UNSIGNED NOT NULL DEFAULT 3600 ,
` id_agente_modulo ` MEDIUMINT UNSIGNED NOT NULL DEFAULT 0 ,
` id_agent ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` id_layout_linked ` INT unsigned NOT NULL DEFAULT 0 ,
` parent_item ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` enable_link ` TINYINT UNSIGNED NOT NULL DEFAULT 1 ,
` id_metaconsole ` INT NOT NULL DEFAULT 0 ,
` id_group ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` id_custom_graph ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` border_width ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` type_graph ` VARCHAR ( 50 ) NOT NULL DEFAULT ' area ' ,
` label_position ` VARCHAR ( 50 ) NOT NULL DEFAULT ' down ' ,
` border_color ` VARCHAR ( 200 ) DEFAULT ' ' ,
` fill_color ` VARCHAR ( 200 ) DEFAULT ' ' ,
` show_statistics ` TINYINT NOT NULL DEFAULT 0 ,
` linked_layout_node_id ` INT NOT NULL DEFAULT 0 ,
` linked_layout_status_type ` ENUM ( ' default ' , ' weight ' , ' service ' ) DEFAULT ' default ' ,
` id_layout_linked_weight ` INT NOT NULL DEFAULT 0 ,
` linked_layout_status_as_service_warning ` DOUBLE NOT NULL DEFAULT 0 ,
` linked_layout_status_as_service_critical ` DOUBLE NOT NULL DEFAULT 0 ,
` element_group ` INT NOT NULL DEFAULT 0 ,
` show_on_top ` TINYINT NOT NULL DEFAULT 0 ,
` clock_animation ` VARCHAR ( 60 ) NOT NULL DEFAULT ' analogic_1 ' ,
` time_format ` VARCHAR ( 60 ) NOT NULL DEFAULT ' time ' ,
` timezone ` VARCHAR ( 60 ) NOT NULL DEFAULT ' Europe/Madrid ' ,
` show_last_value ` TINYINT UNSIGNED NULL DEFAULT 0 ,
` cache_expiration ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` title ` TEXT ,
2023-01-24 12:10:40 +01:00
PRIMARY KEY ( ` id ` ) ,
INDEX ` tlayout_data_layout ` ( ` id_layout ` )
2022-02-01 13:49:32 +01:00
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2008-02-21 16:16:54 +01:00
2013-01-24 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.postgreSQL.sql, pandoradb.oracle.sql, pandoradb.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql: changed in the
table "tlayout_data" the field "label" to text without limits.
* godmode/extensions.php, include/functions_tags.php,
include/functions_ui.php, include/functions_agents.php,
include/functions_config.php: cleaned source code style.
* godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.editor.php,
include/styles/pandora.css, include/styles/pandora_legacy.css,
include/functions_visual_map.php,
include/ajax/visual_console_builder.ajax.php,
include/functions_visual_map_editor.php: added the formatted label
into the item label with the help of tiny_mce.
* include/javascript/tiny_mce/*: update the last version of
tiny_mce.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7524 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-24 12:30:37 +01:00
-- ---------------------------------------------------------------------
2012-08-20 Miguel de Dios <miguel.dedios@artica.es>
* index.php, extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
general/login_page.php, general/logon_failed.php,
godmode/users/configure_user.php, include/api.php,
include/auth/mysql.php, pandoradb.sql, pandoradb.postgreSQL.sql,
pandoradb.oracle.sql: added the feature to set any user with
"not login" for only the user can work across the API.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6891 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-08-20 20:06:04 +02:00
-- Table `tplugin`
2013-01-24 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.postgreSQL.sql, pandoradb.oracle.sql, pandoradb.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql: changed in the
table "tlayout_data" the field "label" to text without limits.
* godmode/extensions.php, include/functions_tags.php,
include/functions_ui.php, include/functions_agents.php,
include/functions_config.php: cleaned source code style.
* godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.editor.php,
include/styles/pandora.css, include/styles/pandora_legacy.css,
include/functions_visual_map.php,
include/ajax/visual_console_builder.ajax.php,
include/functions_visual_map_editor.php: added the formatted label
into the item label with the help of tiny_mce.
* include/javascript/tiny_mce/*: update the last version of
tiny_mce.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7524 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-24 12:30:37 +01:00
-- ---------------------------------------------------------------------
2022-02-01 13:49:32 +01:00
-- The fields 'net_dst_opt', 'net_port_opt', 'user_opt' and
-- 'pass_opt' are deprecated for the 5.1.
2011-02-07 12:34:44 +01:00
CREATE TABLE IF NOT EXISTS ` tplugin ` (
2022-02-01 13:49:32 +01:00
` id ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` name ` VARCHAR ( 200 ) NOT NULL ,
2022-02-02 12:30:02 +01:00
` description ` MEDIUMTEXT ,
2022-02-01 13:49:32 +01:00
` max_timeout ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` max_retries ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` execute ` VARCHAR ( 250 ) NOT NULL ,
` net_dst_opt ` VARCHAR ( 50 ) DEFAULT ' ' ,
` net_port_opt ` VARCHAR ( 50 ) DEFAULT ' ' ,
` user_opt ` VARCHAR ( 50 ) DEFAULT ' ' ,
` pass_opt ` VARCHAR ( 50 ) DEFAULT ' ' ,
` plugin_type ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` macros ` TEXT ,
` parameters ` TEXT ,
2022-09-08 15:18:48 +02:00
` no_delete ` TINYINT NOT NULL DEFAULT 0 ,
2022-02-01 13:49:32 +01:00
PRIMARY KEY ( ` id ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2008-02-21 16:16:54 +01:00
2013-01-24 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.postgreSQL.sql, pandoradb.oracle.sql, pandoradb.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql: changed in the
table "tlayout_data" the field "label" to text without limits.
* godmode/extensions.php, include/functions_tags.php,
include/functions_ui.php, include/functions_agents.php,
include/functions_config.php: cleaned source code style.
* godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.editor.php,
include/styles/pandora.css, include/styles/pandora_legacy.css,
include/functions_visual_map.php,
include/ajax/visual_console_builder.ajax.php,
include/functions_visual_map_editor.php: added the formatted label
into the item label with the help of tiny_mce.
* include/javascript/tiny_mce/*: update the last version of
tiny_mce.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7524 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-24 12:30:37 +01:00
-- ---------------------------------------------------------------------
2012-08-20 Miguel de Dios <miguel.dedios@artica.es>
* index.php, extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
general/login_page.php, general/logon_failed.php,
godmode/users/configure_user.php, include/api.php,
include/auth/mysql.php, pandoradb.sql, pandoradb.postgreSQL.sql,
pandoradb.oracle.sql: added the feature to set any user with
"not login" for only the user can work across the API.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6891 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-08-20 20:06:04 +02:00
-- Table `tmodule`
2013-01-24 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.postgreSQL.sql, pandoradb.oracle.sql, pandoradb.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql: changed in the
table "tlayout_data" the field "label" to text without limits.
* godmode/extensions.php, include/functions_tags.php,
include/functions_ui.php, include/functions_agents.php,
include/functions_config.php: cleaned source code style.
* godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.editor.php,
include/styles/pandora.css, include/styles/pandora_legacy.css,
include/functions_visual_map.php,
include/ajax/visual_console_builder.ajax.php,
include/functions_visual_map_editor.php: added the formatted label
into the item label with the help of tiny_mce.
* include/javascript/tiny_mce/*: update the last version of
tiny_mce.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7524 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-24 12:30:37 +01:00
-- ---------------------------------------------------------------------
2008-08-05 13:42:08 +02:00
CREATE TABLE IF NOT EXISTS ` tmodule ` (
2022-02-01 13:49:32 +01:00
` id_module ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` name ` VARCHAR ( 100 ) NOT NULL DEFAULT ' ' ,
PRIMARY KEY ( ` id_module ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2008-02-21 16:16:54 +01:00
2013-01-24 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.postgreSQL.sql, pandoradb.oracle.sql, pandoradb.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql: changed in the
table "tlayout_data" the field "label" to text without limits.
* godmode/extensions.php, include/functions_tags.php,
include/functions_ui.php, include/functions_agents.php,
include/functions_config.php: cleaned source code style.
* godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.editor.php,
include/styles/pandora.css, include/styles/pandora_legacy.css,
include/functions_visual_map.php,
include/ajax/visual_console_builder.ajax.php,
include/functions_visual_map_editor.php: added the formatted label
into the item label with the help of tiny_mce.
* include/javascript/tiny_mce/*: update the last version of
tiny_mce.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7524 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-24 12:30:37 +01:00
-- ---------------------------------------------------------------------
2012-08-20 Miguel de Dios <miguel.dedios@artica.es>
* index.php, extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
general/login_page.php, general/logon_failed.php,
godmode/users/configure_user.php, include/api.php,
include/auth/mysql.php, pandoradb.sql, pandoradb.postgreSQL.sql,
pandoradb.oracle.sql: added the feature to set any user with
"not login" for only the user can work across the API.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6891 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-08-20 20:06:04 +02:00
-- Table `tserver_export`
2013-01-24 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.postgreSQL.sql, pandoradb.oracle.sql, pandoradb.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql: changed in the
table "tlayout_data" the field "label" to text without limits.
* godmode/extensions.php, include/functions_tags.php,
include/functions_ui.php, include/functions_agents.php,
include/functions_config.php: cleaned source code style.
* godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.editor.php,
include/styles/pandora.css, include/styles/pandora_legacy.css,
include/functions_visual_map.php,
include/ajax/visual_console_builder.ajax.php,
include/functions_visual_map_editor.php: added the formatted label
into the item label with the help of tiny_mce.
* include/javascript/tiny_mce/*: update the last version of
tiny_mce.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7524 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-24 12:30:37 +01:00
-- ---------------------------------------------------------------------
2008-08-05 13:42:08 +02:00
CREATE TABLE IF NOT EXISTS ` tserver_export ` (
2022-02-01 13:49:32 +01:00
` id ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` name ` VARCHAR ( 600 ) NOT NULL DEFAULT ' ' ,
` preffix ` VARCHAR ( 100 ) NOT NULL DEFAULT ' ' ,
` interval ` INT UNSIGNED NOT NULL DEFAULT 300 ,
` ip_server ` VARCHAR ( 100 ) NOT NULL DEFAULT ' ' ,
` connect_mode ` enum ( ' tentacle ' , ' ssh ' , ' local ' ) DEFAULT ' local ' ,
` id_export_server ` INT UNSIGNED DEFAULT NULL ,
` user ` VARCHAR ( 100 ) NOT NULL DEFAULT ' ' ,
` pass ` VARCHAR ( 100 ) NOT NULL DEFAULT ' ' ,
` port ` INT UNSIGNED DEFAULT 0 ,
` directory ` VARCHAR ( 100 ) NOT NULL DEFAULT ' ' ,
` options ` VARCHAR ( 100 ) NOT NULL DEFAULT ' ' ,
` timezone_offset ` TINYINT NULL DEFAULT 0 COMMENT ' Number of hours of difference with the server timezone ' ,
PRIMARY KEY ( ` id ` ) ,
INDEX id_export_server ( ` id_export_server ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2008-03-06 Sancho Lerena <slerena@gmail.com>
Pandora FMS 2.0 development first commit. 1.4 version is now 2.0
* pandoradb_data.sql: Added correct tnetwork_components, fixed
ttipo_modulo (categoria values).
* include/styles/pandora.css: Added some server icons, tab style
for module editor has been improved.
* include/functions_db.php: added new functions, lang_string and
check_login, and a first review of several functions that currently
need change for new config session parameters in array $config[]
* include/javascript/pandora.js: Added a new global include for
spare javascript functions before included into a few pages.
* include/languages/language_en.php: New tokens.
* include/help*: New contextual help system.
* include/config_process.php: New way to manage config.
* include/functions.php: Added new functions to manage global
* operation/agentes/estado_ultimopaquete.php: removed old javascript
code from there.
* operation/agentes/estado_agente.php: Removed references to deprecated
field "agent_type".
* operation/agentes/tactical.php: Some code cleanup and progressbar
issues merged from 1.3.1 branch. Need to add support to new server
types and new module types.
* operation/servers/view_server.php: Added support to new servers, code
cleanup.
* reporting/fgraph.php: Code cleanup, changes to use new config method,
and a lot of style change.
* general/pandora_help.php: New source for contextual help in the way
of moodle.
* general/footer.php, general/noaccess.php: Code cleanup and uses of
new config.
* module_manager_editor: New editors for each module family. Need
finish and implement EDITION of data, now only inserts data.
* godmode/agentes/agent_manager.php: Implemented new server assigment
and edition.
* godmode/agentes/configurar_agente.php: Small changes that affects
module management, visualization and agent management.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@739 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-03-07 17:22:16 +01:00
2013-01-24 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.postgreSQL.sql, pandoradb.oracle.sql, pandoradb.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql: changed in the
table "tlayout_data" the field "label" to text without limits.
* godmode/extensions.php, include/functions_tags.php,
include/functions_ui.php, include/functions_agents.php,
include/functions_config.php: cleaned source code style.
* godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.editor.php,
include/styles/pandora.css, include/styles/pandora_legacy.css,
include/functions_visual_map.php,
include/ajax/visual_console_builder.ajax.php,
include/functions_visual_map_editor.php: added the formatted label
into the item label with the help of tiny_mce.
* include/javascript/tiny_mce/*: update the last version of
tiny_mce.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7524 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-24 12:30:37 +01:00
-- ---------------------------------------------------------------------
2012-08-20 Miguel de Dios <miguel.dedios@artica.es>
* index.php, extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
general/login_page.php, general/logon_failed.php,
godmode/users/configure_user.php, include/api.php,
include/auth/mysql.php, pandoradb.sql, pandoradb.postgreSQL.sql,
pandoradb.oracle.sql: added the feature to set any user with
"not login" for only the user can work across the API.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6891 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-08-20 20:06:04 +02:00
-- Table `tserver_export_data`
2013-01-24 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.postgreSQL.sql, pandoradb.oracle.sql, pandoradb.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql: changed in the
table "tlayout_data" the field "label" to text without limits.
* godmode/extensions.php, include/functions_tags.php,
include/functions_ui.php, include/functions_agents.php,
include/functions_config.php: cleaned source code style.
* godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.editor.php,
include/styles/pandora.css, include/styles/pandora_legacy.css,
include/functions_visual_map.php,
include/ajax/visual_console_builder.ajax.php,
include/functions_visual_map_editor.php: added the formatted label
into the item label with the help of tiny_mce.
* include/javascript/tiny_mce/*: update the last version of
tiny_mce.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7524 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-24 12:30:37 +01:00
-- ---------------------------------------------------------------------
2008-07-30 20:39:40 +02:00
-- id_export_server is real pandora fms export server process that manages this server
2022-02-01 13:49:32 +01:00
-- id is the 'destination' server to export
2008-08-05 13:42:08 +02:00
CREATE TABLE IF NOT EXISTS ` tserver_export_data ` (
2022-02-01 13:49:32 +01:00
` id ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` id_export_server ` INT UNSIGNED DEFAULT NULL ,
` agent_name ` VARCHAR ( 100 ) NOT NULL DEFAULT ' ' ,
` module_name ` VARCHAR ( 600 ) NOT NULL DEFAULT ' ' ,
` module_type ` VARCHAR ( 100 ) NOT NULL DEFAULT ' ' ,
` data ` VARCHAR ( 255 ) DEFAULT NULL ,
` timestamp ` DATETIME NOT NULL DEFAULT ' 1970-01-01 00:00:00 ' ,
PRIMARY KEY ( ` id ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2008-03-26 17:47:39 +01:00
2013-01-24 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.postgreSQL.sql, pandoradb.oracle.sql, pandoradb.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql: changed in the
table "tlayout_data" the field "label" to text without limits.
* godmode/extensions.php, include/functions_tags.php,
include/functions_ui.php, include/functions_agents.php,
include/functions_config.php: cleaned source code style.
* godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.editor.php,
include/styles/pandora.css, include/styles/pandora_legacy.css,
include/functions_visual_map.php,
include/ajax/visual_console_builder.ajax.php,
include/functions_visual_map_editor.php: added the formatted label
into the item label with the help of tiny_mce.
* include/javascript/tiny_mce/*: update the last version of
tiny_mce.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7524 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-24 12:30:37 +01:00
-- ---------------------------------------------------------------------
2012-08-29 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.sql, pandoradb.postgreSQL.sql, pandoradb.oracle.sql,
include/db/mysql.php,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
godmode/agentes/planned_downtime.list.php,
godmode/agentes/planned_downtime.editor.php, godmode/menu.php,
include/ajax/planned_downtime.ajax.php: refactoriced the code for
planned downtime, now this have new feature such as set a downtime
with a periodicity each week, each month and set the agents and
the modules with Quiet state instead the old form (but the old still
is). And the page is more easy and quickly to set or config a
planned downtime.
* godmode/alerts/configure_alert_template.php,
include/javascript/pandora.js: cleaned source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6919 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-08-29 11:46:05 +02:00
-- Table `tplanned_downtime`
2013-01-24 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.postgreSQL.sql, pandoradb.oracle.sql, pandoradb.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql: changed in the
table "tlayout_data" the field "label" to text without limits.
* godmode/extensions.php, include/functions_tags.php,
include/functions_ui.php, include/functions_agents.php,
include/functions_config.php: cleaned source code style.
* godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.editor.php,
include/styles/pandora.css, include/styles/pandora_legacy.css,
include/functions_visual_map.php,
include/ajax/visual_console_builder.ajax.php,
include/functions_visual_map_editor.php: added the formatted label
into the item label with the help of tiny_mce.
* include/javascript/tiny_mce/*: update the last version of
tiny_mce.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7524 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-24 12:30:37 +01:00
-- ---------------------------------------------------------------------
2008-08-05 13:42:08 +02:00
CREATE TABLE IF NOT EXISTS ` tplanned_downtime ` (
2022-02-01 13:49:32 +01:00
` id ` MEDIUMINT NOT NULL AUTO_INCREMENT ,
` name ` VARCHAR ( 100 ) NOT NULL ,
2022-02-01 15:11:59 +01:00
` description ` TEXT ,
2022-02-01 13:49:32 +01:00
` date_from ` BIGINT NOT NULL DEFAULT 0 ,
` date_to ` BIGINT NOT NULL DEFAULT 0 ,
` executed ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
` id_group ` MEDIUMINT UNSIGNED NULL DEFAULT 0 ,
` only_alerts ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
` monday ` TINYINT DEFAULT 0 ,
` tuesday ` TINYINT DEFAULT 0 ,
` wednesday ` TINYINT DEFAULT 0 ,
` thursday ` TINYINT DEFAULT 0 ,
` friday ` TINYINT DEFAULT 0 ,
` saturday ` TINYINT DEFAULT 0 ,
` sunday ` TINYINT DEFAULT 0 ,
` periodically_time_from ` time NULL DEFAULT NULL ,
` periodically_time_to ` time NULL DEFAULT NULL ,
` periodically_day_from ` INT UNSIGNED DEFAULT NULL ,
` periodically_day_to ` INT UNSIGNED DEFAULT NULL ,
` type_downtime ` VARCHAR ( 100 ) NOT NULL DEFAULT ' disabled_agents_alerts ' ,
` type_execution ` VARCHAR ( 100 ) NOT NULL DEFAULT ' once ' ,
` type_periodicity ` VARCHAR ( 100 ) NOT NULL DEFAULT ' weekly ' ,
2022-06-08 11:49:48 +02:00
` id_user ` VARCHAR ( 255 ) NOT NULL DEFAULT ' 0 ' ,
2022-08-16 18:42:51 +02:00
` cron_interval_from ` VARCHAR ( 100 ) DEFAULT ' ' ,
` cron_interval_to ` VARCHAR ( 100 ) DEFAULT ' ' ,
2022-02-01 13:49:32 +01:00
PRIMARY KEY ( ` id ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2008-07-25 20:37:32 +02:00
2013-01-24 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.postgreSQL.sql, pandoradb.oracle.sql, pandoradb.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql: changed in the
table "tlayout_data" the field "label" to text without limits.
* godmode/extensions.php, include/functions_tags.php,
include/functions_ui.php, include/functions_agents.php,
include/functions_config.php: cleaned source code style.
* godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.editor.php,
include/styles/pandora.css, include/styles/pandora_legacy.css,
include/functions_visual_map.php,
include/ajax/visual_console_builder.ajax.php,
include/functions_visual_map_editor.php: added the formatted label
into the item label with the help of tiny_mce.
* include/javascript/tiny_mce/*: update the last version of
tiny_mce.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7524 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-24 12:30:37 +01:00
-- ---------------------------------------------------------------------
2012-08-29 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.sql, pandoradb.postgreSQL.sql, pandoradb.oracle.sql,
include/db/mysql.php,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
godmode/agentes/planned_downtime.list.php,
godmode/agentes/planned_downtime.editor.php, godmode/menu.php,
include/ajax/planned_downtime.ajax.php: refactoriced the code for
planned downtime, now this have new feature such as set a downtime
with a periodicity each week, each month and set the agents and
the modules with Quiet state instead the old form (but the old still
is). And the page is more easy and quickly to set or config a
planned downtime.
* godmode/alerts/configure_alert_template.php,
include/javascript/pandora.js: cleaned source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6919 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-08-29 11:46:05 +02:00
-- Table `tplanned_downtime_agents`
2013-01-24 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.postgreSQL.sql, pandoradb.oracle.sql, pandoradb.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql: changed in the
table "tlayout_data" the field "label" to text without limits.
* godmode/extensions.php, include/functions_tags.php,
include/functions_ui.php, include/functions_agents.php,
include/functions_config.php: cleaned source code style.
* godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.editor.php,
include/styles/pandora.css, include/styles/pandora_legacy.css,
include/functions_visual_map.php,
include/ajax/visual_console_builder.ajax.php,
include/functions_visual_map_editor.php: added the formatted label
into the item label with the help of tiny_mce.
* include/javascript/tiny_mce/*: update the last version of
tiny_mce.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7524 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-24 12:30:37 +01:00
-- ---------------------------------------------------------------------
2008-08-05 13:42:08 +02:00
CREATE TABLE IF NOT EXISTS ` tplanned_downtime_agents ` (
2022-02-01 13:49:32 +01:00
` id ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` id_agent ` MEDIUMINT UNSIGNED NOT NULL DEFAULT 0 ,
` id_downtime ` MEDIUMINT NOT NULL DEFAULT 0 ,
` all_modules ` TINYINT DEFAULT 1 ,
` manually_disabled ` TINYINT DEFAULT 0 ,
PRIMARY KEY ( ` id ` ) ,
FOREIGN KEY ( ` id_downtime ` ) REFERENCES tplanned_downtime ( ` id ` )
ON DELETE CASCADE
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2009-01-20 11:37:04 +01:00
2013-01-24 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.postgreSQL.sql, pandoradb.oracle.sql, pandoradb.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql: changed in the
table "tlayout_data" the field "label" to text without limits.
* godmode/extensions.php, include/functions_tags.php,
include/functions_ui.php, include/functions_agents.php,
include/functions_config.php: cleaned source code style.
* godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.editor.php,
include/styles/pandora.css, include/styles/pandora_legacy.css,
include/functions_visual_map.php,
include/ajax/visual_console_builder.ajax.php,
include/functions_visual_map_editor.php: added the formatted label
into the item label with the help of tiny_mce.
* include/javascript/tiny_mce/*: update the last version of
tiny_mce.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7524 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-24 12:30:37 +01:00
-- ---------------------------------------------------------------------
2012-08-29 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.sql, pandoradb.postgreSQL.sql, pandoradb.oracle.sql,
include/db/mysql.php,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
godmode/agentes/planned_downtime.list.php,
godmode/agentes/planned_downtime.editor.php, godmode/menu.php,
include/ajax/planned_downtime.ajax.php: refactoriced the code for
planned downtime, now this have new feature such as set a downtime
with a periodicity each week, each month and set the agents and
the modules with Quiet state instead the old form (but the old still
is). And the page is more easy and quickly to set or config a
planned downtime.
* godmode/alerts/configure_alert_template.php,
include/javascript/pandora.js: cleaned source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6919 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-08-29 11:46:05 +02:00
-- Table `tplanned_downtime_modules`
2013-01-24 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.postgreSQL.sql, pandoradb.oracle.sql, pandoradb.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql: changed in the
table "tlayout_data" the field "label" to text without limits.
* godmode/extensions.php, include/functions_tags.php,
include/functions_ui.php, include/functions_agents.php,
include/functions_config.php: cleaned source code style.
* godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.editor.php,
include/styles/pandora.css, include/styles/pandora_legacy.css,
include/functions_visual_map.php,
include/ajax/visual_console_builder.ajax.php,
include/functions_visual_map_editor.php: added the formatted label
into the item label with the help of tiny_mce.
* include/javascript/tiny_mce/*: update the last version of
tiny_mce.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7524 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-24 12:30:37 +01:00
-- ---------------------------------------------------------------------
2012-08-29 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.sql, pandoradb.postgreSQL.sql, pandoradb.oracle.sql,
include/db/mysql.php,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
godmode/agentes/planned_downtime.list.php,
godmode/agentes/planned_downtime.editor.php, godmode/menu.php,
include/ajax/planned_downtime.ajax.php: refactoriced the code for
planned downtime, now this have new feature such as set a downtime
with a periodicity each week, each month and set the agents and
the modules with Quiet state instead the old form (but the old still
is). And the page is more easy and quickly to set or config a
planned downtime.
* godmode/alerts/configure_alert_template.php,
include/javascript/pandora.js: cleaned source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6919 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-08-29 11:46:05 +02:00
CREATE TABLE IF NOT EXISTS ` tplanned_downtime_modules ` (
2022-02-01 13:49:32 +01:00
` id ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` id_agent ` MEDIUMINT UNSIGNED NOT NULL DEFAULT 0 ,
` id_agent_module ` INT NOT NULL ,
` id_downtime ` MEDIUMINT NOT NULL DEFAULT 0 ,
PRIMARY KEY ( ` id ` ) ,
FOREIGN KEY ( ` id_downtime ` ) REFERENCES tplanned_downtime ( ` id ` )
ON DELETE CASCADE
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2010-01-12 19:08:08 +01:00
2012-08-29 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.sql, pandoradb.postgreSQL.sql, pandoradb.oracle.sql,
include/db/mysql.php,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
godmode/agentes/planned_downtime.list.php,
godmode/agentes/planned_downtime.editor.php, godmode/menu.php,
include/ajax/planned_downtime.ajax.php: refactoriced the code for
planned downtime, now this have new feature such as set a downtime
with a periodicity each week, each month and set the agents and
the modules with Quiet state instead the old form (but the old still
is). And the page is more easy and quickly to set or config a
planned downtime.
* godmode/alerts/configure_alert_template.php,
include/javascript/pandora.js: cleaned source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6919 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-08-29 11:46:05 +02:00
-- GIS extension Tables
2012-12-09 23:31:29 +01:00
-- ----------------------------------------------------------------------
2010-02-17 20:35:39 +01:00
-- Table `tgis_data_history`
2012-12-09 23:31:29 +01:00
-- ----------------------------------------------------------------------
2010-02-17 20:35:39 +01:00
CREATE TABLE IF NOT EXISTS ` tgis_data_history ` (
2022-02-01 13:49:32 +01:00
` id_tgis_data ` INT NOT NULL AUTO_INCREMENT COMMENT ' key of the table ' ,
` longitude ` DOUBLE NOT NULL ,
` latitude ` DOUBLE NOT NULL ,
` altitude ` DOUBLE NULL ,
` start_timestamp ` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT ' timestamp on wich the agente started to be in this position ' ,
` end_timestamp ` TIMESTAMP NULL COMMENT ' timestamp on wich the agent was placed for last time on this position ' ,
` description ` TEXT NULL COMMENT ' description of the region correoponding to this placemnt ' ,
` manual_placement ` TINYINT NOT NULL DEFAULT 0 COMMENT ' 0 to show that the position cames from the agent, 1 to show that the position was established manualy ' ,
` number_of_packages ` INT NOT NULL DEFAULT 1 COMMENT ' Number of data packages received with this position from the start_timestampa to the_end_timestamp ' ,
` tagente_id_agente ` INT UNSIGNED NOT NULL COMMENT ' reference to the agent ' ,
PRIMARY KEY ( ` id_tgis_data ` ) ,
INDEX ` start_timestamp_index ` USING BTREE ( ` start_timestamp ` ASC ) ,
INDEX ` end_timestamp_index ` USING BTREE ( ` end_timestamp ` ASC )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 COMMENT = ' Table to store historical GIS information of the agents ' ;
2010-02-17 20:35:39 +01:00
2012-12-09 23:31:29 +01:00
-- ----------------------------------------------------------------------
2010-02-17 20:35:39 +01:00
-- Table `tgis_data_status`
2012-12-09 23:31:29 +01:00
-- ----------------------------------------------------------------------
2010-02-17 20:35:39 +01:00
CREATE TABLE IF NOT EXISTS ` tgis_data_status ` (
2022-02-01 13:49:32 +01:00
` tagente_id_agente ` INT UNSIGNED NOT NULL COMMENT ' Reference to the agent ' ,
` current_longitude ` DOUBLE NOT NULL COMMENT ' Last received longitude ' ,
` current_latitude ` DOUBLE NOT NULL COMMENT ' Last received latitude ' ,
` current_altitude ` DOUBLE NULL COMMENT ' Last received altitude ' ,
` stored_longitude ` DOUBLE NOT NULL COMMENT ' Reference longitude to see if the agent has moved ' ,
` stored_latitude ` DOUBLE NOT NULL COMMENT ' Reference latitude to see if the agent has moved ' ,
` stored_altitude ` DOUBLE NULL COMMENT ' Reference altitude to see if the agent has moved ' ,
` number_of_packages ` INT NOT NULL DEFAULT 1 COMMENT ' Number of data packages received with this position since start_timestampa ' ,
` start_timestamp ` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT ' Timestamp on wich the agente started to be in this position ' ,
` manual_placement ` TINYINT NOT NULL DEFAULT 0 COMMENT ' 0 to show that the position cames from the agent, 1 to show that the position was established manualy ' ,
` description ` TEXT NULL COMMENT ' description of the region correoponding to this placemnt ' ,
PRIMARY KEY ( ` tagente_id_agente ` ) ,
INDEX ` start_timestamp_index ` USING BTREE ( ` start_timestamp ` ASC ) ,
INDEX ` fk_tgisdata_tagente1 ` ( ` tagente_id_agente ` ASC ) ,
CONSTRAINT ` fk_tgisdata_tagente1 `
FOREIGN KEY ( ` tagente_id_agente ` )
REFERENCES ` tagente ` ( ` id_agente ` )
ON DELETE CASCADE
ON UPDATE NO ACTION
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 COMMENT = ' Table to store last GIS information of the agents ' ;
2010-01-12 19:08:08 +01:00
2012-12-09 23:31:29 +01:00
-- ----------------------------------------------------------------------
2010-01-13 18:32:52 +01:00
-- Table `tgis_map`
2012-12-09 23:31:29 +01:00
-- ----------------------------------------------------------------------
2010-01-12 19:08:08 +01:00
CREATE TABLE IF NOT EXISTS ` tgis_map ` (
2022-02-01 13:49:32 +01:00
` id_tgis_map ` INT NOT NULL AUTO_INCREMENT COMMENT ' table identifier ' ,
` map_name ` VARCHAR ( 63 ) NOT NULL COMMENT ' Name of the map ' ,
2022-02-02 12:32:33 +01:00
` initial_longitude ` DOUBLE NULL COMMENT " longitude of the center of the map when it\'s loaded " ,
` initial_latitude ` DOUBLE NULL COMMENT " latitude of the center of the map when it\'s loaded " ,
` initial_altitude ` DOUBLE NULL COMMENT " altitude of the center of the map when it\'s loaded " ,
2022-02-01 13:49:32 +01:00
` zoom_level ` TINYINT NULL DEFAULT 1 COMMENT ' Zoom level to show when the map is loaded. ' ,
2022-02-02 12:32:33 +01:00
` map_background ` VARCHAR ( 127 ) NULL COMMENT ' path on the server to the background image of the map ' ,
` default_longitude ` DOUBLE NULL COMMENT ' DEFAULT longitude for the agents placed on the map ' ,
` default_latitude ` DOUBLE NULL COMMENT ' DEFAULT latitude for the agents placed on the map ' ,
` default_altitude ` DOUBLE NULL COMMENT ' DEFAULT altitude for the agents placed on the map ' ,
2022-02-01 13:49:32 +01:00
` group_id ` INT NOT NULL DEFAULT 0 COMMENT ' Group that owns the map ' ,
` default_map ` TINYINT NULL DEFAULT 0 COMMENT ' 1 if this is the DEFAULT map, 0 in other case ' ,
PRIMARY KEY ( ` id_tgis_map ` ) ,
INDEX ` map_name_index ` ( ` map_name ` ASC )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 COMMENT = ' Table containing information about a gis map ' ;
2010-01-12 19:08:08 +01:00
2012-10-09 17:51:33 +02:00
-- ---------------------------------------------------------------------
2010-01-13 18:32:52 +01:00
-- Table `tgis_map_connection`
2012-10-09 17:51:33 +02:00
-- ---------------------------------------------------------------------
2010-01-13 18:32:52 +01:00
CREATE TABLE IF NOT EXISTS ` tgis_map_connection ` (
2022-02-02 12:32:33 +01:00
` id_tmap_connection ` INT NOT NULL AUTO_INCREMENT COMMENT ' table id ' ,
` conection_name ` VARCHAR ( 45 ) NULL COMMENT ' Name of the connection (name of the base layer) ' ,
` connection_type ` VARCHAR ( 45 ) NULL COMMENT ' Type of map server to connect ' ,
` conection_data ` TEXT NULL COMMENT ' connection information (this can probably change to fit better the possible connection parameters) ' ,
` num_zoom_levels ` TINYINT NULL COMMENT ' Number of zoom levels available ' ,
` default_zoom_level ` TINYINT NOT NULL DEFAULT 16 COMMENT ' DEFAULT Zoom Level for the connection ' ,
` default_longitude ` DOUBLE NULL COMMENT ' DEFAULT longitude for the agents placed on the map ' ,
` default_latitude ` DOUBLE NULL COMMENT ' DEFAULT latitude for the agents placed on the map ' ,
` default_altitude ` DOUBLE NULL COMMENT ' DEFAULT altitude for the agents placed on the map ' ,
` initial_longitude ` DOUBLE NULL COMMENT " longitude of the center of the map when it\'s loaded " ,
` initial_latitude ` DOUBLE NULL COMMENT " latitude of the center of the map when it\'s loaded " ,
` initial_altitude ` DOUBLE NULL COMMENT " altitude of the center of the map when it\'s loaded " ,
2022-02-01 13:49:32 +01:00
` group_id ` INT NOT NULL DEFAULT 0 COMMENT ' Group that owns the map ' ,
PRIMARY KEY ( ` id_tmap_connection ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 COMMENT = ' Table to store the map connection information ' ;
2010-01-22 15:18:23 +01:00
-- -----------------------------------------------------
2015-06-18 19:17:59 +02:00
-- Table `tgis_map_has_tgis_map_con` (tgis_map_has_tgis_map_connection)
2010-01-22 15:18:23 +01:00
-- -----------------------------------------------------
2015-06-18 19:17:59 +02:00
CREATE TABLE IF NOT EXISTS ` tgis_map_has_tgis_map_con ` (
2022-02-01 13:49:32 +01:00
` tgis_map_id_tgis_map ` INT NOT NULL COMMENT ' reference to tgis_map ' ,
` tgis_map_con_id_tmap_con ` INT NOT NULL COMMENT ' reference to tgis_map_connection ' ,
` modification_time ` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT ' Last Modification Time of the Connection ' ,
` default_map_connection ` TINYINT NULL DEFAULT FALSE COMMENT ' Flag to mark the DEFAULT map connection of a map ' ,
PRIMARY KEY ( ` tgis_map_id_tgis_map ` , ` tgis_map_con_id_tmap_con ` ) ,
INDEX ` fk_tgis_map_has_tgis_map_connection_tgis_map1 ` ( ` tgis_map_id_tgis_map ` ASC ) ,
INDEX ` fk_tgis_map_has_tgis_map_connection_tgis_map_connection1 ` ( ` tgis_map_con_id_tmap_con ` ASC ) ,
CONSTRAINT ` fk_tgis_map_has_tgis_map_connection_tgis_map1 `
FOREIGN KEY ( ` tgis_map_id_tgis_map ` )
REFERENCES ` tgis_map ` ( ` id_tgis_map ` )
ON DELETE CASCADE
ON UPDATE NO ACTION ,
CONSTRAINT ` fk_tgis_map_has_tgis_map_connection_tgis_map_connection1 `
FOREIGN KEY ( ` tgis_map_con_id_tmap_con ` )
REFERENCES ` tgis_map_connection ` ( ` id_tmap_connection ` )
ON DELETE CASCADE
ON UPDATE NO ACTION
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 COMMENT = ' Table to asociate a connection to a gis map ' ;
2010-01-13 18:32:52 +01:00
-- -----------------------------------------------------
-- Table `tgis_map_layer`
-- -----------------------------------------------------
2010-01-12 19:08:08 +01:00
CREATE TABLE IF NOT EXISTS ` tgis_map_layer ` (
2022-02-02 12:32:33 +01:00
` id_tmap_layer ` INT NOT NULL AUTO_INCREMENT COMMENT ' table id ' ,
` layer_name ` VARCHAR ( 45 ) NOT NULL COMMENT ' Name of the layer ' ,
` view_layer ` TINYINT NOT NULL DEFAULT TRUE COMMENT ' True if the layer must be shown ' ,
` layer_stack_order ` TINYINT NULL DEFAULT 0 COMMENT ' Number of order of the layer in the layer stack, bigger means upper on the stack. ' ,
` tgis_map_id_tgis_map ` INT NOT NULL COMMENT ' reference to the map containing the layer ' ,
` tgrupo_id_grupo ` MEDIUMINT NOT NULL COMMENT ' reference to the group shown in the layer ' ,
PRIMARY KEY ( ` id_tmap_layer ` ) ,
INDEX ` fk_tmap_layer_tgis_map1 ` ( ` tgis_map_id_tgis_map ` ASC ) ,
2022-02-01 13:49:32 +01:00
CONSTRAINT ` fk_tmap_layer_tgis_map1 `
FOREIGN KEY ( ` tgis_map_id_tgis_map ` )
REFERENCES ` tgis_map ` ( ` id_tgis_map ` )
ON DELETE CASCADE
ON UPDATE NO ACTION
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 COMMENT = ' Table containing information about the map layers ' ;
2010-01-22 15:18:23 +01:00
-- -----------------------------------------------------
-- Table `tgis_map_layer_has_tagente`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS ` tgis_map_layer_has_tagente ` (
2022-02-02 12:32:33 +01:00
` tgis_map_layer_id_tmap_layer ` INT NOT NULL ,
` tagente_id_agente ` INT UNSIGNED NOT NULL ,
PRIMARY KEY ( ` tgis_map_layer_id_tmap_layer ` , ` tagente_id_agente ` ) ,
INDEX ` fk_tgis_map_layer_has_tagente_tgis_map_layer1 ` ( ` tgis_map_layer_id_tmap_layer ` ASC ) ,
INDEX ` fk_tgis_map_layer_has_tagente_tagente1 ` ( ` tagente_id_agente ` ASC ) ,
2022-02-01 13:49:32 +01:00
CONSTRAINT ` fk_tgis_map_layer_has_tagente_tgis_map_layer1 `
FOREIGN KEY ( ` tgis_map_layer_id_tmap_layer ` )
REFERENCES ` tgis_map_layer ` ( ` id_tmap_layer ` )
ON DELETE CASCADE
ON UPDATE NO ACTION ,
CONSTRAINT ` fk_tgis_map_layer_has_tagente_tagente1 `
FOREIGN KEY ( ` tagente_id_agente ` )
REFERENCES ` tagente ` ( ` id_agente ` )
ON DELETE CASCADE
ON UPDATE NO ACTION
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 COMMENT = ' Table to define wich agents are shown in a layer ' ;
2010-01-22 15:18:23 +01:00
2018-08-17 11:07:42 +02:00
-- -----------------------------------------------------
-- Table `tgis_map_layer_groups`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS ` tgis_map_layer_groups ` (
2022-02-01 13:49:32 +01:00
` layer_id ` INT NOT NULL ,
` group_id ` MEDIUMINT UNSIGNED NOT NULL ,
` agent_id ` INT UNSIGNED NOT NULL COMMENT ' Used to link the position to the group ' ,
PRIMARY KEY ( ` layer_id ` , ` group_id ` ) ,
FOREIGN KEY ( ` layer_id ` )
REFERENCES ` tgis_map_layer ` ( ` id_tmap_layer ` )
ON DELETE CASCADE ,
FOREIGN KEY ( ` group_id ` )
REFERENCES ` tgrupo ` ( ` id_grupo ` )
ON DELETE CASCADE ,
FOREIGN KEY ( ` agent_id ` )
REFERENCES ` tagente ` ( ` id_agente ` )
ON DELETE CASCADE
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2018-08-17 11:07:42 +02:00
2012-12-09 23:31:29 +01:00
-- ----------------------------------------------------------------------
2010-02-10 18:10:10 +01:00
-- Table `tgroup_stat`
2012-12-09 23:31:29 +01:00
-- ----------------------------------------------------------------------
2010-02-10 18:10:10 +01:00
CREATE TABLE IF NOT EXISTS ` tgroup_stat ` (
2022-02-01 13:49:32 +01:00
` id_group ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` modules ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` normal ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` critical ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` warning ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` unknown ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` non - init ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` alerts ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` alerts_fired ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` agents ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` agents_unknown ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` utimestamp ` INT UNSIGNED NOT NULL DEFAULT 0 ,
PRIMARY KEY ( ` id_group ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 COMMENT = ' Table to store global system stats per group ' ;
2010-02-10 18:10:10 +01:00
2012-12-09 23:31:29 +01:00
-- ----------------------------------------------------------------------
2010-07-30 11:03:23 +02:00
-- Table `tnetwork_map`
2012-12-09 23:31:29 +01:00
-- ----------------------------------------------------------------------
2010-07-30 11:03:23 +02:00
CREATE TABLE IF NOT EXISTS ` tnetwork_map ` (
2022-02-01 13:49:32 +01:00
` id_networkmap ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
2022-06-08 11:49:48 +02:00
` id_user ` VARCHAR ( 255 ) NOT NULL ,
2022-02-01 13:49:32 +01:00
` name ` VARCHAR ( 100 ) NOT NULL ,
` type ` VARCHAR ( 20 ) NOT NULL ,
` layout ` VARCHAR ( 20 ) NOT NULL ,
` nooverlap ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
` simple ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
` regenerate ` TINYINT UNSIGNED NOT NULL DEFAULT 1 ,
` font_size ` INT UNSIGNED NOT NULL DEFAULT 12 ,
` id_group ` INT NOT NULL DEFAULT 0 ,
` id_module_group ` INT NOT NULL DEFAULT 0 ,
` id_policy ` INT NOT NULL DEFAULT 0 ,
` depth ` VARCHAR ( 20 ) NOT NULL ,
` only_modules_with_alerts ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
` hide_policy_modules ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
` zoom ` DOUBLE NOT NULL DEFAULT 1 ,
` distance_nodes ` DOUBLE NOT NULL DEFAULT 2 . 5 ,
` center ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` contracted_nodes ` TEXT ,
` show_snmp_modules ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
` text_filter ` VARCHAR ( 100 ) NOT NULL DEFAULT ' ' ,
` dont_show_subgroups ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
` pandoras_children ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
` show_groups ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
` show_modules ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
` id_agent ` INT NOT NULL DEFAULT 0 ,
` server_name ` VARCHAR ( 100 ) NOT NULL ,
` show_modulegroup ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
` l2_network ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
` id_tag ` INT DEFAULT 0 ,
` store_group ` INT DEFAULT 0 ,
PRIMARY KEY ( ` id_networkmap ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2010-07-30 11:03:23 +02:00
2012-12-09 23:31:29 +01:00
-- ----------------------------------------------------------------------
2010-08-12 14:23:25 +02:00
-- Table `tsnmp_filter`
2012-12-09 23:31:29 +01:00
-- ----------------------------------------------------------------------
2010-08-25 14:04:42 +02:00
CREATE TABLE IF NOT EXISTS ` tsnmp_filter ` (
2022-02-01 13:49:32 +01:00
` id_snmp_filter ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` description ` VARCHAR ( 255 ) DEFAULT ' ' ,
` filter ` VARCHAR ( 255 ) DEFAULT ' ' ,
` unified_filters_id ` INT NOT NULL DEFAULT 0 ,
PRIMARY KEY ( ` id_snmp_filter ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2010-02-10 18:10:10 +01:00
2012-12-09 23:31:29 +01:00
-- ----------------------------------------------------------------------
2010-08-25 14:04:42 +02:00
-- Table `tagent_custom_fields`
2012-12-09 23:31:29 +01:00
-- ----------------------------------------------------------------------
2010-08-25 14:04:42 +02:00
CREATE TABLE IF NOT EXISTS ` tagent_custom_fields ` (
2022-02-01 13:49:32 +01:00
` id_field ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` name ` VARCHAR ( 45 ) NOT NULL DEFAULT ' ' ,
` display_on_front ` TINYINT NOT NULL DEFAULT 0 ,
` is_password_type ` TINYINT NOT NULL DEFAULT 0 ,
2022-02-01 15:11:59 +01:00
` combo_values ` TEXT ,
2022-11-16 10:28:50 +01:00
` is_link_enabled ` TINYINT ( 1 ) NOT NULL DEFAULT 0 ,
2022-02-01 13:49:32 +01:00
PRIMARY KEY ( ` id_field ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2010-08-25 14:04:42 +02:00
2012-12-09 23:31:29 +01:00
-- ----------------------------------------------------------------------
2010-08-25 14:04:42 +02:00
-- Table `tagent_custom_data`
2012-12-09 23:31:29 +01:00
-- ----------------------------------------------------------------------
2010-08-25 14:04:42 +02:00
CREATE TABLE IF NOT EXISTS ` tagent_custom_data ` (
2022-02-01 13:49:32 +01:00
` id_field ` INT UNSIGNED NOT NULL ,
` id_agent ` INT UNSIGNED NOT NULL ,
` description ` TEXT ,
FOREIGN KEY ( ` id_field ` ) REFERENCES tagent_custom_fields ( ` id_field ` )
ON UPDATE CASCADE ON DELETE CASCADE ,
FOREIGN KEY ( ` id_agent ` ) REFERENCES tagente ( ` id_agente ` )
ON UPDATE CASCADE ON DELETE CASCADE ,
PRIMARY KEY ( ` id_field ` , ` id_agent ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2011-05-26 12:51:17 +02:00
2012-12-09 23:31:29 +01:00
-- ----------------------------------------------------------------------
2011-05-26 12:51:17 +02:00
-- Table `ttag`
2012-12-09 23:31:29 +01:00
-- ----------------------------------------------------------------------
2011-05-26 12:51:17 +02:00
CREATE TABLE IF NOT EXISTS ` ttag ` (
2022-02-01 13:49:32 +01:00
` id_tag ` INT unsigned NOT NULL AUTO_INCREMENT ,
2022-02-01 15:11:59 +01:00
` name ` TEXT ,
` description ` TEXT ,
2022-02-02 12:30:02 +01:00
` url ` MEDIUMTEXT ,
2022-02-01 13:49:32 +01:00
` email ` TEXT NULL ,
` phone ` TEXT NULL ,
` previous_name ` TEXT NULL ,
2023-01-24 12:10:40 +01:00
PRIMARY KEY ( ` id_tag ` ) ,
INDEX ` ttag_name ` ( name ( 15 ) )
2022-02-01 13:49:32 +01:00
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2011-05-26 12:51:17 +02:00
-- -----------------------------------------------------
-- Table `ttag_module`
-- -----------------------------------------------------
2014-12-10 13:36:42 +01:00
CREATE TABLE IF NOT EXISTS ` ttag_module ` (
2022-02-01 13:49:32 +01:00
` id_tag ` INT NOT NULL ,
` id_agente_modulo ` INT NOT NULL DEFAULT 0 ,
` id_policy_module ` INT NOT NULL DEFAULT 0 ,
PRIMARY KEY ( id_tag , id_agente_modulo ) ,
KEY ` idx_id_agente_modulo ` ( ` id_agente_modulo ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2011-05-26 12:51:17 +02:00
2012-11-13 17:06:21 +01:00
-- ---------------------------------------------------------------------
2011-05-26 12:51:17 +02:00
-- Table `ttag_policy_module`
2012-11-13 17:06:21 +01:00
-- ---------------------------------------------------------------------
2011-05-26 12:51:17 +02:00
CREATE TABLE IF NOT EXISTS ` ttag_policy_module ` (
2022-02-01 13:49:32 +01:00
` id_tag ` INT NOT NULL ,
` id_policy_module ` INT NOT NULL DEFAULT 0 ,
PRIMARY KEY ( id_tag , id_policy_module ) ,
KEY ` idx_id_policy_module ` ( ` id_policy_module ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2011-05-26 12:51:17 +02:00
2012-11-13 17:06:21 +01:00
-- ---------------------------------------------------------------------
2011-12-21 16:28:01 +01:00
-- Table `tnetflow_filter`
2012-11-13 17:06:21 +01:00
-- ---------------------------------------------------------------------
2011-12-21 16:28:01 +01:00
CREATE TABLE IF NOT EXISTS ` tnetflow_filter ` (
2022-02-01 13:49:32 +01:00
` id_sg ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` id_name ` VARCHAR ( 600 ) NOT NULL DEFAULT ' 0 ' ,
` id_group ` INT ,
2022-02-01 15:11:59 +01:00
` ip_dst ` TEXT ,
` ip_src ` TEXT ,
` dst_port ` TEXT ,
` src_port ` TEXT ,
` router_ip ` TEXT ,
` advanced_filter ` TEXT ,
` filter_args ` TEXT ,
2022-02-01 13:49:32 +01:00
` aggregate ` VARCHAR ( 60 ) ,
2023-03-14 18:55:43 +01:00
` netflow_monitoring ` TINYINT UNSIGNED NOT NULL default 0 ,
2023-03-14 19:48:49 +01:00
` traffic_max ` INTEGER NOT NULL default 0 ,
2023-03-14 18:55:43 +01:00
` traffic_critical ` FLOAT ( 20 , 2 ) NOT NULL default 0 ,
2023-03-15 09:24:53 +01:00
` traffic_warning ` FLOAT ( 20 , 2 ) NOT NULL default 0 ,
2023-03-21 12:12:54 +01:00
` netflow_monitoring_interval ` INT UNSIGNED NOT NULL DEFAULT 300 ,
2023-03-21 11:28:11 +01:00
` utimestamp ` INT UNSIGNED NOT NULL DEFAULT 0 ,
2022-02-01 13:49:32 +01:00
PRIMARY KEY ( ` id_sg ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2011-12-21 16:28:01 +01:00
2012-11-13 17:06:21 +01:00
-- ---------------------------------------------------------------------
2011-12-21 16:28:01 +01:00
-- Table `tnetflow_report`
2012-11-13 17:06:21 +01:00
-- ---------------------------------------------------------------------
2011-12-21 16:28:01 +01:00
CREATE TABLE IF NOT EXISTS ` tnetflow_report ` (
2022-02-01 13:49:32 +01:00
` id_report ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` id_name ` VARCHAR ( 150 ) NOT NULL DEFAULT ' ' ,
2022-02-01 15:11:59 +01:00
` description ` TEXT ,
2022-02-01 13:49:32 +01:00
` id_group ` INT ,
2022-02-01 15:11:59 +01:00
` server_name ` TEXT ,
2022-02-01 13:49:32 +01:00
PRIMARY KEY ( ` id_report ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2011-12-21 16:28:01 +01:00
2012-10-09 17:51:33 +02:00
-- ---------------------------------------------------------------------
2011-12-21 16:28:01 +01:00
-- Table `tnetflow_report_content`
2012-10-09 17:51:33 +02:00
-- ---------------------------------------------------------------------
2011-12-21 16:28:01 +01:00
CREATE TABLE IF NOT EXISTS ` tnetflow_report_content ` (
2022-02-01 13:49:32 +01:00
` id_rc ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` id_report ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` id_filter ` INT UNSIGNED NOT NULL DEFAULT 0 ,
2022-02-01 15:11:59 +01:00
` description ` TEXT ,
2022-02-01 13:49:32 +01:00
` date ` BIGINT NOT NULL DEFAULT 0 ,
` period ` INT NOT NULL DEFAULT 0 ,
` max ` INT NOT NULL DEFAULT 0 ,
` show_graph ` VARCHAR ( 60 ) ,
` order ` INT NOT NULL DEFAULT 0 ,
PRIMARY KEY ( ` id_rc ` ) ,
FOREIGN KEY ( ` id_report ` ) REFERENCES tnetflow_report ( ` id_report ` )
ON DELETE CASCADE ,
FOREIGN KEY ( ` id_filter ` ) REFERENCES tnetflow_filter ( ` id_sg ` )
ON DELETE CASCADE
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2012-02-20 17:15:34 +01:00
2012-11-07 18:49:31 +01:00
-- ---------------------------------------------------------------------
2012-05-30 14:07:26 +02:00
-- Table `tpassword_history`
2012-11-07 18:49:31 +01:00
-- ---------------------------------------------------------------------
2012-05-30 14:07:26 +02:00
CREATE TABLE IF NOT EXISTS ` tpassword_history ` (
2022-02-01 13:49:32 +01:00
` id_pass ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
2022-06-08 11:49:48 +02:00
` id_user ` VARCHAR ( 255 ) NOT NULL ,
2022-02-01 13:49:32 +01:00
` password ` VARCHAR ( 45 ) DEFAULT NULL ,
` date_begin ` DATETIME ,
` date_end ` DATETIME ,
PRIMARY KEY ( ` id_pass ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2012-10-09 18:08:18 +02:00
-- ---------------------------------------------------------------------
-- Table `tevent_response`
-- ---------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS ` tevent_response ` (
2022-02-01 13:49:32 +01:00
` id ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` name ` VARCHAR ( 600 ) NOT NULL DEFAULT ' ' ,
2022-02-01 15:11:59 +01:00
` description ` TEXT ,
` target ` TEXT ,
2022-02-01 13:49:32 +01:00
` type ` VARCHAR ( 60 ) NOT NULL ,
` id_group ` MEDIUMINT NOT NULL DEFAULT 0 ,
` modal_width ` INT NOT NULL DEFAULT 0 ,
` modal_height ` INT NOT NULL DEFAULT 0 ,
` new_window ` TINYINT NOT NULL DEFAULT 0 ,
` params ` TEXT NOT NULL ,
` server_to_exec ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` command_timeout ` INT UNSIGNED NOT NULL DEFAULT 90 ,
2022-02-01 15:16:21 +01:00
` display_command ` TINYINT DEFAULT 0 ,
2022-02-01 13:49:32 +01:00
PRIMARY KEY ( ` id ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2012-12-05 13:55:44 +01:00
2012-12-09 23:31:29 +01:00
-- ----------------------------------------------------------------------
2012-12-05 13:55:44 +01:00
-- Table `tcategory`
2012-12-09 23:31:29 +01:00
-- ----------------------------------------------------------------------
2012-12-05 13:55:44 +01:00
CREATE TABLE IF NOT EXISTS ` tcategory ` (
2022-02-01 13:49:32 +01:00
` id ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` name ` VARCHAR ( 600 ) NOT NULL DEFAULT ' ' ,
PRIMARY KEY ( ` id ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2012-12-10 16:52:51 +01:00
-- ---------------------------------------------------------------------
-- Table `tupdate_settings`
-- ---------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS ` tupdate_settings ` (
2022-02-01 13:49:32 +01:00
` key ` VARCHAR ( 255 ) DEFAULT ' ' ,
` value ` VARCHAR ( 255 ) DEFAULT ' ' , PRIMARY KEY ( ` key ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2012-12-10 16:52:51 +01:00
-- ---------------------------------------------------------------------
-- Table `tupdate_journal`
-- ---------------------------------------------------------------------
2022-03-30 14:41:47 +02:00
CREATE TABLE ` tupdate_journal ` (
` id ` SERIAL ,
` utimestamp ` BIGINT DEFAULT 0 ,
` version ` VARCHAR ( 25 ) DEFAULT ' ' ,
` type ` VARCHAR ( 25 ) DEFAULT ' ' ,
` origin ` VARCHAR ( 25 ) DEFAULT ' ' ,
2022-06-08 11:49:48 +02:00
` id_user ` VARCHAR ( 255 ) NOT NULL DEFAULT ' '
2022-02-01 13:49:32 +01:00
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2014-03-31 17:00:16 +02:00
-- ---------------------------------------------------------------------
-- Table `talert_snmp_action`
-- ---------------------------------------------------------------------
2018-03-05 12:39:56 +01:00
CREATE TABLE IF NOT EXISTS ` talert_snmp_action ` (
2022-02-01 13:49:32 +01:00
` id ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` id_alert_snmp ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` alert_type ` INT UNSIGNED NOT NULL DEFAULT 0 ,
2022-02-01 15:11:59 +01:00
` al_field1 ` TEXT ,
` al_field2 ` TEXT ,
` al_field3 ` TEXT ,
` al_field4 ` TEXT ,
` al_field5 ` TEXT ,
` al_field6 ` TEXT ,
` al_field7 ` TEXT ,
` al_field8 ` TEXT ,
` al_field9 ` TEXT ,
` al_field10 ` TEXT ,
` al_field11 ` TEXT ,
` al_field12 ` TEXT ,
` al_field13 ` TEXT ,
` al_field14 ` TEXT ,
` al_field15 ` TEXT ,
` al_field16 ` TEXT ,
` al_field17 ` TEXT ,
` al_field18 ` TEXT ,
` al_field19 ` TEXT ,
` al_field20 ` TEXT ,
2022-02-01 13:49:32 +01:00
PRIMARY KEY ( ` id ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2015-04-13 11:27:23 +02:00
-- ---------------------------------------------------------------------
-- Table `tsessions_php`
-- ---------------------------------------------------------------------
2018-03-05 12:39:56 +01:00
CREATE TABLE IF NOT EXISTS ` tsessions_php ` (
2022-02-01 13:49:32 +01:00
` id_session ` CHAR ( 52 ) NOT NULL ,
` last_active ` INT NOT NULL ,
` data ` TEXT ,
PRIMARY KEY ( ` id_session ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2016-02-01 09:58:35 +01:00
-- ---------------------------------------------------------------------
-- Table `tmap`
-- ---------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS ` tmap ` (
2022-02-01 13:49:32 +01:00
` id ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
2023-02-15 11:56:29 +01:00
` id_group ` TEXT NOT NULL DEFAULT ' ' ,
2022-06-08 11:49:48 +02:00
` id_user ` VARCHAR ( 255 ) NOT NULL DEFAULT ' ' ,
2022-02-01 13:49:32 +01:00
` type ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` subtype ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` name ` VARCHAR ( 250 ) DEFAULT ' ' ,
` description ` TEXT ,
` height ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` width ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` center_x ` INT NOT NULL DEFAULT 0 ,
` center_y ` INT NOT NULL DEFAULT 0 ,
` background ` VARCHAR ( 250 ) DEFAULT ' ' ,
` background_options ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` source_period ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` source ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` source_data ` VARCHAR ( 250 ) DEFAULT ' ' ,
` generation_method ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` generated ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` filter ` TEXT ,
` id_group_map ` INT UNSIGNED NOT NULL DEFAULT 0 ,
2022-08-29 09:39:47 +02:00
` refresh_time ` INT UNSIGNED NOT NULL DEFAULT 0 ,
2022-02-01 13:49:32 +01:00
PRIMARY KEY ( ` id ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2016-02-01 09:58:35 +01:00
-- ---------------------------------------------------------------------
-- Table `titem`
-- ---------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS ` titem ` (
2022-02-01 13:49:32 +01:00
` id ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` id_map ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` x ` INT NOT NULL DEFAULT 0 ,
` y ` INT NOT NULL DEFAULT 0 ,
` z ` INT NOT NULL DEFAULT 0 ,
` deleted ` INT unsigned NOT NULL DEFAULT 0 ,
` type ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` refresh ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` source ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` source_data ` VARCHAR ( 250 ) DEFAULT ' ' ,
` options ` TEXT ,
` style ` TEXT ,
PRIMARY KEY ( ` id ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2016-02-01 09:58:35 +01:00
-- ---------------------------------------------------------------------
-- Table `trel_item`
-- ---------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS ` trel_item ` (
2022-02-01 13:49:32 +01:00
` id ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` id_parent ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` id_child ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` id_map ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` id_parent_source_data ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` id_child_source_data ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` parent_type ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` child_type ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` id_item ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` deleted ` INT UNSIGNED NOT NULL DEFAULT 0 ,
PRIMARY KEY ( ` id ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2017-03-03 10:27:52 +01:00
-- -----------------------------------------------------
-- Table `tlocal_component`
-- -----------------------------------------------------
-- tlocal_component is a repository of local modules for
-- physical agents on Windows / Unix physical agents
CREATE TABLE IF NOT EXISTS ` tlocal_component ` (
2022-02-01 13:49:32 +01:00
` id ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
2022-02-01 15:11:59 +01:00
` name ` TEXT ,
2022-02-02 12:30:02 +01:00
` data ` MEDIUMTEXT ,
2022-02-01 13:49:32 +01:00
` description ` VARCHAR ( 1024 ) DEFAULT NULL ,
` id_os ` INT UNSIGNED DEFAULT 0 ,
` os_version ` VARCHAR ( 100 ) DEFAULT ' ' ,
` id_network_component_group ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` type ` SMALLINT NOT NULL DEFAULT 6 ,
` max ` BIGINT NOT NULL DEFAULT 0 ,
` min ` BIGINT NOT NULL DEFAULT 0 ,
` module_interval ` MEDIUMINT UNSIGNED NOT NULL DEFAULT 0 ,
` id_module_group ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
` history_data ` TINYINT UNSIGNED DEFAULT 1 ,
` min_warning ` DOUBLE DEFAULT 0 ,
` max_warning ` DOUBLE DEFAULT 0 ,
` str_warning ` TEXT ,
` min_critical ` DOUBLE DEFAULT 0 ,
` max_critical ` DOUBLE DEFAULT 0 ,
` str_critical ` TEXT ,
` min_ff_event ` INT UNSIGNED DEFAULT 0 ,
` post_process ` DOUBLE DEFAULT 0 ,
` unit ` TEXT ,
` wizard_level ` ENUM ( ' basic ' , ' advanced ' , ' nowizard ' ) DEFAULT ' nowizard ' ,
` macros ` TEXT ,
2022-02-01 15:11:59 +01:00
` critical_instructions ` TEXT ,
` warning_instructions ` TEXT ,
` unknown_instructions ` TEXT ,
2022-02-01 13:49:32 +01:00
` critical_inverse ` TINYINT UNSIGNED DEFAULT 0 ,
` warning_inverse ` TINYINT UNSIGNED DEFAULT 0 ,
` id_category ` INT DEFAULT 0 ,
2022-02-01 15:11:59 +01:00
` tags ` TEXT ,
` disabled_types_event ` TEXT ,
2022-02-01 13:49:32 +01:00
` min_ff_event_normal ` INT UNSIGNED DEFAULT 0 ,
` min_ff_event_warning ` INT UNSIGNED DEFAULT 0 ,
` min_ff_event_critical ` INT UNSIGNED DEFAULT 0 ,
` ff_type ` TINYINT UNSIGNED DEFAULT 0 ,
` each_ff ` TINYINT UNSIGNED DEFAULT 0 ,
` ff_timeout ` INT UNSIGNED DEFAULT 0 ,
` dynamic_interval ` INT UNSIGNED DEFAULT 0 ,
` dynamic_max ` INT DEFAULT 0 ,
` dynamic_min ` INT DEFAULT 0 ,
` dynamic_next ` BIGINT NOT NULL DEFAULT 0 ,
` dynamic_two_tailed ` TINYINT UNSIGNED DEFAULT 0 ,
` prediction_sample_window ` INT DEFAULT 0 ,
` prediction_samples ` INT DEFAULT 0 ,
` prediction_threshold ` INT DEFAULT 0 ,
` percentage_critical ` TINYINT UNSIGNED DEFAULT 0 ,
` percentage_warning ` TINYINT UNSIGNED DEFAULT 0 ,
2022-10-21 13:10:12 +02:00
` warning_time ` INT UNSIGNED DEFAULT 0 ,
2022-02-01 13:49:32 +01:00
PRIMARY KEY ( ` id ` ) ,
FOREIGN KEY ( ` id_network_component_group ` ) REFERENCES tnetwork_component_group ( ` id_sg ` )
ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2017-03-03 10:27:52 +01:00
-- -----------------------------------------------------
-- Table `tpolicy_modules`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS ` tpolicy_modules ` (
2022-02-01 13:49:32 +01:00
` id ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` id_policy ` INT UNSIGNED NOT NULL DEFAULT 0 ,
2022-02-02 12:30:02 +01:00
` configuration_data ` MEDIUMTEXT ,
2022-02-01 13:49:32 +01:00
` id_tipo_modulo ` SMALLINT NOT NULL DEFAULT 0 ,
` description ` VARCHAR ( 1024 ) NOT NULL DEFAULT ' ' ,
` name ` VARCHAR ( 200 ) NOT NULL DEFAULT ' ' ,
` unit ` TEXT ,
` max ` BIGINT DEFAULT 0 ,
` min ` BIGINT DEFAULT 0 ,
` module_interval ` INT UNSIGNED DEFAULT 0 ,
` ip_target ` VARCHAR ( 100 ) DEFAULT ' ' ,
` tcp_port ` INT UNSIGNED DEFAULT 0 ,
` tcp_send ` TEXT ,
` tcp_rcv ` TEXT ,
` snmp_community ` VARCHAR ( 100 ) DEFAULT ' ' ,
` snmp_oid ` VARCHAR ( 255 ) DEFAULT ' 0 ' ,
` id_module_group ` INT UNSIGNED DEFAULT 0 ,
` flag ` TINYINT UNSIGNED DEFAULT 1 ,
` id_module ` INT DEFAULT 0 ,
` disabled ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
` id_export ` SMALLINT UNSIGNED DEFAULT 0 ,
` plugin_user ` TEXT ,
` plugin_pass ` TEXT ,
` plugin_parameter ` TEXT ,
` id_plugin ` INT DEFAULT 0 ,
` post_process ` DOUBLE DEFAULT 0 ,
` prediction_module ` BIGINT DEFAULT 0 ,
` max_timeout ` INT UNSIGNED DEFAULT 0 ,
` max_retries ` INT UNSIGNED DEFAULT 0 ,
` custom_id ` VARCHAR ( 255 ) DEFAULT ' ' ,
` history_data ` TINYINT UNSIGNED DEFAULT 1 ,
` min_warning ` DOUBLE DEFAULT 0 ,
` max_warning ` DOUBLE DEFAULT 0 ,
` str_warning ` TEXT ,
` min_critical ` DOUBLE DEFAULT 0 ,
` max_critical ` DOUBLE DEFAULT 0 ,
` str_critical ` TEXT ,
` min_ff_event ` INT UNSIGNED DEFAULT 0 ,
` custom_string_1 ` TEXT ,
` custom_string_2 ` TEXT ,
` custom_string_3 ` TEXT ,
` custom_integer_1 ` INT DEFAULT 0 ,
` custom_integer_2 ` INT DEFAULT 0 ,
` pending_delete ` TINYINT DEFAULT 0 ,
2022-02-01 15:11:59 +01:00
` critical_instructions ` TEXT ,
` warning_instructions ` TEXT ,
` unknown_instructions ` TEXT ,
2022-02-01 13:49:32 +01:00
` critical_inverse ` TINYINT UNSIGNED DEFAULT 0 ,
` warning_inverse ` TINYINT UNSIGNED DEFAULT 0 ,
` id_category ` INT DEFAULT 0 ,
` module_ff_interval ` INT UNSIGNED DEFAULT 0 ,
` quiet ` TINYINT NOT NULL DEFAULT 0 ,
` cron_interval ` VARCHAR ( 100 ) DEFAULT ' ' ,
` macros ` TEXT ,
2022-02-01 15:11:59 +01:00
` disabled_types_event ` TEXT ,
` module_macros ` TEXT ,
2022-02-01 13:49:32 +01:00
` min_ff_event_normal ` INT UNSIGNED DEFAULT 0 ,
` min_ff_event_warning ` INT UNSIGNED DEFAULT 0 ,
` min_ff_event_critical ` INT UNSIGNED DEFAULT 0 ,
` ff_type ` TINYINT UNSIGNED DEFAULT 0 ,
` each_ff ` TINYINT UNSIGNED DEFAULT 0 ,
` ff_timeout ` INT UNSIGNED DEFAULT 0 ,
` dynamic_interval ` INT UNSIGNED DEFAULT 0 ,
` dynamic_max ` INT DEFAULT 0 ,
` dynamic_min ` INT DEFAULT 0 ,
` dynamic_next ` BIGINT NOT NULL DEFAULT 0 ,
` dynamic_two_tailed ` TINYINT UNSIGNED DEFAULT 0 ,
` prediction_sample_window ` INT DEFAULT 0 ,
` prediction_samples ` INT DEFAULT 0 ,
` prediction_threshold ` INT DEFAULT 0 ,
` cps ` INT NOT NULL DEFAULT 0 ,
` percentage_warning ` TINYINT UNSIGNED DEFAULT 0 ,
` percentage_critical ` TINYINT UNSIGNED DEFAULT 0 ,
2022-10-21 13:10:12 +02:00
` warning_time ` INT UNSIGNED DEFAULT 0 ,
2022-02-01 13:49:32 +01:00
PRIMARY KEY ( ` id ` ) ,
KEY ` main_idx ` ( ` id_policy ` ) ,
UNIQUE ( ` id_policy ` , ` name ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2017-03-03 10:27:52 +01:00
-- ---------------------------------------------------------------------
-- Table `tpolicies`
-- ---------------------------------------------------------------------
-- 'status' could be 0 (without changes, updated), 1 (needy update only database) or 2 (needy update database and conf files)
CREATE TABLE IF NOT EXISTS ` tpolicies ` (
2022-02-01 13:49:32 +01:00
` id ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
2022-02-01 15:11:59 +01:00
` name ` TEXT ,
2022-02-01 13:49:32 +01:00
` description ` VARCHAR ( 255 ) NOT NULL DEFAULT ' ' ,
` id_group ` INT UNSIGNED DEFAULT 0 ,
` status ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` force_apply ` TINYINT DEFAULT 0 ,
2022-09-23 09:58:37 +02:00
` apply_to_secondary_groups ` TINYINT NOT NULL DEFAULT 0 ,
2022-02-01 13:49:32 +01:00
PRIMARY KEY ( ` id ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2017-03-03 10:27:52 +01:00
-- -----------------------------------------------------
-- Table `tpolicy_alerts`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS ` tpolicy_alerts ` (
2022-02-01 13:49:32 +01:00
` id ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` id_policy ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` id_policy_module ` INT UNSIGNED DEFAULT 0 ,
` id_alert_template ` INT UNSIGNED DEFAULT 0 ,
2022-02-01 15:11:59 +01:00
` name_extern_module ` TEXT ,
2022-02-01 13:49:32 +01:00
` disabled ` TINYINT DEFAULT 0 ,
` standby ` TINYINT DEFAULT 0 ,
` pending_delete ` TINYINT DEFAULT 0 ,
PRIMARY KEY ( ` id ` ) ,
FOREIGN KEY ( ` id_alert_template ` ) REFERENCES talert_templates ( ` id ` )
ON DELETE CASCADE ON UPDATE CASCADE ,
FOREIGN KEY ( ` id_policy ` ) REFERENCES tpolicies ( ` id ` )
ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2017-03-03 10:27:52 +01:00
-- -----------------------------------------------------
-- Table `tpolicy_agents`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS ` tpolicy_agents ` (
2022-02-01 13:49:32 +01:00
` id ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` id_policy ` INT UNSIGNED DEFAULT 0 ,
` id_agent ` INT UNSIGNED DEFAULT 0 ,
` policy_applied ` TINYINT UNSIGNED DEFAULT 0 ,
` pending_delete ` TINYINT UNSIGNED DEFAULT 0 ,
` last_apply_utimestamp ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` id_node ` INT NOT NULL DEFAULT 0 ,
PRIMARY KEY ( ` id ` ) ,
UNIQUE ( ` id_policy ` , ` id_agent ` , ` id_node ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2017-03-03 10:27:52 +01:00
2017-07-11 10:10:48 +02:00
-- -----------------------------------------------------
-- Table `tpolicy_groups`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS ` tpolicy_groups ` (
2022-02-01 13:49:32 +01:00
` id ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` id_policy ` INT UNSIGNED DEFAULT 0 ,
` id_group ` INT UNSIGNED DEFAULT 0 ,
` policy_applied ` TINYINT UNSIGNED DEFAULT 0 ,
` pending_delete ` TINYINT UNSIGNED DEFAULT 0 ,
` last_apply_utimestamp ` INT UNSIGNED NOT NULL DEFAULT 0 ,
PRIMARY KEY ( ` id ` ) ,
UNIQUE ( ` id_policy ` , ` id_group ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2017-07-11 10:10:48 +02:00
2022-02-08 22:52:54 +01:00
-- -----------------------------------------------------
-- Table `tpolicy_group_agents`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS ` tpolicy_group_agents ` (
` id ` SERIAL ,
` id_policy ` INT UNSIGNED ,
` id_agent ` INT UNSIGNED ,
` direct ` TINYINT UNSIGNED DEFAULT 0 ,
FOREIGN KEY ( ` id_policy ` ) REFERENCES ` tpolicies ` ( ` id ` )
ON DELETE CASCADE ON UPDATE CASCADE ,
FOREIGN KEY ( ` id_agent ` ) REFERENCES ` tagente ` ( ` id_agente ` )
ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE = InnoDB DEFAULT CHARSET = utf8 ;
2017-03-03 10:27:52 +01:00
-- ---------------------------------------------------------------------
-- Table `tdashboard`
-- ---------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS ` tdashboard ` (
2022-02-01 13:49:32 +01:00
` id ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
2022-05-25 13:13:09 +02:00
` name ` TEXT NOT NULL DEFAULT ' ' ,
2022-06-08 11:49:48 +02:00
` id_user ` VARCHAR ( 255 ) NOT NULL DEFAULT ' ' ,
2022-02-01 13:49:32 +01:00
` id_group ` INT NOT NULL DEFAULT 0 ,
` active ` TINYINT NOT NULL DEFAULT 0 ,
` cells ` INT UNSIGNED DEFAULT 0 ,
` cells_slideshow ` TINYINT NOT NULL DEFAULT 0 ,
PRIMARY KEY ( ` id ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2017-03-03 10:27:52 +01:00
2018-05-16 15:26:28 +02:00
-- ---------------------------------------------------------------------
-- Table `tdatabase`
-- ---------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS ` tdatabase ` (
2022-02-01 13:49:32 +01:00
` id ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` host ` VARCHAR ( 255 ) DEFAULT ' ' ,
` label ` VARCHAR ( 255 ) DEFAULT ' ' ,
` os_port ` INT UNSIGNED NOT NULL DEFAULT 22 ,
` os_user ` VARCHAR ( 255 ) DEFAULT ' ' ,
` db_port ` INT UNSIGNED NOT NULL DEFAULT 3306 ,
` status ` TINYINT UNSIGNED DEFAULT 0 ,
` action ` TINYINT UNSIGNED DEFAULT 0 ,
` ssh_key ` TEXT ,
` ssh_pubkey ` TEXT ,
2023-03-03 10:15:02 +01:00
` ssh_status ` TINYINT UNSIGNED DEFAULT 0 ,
2022-02-01 13:49:32 +01:00
` last_error ` TEXT ,
2023-03-03 10:15:02 +01:00
` db_status ` TINYINT UNSIGNED DEFAULT 0 ,
` replication_status ` TINYINT UNSIGNED DEFAULT 0 ,
` replication_delay ` BIGINT DEFAULT 0 ,
` master ` TINYINT UNSIGNED DEFAULT 0 ,
` utimestamp ` BIGINT DEFAULT 0 ,
` mysql_version ` VARCHAR ( 10 ) DEFAULT ' ' ,
` pandora_version ` VARCHAR ( 10 ) DEFAULT ' ' ,
2022-02-01 13:49:32 +01:00
PRIMARY KEY ( ` id ` )
2023-03-03 10:15:02 +01:00
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2018-05-16 15:26:28 +02:00
2017-03-03 10:27:52 +01:00
-- -----------------------------------------------------
-- Table `twidget`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS ` twidget ` (
2022-02-01 13:49:32 +01:00
` id ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` class_name ` VARCHAR ( 60 ) NOT NULL DEFAULT ' ' ,
` unique_name ` VARCHAR ( 60 ) NOT NULL DEFAULT ' ' ,
2022-02-01 15:11:59 +01:00
` description ` TEXT ,
` options ` TEXT ,
2022-02-01 13:49:32 +01:00
` page ` VARCHAR ( 120 ) NOT NULL DEFAULT ' ' ,
PRIMARY KEY ( ` id ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2017-03-03 10:27:52 +01:00
-- -----------------------------------------------------
-- Table `twidget_dashboard`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS ` twidget_dashboard ` (
2022-02-01 13:49:32 +01:00
` id ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
2022-02-01 15:11:59 +01:00
` position ` TEXT ,
` options ` LONGTEXT ,
2022-02-01 13:49:32 +01:00
` order ` INT NOT NULL DEFAULT 0 ,
` id_dashboard ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` id_widget ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` prop_width ` DOUBLE NOT NULL DEFAULT 0 . 32 ,
` prop_height ` DOUBLE NOT NULL DEFAULT 0 . 32 ,
PRIMARY KEY ( ` id ` ) ,
FOREIGN KEY ( ` id_dashboard ` ) REFERENCES tdashboard ( ` id ` )
ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2017-03-03 10:27:52 +01:00
-- -----------------------------------------------------
-- Table `tmodule_inventory`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS ` tmodule_inventory ` (
2022-02-01 13:49:32 +01:00
` id_module_inventory ` INT NOT NULL AUTO_INCREMENT ,
` id_os ` INT UNSIGNED DEFAULT NULL ,
` name ` TEXT ,
` description ` TEXT ,
` interpreter ` VARCHAR ( 100 ) DEFAULT ' ' ,
` data_format ` TEXT ,
` code ` BLOB NOT NULL ,
` block_mode ` INT NOT NULL DEFAULT 0 ,
2022-09-26 15:30:31 +02:00
` script_mode ` INT NOT NULL DEFAULT 1 ,
` script_path ` VARCHAR ( 1000 ) DEFAULT ' ' ,
2022-02-01 13:49:32 +01:00
PRIMARY KEY ( ` id_module_inventory ` ) ,
FOREIGN KEY ( ` id_os ` ) REFERENCES tconfig_os ( ` id_os ` )
ON UPDATE CASCADE ON DELETE CASCADE
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2017-03-03 10:27:52 +01:00
-- ---------------------------------------------------------------------
-- Table `tagent_module_inventory`
-- ---------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS ` tagent_module_inventory ` (
2022-02-01 13:49:32 +01:00
` id_agent_module_inventory ` INT NOT NULL AUTO_INCREMENT ,
` id_agente ` INT UNSIGNED NOT NULL ,
` id_module_inventory ` INT NOT NULL ,
` target ` VARCHAR ( 100 ) DEFAULT ' ' ,
` interval ` INT UNSIGNED NOT NULL DEFAULT 3600 ,
` username ` VARCHAR ( 100 ) DEFAULT ' ' ,
` password ` VARCHAR ( 100 ) DEFAULT ' ' ,
` data ` MEDIUMBLOB NOT NULL ,
` timestamp ` DATETIME DEFAULT ' 1970-01-01 00:00:00 ' ,
` utimestamp ` BIGINT DEFAULT 0 ,
` flag ` TINYINT UNSIGNED DEFAULT 1 ,
` id_policy_module_inventory ` INT NOT NULL DEFAULT 0 ,
` custom_fields ` MEDIUMBLOB NOT NULL ,
PRIMARY KEY ( ` id_agent_module_inventory ` ) ,
FOREIGN KEY ( ` id_agente ` ) REFERENCES tagente ( ` id_agente ` )
ON UPDATE CASCADE ON DELETE CASCADE ,
FOREIGN KEY ( ` id_module_inventory ` ) REFERENCES tmodule_inventory ( ` id_module_inventory ` )
ON UPDATE CASCADE ON DELETE CASCADE
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2017-03-03 10:27:52 +01:00
2020-12-04 10:31:22 +01:00
-- ---------------------------------------------------------------------
-- Table `tinventory_alert`
-- ---------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS ` tinventory_alert ` (
2022-02-01 13:49:32 +01:00
` id ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` id_module_inventory ` INT NOT NULL ,
2022-02-01 15:11:59 +01:00
` actions ` TEXT ,
2022-02-01 13:49:32 +01:00
` id_group ` MEDIUMINT UNSIGNED NULL DEFAULT 0 ,
` condition ` ENUM ( ' WHITE_LIST ' , ' BLACK_LIST ' , ' MATCH ' ) NOT NULL DEFAULT ' WHITE_LIST ' ,
2022-02-01 15:11:59 +01:00
` value ` TEXT ,
` name ` TINYTEXT ,
` description ` TEXT ,
2022-02-01 13:49:32 +01:00
` time_threshold ` INT NOT NULL DEFAULT 0 ,
2022-02-01 15:11:59 +01:00
` last_fired ` TEXT ,
2022-02-01 13:49:32 +01:00
` disable_event ` TINYINT UNSIGNED DEFAULT 0 ,
` enabled ` TINYINT UNSIGNED DEFAULT 1 ,
2022-02-01 15:11:59 +01:00
` alert_groups ` TEXT ,
2022-02-01 13:49:32 +01:00
PRIMARY KEY ( ` id ` ) ,
FOREIGN KEY ( ` id_module_inventory ` ) REFERENCES tmodule_inventory ( ` id_module_inventory ` )
ON DELETE CASCADE ON UPDATE CASCADE
) engine = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2020-12-04 10:31:22 +01:00
2017-03-03 10:27:52 +01:00
-- ---------------------------------------------------------------------
-- Table `tpolicy_modules_inventory`
-- ---------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS ` tpolicy_modules_inventory ` (
2022-02-01 13:49:32 +01:00
` id ` INT NOT NULL AUTO_INCREMENT ,
` id_policy ` INT UNSIGNED NOT NULL ,
` id_module_inventory ` INT NOT NULL ,
` interval ` INT UNSIGNED NOT NULL DEFAULT 3600 ,
` username ` VARCHAR ( 100 ) DEFAULT ' ' ,
` password ` VARCHAR ( 100 ) DEFAULT ' ' ,
` pending_delete ` TINYINT DEFAULT 0 ,
` custom_fields ` MEDIUMBLOB NOT NULL ,
PRIMARY KEY ( ` id ` ) ,
FOREIGN KEY ( ` id_policy ` ) REFERENCES tpolicies ( ` id ` )
ON UPDATE CASCADE ON DELETE CASCADE ,
FOREIGN KEY ( ` id_module_inventory ` ) REFERENCES tmodule_inventory ( ` id_module_inventory ` )
ON UPDATE CASCADE ON DELETE CASCADE
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2017-03-03 10:27:52 +01:00
-- -----------------------------------------------------
-- Table `tagente_datos_inventory`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS ` tagente_datos_inventory ` (
2022-02-01 13:49:32 +01:00
` id_agent_module_inventory ` INT NOT NULL ,
` data ` MEDIUMBLOB NOT NULL ,
` utimestamp ` BIGINT DEFAULT 0 ,
` timestamp ` DATETIME DEFAULT ' 1970-01-01 00:00:00 ' ,
KEY ` idx_id_agent_module ` ( ` id_agent_module_inventory ` ) ,
KEY ` idx_utimestamp ` USING BTREE ( ` utimestamp ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2017-03-03 10:27:52 +01:00
-- -----------------------------------------------------
-- Table `ttrap_custom_values`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS ` ttrap_custom_values ` (
2022-02-01 13:49:32 +01:00
` id ` INT NOT NULL AUTO_INCREMENT ,
` oid ` VARCHAR ( 255 ) NOT NULL DEFAULT ' ' ,
` custom_oid ` VARCHAR ( 255 ) NOT NULL DEFAULT ' ' ,
` text ` VARCHAR ( 255 ) DEFAULT ' ' ,
` description ` VARCHAR ( 255 ) DEFAULT ' ' ,
` severity ` TINYINT UNSIGNED NOT NULL DEFAULT 2 ,
CONSTRAINT oid_custom_oid UNIQUE ( oid , custom_oid ) ,
PRIMARY KEY ( ` id ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2017-03-03 10:27:52 +01:00
-- -----------------------------------------------------
-- Table `tmetaconsole_setup`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS ` tmetaconsole_setup ` (
2022-02-01 13:49:32 +01:00
` id ` INT NOT NULL AUTO_INCREMENT ,
` server_name ` TEXT ,
` server_url ` TEXT ,
` dbuser ` TEXT ,
` dbpass ` TEXT ,
` dbhost ` TEXT ,
` dbport ` TEXT ,
` dbname ` TEXT ,
` meta_dbuser ` TEXT ,
` meta_dbpass ` TEXT ,
` meta_dbhost ` TEXT ,
` meta_dbport ` TEXT ,
` meta_dbname ` TEXT ,
` auth_token ` TEXT ,
` id_group ` INT UNSIGNED NOT NULL DEFAULT 0 ,
2022-02-01 15:11:59 +01:00
` api_password ` TEXT ,
2022-02-01 13:49:32 +01:00
` disabled ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
` unified ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
2022-02-01 15:11:59 +01:00
` server_uid ` TEXT ,
2022-02-01 13:49:32 +01:00
PRIMARY KEY ( ` id ` )
2021-03-08 12:20:32 +01:00
) ENGINE = InnoDB
COMMENT = ' Table to store metaconsole sources '
2022-02-01 13:49:32 +01:00
DEFAULT CHARSET = UTF8MB4 ;
2017-03-03 10:27:52 +01:00
-- ---------------------------------------------------------------------
-- Table `tprofile_view`
-- ---------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS ` tprofile_view ` (
2022-02-01 13:49:32 +01:00
` id ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` id_profile ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` sec ` TEXT ,
` sec2 ` TEXT ,
` sec3 ` TEXT ,
PRIMARY KEY ( ` id ` )
2017-03-03 10:27:52 +01:00
) ENGINE = InnoDB
2022-02-01 13:49:32 +01:00
COMMENT = ' 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. '
DEFAULT CHARSET = UTF8MB4 ;
2017-03-03 10:27:52 +01:00
-- ---------------------------------------------------------------------
-- Table `tservice`
-- ---------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS ` tservice ` (
2022-02-01 13:49:32 +01:00
` id ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` name ` VARCHAR ( 100 ) NOT NULL DEFAULT ' ' ,
2022-02-01 15:11:59 +01:00
` description ` TEXT ,
2022-02-01 13:49:32 +01:00
` id_group ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` critical ` DOUBLE NOT NULL DEFAULT 0 ,
` warning ` DOUBLE NOT NULL DEFAULT 0 ,
` unknown_as_critical ` TINYINT NOT NULL DEFAULT 0 ,
` service_interval ` DOUBLE NOT NULL DEFAULT 0 ,
` service_value ` DOUBLE NOT NULL DEFAULT 0 ,
` status ` TINYINT NOT NULL DEFAULT - 1 ,
` utimestamp ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` auto_calculate ` TINYINT UNSIGNED NOT NULL DEFAULT 1 ,
` id_agent_module ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` sla_interval ` DOUBLE NOT NULL DEFAULT 0 ,
` sla_id_module ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` sla_value_id_module ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` sla_limit ` DOUBLE NOT NULL DEFAULT 100 ,
` id_template_alert_warning ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` id_template_alert_critical ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` id_template_alert_unknown ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` id_template_alert_critical_sla ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` quiet ` TINYINT NOT NULL DEFAULT 0 ,
` cps ` INT NOT NULL DEFAULT 0 ,
` cascade_protection ` TINYINT NOT NULL DEFAULT 0 ,
` evaluate_sla ` INT NOT NULL DEFAULT 0 ,
` is_favourite ` TINYINT NOT NULL DEFAULT 0 ,
2022-04-12 17:24:47 +02:00
` enable_sunburst ` TINYINT NOT NULL DEFAULT 0 ,
2022-06-21 16:31:56 +02:00
` asynchronous ` TINYINT NOT NULL DEFAULT 0 ,
` rca ` TEXT ,
2022-02-01 13:49:32 +01:00
PRIMARY KEY ( ` id ` )
2017-03-03 10:27:52 +01:00
) ENGINE = InnoDB
COMMENT = ' Table to define services to monitor '
2022-02-01 13:49:32 +01:00
DEFAULT CHARSET = UTF8MB4 ;
2017-03-03 10:27:52 +01:00
-- ---------------------------------------------------------------------
-- Table `tservice_element`
-- ---------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS ` tservice_element ` (
2022-02-01 13:49:32 +01:00
` id ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` id_service ` INT UNSIGNED NOT NULL ,
` weight_ok ` DOUBLE NOT NULL DEFAULT 0 ,
` weight_warning ` DOUBLE NOT NULL DEFAULT 0 ,
` weight_critical ` DOUBLE NOT NULL DEFAULT 0 ,
` weight_unknown ` DOUBLE NOT NULL DEFAULT 0 ,
2022-02-01 15:11:59 +01:00
` description ` TEXT ,
2022-02-01 13:49:32 +01:00
` id_agente_modulo ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` id_agent ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` id_service_child ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` id_server_meta ` INT unsigned NOT NULL DEFAULT 0 ,
` rules ` TEXT ,
PRIMARY KEY ( ` id ` ) ,
2023-01-24 12:10:40 +01:00
INDEX ` IDX_tservice_element ` ( ` id_service ` , ` id_agente_modulo ` ) ,
INDEX ` tservice_element_service ` ( ` id_service ` ) ,
INDEX ` tservice_element_agent ` ( ` id_agent ` ) ,
INDEX ` tservice_element_am ` ( ` id_agente_modulo ` )
2017-03-03 10:27:52 +01:00
) ENGINE = InnoDB
COMMENT = ' Table to define the modules and the weights of the modules that define a service '
2022-02-01 13:49:32 +01:00
DEFAULT CHARSET = UTF8MB4 ;
2017-03-03 10:27:52 +01:00
-- ---------------------------------------------------------------------
-- Table `tcollection`
-- ---------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS ` tcollection ` (
2022-02-01 13:49:32 +01:00
` id ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` name ` VARCHAR ( 100 ) NOT NULL DEFAULT ' ' ,
` short_name ` VARCHAR ( 100 ) NOT NULL DEFAULT ' ' ,
` id_group ` INT UNSIGNED NOT NULL DEFAULT 0 ,
2022-02-02 12:30:02 +01:00
` description ` MEDIUMTEXT ,
2022-02-01 13:49:32 +01:00
` status ` INT UNSIGNED NOT NULL DEFAULT 0 ,
PRIMARY KEY ( ` id ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2017-03-03 10:27:52 +01:00
-- status: 0 - Not apply
-- status: 1 - Applied
-- ---------------------------------------------------------------------
-- Table `tpolicy_collections`
-- ---------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS ` tpolicy_collections ` (
2022-02-01 13:49:32 +01:00
` id ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` id_policy ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` id_collection ` INT UNSIGNED DEFAULT 0 ,
` pending_delete ` TINYINT DEFAULT 0 ,
PRIMARY KEY ( ` id ` ) ,
FOREIGN KEY ( ` id_policy ` ) REFERENCES ` tpolicies ` ( ` id ` )
ON DELETE CASCADE ON UPDATE CASCADE ,
FOREIGN KEY ( ` id_collection ` ) REFERENCES ` tcollection ` ( ` id ` )
ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2017-03-03 10:27:52 +01:00
-- -----------------------------------------------------
-- Table `tpolicy_alerts_actions`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS ` tpolicy_alerts_actions ` (
2022-02-01 13:49:32 +01:00
` id ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` id_policy_alert ` INT UNSIGNED NOT NULL ,
` id_alert_action ` INT UNSIGNED NOT NULL ,
` fires_min ` INT UNSIGNED DEFAULT 0 ,
` fires_max ` INT UNSIGNED DEFAULT 0 ,
PRIMARY KEY ( ` id ` ) ,
FOREIGN KEY ( ` id_policy_alert ` ) REFERENCES ` tpolicy_alerts ` ( ` id ` )
ON DELETE CASCADE ON UPDATE CASCADE ,
FOREIGN KEY ( ` id_alert_action ` ) REFERENCES ` talert_actions ` ( ` id ` )
ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2017-03-03 10:27:52 +01:00
-- -----------------------------------------------------
-- Table `tpolicy_plugins`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS ` tpolicy_plugins ` (
2022-02-01 13:49:32 +01:00
` id ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` id_policy ` INT UNSIGNED DEFAULT 0 ,
` plugin_exec ` TEXT ,
` pending_delete ` TINYINT DEFAULT 0 ,
PRIMARY KEY ( ` id ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2017-03-03 10:27:52 +01:00
-- -----------------------------------------------------
-- Table `tsesion_extended`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS ` tsesion_extended ` (
2022-02-01 13:49:32 +01:00
` id ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` id_sesion ` INT UNSIGNED NOT NULL ,
` extended_info ` TEXT ,
` hash ` VARCHAR ( 255 ) DEFAULT ' ' ,
PRIMARY KEY ( ` id ` ) ,
KEY idx_session ( id_sesion )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2017-03-03 10:27:52 +01:00
-- -----------------------------------------------------
-- Table `tskin`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS ` tskin ` (
2022-02-01 13:49:32 +01:00
` id ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
2022-02-01 15:11:59 +01:00
` name ` TEXT ,
` relative_path ` TEXT ,
` description ` TEXT ,
2022-02-01 13:49:32 +01:00
` disabled ` TINYINT NOT NULL DEFAULT 0 ,
PRIMARY KEY ( id )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2017-03-03 10:27:52 +01:00
-- ---------------------------------------------------------------------
-- Table `tpolicy_queue`
-- ---------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS ` tpolicy_queue ` (
2022-02-01 13:49:32 +01:00
` id ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` id_policy ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` id_agent ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` operation ` VARCHAR ( 15 ) DEFAULT ' ' ,
` progress ` INT NOT NULL DEFAULT 0 ,
` end_utimestamp ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` priority ` INT UNSIGNED NOT NULL DEFAULT 0 ,
PRIMARY KEY ( ` id ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2017-03-03 10:27:52 +01:00
-- -----------------------------------------------------
-- Table `tevent_rule`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS ` tevent_rule ` (
2022-02-01 13:49:32 +01:00
` id_event_rule ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` id_event_alert ` INT UNSIGNED NOT NULL ,
` operation ` ENUM ( ' NOP ' , ' AND ' , ' OR ' , ' XOR ' , ' NAND ' , ' NOR ' , ' NXOR ' ) ,
` order ` INT UNSIGNED DEFAULT 0 ,
` window ` INT NOT NULL DEFAULT 0 ,
` count ` INT NOT NULL DEFAULT 1 ,
` agent ` TEXT ,
` id_usuario ` TEXT ,
` id_grupo ` TEXT ,
` evento ` TEXT ,
` event_type ` TEXT ,
` module ` TEXT ,
` alert ` TEXT ,
` criticity ` TEXT ,
` user_comment ` TEXT ,
` id_tag ` TEXT ,
` name ` TEXT ,
` group_recursion ` TEXT ,
` log_content ` TEXT ,
` log_source ` TEXT ,
` log_agent ` TEXT ,
` operator_agent ` TEXT COMMENT ' Operator for agent ' ,
` operator_id_usuario ` TEXT COMMENT ' Operator for id_usuario ' ,
` operator_id_grupo ` TEXT COMMENT ' Operator for id_grupo ' ,
` operator_evento ` TEXT COMMENT ' Operator for evento ' ,
` operator_event_type ` TEXT COMMENT ' Operator for event_type ' ,
` operator_module ` TEXT COMMENT ' Operator for module ' ,
` operator_alert ` TEXT COMMENT ' Operator for alert ' ,
` operator_criticity ` TEXT COMMENT ' Operator for criticity ' ,
` operator_user_comment ` TEXT COMMENT ' Operator for user_comment ' ,
` operator_id_tag ` TEXT COMMENT ' Operator for id_tag ' ,
` operator_log_content ` TEXT COMMENT ' Operator for log_content ' ,
` operator_log_source ` TEXT COMMENT ' Operator for log_source ' ,
` operator_log_agent ` TEXT COMMENT ' Operator for log_agent ' ,
PRIMARY KEY ( ` id_event_rule ` ) ,
KEY ` idx_id_event_alert ` ( ` id_event_alert ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2017-03-03 10:27:52 +01:00
-- -----------------------------------------------------
-- Table `tevent_alert`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS ` tevent_alert ` (
2022-02-01 13:49:32 +01:00
` id ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` name ` TEXT ,
2022-02-02 12:30:02 +01:00
` description ` MEDIUMTEXT ,
2022-02-01 13:49:32 +01:00
` order ` INT UNSIGNED DEFAULT 0 ,
` mode ` ENUM ( ' PASS ' , ' DROP ' ) ,
2022-02-01 15:11:59 +01:00
` field1 ` TEXT ,
` field2 ` TEXT ,
` field3 ` TEXT ,
` field4 ` TEXT ,
` field5 ` TEXT ,
` field6 ` TEXT ,
` field7 ` TEXT ,
` field8 ` TEXT ,
` field9 ` TEXT ,
` field10 ` TEXT ,
2022-02-01 13:49:32 +01:00
` time_threshold ` INT NOT NULL DEFAULT 86400 ,
` max_alerts ` INT UNSIGNED NOT NULL DEFAULT 1 ,
` min_alerts ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` time_from ` time DEFAULT ' 00:00:00 ' ,
` time_to ` time DEFAULT ' 00:00:00 ' ,
` monday ` TINYINT DEFAULT 1 ,
` tuesday ` TINYINT DEFAULT 1 ,
` wednesday ` TINYINT DEFAULT 1 ,
` thursday ` TINYINT DEFAULT 1 ,
` friday ` TINYINT DEFAULT 1 ,
` saturday ` TINYINT DEFAULT 1 ,
` sunday ` TINYINT DEFAULT 1 ,
` recovery_notify ` TINYINT DEFAULT 0 ,
2022-06-17 09:00:35 +02:00
` field1_recovery ` TEXT ,
` field2_recovery ` TEXT ,
2022-02-01 15:11:59 +01:00
` field3_recovery ` TEXT ,
2022-06-17 09:00:35 +02:00
` field4_recovery ` TEXT ,
` field5_recovery ` TEXT ,
` field6_recovery ` TEXT ,
` field7_recovery ` TEXT ,
` field8_recovery ` TEXT ,
` field9_recovery ` TEXT ,
` field10_recovery ` TEXT ,
2022-02-01 13:49:32 +01:00
` id_group ` MEDIUMINT UNSIGNED NULL DEFAULT 0 ,
` internal_counter ` INT DEFAULT 0 ,
` last_fired ` BIGINT NOT NULL DEFAULT 0 ,
` last_reference ` BIGINT NOT NULL DEFAULT 0 ,
` times_fired ` INT NOT NULL DEFAULT 0 ,
` disabled ` TINYINT DEFAULT 0 ,
` standby ` TINYINT DEFAULT 0 ,
` priority ` TINYINT DEFAULT 0 ,
` force_execution ` TINYINT DEFAULT 0 ,
` group_by ` enum ( ' ' , ' id_agente ' , ' id_agentmodule ' , ' id_alert_am ' , ' id_grupo ' ) DEFAULT ' ' ,
` special_days ` TINYINT DEFAULT 0 ,
` disable_event ` TINYINT DEFAULT 0 ,
` id_template_conditions ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` id_template_fields ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` last_evaluation ` BIGINT NOT NULL DEFAULT 0 ,
` pool_occurrences ` INT UNSIGNED NOT NULL DEFAULT 0 ,
2022-02-08 13:02:22 +01:00
` schedule ` TEXT ,
2022-02-01 13:49:32 +01:00
PRIMARY KEY ( ` id ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2017-03-03 10:27:52 +01:00
-- -----------------------------------------------------
-- Table `tevent_alert_action`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS ` tevent_alert_action ` (
2022-02-01 13:49:32 +01:00
` id ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` id_event_alert ` INT UNSIGNED NOT NULL ,
` id_alert_action ` INT UNSIGNED NOT NULL ,
` fires_min ` INT UNSIGNED DEFAULT 0 ,
` fires_max ` INT UNSIGNED DEFAULT 0 ,
` module_action_threshold ` INT NOT NULL DEFAULT 0 ,
` last_execution ` BIGINT NOT NULL DEFAULT 0 ,
PRIMARY KEY ( ` id ` ) ,
FOREIGN KEY ( ` id_event_alert ` ) REFERENCES tevent_alert ( ` id ` )
ON DELETE CASCADE ON UPDATE CASCADE ,
FOREIGN KEY ( ` id_alert_action ` ) REFERENCES talert_actions ( ` id ` )
ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2017-03-03 10:27:52 +01:00
-- -----------------------------------------------------
-- Table `tmodule_synth`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS ` tmodule_synth ` (
2022-02-01 13:49:32 +01:00
` id ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` id_agent_module_source ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` id_agent_module_target ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` fixed_value ` DOUBLE NOT NULL DEFAULT 0 ,
` operation ` enum ( ' ADD ' , ' SUB ' , ' DIV ' , ' MUL ' , ' AVG ' , ' NOP ' ) NOT NULL DEFAULT ' NOP ' ,
` order ` INT NOT NULL DEFAULT 0 ,
FOREIGN KEY ( ` id_agent_module_target ` ) REFERENCES tagente_modulo ( ` id_agente_modulo ` )
ON DELETE CASCADE ON UPDATE CASCADE ,
PRIMARY KEY ( id )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2017-03-03 10:27:52 +01:00
-- -----------------------------------------------------
-- Table `tnetworkmap_enterprise`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS ` tnetworkmap_enterprise ` (
2022-02-01 13:49:32 +01:00
` id ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` name ` VARCHAR ( 500 ) DEFAULT ' ' ,
` id_group ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` options ` TEXT ,
PRIMARY KEY ( id )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2017-03-03 10:27:52 +01:00
-- -----------------------------------------------------
-- Table `tnetworkmap_enterprise_nodes`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS ` tnetworkmap_enterprise_nodes ` (
2022-02-01 13:49:32 +01:00
` id ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` id_networkmap_enterprise ` INT UNSIGNED NOT NULL ,
` x ` INT DEFAULT 0 ,
` y ` INT DEFAULT 0 ,
` z ` INT DEFAULT 0 ,
` id_agent ` INT DEFAULT 0 ,
` id_module ` INT DEFAULT 0 ,
` id_agent_module ` INT DEFAULT 0 ,
` parent ` INT DEFAULT 0 ,
` options ` TEXT ,
` deleted ` INT DEFAULT 0 ,
` state ` VARCHAR ( 150 ) NOT NULL DEFAULT ' ' ,
PRIMARY KEY ( id ) ,
FOREIGN KEY ( ` id_networkmap_enterprise ` ) REFERENCES tnetworkmap_enterprise ( ` id ` )
ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2017-03-03 10:27:52 +01:00
-- -----------------------------------------------------
-- Table `tnetworkmap_ent_rel_nodes` (Before `tnetworkmap_enterprise_relation_nodes`)
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS ` tnetworkmap_ent_rel_nodes ` (
2022-02-01 13:49:32 +01:00
` id ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` id_networkmap_enterprise ` INT UNSIGNED NOT NULL ,
` parent ` INT DEFAULT 0 ,
` parent_type ` VARCHAR ( 30 ) DEFAULT ' node ' ,
` child ` INT DEFAULT 0 ,
` child_type ` VARCHAR ( 30 ) DEFAULT ' node ' ,
` deleted ` INT DEFAULT 0 ,
PRIMARY KEY ( id , id_networkmap_enterprise ) ,
FOREIGN KEY ( ` id_networkmap_enterprise ` ) REFERENCES tnetworkmap_enterprise ( ` id ` )
ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2017-03-03 10:27:52 +01:00
-- -----------------------------------------------------
-- Table `treport_template`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS ` treport_template ` (
2022-02-01 13:49:32 +01:00
` id_report ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
2022-06-08 11:49:48 +02:00
` id_user ` VARCHAR ( 255 ) NOT NULL DEFAULT ' ' ,
2022-02-01 13:49:32 +01:00
` name ` VARCHAR ( 150 ) NOT NULL DEFAULT ' ' ,
2022-02-01 15:11:59 +01:00
` description ` TEXT ,
2022-02-01 13:49:32 +01:00
` private ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
` id_group ` MEDIUMINT UNSIGNED NULL DEFAULT NULL ,
` custom_logo ` VARCHAR ( 200 ) DEFAULT NULL ,
2022-02-02 12:30:02 +01:00
` header ` MEDIUMTEXT ,
` first_page ` MEDIUMTEXT ,
` footer ` MEDIUMTEXT ,
2022-02-01 13:49:32 +01:00
` custom_font ` VARCHAR ( 200 ) DEFAULT NULL ,
` metaconsole ` TINYINT DEFAULT 0 ,
` agent_regex ` VARCHAR ( 600 ) NOT NULL DEFAULT ' ' ,
` cover_page_render ` TINYINT NOT NULL DEFAULT 1 ,
` index_render ` TINYINT NOT NULL DEFAULT 1 ,
PRIMARY KEY ( ` id_report ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2017-03-03 10:27:52 +01:00
-- -----------------------------------------------------
-- Table `treport_content_template`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS ` treport_content_template ` (
2022-02-01 13:49:32 +01:00
` id_rc ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` id_report ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` id_gs ` INT UNSIGNED NULL DEFAULT NULL ,
` text_agent_module ` TEXT ,
` type ` VARCHAR ( 30 ) DEFAULT ' simple_graph ' ,
` period ` INT NOT NULL DEFAULT 0 ,
` order ` INT NOT NULL DEFAULT 0 ,
2022-02-02 12:30:02 +01:00
` description ` MEDIUMTEXT ,
2022-02-01 13:49:32 +01:00
` text_agent ` TEXT ,
` text ` TEXT ,
2022-02-02 12:30:02 +01:00
` external_source ` MEDIUMTEXT ,
2022-02-01 13:49:32 +01:00
` treport_custom_sql_id ` INT UNSIGNED DEFAULT 0 ,
` header_definition ` TINYTEXT ,
` column_separator ` TINYTEXT ,
` line_separator ` TINYTEXT ,
` time_from ` time DEFAULT ' 00:00:00 ' ,
` time_to ` time DEFAULT ' 00:00:00 ' ,
` monday ` TINYINT DEFAULT 1 ,
` tuesday ` TINYINT DEFAULT 1 ,
` wednesday ` TINYINT DEFAULT 1 ,
` thursday ` TINYINT DEFAULT 1 ,
` friday ` TINYINT DEFAULT 1 ,
` saturday ` TINYINT DEFAULT 1 ,
` sunday ` TINYINT DEFAULT 1 ,
` only_display_wrong ` TINYINT unsigned DEFAULT 0 NOT NULL ,
` top_n ` INT NOT NULL DEFAULT 0 ,
` top_n_value ` INT NOT NULL DEFAULT 10 ,
` exception_condition ` INT NOT NULL DEFAULT 0 ,
` exception_condition_value ` DOUBLE NOT NULL DEFAULT 0 ,
` show_resume ` INT NOT NULL DEFAULT 0 ,
` order_uptodown ` INT NOT NULL DEFAULT 0 ,
` show_graph ` INT NOT NULL DEFAULT 0 ,
` group_by_agent ` INT NOT NULL DEFAULT 0 ,
2022-02-01 15:11:59 +01:00
` style ` TEXT ,
2022-02-01 13:49:32 +01:00
` id_group ` INT unsigned NOT NULL DEFAULT 0 ,
` id_module_group ` INT unsigned NOT NULL DEFAULT 0 ,
` server_name ` TEXT ,
` exact_match ` TINYINT DEFAULT 0 ,
` module_names ` TEXT ,
` module_free_text ` TEXT ,
` each_agent ` TINYINT DEFAULT 1 ,
` historical_db ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
` lapse_calc ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
` lapse ` INT UNSIGNED NOT NULL DEFAULT 300 ,
` visual_format ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
` hide_no_data ` TINYINT DEFAULT 0 ,
` total_time ` TINYINT DEFAULT 1 ,
` time_failed ` TINYINT DEFAULT 1 ,
` time_in_ok_status ` TINYINT DEFAULT 1 ,
` time_in_warning_status ` TINYINT DEFAULT 0 ,
` time_in_unknown_status ` TINYINT DEFAULT 1 ,
` time_of_not_initialized_module ` TINYINT DEFAULT 1 ,
` time_of_downtime ` TINYINT DEFAULT 1 ,
` total_checks ` TINYINT DEFAULT 1 ,
` checks_failed ` TINYINT DEFAULT 1 ,
` checks_in_ok_status ` TINYINT DEFAULT 1 ,
` checks_in_warning_status ` TINYINT DEFAULT 0 ,
` unknown_checks ` TINYINT DEFAULT 1 ,
` agent_max_value ` TINYINT DEFAULT 1 ,
` agent_min_value ` TINYINT DEFAULT 1 ,
` current_month ` TINYINT DEFAULT 1 ,
` failover_mode ` TINYINT DEFAULT 1 ,
` failover_type ` TINYINT DEFAULT 1 ,
` summary ` TINYINT DEFAULT 0 ,
` uncompressed_module ` TINYINT DEFAULT 0 ,
` landscape ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
` pagebreak ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
` compare_work_time ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
` graph_render ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
` ipam_network_filter ` INT UNSIGNED DEFAULT 0 ,
` ipam_alive_ips ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
` ipam_ip_not_assigned_to_agent ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
2022-03-31 20:11:52 +02:00
` macros_definition ` TEXT ,
` render_definition ` TEXT ,
2022-10-26 18:25:16 +02:00
` use_prefix_notation ` TINYINT UNSIGNED NOT NULL DEFAULT 1 ,
2022-02-01 13:49:32 +01:00
PRIMARY KEY ( ` id_rc ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2017-03-03 10:27:52 +01:00
-- -----------------------------------------------------
-- Table `treport_content_sla_com_temp` (treport_content_sla_combined_template)
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS ` treport_content_sla_com_temp ` (
2022-02-01 13:49:32 +01:00
` id ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` id_report_content ` INT UNSIGNED NOT NULL ,
` text_agent ` TEXT ,
` text_agent_module ` TEXT ,
` sla_max ` DOUBLE NOT NULL DEFAULT 0 ,
` sla_min ` DOUBLE NOT NULL DEFAULT 0 ,
` sla_limit ` DOUBLE NOT NULL DEFAULT 0 ,
` server_name ` TEXT ,
` exact_match ` TINYINT DEFAULT 0 ,
PRIMARY KEY ( ` id ` ) ,
FOREIGN KEY ( ` id_report_content ` ) REFERENCES treport_content_template ( ` id_rc ` )
ON UPDATE CASCADE ON DELETE CASCADE
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2017-03-03 10:27:52 +01:00
-- -----------------------------------------------------
-- Table `treport_content_item_temp` (treport_content_item_template)
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS ` treport_content_item_temp ` (
2022-02-01 13:49:32 +01:00
` id ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` id_report_content ` INT UNSIGNED NOT NULL ,
` text_agent ` TEXT ,
` text_agent_module ` TEXT ,
` server_name ` TEXT ,
` exact_match ` TINYINT DEFAULT 0 ,
` operation ` TEXT ,
PRIMARY KEY ( ` id ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2017-03-03 10:27:52 +01:00
-- -----------------------------------------------------
-- Table `tgraph_template`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS ` tgraph_template ` (
2022-02-01 13:49:32 +01:00
` id_graph_template ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
2022-02-01 15:11:59 +01:00
` id_user ` TEXT ,
` name ` TEXT ,
` description ` TEXT ,
2022-02-01 13:49:32 +01:00
` period ` INT NOT NULL DEFAULT 0 ,
` width ` SMALLINT UNSIGNED NOT NULL DEFAULT 0 ,
` height ` SMALLINT UNSIGNED NOT NULL DEFAULT 0 ,
` private ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
` events ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
` stacked ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
` id_group ` MEDIUMINT UNSIGNED NULL DEFAULT 0 ,
PRIMARY KEY ( ` id_graph_template ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2017-03-03 10:27:52 +01:00
-- ---------------------------------------------------------------------
-- Table `tgraph_source_template`
-- ---------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS ` tgraph_source_template ` (
2022-02-01 13:49:32 +01:00
` id_gs_template ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` id_template ` INT NOT NULL DEFAULT 0 ,
` agent ` TEXT ,
` module ` TEXT ,
` weight ` DOUBLE NOT NULL DEFAULT 2 ,
` exact_match ` TINYINT DEFAULT 0 ,
PRIMARY KEY ( ` id_gs_template ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2017-03-03 10:27:52 +01:00
-- ---------------------------------------------------------------------
-- Table `textension_translate_string`
-- ---------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS ` textension_translate_string ` (
2022-02-01 13:49:32 +01:00
` id ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` lang ` VARCHAR ( 10 ) NOT NULL ,
2022-02-01 15:11:59 +01:00
` string ` TEXT ,
` translation ` TEXT ,
2022-02-01 13:49:32 +01:00
PRIMARY KEY ( ` id ` ) ,
KEY ` lang_index ` ( ` lang ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2017-03-03 10:27:52 +01:00
-- ---------------------------------------------------------------------
-- Table `tagent_module_log`
-- ---------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS ` tagent_module_log ` (
2022-02-01 13:49:32 +01:00
` id_agent_module_log ` INT NOT NULL AUTO_INCREMENT ,
` id_agent ` INT UNSIGNED NOT NULL ,
2022-02-01 15:11:59 +01:00
` source ` TEXT ,
2022-02-01 13:49:32 +01:00
` timestamp ` DATETIME DEFAULT ' 1970-01-01 00:00:00 ' ,
` utimestamp ` BIGINT DEFAULT 0 ,
2023-01-24 12:10:40 +01:00
PRIMARY KEY ( ` id_agent_module_log ` ) ,
INDEX ` tagent_module_log_agent ` ( ` id_agent ` )
2022-02-01 13:49:32 +01:00
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2017-03-03 10:27:52 +01:00
-- ---------------------------------------------------------------------
-- Table `tevent_custom_field`
-- ---------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS ` tevent_custom_field ` (
2022-02-01 13:49:32 +01:00
` id_group ` MEDIUMINT UNSIGNED NOT NULL ,
2022-02-01 15:11:59 +01:00
` value ` TEXT ,
2022-02-01 13:49:32 +01:00
PRIMARY KEY ( ` id_group ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2017-03-03 10:27:52 +01:00
-- ---------------------------------------------------------------------
-- Table `tmetaconsole_agent`
-- ---------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS ` tmetaconsole_agent ` (
2022-02-01 13:49:32 +01:00
` id_agente ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` id_tagente ` INT UNSIGNED NOT NULL ,
` id_tmetaconsole_setup ` INT NOT NULL ,
` nombre ` VARCHAR ( 600 ) NOT NULL DEFAULT ' ' ,
` direccion ` VARCHAR ( 100 ) DEFAULT NULL ,
` comentarios ` VARCHAR ( 255 ) DEFAULT ' ' ,
` id_grupo ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` ultimo_contacto ` DATETIME NOT NULL DEFAULT ' 1970-01-01 00:00:00 ' ,
` modo ` TINYINT NOT NULL DEFAULT 0 ,
` intervalo ` INT UNSIGNED NOT NULL DEFAULT 300 ,
` id_os ` INT UNSIGNED DEFAULT 0 ,
` os_version ` VARCHAR ( 100 ) DEFAULT ' ' ,
` agent_version ` VARCHAR ( 100 ) DEFAULT ' ' ,
` ultimo_contacto_remoto ` DATETIME DEFAULT ' 1970-01-01 00:00:00 ' ,
` disabled ` TINYINT NOT NULL DEFAULT 0 ,
` remote ` TINYINT NOT NULL DEFAULT 0 ,
` id_parent ` INT UNSIGNED DEFAULT 0 ,
` custom_id ` VARCHAR ( 255 ) DEFAULT ' ' ,
` server_name ` VARCHAR ( 100 ) DEFAULT ' ' ,
` cascade_protection ` TINYINT NOT NULL DEFAULT 0 ,
` cascade_protection_module ` INT UNSIGNED DEFAULT 0 ,
` timezone_offset ` TINYINT NULL DEFAULT 0 COMMENT ' number of hours of diference with the server timezone ' ,
` icon_path ` VARCHAR ( 127 ) NULL DEFAULT NULL COMMENT ' path in the server to the image of the icon representing the agent ' ,
` update_gis_data ` TINYINT NOT NULL DEFAULT 1 COMMENT ' set it to one to update the position data (altitude, longitude, latitude) when getting information from the agent or to 0 to keep the last value and do not update it ' ,
2022-02-02 12:30:02 +01:00
` url_address ` MEDIUMTEXT NULL ,
2022-02-01 13:49:32 +01:00
` quiet ` TINYINT NOT NULL DEFAULT 0 ,
` normal_count ` BIGINT NOT NULL DEFAULT 0 ,
` warning_count ` BIGINT NOT NULL DEFAULT 0 ,
` critical_count ` BIGINT NOT NULL DEFAULT 0 ,
` unknown_count ` BIGINT NOT NULL DEFAULT 0 ,
` notinit_count ` BIGINT NOT NULL DEFAULT 0 ,
` total_count ` BIGINT NOT NULL DEFAULT 0 ,
` fired_count ` BIGINT NOT NULL DEFAULT 0 ,
` update_module_count ` TINYINT NOT NULL DEFAULT 0 ,
` update_alert_count ` TINYINT NOT NULL DEFAULT 0 ,
` update_secondary_groups ` TINYINT NOT NULL DEFAULT 0 ,
` transactional_agent ` TINYINT NOT NULL DEFAULT 0 ,
` alias ` VARCHAR ( 600 ) NOT NULL DEFAULT ' ' ,
` alias_as_name ` TINYINT NOT NULL DEFAULT 0 ,
` safe_mode_module ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` cps ` INT NOT NULL DEFAULT 0 ,
2022-06-08 13:10:01 +02:00
` satellite_server ` INT NOT NULL DEFAULT 0 ,
2022-08-16 12:37:40 +02:00
` fixed_ip ` TINYINT NOT NULL DEFAULT 0 ,
2022-02-01 13:49:32 +01:00
PRIMARY KEY ( ` id_agente ` ) ,
KEY ` nombre ` ( ` nombre ` ( 255 ) ) ,
KEY ` direccion ` ( ` direccion ` ) ,
KEY ` id_tagente_idx ` ( ` id_tagente ` ) ,
KEY ` disabled ` ( ` disabled ` ) ,
KEY ` id_grupo ` ( ` id_grupo ` ) ,
KEY ` tma_id_os_idx ` ( ` id_os ` ) ,
KEY ` tma_server_name_idx ` ( ` server_name ` ) ,
FOREIGN KEY ( ` id_tmetaconsole_setup ` ) REFERENCES tmetaconsole_setup ( ` id ` ) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2020-09-16 14:33:20 +02:00
2017-03-03 10:27:52 +01:00
-- ---------------------------------------------------------------------
2022-11-11 12:53:41 +01:00
-- Table `treset_pass`
2017-03-03 10:27:52 +01:00
-- ---------------------------------------------------------------------
2017-04-20 12:36:33 +02:00
CREATE TABLE IF NOT EXISTS ` treset_pass ` (
2022-02-01 13:49:32 +01:00
` id ` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT ,
2022-06-08 11:49:48 +02:00
` id_user ` VARCHAR ( 255 ) NOT NULL DEFAULT ' ' ,
2022-02-01 13:49:32 +01:00
` cod_hash ` VARCHAR ( 100 ) NOT NULL DEFAULT ' ' ,
` reset_time ` INT UNSIGNED NOT NULL DEFAULT 0 ,
PRIMARY KEY ( ` id ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2018-01-16 15:41:35 +01:00
2018-01-16 16:02:20 +01:00
-- ---------------------------------------------------------------------
-- Table `tcluster`
-- ---------------------------------------------------------------------
2022-02-01 13:49:32 +01:00
CREATE TABLE IF NOT EXISTS ` tcluster ` (
` id ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
2022-02-01 15:11:59 +01:00
` name ` TINYTEXT ,
2022-02-01 13:49:32 +01:00
` cluster_type ` ENUM ( ' AA ' , ' AP ' ) NOT NULL DEFAULT ' AA ' ,
2022-02-01 15:11:59 +01:00
` description ` TEXT ,
2022-02-01 13:49:32 +01:00
` group ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` id_agent ` INT UNSIGNED NOT NULL ,
PRIMARY KEY ( ` id ` )
) engine = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2018-01-16 15:41:35 +01:00
2018-01-16 16:02:20 +01:00
-- ---------------------------------------------------------------------
-- Table `tcluster_item`
-- ---------------------------------------------------------------------
2022-02-01 13:49:32 +01:00
CREATE TABLE IF NOT EXISTS ` tcluster_item ` (
` id ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
2022-02-01 15:11:59 +01:00
` name ` TINYTEXT ,
2022-02-01 13:49:32 +01:00
` item_type ` ENUM ( ' AA ' , ' AP ' ) NOT NULL DEFAULT ' AA ' ,
` critical_limit ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` warning_limit ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` is_critical ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
` id_cluster ` INT UNSIGNED ,
PRIMARY KEY ( ` id ` ) ,
FOREIGN KEY ( ` id_cluster ` ) REFERENCES tcluster ( ` id ` )
ON DELETE SET NULL ON UPDATE CASCADE
) engine = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2018-01-16 15:41:35 +01:00
2018-01-16 16:02:20 +01:00
-- ---------------------------------------------------------------------
-- Table `tcluster_agent`
-- ---------------------------------------------------------------------
2022-02-01 13:49:32 +01:00
CREATE TABLE IF NOT EXISTS ` tcluster_agent ` (
` id_cluster ` INT UNSIGNED NOT NULL ,
` id_agent ` INT UNSIGNED NOT NULL ,
PRIMARY KEY ( ` id_cluster ` , ` id_agent ` ) ,
FOREIGN KEY ( ` id_cluster ` ) REFERENCES tcluster ( ` id ` )
ON UPDATE CASCADE
) engine = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2018-01-16 19:24:58 +01:00
2018-03-05 12:39:56 +01:00
-- ---------------------------------------------------------------------
-- Table `tprovisioning`
-- ---------------------------------------------------------------------
2022-02-01 13:49:32 +01:00
CREATE TABLE IF NOT EXISTS ` tprovisioning ` (
` id ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` name ` VARCHAR ( 100 ) NOT NULL ,
` description ` TEXT ,
` order ` INT NOT NULL DEFAULT 0 ,
` config ` TEXT ,
PRIMARY KEY ( ` id ` )
) engine = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2018-03-05 12:39:56 +01:00
-- ---------------------------------------------------------------------
-- Table `tprovisioning_rules`
-- ---------------------------------------------------------------------
2022-02-01 13:49:32 +01:00
CREATE TABLE IF NOT EXISTS ` tprovisioning_rules ` (
` id ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` id_provisioning ` INT UNSIGNED NOT NULL ,
` order ` INT NOT NULL DEFAULT 0 ,
` operator ` ENUM ( ' AND ' , ' OR ' ) DEFAULT ' OR ' ,
` type ` ENUM ( ' alias ' , ' ip-range ' ) DEFAULT ' alias ' ,
` value ` VARCHAR ( 100 ) NOT NULL DEFAULT ' ' ,
PRIMARY KEY ( ` id ` ) ,
FOREIGN KEY ( ` id_provisioning ` ) REFERENCES tprovisioning ( ` id ` )
ON DELETE CASCADE
) engine = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2018-03-13 18:40:51 +01:00
2018-03-08 12:09:03 +01:00
-- ---------------------------------------------------------------------
-- Table `tmigration_queue`
-- ---------------------------------------------------------------------
2022-02-01 13:49:32 +01:00
CREATE TABLE IF NOT EXISTS ` tmigration_queue ` (
` id ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` id_source_agent ` INT UNSIGNED NOT NULL ,
` id_target_agent ` INT UNSIGNED NOT NULL ,
` id_source_node ` INT UNSIGNED NOT NULL ,
` id_target_node ` INT UNSIGNED NOT NULL ,
` priority ` INT UNSIGNED DEFAULT 0 ,
` step ` INT DEFAULT 0 ,
` running ` TINYINT DEFAULT 0 ,
` active_db_only ` TINYINT DEFAULT 0 ,
PRIMARY KEY ( ` id ` )
) engine = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2018-03-08 12:09:03 +01:00
-- ---------------------------------------------------------------------
-- Table `tmigration_module_queue`
-- ---------------------------------------------------------------------
2022-02-01 13:49:32 +01:00
CREATE TABLE IF NOT EXISTS ` tmigration_module_queue ` (
` id ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` id_migration ` INT UNSIGNED NOT NULL ,
` id_source_agentmodule ` INT UNSIGNED NOT NULL ,
` id_target_agentmodule ` INT UNSIGNED NOT NULL ,
` last_replication_timestamp ` BIGINT NOT NULL DEFAULT 0 ,
PRIMARY KEY ( ` id ` ) ,
FOREIGN KEY ( ` id_migration ` ) REFERENCES tmigration_queue ( ` id ` )
ON DELETE CASCADE
ON UPDATE CASCADE
) engine = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2018-03-20 13:29:17 +01:00
-- ---------------------------------------------------------------------
-- Table `tagent_secondary_group`
-- ---------------------------------------------------------------------
2022-02-01 13:49:32 +01:00
CREATE TABLE IF NOT EXISTS ` tagent_secondary_group ` (
` id ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` id_agent ` INT UNSIGNED NOT NULL ,
` id_group ` MEDIUMINT UNSIGNED NOT NULL ,
PRIMARY KEY ( ` id ` ) ,
FOREIGN KEY ( ` id_agent ` ) REFERENCES tagente ( ` id_agente ` )
ON DELETE CASCADE ,
FOREIGN KEY ( ` id_group ` ) REFERENCES tgrupo ( ` id_grupo ` )
ON DELETE CASCADE
) engine = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2018-03-20 13:29:17 +01:00
2018-04-03 15:36:33 +02:00
-- ---------------------------------------------------------------------
-- Table `tmetaconsole_agent_secondary_group`
-- ---------------------------------------------------------------------
2022-02-01 13:49:32 +01:00
CREATE TABLE IF NOT EXISTS ` tmetaconsole_agent_secondary_group ` (
` id ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` id_agent ` INT UNSIGNED NOT NULL ,
` id_tagente ` INT UNSIGNED NOT NULL ,
` id_tmetaconsole_setup ` INT NOT NULL ,
` id_group ` MEDIUMINT UNSIGNED NOT NULL ,
PRIMARY KEY ( ` id ` ) ,
KEY ` id_tagente ` ( ` id_tagente ` ) ,
FOREIGN KEY ( ` id_agent ` ) REFERENCES tmetaconsole_agent ( ` id_agente ` )
ON DELETE CASCADE ,
FOREIGN KEY ( ` id_group ` ) REFERENCES tgrupo ( ` id_grupo ` )
ON DELETE CASCADE ,
FOREIGN KEY ( ` id_tmetaconsole_setup ` ) REFERENCES tmetaconsole_setup ( ` id ` )
ON DELETE CASCADE
) engine = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2018-04-03 15:36:33 +02:00
2018-07-03 12:01:37 +02:00
-- ---------------------------------------------------------------------
-- Table `tautoconfig`
-- ---------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS ` tautoconfig ` (
2022-02-01 13:49:32 +01:00
` id ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` name ` VARCHAR ( 100 ) NOT NULL ,
` order ` INT NOT NULL DEFAULT 0 ,
` description ` TEXT ,
2022-06-09 15:12:05 +02:00
` disabled ` TINYINT DEFAULT 0 ,
2022-07-08 11:02:58 +02:00
` type_execution ` VARCHAR ( 100 ) NOT NULL DEFAULT ' start ' ,
` type_periodicity ` VARCHAR ( 100 ) NOT NULL DEFAULT ' weekly ' ,
` monday ` TINYINT DEFAULT 0 ,
` tuesday ` TINYINT DEFAULT 0 ,
` wednesday ` TINYINT DEFAULT 0 ,
` thursday ` TINYINT DEFAULT 0 ,
` friday ` TINYINT DEFAULT 0 ,
` saturday ` TINYINT DEFAULT 0 ,
` sunday ` TINYINT DEFAULT 0 ,
` periodically_day_from ` INT UNSIGNED DEFAULT NULL ,
` periodically_time_from ` time NULL DEFAULT NULL ,
` executed ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
2018-07-03 12:01:37 +02:00
PRIMARY KEY ( ` id ` )
2022-02-01 13:49:32 +01:00
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2018-07-03 12:01:37 +02:00
-- ---------------------------------------------------------------------
-- Table `tautoconfig_rules`
-- ---------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS ` tautoconfig_rules ` (
2022-02-01 13:49:32 +01:00
` id ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` id_autoconfig ` INT UNSIGNED NOT NULL ,
` order ` INT NOT NULL DEFAULT 0 ,
` operator ` ENUM ( ' AND ' , ' OR ' ) DEFAULT ' OR ' ,
` type ` ENUM ( ' alias ' , ' ip-range ' , ' group ' , ' os ' , ' custom-field ' , ' script ' , ' server-name ' ) DEFAULT ' alias ' ,
` value ` TEXT ,
` custom ` TEXT ,
2018-07-03 12:01:37 +02:00
PRIMARY KEY ( ` id ` ) ,
KEY ` id_autoconfig ` ( ` id_autoconfig ` ) ,
CONSTRAINT ` tautoconfig_rules_ibfk_1 ` FOREIGN KEY ( ` id_autoconfig ` ) REFERENCES ` tautoconfig ` ( ` id ` ) ON DELETE CASCADE
2022-02-01 13:49:32 +01:00
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2018-07-03 12:01:37 +02:00
-- ---------------------------------------------------------------------
-- Table `tautoconfig_actions`
-- ---------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS ` tautoconfig_actions ` (
2022-02-01 13:49:32 +01:00
` id ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` id_autoconfig ` INT UNSIGNED NOT NULL ,
` order ` INT NOT NULL DEFAULT 0 ,
` action_type ` ENUM ( ' set-group ' , ' set-secondary-group ' , ' apply-policy ' , ' launch-script ' , ' launch-event ' , ' launch-alert-action ' , ' raw-config ' ) DEFAULT ' launch-event ' ,
` value ` TEXT ,
` custom ` TEXT ,
2018-07-03 12:01:37 +02:00
PRIMARY KEY ( ` id ` ) ,
KEY ` id_autoconfig ` ( ` id_autoconfig ` ) ,
CONSTRAINT ` tautoconfig_action_ibfk_1 ` FOREIGN KEY ( ` id_autoconfig ` ) REFERENCES ` tautoconfig ` ( ` id ` ) ON DELETE CASCADE
2022-02-01 13:49:32 +01:00
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2018-07-03 12:01:37 +02:00
2018-08-01 09:58:48 +02:00
-- ---------------------------------------------------------------------
2018-08-01 12:22:13 +02:00
-- Table `tlayout_template`
2018-08-01 09:58:48 +02:00
-- ---------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS ` tlayout_template ` (
2022-02-01 13:49:32 +01:00
` id ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` name ` VARCHAR ( 600 ) NOT NULL ,
` id_group ` INT UNSIGNED NOT NULL ,
` background ` VARCHAR ( 200 ) NOT NULL ,
` height ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` width ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` background_color ` VARCHAR ( 50 ) NOT NULL DEFAULT ' #FFF ' ,
` is_favourite ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` auto_adjust ` INT UNSIGNED NOT NULL DEFAULT 0 ,
2022-11-30 18:50:57 +01:00
` maintenance_mode ` TEXT ,
2022-02-01 13:49:32 +01:00
PRIMARY KEY ( ` id ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2018-07-03 12:01:37 +02:00
2018-08-01 09:58:48 +02:00
-- ---------------------------------------------------------------------
2018-08-01 12:22:13 +02:00
-- Table `tlayout_template_data`
2018-08-01 09:58:48 +02:00
-- ---------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS ` tlayout_template_data ` (
2022-02-01 13:49:32 +01:00
` id ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` id_layout_template ` INT UNSIGNED NOT NULL ,
` pos_x ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` pos_y ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` height ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` width ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` label ` TEXT ,
` image ` VARCHAR ( 200 ) DEFAULT ' ' ,
` type ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
` period ` INT UNSIGNED NOT NULL DEFAULT 3600 ,
2022-02-01 15:11:59 +01:00
` module_name ` TEXT ,
2022-02-01 13:49:32 +01:00
` agent_name ` VARCHAR ( 600 ) NOT NULL DEFAULT ' ' ,
` id_layout_linked ` INT unsigned NOT NULL DEFAULT 0 ,
` parent_item ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` enable_link ` TINYINT UNSIGNED NOT NULL DEFAULT 1 ,
` id_metaconsole ` INT NOT NULL DEFAULT 0 ,
` id_group ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` id_custom_graph ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` border_width ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` type_graph ` VARCHAR ( 50 ) NOT NULL DEFAULT ' area ' ,
` label_position ` VARCHAR ( 50 ) NOT NULL DEFAULT ' down ' ,
` border_color ` VARCHAR ( 200 ) DEFAULT ' ' ,
` fill_color ` VARCHAR ( 200 ) DEFAULT ' ' ,
` show_statistics ` TINYINT NOT NULL DEFAULT 0 ,
` linked_layout_node_id ` INT NOT NULL DEFAULT 0 ,
` linked_layout_status_type ` ENUM ( ' default ' , ' weight ' , ' service ' ) DEFAULT ' default ' ,
` id_layout_linked_weight ` INT NOT NULL DEFAULT 0 ,
` linked_layout_status_as_service_warning ` DOUBLE NOT NULL DEFAULT 0 ,
` linked_layout_status_as_service_critical ` DOUBLE NOT NULL DEFAULT 0 ,
` element_group ` INT NOT NULL DEFAULT 0 ,
` show_on_top ` TINYINT NOT NULL DEFAULT 0 ,
` clock_animation ` VARCHAR ( 60 ) NOT NULL DEFAULT ' analogic_1 ' ,
` time_format ` VARCHAR ( 60 ) NOT NULL DEFAULT ' time ' ,
` timezone ` VARCHAR ( 60 ) NOT NULL DEFAULT ' Europe/Madrid ' ,
` show_last_value ` TINYINT UNSIGNED NULL DEFAULT 0 ,
` cache_expiration ` INT UNSIGNED NOT NULL DEFAULT 0 ,
PRIMARY KEY ( ` id ` ) ,
FOREIGN KEY ( ` id_layout_template ` ) REFERENCES tlayout_template ( ` id ` ) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2018-09-13 18:17:28 +02:00
2018-09-06 16:48:18 +02:00
-- ---------------------------------------------------------------------
-- Table `tlog_graph_models`
-- ---------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS ` tlog_graph_models ` (
2022-02-01 13:49:32 +01:00
` id ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
2022-02-01 15:11:59 +01:00
` title ` TEXT ,
` regexp ` TEXT ,
` fields ` TEXT ,
2022-02-01 13:49:32 +01:00
` average ` TINYINT NOT NULL DEFAULT 0 ,
PRIMARY KEY ( ` id ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2018-11-13 15:46:44 +01:00
-- ---------------------------------------------------------------------
-- Table `tagent_custom_fields_filter`
-- ---------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS ` tagent_custom_fields_filter ` (
2022-02-01 13:49:32 +01:00
` id ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` name ` VARCHAR ( 600 ) NOT NULL ,
` id_group ` INT UNSIGNED DEFAULT 0 ,
` id_custom_field ` VARCHAR ( 600 ) DEFAULT ' ' ,
` id_custom_fields_data ` VARCHAR ( 600 ) DEFAULT ' ' ,
` id_status ` VARCHAR ( 600 ) DEFAULT ' ' ,
` module_search ` VARCHAR ( 600 ) DEFAULT ' ' ,
` module_status ` VARCHAR ( 600 ) DEFAULT ' ' ,
` recursion ` INT UNSIGNED DEFAULT 0 ,
` group_search ` INT UNSIGNED DEFAULT 0 ,
PRIMARY KEY ( ` id ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2019-01-21 17:42:41 +01:00
-- -----------------------------------------------------
-- Table `tnetwork_matrix`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS ` tnetwork_matrix ` (
2022-02-01 13:49:32 +01:00
` id ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` source ` VARCHAR ( 60 ) DEFAULT ' ' ,
` destination ` VARCHAR ( 60 ) DEFAULT ' ' ,
` utimestamp ` BIGINT DEFAULT 0 ,
` bytes ` INT UNSIGNED DEFAULT 0 ,
` pkts ` INT UNSIGNED DEFAULT 0 ,
PRIMARY KEY ( ` id ` ) ,
UNIQUE ( ` source ` , ` destination ` , ` utimestamp ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2019-03-25 09:20:06 +01:00
2019-03-01 15:26:05 +01:00
-- ---------------------------------------------------------------------
-- Table `user_task`
-- ---------------------------------------------------------------------
2022-02-01 13:49:32 +01:00
CREATE TABLE IF NOT EXISTS ` tuser_task ` (
` id ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` function_name ` VARCHAR ( 80 ) NOT NULL DEFAULT ' ' ,
2022-02-01 15:11:59 +01:00
` parameters ` TEXT ,
2022-02-01 13:49:32 +01:00
` name ` VARCHAR ( 60 ) NOT NULL DEFAULT ' ' ,
PRIMARY KEY ( ` id ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2019-03-01 15:26:05 +01:00
-- ---------------------------------------------------------------------
-- Table `user_task_scheduled`
-- ---------------------------------------------------------------------
2022-02-01 13:49:32 +01:00
CREATE TABLE IF NOT EXISTS ` tuser_task_scheduled ` (
` id ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
2022-06-08 11:49:48 +02:00
` id_usuario ` VARCHAR ( 255 ) NOT NULL DEFAULT ' 0 ' ,
2022-02-01 13:49:32 +01:00
` id_user_task ` INT UNSIGNED NOT NULL DEFAULT 0 ,
2022-02-01 15:11:59 +01:00
` args ` TEXT ,
2022-02-01 13:49:32 +01:00
` scheduled ` ENUM ( ' no ' , ' hourly ' , ' daily ' , ' weekly ' , ' monthly ' , ' yearly ' , ' custom ' ) DEFAULT ' no ' ,
` last_run ` INT UNSIGNED DEFAULT 0 ,
` custom_data ` INT NULL DEFAULT 0 ,
` flag_delete ` TINYINT UNSIGNED NOT NULL DEFAULT 0 ,
` id_grupo ` INT UNSIGNED NOT NULL DEFAULT 0 ,
2022-03-23 11:47:34 +01:00
` enabled ` TINYINT UNSIGNED NOT NULL DEFAULT 1 ,
2023-02-21 15:32:45 +01:00
` id_console ` BIGINT NOT NULL DEFAULT 0 ,
2022-02-01 13:49:32 +01:00
PRIMARY KEY ( ` id ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2019-05-20 15:15:54 +02:00
-- ---------------------------------------------------------------------
-- Table `tvisual_console_items_cache`
-- ---------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS ` tvisual_console_elements_cache ` (
2022-02-01 13:49:32 +01:00
` id ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` vc_id ` INT UNSIGNED NOT NULL ,
` vc_item_id ` INT UNSIGNED NOT NULL ,
2022-05-09 12:40:36 +02:00
` user_id ` VARCHAR ( 255 ) DEFAULT NULL ,
2022-02-01 15:11:59 +01:00
` data ` TEXT ,
2022-02-01 13:49:32 +01:00
` created_at ` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ,
` expiration ` INT UNSIGNED NOT NULL COMMENT ' Seconds to expire ' ,
PRIMARY KEY ( ` id ` ) ,
FOREIGN KEY ( ` vc_id ` ) REFERENCES ` tlayout ` ( ` id ` )
ON DELETE CASCADE ,
FOREIGN KEY ( ` vc_item_id ` ) REFERENCES ` tlayout_data ` ( ` id ` )
ON DELETE CASCADE ,
FOREIGN KEY ( ` user_id ` ) REFERENCES ` tusuario ` ( ` id_user ` )
ON DELETE CASCADE
ON UPDATE CASCADE
) engine = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2019-07-17 20:37:13 +02:00
-- ---------------------------------------------------------------------
-- Table `tagent_repository`
-- ---------------------------------------------------------------------
2022-02-01 13:49:32 +01:00
CREATE TABLE IF NOT EXISTS ` tagent_repository ` (
2019-07-17 20:37:13 +02:00
` id ` SERIAL ,
2022-02-01 13:49:32 +01:00
` id_os ` INT UNSIGNED DEFAULT 0 ,
2019-07-17 20:37:13 +02:00
` arch ` ENUM ( ' x64 ' , ' x86 ' ) DEFAULT ' x64 ' ,
` version ` VARCHAR ( 10 ) DEFAULT ' ' ,
2022-02-01 13:49:32 +01:00
` path ` TEXT ,
2021-11-02 17:37:47 +01:00
` deployment_timeout ` INT UNSIGNED DEFAULT 600 ,
2019-07-17 20:37:13 +02:00
` uploaded_by ` VARCHAR ( 100 ) DEFAULT ' ' ,
2022-02-01 13:49:32 +01:00
` uploaded ` BIGINT NOT NULL DEFAULT 0 COMMENT ' When it was uploaded ' ,
` last_err ` TEXT ,
2019-07-17 20:37:13 +02:00
PRIMARY KEY ( ` id ` ) ,
2019-07-23 13:01:50 +02:00
FOREIGN KEY ( ` id_os ` ) REFERENCES ` tconfig_os ` ( ` id_os ` )
2022-02-01 13:49:32 +01:00
ON UPDATE CASCADE ON DELETE CASCADE
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2019-07-23 13:01:50 +02:00
-- ----------------------------------------------------------------------
-- Table `tdeployment_hosts`
-- ----------------------------------------------------------------------
2022-02-01 13:49:32 +01:00
CREATE TABLE IF NOT EXISTS ` tdeployment_hosts ` (
2019-07-23 13:01:50 +02:00
` id ` SERIAL ,
` id_cs ` VARCHAR ( 100 ) ,
` ip ` VARCHAR ( 100 ) NOT NULL UNIQUE ,
2022-02-01 13:49:32 +01:00
` id_os ` INT UNSIGNED DEFAULT 0 ,
` os_version ` VARCHAR ( 100 ) DEFAULT ' ' COMMENT ' OS version in STR format ' ,
2019-07-23 13:01:50 +02:00
` arch ` ENUM ( ' x64 ' , ' x86 ' ) DEFAULT ' x64 ' ,
2022-02-01 13:49:32 +01:00
` current_agent_version ` VARCHAR ( 100 ) DEFAULT ' ' COMMENT ' String latest installed agent ' ,
2019-07-23 13:01:50 +02:00
` target_agent_version_id ` BIGINT UNSIGNED ,
2022-02-01 13:49:32 +01:00
` deployed ` BIGINT NOT NULL DEFAULT 0 COMMENT ' When it was deployed ' ,
` server_ip ` VARCHAR ( 100 ) DEFAULT NULL COMMENT ' Where to point target agent ' ,
` last_err ` TEXT ,
2019-07-23 13:01:50 +02:00
PRIMARY KEY ( ` id ` ) ,
FOREIGN KEY ( ` id_cs ` ) REFERENCES ` tcredential_store ` ( ` identifier ` )
2022-02-01 13:49:32 +01:00
ON UPDATE CASCADE ON DELETE SET NULL ,
2019-07-23 13:01:50 +02:00
FOREIGN KEY ( ` id_os ` ) REFERENCES ` tconfig_os ` ( ` id_os ` )
2022-02-01 13:49:32 +01:00
ON UPDATE CASCADE ON DELETE CASCADE ,
2019-07-23 13:01:50 +02:00
FOREIGN KEY ( ` target_agent_version_id ` ) REFERENCES ` tagent_repository ` ( ` id ` )
2022-02-01 13:49:32 +01:00
ON UPDATE CASCADE ON DELETE SET NULL
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2019-10-28 12:20:55 +01:00
-- ----------------------------------------------------------------------
-- Table `tremote_command`
-- ----------------------------------------------------------------------
2022-02-01 13:49:32 +01:00
CREATE TABLE IF NOT EXISTS ` tremote_command ` (
2019-10-28 12:20:55 +01:00
` id ` SERIAL ,
2022-02-01 13:49:32 +01:00
` name ` VARCHAR ( 150 ) NOT NULL ,
` timeout ` INT UNSIGNED NOT NULL DEFAULT 30 ,
` retries ` INT UNSIGNED NOT NULL DEFAULT 3 ,
` preconditions ` TEXT ,
` script ` TEXT ,
` postconditions ` TEXT ,
` utimestamp ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` id_group ` INT UNSIGNED NOT NULL DEFAULT 0 ,
2019-10-28 12:20:55 +01:00
PRIMARY KEY ( ` id ` )
2022-02-01 13:49:32 +01:00
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2019-10-28 12:20:55 +01:00
-- ----------------------------------------------------------------------
-- Table `tremote_command_target`
-- ----------------------------------------------------------------------
2022-02-01 13:49:32 +01:00
CREATE TABLE IF NOT EXISTS ` tremote_command_target ` (
2019-10-30 14:43:10 +01:00
` id ` SERIAL ,
2022-02-01 13:49:32 +01:00
` rcmd_id ` BIGINT UNSIGNED NOT NULL ,
` id_agent ` INT UNSIGNED NOT NULL ,
` utimestamp ` INT UNSIGNED NOT NULL DEFAULT 0 ,
2019-11-15 09:45:49 +01:00
` stdout ` MEDIUMTEXT ,
` stderr ` MEDIUMTEXT ,
2022-02-01 13:49:32 +01:00
` errorlevel ` INT UNSIGNED NOT NULL DEFAULT 0 ,
2019-10-30 14:43:10 +01:00
PRIMARY KEY ( ` id ` ) ,
2019-10-28 12:20:55 +01:00
FOREIGN KEY ( ` rcmd_id ` ) REFERENCES ` tremote_command ` ( ` id ` )
2022-02-01 13:49:32 +01:00
ON UPDATE CASCADE ON DELETE CASCADE
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2020-05-27 09:18:21 +02:00
-- ----------------------------------------------------------------------
-- Table `tnode_relations`
-- ----------------------------------------------------------------------
2022-02-01 13:49:32 +01:00
CREATE TABLE IF NOT EXISTS ` tnode_relations ` (
` id ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` gateway ` VARCHAR ( 100 ) NOT NULL ,
` imei ` VARCHAR ( 100 ) NOT NULL ,
` node_address ` VARCHAR ( 60 ) NOT NULL ,
PRIMARY KEY ( ` id ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2021-01-14 14:42:18 +01:00
2021-11-29 16:34:32 +01:00
-- ----------------------------------------------------------------------
-- Table `tipam_network_location`
-- ----------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS ` tipam_network_location ` (
2022-02-01 13:49:32 +01:00
` id ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` name ` VARCHAR ( 100 ) NOT NULL DEFAULT ' ' ,
PRIMARY KEY ( ` id ` ) ,
UNIQUE ( ` name ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2021-11-29 16:34:32 +01:00
2021-12-09 13:51:20 +01:00
-- ----------------------------------------------------------------------
-- Table `tipam_sites`
-- ----------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS ` tipam_sites ` (
2022-02-01 13:49:32 +01:00
` id ` SERIAL ,
` name ` VARCHAR ( 100 ) UNIQUE NOT NULL DEFAULT ' ' ,
` description ` TEXT ,
` parent ` BIGINT UNSIGNED null ,
PRIMARY KEY ( ` id ` ) ,
FOREIGN KEY ( ` parent ` ) REFERENCES ` tipam_sites ` ( ` id ` ) ON UPDATE CASCADE ON DELETE SET NULL
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2021-12-09 13:51:20 +01:00
2021-01-14 14:42:18 +01:00
-- ----------------------------------------------------------------------
-- Table `tipam_network`
-- ----------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS ` tipam_network ` (
2022-02-01 13:49:32 +01:00
` id ` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT ,
` network ` VARCHAR ( 100 ) NOT NULL DEFAULT ' ' ,
` name_network ` VARCHAR ( 255 ) DEFAULT ' ' ,
2022-02-01 15:11:59 +01:00
` description ` TEXT ,
2022-02-01 13:49:32 +01:00
` location ` INT UNSIGNED NULL ,
2022-08-08 12:24:04 +02:00
` id_recon_task ` INT UNSIGNED DEFAULT 0 ,
2022-02-01 13:49:32 +01:00
` scan_interval ` TINYINT DEFAULT 1 ,
` monitoring ` TINYINT DEFAULT 0 ,
` id_group ` MEDIUMINT UNSIGNED NULL DEFAULT 0 ,
` lightweight_mode ` TINYINT DEFAULT 0 ,
` users_operator ` TEXT ,
` id_site ` BIGINT UNSIGNED ,
` vrf ` INT UNSIGNED ,
PRIMARY KEY ( ` id ` ) ,
2022-08-08 12:24:04 +02:00
FOREIGN KEY ( ` id_recon_task ` ) REFERENCES trecon_task ( ` id_rt ` ) ON DELETE SET NULL ON UPDATE CASCADE ,
2022-02-01 13:49:32 +01:00
FOREIGN KEY ( ` location ` ) REFERENCES ` tipam_network_location ` ( ` id ` ) ON DELETE CASCADE ,
FOREIGN KEY ( ` id_site ` ) REFERENCES ` tipam_sites ` ( ` id ` ) ON DELETE SET NULL ON UPDATE CASCADE ,
FOREIGN KEY ( ` vrf ` ) REFERENCES ` tagente ` ( ` id_agente ` ) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2021-01-14 14:42:18 +01:00
-- ----------------------------------------------------------------------
-- Table `tipam_ip`
-- ----------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS ` tipam_ip ` (
2022-02-01 13:49:32 +01:00
` id ` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT ,
` id_network ` BIGINT UNSIGNED NOT NULL DEFAULT 0 ,
` id_agent ` INT UNSIGNED NOT NULL ,
` forced_agent ` TINYINT NOT NULL DEFAULT 0 ,
` ip ` VARCHAR ( 100 ) NOT NULL DEFAULT ' ' ,
` ip_dec ` INT UNSIGNED NOT NULL ,
` id_os ` INT UNSIGNED NOT NULL ,
` forced_os ` TINYINT NOT NULL DEFAULT 0 ,
2022-02-01 15:11:59 +01:00
` hostname ` TINYTEXT ,
2022-02-01 13:49:32 +01:00
` forced_hostname ` TINYINT NOT NULL DEFAULT 0 ,
2022-02-01 15:11:59 +01:00
` comments ` TEXT ,
2022-02-01 13:49:32 +01:00
` alive ` TINYINT NOT NULL DEFAULT 0 ,
` managed ` TINYINT NOT NULL DEFAULT 0 ,
` reserved ` TINYINT NOT NULL DEFAULT 0 ,
` time_last_check ` DATETIME NOT NULL DEFAULT ' 1970-01-01 00:00:00 ' ,
` time_create ` DATETIME NOT NULL DEFAULT ' 1970-01-01 00:00:00 ' ,
` users_operator ` TEXT ,
` time_last_edit ` DATETIME NOT NULL DEFAULT ' 1970-01-01 00:00:00 ' ,
` enabled ` TINYINT NOT NULL DEFAULT 1 ,
` generate_events ` TINYINT NOT NULL DEFAULT 0 ,
` leased ` TINYINT DEFAULT 0 ,
` leased_expiration ` BIGINT DEFAULT 0 ,
` mac_address ` VARCHAR ( 20 ) DEFAULT NULL ,
` leased_mode ` TINYINT DEFAULT 0 ,
PRIMARY KEY ( ` id ` ) ,
FOREIGN KEY ( ` id_network ` ) REFERENCES tipam_network ( ` id ` ) ON DELETE CASCADE
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2021-01-14 14:42:18 +01:00
-- ----------------------------------------------------------------------
-- Table `tipam_vlan`
-- ----------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS ` tipam_vlan ` (
2022-02-01 13:49:32 +01:00
` id ` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT ,
` name ` VARCHAR ( 250 ) NOT NULL ,
` description ` TEXT ,
2022-02-24 13:58:04 +01:00
` custom_id ` bigint ( 20 ) UNSIGNED DEFAULT NULL ,
2022-02-01 13:49:32 +01:00
PRIMARY KEY ( ` id ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2021-01-14 14:42:18 +01:00
-- ----------------------------------------------------------------------
-- Table `tipam_vlan_network`
-- ----------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS ` tipam_vlan_network ` (
2022-02-01 13:49:32 +01:00
` id ` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT ,
` id_vlan ` BIGINT UNSIGNED NOT NULL ,
` id_network ` BIGINT UNSIGNED NOT NULL ,
PRIMARY KEY ( ` id ` ) ,
FOREIGN KEY ( ` id_vlan ` ) REFERENCES ` tipam_vlan ` ( ` id ` ) ON UPDATE CASCADE ON DELETE CASCADE ,
FOREIGN KEY ( ` id_network ` ) REFERENCES ` tipam_network ` ( ` id ` ) ON UPDATE CASCADE ON DELETE CASCADE
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2021-01-14 14:42:18 +01:00
-- ----------------------------------------------------------------------
-- Table `tipam_supernet`
-- ----------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS ` tipam_supernet ` (
2022-02-01 13:49:32 +01:00
` id ` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT ,
` name ` VARCHAR ( 250 ) NOT NULL ,
` description ` TEXT ,
` address ` VARCHAR ( 250 ) NOT NULL ,
` mask ` VARCHAR ( 250 ) NOT NULL ,
` subneting_mask ` VARCHAR ( 250 ) DEFAULT ' ' ,
` id_site ` BIGINT UNSIGNED ,
PRIMARY KEY ( ` id ` ) ,
FOREIGN KEY ( ` id_site ` ) REFERENCES ` tipam_sites ` ( ` id ` ) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2021-01-14 14:42:18 +01:00
-- ----------------------------------------------------------------------
-- Table `tipam_supernet_network`
-- ----------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS ` tipam_supernet_network ` (
2022-02-01 13:49:32 +01:00
` id ` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT ,
` id_supernet ` BIGINT UNSIGNED NOT NULL ,
` id_network ` BIGINT UNSIGNED NOT NULL ,
PRIMARY KEY ( ` id ` ) ,
FOREIGN KEY ( ` id_supernet ` ) REFERENCES ` tipam_supernet ` ( ` id ` ) ON UPDATE CASCADE ON DELETE CASCADE ,
FOREIGN KEY ( ` id_network ` ) REFERENCES ` tipam_network ` ( ` id ` ) ON UPDATE CASCADE ON DELETE CASCADE
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2021-04-22 15:37:59 +02:00
-- ----------------------------------------------------------------------
-- Table `tsync_queue`
-- ----------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS ` tsync_queue ` (
2022-02-01 13:49:32 +01:00
` id ` SERIAL ,
` sql ` MEDIUMTEXT ,
` target ` BIGINT UNSIGNED NOT NULL ,
` utimestamp ` BIGINT DEFAULT 0 ,
` operation ` TEXT ,
` table ` TEXT ,
` error ` MEDIUMTEXT ,
` result ` TEXT ,
PRIMARY KEY ( ` id ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2021-09-28 18:53:22 +02:00
2021-10-14 20:44:05 +02:00
-- ----------------------------------------------------------------------
-- Table `tncm_vendor`
-- ----------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS ` tncm_vendor ` (
2022-02-01 13:49:32 +01:00
` id ` SERIAL ,
` name ` VARCHAR ( 255 ) UNIQUE ,
` icon ` VARCHAR ( 255 ) DEFAULT ' ' ,
PRIMARY KEY ( ` id ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2021-10-14 20:44:05 +02:00
-- ----------------------------------------------------------------------
-- Table `tncm_model`
-- ----------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS ` tncm_model ` (
2022-02-01 13:49:32 +01:00
` id ` SERIAL ,
` id_vendor ` BIGINT UNSIGNED NOT NULL ,
` name ` VARCHAR ( 255 ) UNIQUE ,
PRIMARY KEY ( ` id ` ) ,
FOREIGN KEY ( ` id_vendor ` ) REFERENCES ` tncm_vendor ` ( ` id ` ) ON UPDATE CASCADE ON DELETE CASCADE
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2021-10-14 20:44:05 +02:00
2021-09-28 18:53:22 +02:00
-- ----------------------------------------------------------------------
-- Table `tncm_template`
-- ----------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS ` tncm_template ` (
2022-02-01 13:49:32 +01:00
` id ` SERIAL ,
` name ` TEXT ,
` vendors ` TEXT ,
` models ` TEXT ,
PRIMARY KEY ( ` id ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2021-09-28 18:53:22 +02:00
-- ----------------------------------------------------------------------
-- Table `tncm_script`
-- ----------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS ` tncm_script ` (
2022-02-01 13:49:32 +01:00
` id ` SERIAL ,
` type ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` content ` TEXT ,
PRIMARY KEY ( ` id ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2021-09-28 18:53:22 +02:00
-- ----------------------------------------------------------------------
-- Table `tncm_template_scripts`
-- ----------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS ` tncm_template_scripts ` (
2022-02-01 13:49:32 +01:00
` id ` SERIAL ,
` id_template ` BIGINT UNSIGNED NOT NULL ,
` id_script ` BIGINT UNSIGNED NOT NULL ,
PRIMARY KEY ( ` id ` ) ,
FOREIGN KEY ( ` id_template ` ) REFERENCES ` tncm_template ` ( ` id ` ) ON UPDATE CASCADE ON DELETE CASCADE ,
FOREIGN KEY ( ` id_script ` ) REFERENCES ` tncm_script ` ( ` id ` ) ON UPDATE CASCADE ON DELETE CASCADE
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2021-09-28 18:53:22 +02:00
-- ----------------------------------------------------------------------
2021-10-08 15:12:23 +02:00
-- Table `tncm_agent`
2021-09-28 18:53:22 +02:00
-- ----------------------------------------------------------------------
2021-09-29 20:56:39 +02:00
CREATE TABLE IF NOT EXISTS ` tncm_agent ` (
2022-02-01 13:49:32 +01:00
` id_agent ` INT UNSIGNED NOT NULL ,
` id_vendor ` BIGINT UNSIGNED ,
` id_model ` BIGINT UNSIGNED ,
` protocol ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` cred_key ` VARCHAR ( 100 ) ,
` adv_key ` VARCHAR ( 100 ) ,
` port ` INT UNSIGNED DEFAULT 22 ,
` status ` INT NOT NULL DEFAULT 5 ,
` updated_at ` BIGINT NOT NULL DEFAULT 0 ,
` config_backup_id ` BIGINT UNSIGNED DEFAULT NULL ,
` id_template ` BIGINT UNSIGNED ,
` execute_type ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` execute ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` cron_interval ` VARCHAR ( 100 ) DEFAULT ' ' ,
` event_on_change ` INT UNSIGNED DEFAULT null ,
` last_error ` TEXT ,
PRIMARY KEY ( ` id_agent ` ) ,
FOREIGN KEY ( ` id_agent ` ) REFERENCES ` tagente ` ( ` id_agente ` ) ON UPDATE CASCADE ON DELETE CASCADE ,
FOREIGN KEY ( ` cred_key ` ) REFERENCES ` tcredential_store ` ( ` identifier ` ) ON UPDATE CASCADE ON DELETE SET NULL ,
FOREIGN KEY ( ` id_template ` ) REFERENCES ` tncm_template ` ( ` id ` ) ON UPDATE CASCADE ON DELETE CASCADE ,
FOREIGN KEY ( ` id_vendor ` ) REFERENCES ` tncm_vendor ` ( ` id ` ) ON UPDATE CASCADE ON DELETE SET NULL ,
FOREIGN KEY ( ` id_model ` ) REFERENCES ` tncm_model ` ( ` id ` ) ON UPDATE CASCADE ON DELETE SET NULL
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2021-10-05 16:42:24 +02:00
-- ----------------------------------------------------------------------
-- Table `tncm_agent_data`
-- ----------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS ` tncm_agent_data ` (
2022-02-01 13:49:32 +01:00
` id ` SERIAL ,
` id_agent ` INT UNSIGNED NOT NULL ,
` script_type ` INT UNSIGNED NOT NULL ,
` data ` LONGBLOB ,
` status ` INT NOT NULL DEFAULT 5 ,
` updated_at ` BIGINT NOT NULL DEFAULT 0 ,
FOREIGN KEY ( ` id_agent ` ) REFERENCES ` tagente ` ( ` id_agente ` ) ON UPDATE CASCADE ON DELETE CASCADE
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2021-11-23 14:26:11 +01:00
-- ----------------------------------------------------------------------
-- Table `tncm_queue`
-- ----------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS ` tncm_queue ` (
2022-02-01 13:49:32 +01:00
` id ` SERIAL ,
` id_agent ` INT UNSIGNED NOT NULL ,
` id_script ` BIGINT UNSIGNED NOT NULL ,
` utimestamp ` INT UNSIGNED NOT NULL ,
` scheduled ` INT UNSIGNED DEFAULT NULL ,
FOREIGN KEY ( ` id_agent ` ) REFERENCES ` tagente ` ( ` id_agente ` ) ON UPDATE CASCADE ON DELETE CASCADE ,
FOREIGN KEY ( ` id_script ` ) REFERENCES ` tncm_script ` ( ` id ` ) ON UPDATE CASCADE ON DELETE CASCADE
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2021-11-23 14:26:11 +01:00
-- ----------------------------------------------------------------------
-- Table `tncm_snippet`
-- ----------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS ` tncm_snippet ` (
2022-02-01 13:49:32 +01:00
` id ` SERIAL ,
` name ` TEXT ,
` content ` TEXT ,
PRIMARY KEY ( ` id ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2021-11-26 18:11:34 +01:00
-- ----------------------------------------------------------------------
-- Table `tncm_firmware`
-- ----------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS ` tncm_firmware ` (
2022-02-01 13:49:32 +01:00
` id ` SERIAL ,
` name ` VARCHAR ( 255 ) ,
` shortname ` VARCHAR ( 255 ) unique ,
` vendor ` BIGINT UNSIGNED ,
` models ` TEXT ,
` path ` TEXT ,
PRIMARY KEY ( ` id ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2022-02-24 18:27:57 +01:00
-- ----------------------------------------------------------------------
-- Table `tbackup`
-- ----------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS ` tbackup ` (
` id ` SERIAL ,
` utimestamp ` BIGINT DEFAULT 0 ,
` filename ` VARCHAR ( 512 ) DEFAULT ' ' ,
2022-06-08 11:49:48 +02:00
` id_user ` VARCHAR ( 255 ) DEFAULT ' ' ,
2022-02-24 18:27:57 +01:00
` description ` MEDIUMTEXT ,
` pid ` INT UNSIGNED DEFAULT 0 ,
` filepath ` VARCHAR ( 512 ) DEFAULT ' ' ,
PRIMARY KEY ( ` id ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2023-01-19 10:49:48 +01:00
-- ---------------------------------------------------------------------
-- Table `tmonitor_filter`
-- ---------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS ` tmonitor_filter ` (
` id_filter ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` id_name ` VARCHAR ( 600 ) NOT NULL ,
` id_group_filter ` INT NOT NULL DEFAULT 0 ,
` ag_group ` INT NOT NULL DEFAULT 0 ,
` recursion ` TEXT ,
` status ` INT NOT NULL DEFAULT - 1 ,
` ag_modulename ` TEXT ,
` ag_freestring ` TEXT ,
` tag_filter ` TEXT ,
` moduletype ` TEXT ,
` module_option ` INT DEFAULT 1 ,
` modulegroup ` INT NOT NULL DEFAULT - 1 ,
` min_hours_status ` TEXT ,
` datatype ` TEXT ,
` not_condition ` TEXT ,
` ag_custom_fields ` TEXT ,
PRIMARY KEY ( ` id_filter ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2023-02-21 15:32:45 +01:00
-- ---------------------------------------------------------------------
-- Table `tconsole`
-- ---------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS ` tconsole ` (
` id ` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT ,
` id_console ` BIGINT NOT NULL DEFAULT 0 ,
` description ` TEXT ,
` version ` TINYTEXT ,
` last_execution ` INT UNSIGNED NOT NULL DEFAULT 0 ,
` console_type ` TINYINT NOT NULL DEFAULT 0 ,
` timezone ` TINYTEXT ,
` public_url ` TEXT ,
PRIMARY KEY ( ` id ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2023-03-03 09:12:57 +01:00
2023-01-25 17:22:54 +01:00
-- ---------------------------------------------------------------------
-- Table `tagent_filter`
-- ---------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS ` tagent_filter ` (
` id_filter ` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
` id_name ` VARCHAR ( 600 ) NOT NULL ,
` id_group_filter ` INT NOT NULL DEFAULT 0 ,
` group_id ` INT NOT NULL DEFAULT 0 ,
` recursion ` TEXT ,
` status ` INT NOT NULL DEFAULT - 1 ,
` search ` TEXT ,
` id_os ` INT NOT NULL DEFAULT 0 ,
` policies ` TEXT ,
` search_custom ` TEXT ,
` ag_custom_fields ` TEXT ,
PRIMARY KEY ( ` id_filter ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2023-03-02 17:53:42 +01:00
2023-03-03 09:12:57 +01:00
-- ---------------------------------------------------------------------
2023-03-02 08:29:06 +01:00
-- Table `tevent_sound`
-- ---------------------------------------------------------------------
CREATE TABLE ` tevent_sound ` (
` id ` INT NOT NULL AUTO_INCREMENT ,
` name ` TEXT NULL ,
` sound ` TEXT NULL ,
` active ` TINYINT NOT NULL DEFAULT ' 1 ' ,
2023-03-02 17:53:42 +01:00
PRIMARY KEY ( ` id ` ) ) ENGINE = InnoDB DEFAULT CHARSET = utf8 ;
2023-03-07 13:49:39 +01:00
2023-03-08 15:45:18 +01:00
-- ---------------------------------------------------------------------
-- Table `tsesion_filter`
-- ---------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS ` tsesion_filter ` (
` id_filter ` INT NOT NULL AUTO_INCREMENT ,
` id_name ` TEXT NULL ,
` text ` TEXT NULL ,
` period ` TEXT NULL ,
` ip ` TEXT NULL ,
` type ` TEXT NULL ,
` user ` TEXT NULL ,
PRIMARY KEY ( ` id_filter ` )
2023-03-10 11:41:08 +01:00
) ENGINE = InnoDB DEFAULT CHARSET = utf8 ;
2023-02-13 10:06:14 +01:00
CREATE TABLE IF NOT EXISTS ` twelcome_tip ` (
` id ` INT NOT NULL AUTO_INCREMENT ,
2023-02-20 08:59:11 +01:00
` id_lang ` VARCHAR ( 20 ) NULL ,
` id_profile ` INT NOT NULL ,
2023-02-13 10:06:14 +01:00
` title ` VARCHAR ( 255 ) NOT NULL ,
` text ` TEXT NOT NULL ,
` url ` VARCHAR ( 255 ) NULL ,
` enable ` TINYINT NOT NULL ,
PRIMARY KEY ( ` id ` )
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
CREATE TABLE IF NOT EXISTS ` twelcome_tip_file ` (
` id ` INT NOT NULL AUTO_INCREMENT ,
` twelcome_tip_file ` INT NOT NULL ,
` filename ` VARCHAR ( 255 ) NOT NULL ,
` path ` VARCHAR ( 255 ) NOT NULL ,
PRIMARY KEY ( ` id ` ) ,
CONSTRAINT ` twelcome_tip_file `
FOREIGN KEY ( ` twelcome_tip_file ` )
REFERENCES ` twelcome_tip ` ( ` id ` )
ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE = InnoDB DEFAULT CHARSET = UTF8MB4 ;
2023-03-13 08:53:35 +01:00
2023-02-24 11:49:42 +01:00
-- ---------------------------------------------------------------------
-- Table `tfavmenu_user`
-- ---------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS ` tfavmenu_user ` (
` id ` INT NOT NULL AUTO_INCREMENT ,
` id_user ` VARCHAR ( 255 ) NOT NULL ,
` id_element ` TEXT ,
` url ` TEXT NOT NULL ,
` label ` VARCHAR ( 255 ) NOT NULL ,
` section ` VARCHAR ( 255 ) NOT NULL ,
PRIMARY KEY ( ` id ` ) ) ;