2011-03-02 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.data.postgreSQL.sql: fixed the serial values. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4052 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
9d5f594f1c
commit
6d71a2c284
|
@ -1,3 +1,7 @@
|
|||
2011-03-02 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* pandoradb.data.postgreSQL.sql: fixed the serial values.
|
||||
|
||||
2011-03-02 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
|
||||
|
||||
* include/functions_ui.php: Added missing variable initialization in function
|
||||
|
|
|
@ -33,6 +33,7 @@ INSERT INTO "talert_commands" VALUES (6,'Syslog','logger -p daemon.alert Pandora
|
|||
INSERT INTO "talert_commands" VALUES (7,'Sound Alert','/usr/bin/play /usr/share/sounds/alarm.wav','', 0);
|
||||
INSERT INTO "talert_commands" VALUES (8,'Jabber Alert','echo _field3_ | sendxmpp -r _field1_ --chatroom _field2_','Send jabber alert to chat room in a predefined server (configure first .sendxmpprc file). Uses field3 as text message, field1 as useralias for source message, and field2 for chatroom name', 0);
|
||||
INSERT INTO "talert_commands" VALUES (9,'SMS','sendsms _field1_ _field2_','Send SMS using the Pandora FMS standard SMS device, using smstools. Uses field2 as text message, field1 as destination phone (include international prefix!)', 0);
|
||||
SELECT setval('talert_commands_id_seq', (SELECT (SELECT MAX(id) FROM talert_commands)));
|
||||
|
||||
--
|
||||
-- Dumping data for table "tconfig"
|
||||
|
@ -99,6 +100,7 @@ INSERT INTO "tconfig_os" VALUES
|
|||
(14,'Embedded','Embedded device running a Pandora FMS agent','embedded.png'),
|
||||
(15,'Android','Android agent','android.png');
|
||||
COMMIT WORK;
|
||||
SELECT setval('tconfig_os_id_os_seq', (SELECT (SELECT MAX(id_os) FROM tconfig_os)));
|
||||
|
||||
--
|
||||
-- Dumping data for table "tgrupo"
|
||||
|
@ -116,6 +118,7 @@ VALUES
|
|||
(12,'Applications','applications',0,0,0,''),
|
||||
(13,'Web','world',0,0,0,'');
|
||||
COMMIT WORK;
|
||||
SELECT setval('tgrupo_id_grupo_seq', (SELECT (SELECT MAX(id_grupo) FROM tgrupo)));
|
||||
|
||||
--
|
||||
-- Dumping data for table "tlanguage"
|
||||
|
@ -171,6 +174,7 @@ INSERT INTO "tlink" VALUES
|
|||
(5,'Module library','http://pandorafms.org/?sec=community&sec2=repository&lng=es'),
|
||||
(6,'Commercial support','http://pandorafms.com');
|
||||
COMMIT WORK;
|
||||
SELECT setval('tlink_id_link_seq', (SELECT (SELECT MAX(id_link) FROM tlink)));
|
||||
|
||||
--
|
||||
-- Dumping data for table "tmodule_group"
|
||||
|
@ -188,6 +192,7 @@ INSERT INTO "tmodule_group" VALUES
|
|||
(8,'Enviromental'),
|
||||
(9,'Users');
|
||||
COMMIT WORK;
|
||||
SELECT setval('tmodule_group_id_mg_seq', (SELECT (SELECT MAX(id_mg) FROM tmodule_group)));
|
||||
|
||||
--
|
||||
-- Dumping data for table "torigen"
|
||||
|
@ -228,6 +233,7 @@ INSERT INTO "ttipo_modulo" VALUES
|
|||
(23,'async_string', 8, 'Asyncronous string data', 'mod_async_string.png'),
|
||||
(24,'log4x',0,'Log4x','mod_log4x.png'),
|
||||
(100,'keep_alive',-1,'KeepAlive','mod_keepalive.png');
|
||||
SELECT setval('ttipo_modulo_id_tipo_seq', (SELECT (SELECT MAX(id_tipo) FROM ttipo_modulo)));
|
||||
|
||||
-- Categoria field is used to segregate several types
|
||||
-- (plugin, agents, network) on their data
|
||||
|
@ -243,20 +249,24 @@ INSERT INTO "tusuario" ("id_user", "fullname", "firstname", "lastname", "middlen
|
|||
-- Dumping data for table "tusuario_perfil"
|
||||
--
|
||||
INSERT INTO "tusuario_perfil" VALUES (1,'admin',5,0,'admin');
|
||||
SELECT setval('tusuario_perfil_id_up_seq', (SELECT (SELECT MAX(id_up) FROM tusuario_perfil)));
|
||||
|
||||
--
|
||||
-- Dumping data for table "tperfil"
|
||||
--
|
||||
INSERT INTO "tperfil" VALUES (1,'Operator (Read)',0,1,0,1,0,0,0,0,0,0),(2,'Operator (Write)',1,1,0,1,0,0,0,0,0,0),(3,'Chief Operator',1,1,1,1,0,0,0,0,1,0),(4,'Group coordinator',1,1,1,1,1,1,1,0,0,0),(5,'Pandora Administrator',1,1,1,1,1,1,1,1,1,1);
|
||||
SELECT setval('tperfil_id_perfil_seq', (SELECT (SELECT MAX(id_perfil) FROM tperfil)));
|
||||
|
||||
INSERT INTO "tnews" ("id_news", "author", "subject", "text", "timestamp") VALUES (1,'admin','Welcome to Pandora FMS 3.2!','This is the new Pandora FMS Console. A lot of new features have been added since last version. Please read the documentation about it, and feel free to test any option.\r\n\r\nThe Pandora FMS Team.',NOW()),
|
||||
(2,'admin','New GIS Feature','Try our new GIS representation, activate GIS in Setup to see new available options.',NOW());
|
||||
SELECT setval('tnews_id_news_seq', (SELECT (SELECT MAX(id_news) FROM tnews)));
|
||||
|
||||
INSERT INTO tmodule VALUES (1,'Agent module');
|
||||
INSERT INTO tmodule VALUES (2,'Network module');
|
||||
INSERT INTO tmodule VALUES (4,'Plugin module');
|
||||
INSERT INTO tmodule VALUES (5,'Prediction module');
|
||||
INSERT INTO tmodule VALUES (6,'WMI module');
|
||||
SELECT setval('tmodule_id_module_seq', (SELECT (SELECT MAX(id_module) FROM tmodule)));
|
||||
|
||||
INSERT INTO "tnetwork_component" ("id_nc", "name", "description", "id_group", "type", "max", "min", "module_interval", "tcp_port", "tcp_send", "tcp_rcv", "snmp_community", "snmp_oid", "id_module_group", "id_modulo") VALUES (1,'OS Total process','Total process in Operating System (UNIX MIB)',13,15,0,0,180,0,'','','public','HOST-RESOURCES-MIB::hrSystemProcesses.0 ',4,2);
|
||||
INSERT INTO "tnetwork_component" ("id_nc", "name", "description", "id_group", "type", "max", "min", "module_interval", "tcp_port", "tcp_send", "tcp_rcv", "snmp_community", "snmp_oid", "id_module_group", "id_modulo") VALUES (2,'OS CPU Load (1 min)','CPU Load in Operating System (UNIX MIB)',13,15,0,0,180,0,'','','public','UCD-SNMP-MIB::laLoad.1',4,2);
|
||||
|
@ -298,6 +308,7 @@ INSERT INTO "tnetwork_component" ("id_nc", "name", "description", "id_group", "t
|
|||
INSERT INTO "tnetwork_component" ("id_nc", "name", "description", "id_group", "type", "max", "min", "module_interval", "tcp_port", "tcp_send", "tcp_rcv", "snmp_community", "snmp_oid", "id_module_group", "id_modulo", "plugin_user", "max_timeout") VALUES (200, 'CPU load', 'CPU0 load average', 14, 1, 100, 0, 300, 1, '', '', '', 'SELECT LoadPercentage from Win32_Processor WHERE DeviceID = "CPU0"', 1, 6, 'Administrator', 10);
|
||||
INSERT INTO "tnetwork_component" ("id_nc", "name", "description", "id_group", "type", "max", "min", "module_interval", "tcp_port", "tcp_send", "tcp_rcv", "snmp_community", "snmp_oid", "id_module_group", "id_modulo", "plugin_user", "max_timeout") VALUES (201, 'Free RAM', 'Available RAM memory in bytes', 14, 1, 0, 0, 300, 0, '', '', '', 'SELECT AvailableBytes from Win32_PerfRawData_PerfOS_Memory', 1, 6, 'Administrator', 10);
|
||||
INSERT INTO "tnetwork_component" ("id_nc", "name", "description", "id_group", "type", "max", "min", "module_interval", "tcp_port", "tcp_send", "tcp_rcv", "snmp_community", "snmp_oid", "id_module_group", "id_modulo", "plugin_user", "max_timeout") VALUES (202, 'Windows version', 'Operating system version', 14, 3, 0, 0, 300, 1, '', '', '', 'SELECT Caption FROM Win32_OperatingSystem', 1, 6, 'Administrator', 10);
|
||||
SELECT setval('tnetwork_component_id_nc_seq', (SELECT (SELECT MAX(id_nc) FROM tnetwork_component)));
|
||||
|
||||
--
|
||||
-- Dumping data for table "tnetwork_component_group"
|
||||
|
@ -310,6 +321,7 @@ INSERT INTO "tnetwork_component_group" ("id_sg", "name", "parent") VALUES (11,'M
|
|||
INSERT INTO "tnetwork_component_group" ("id_sg", "name", "parent") VALUES (12,'Operating Systems',0);
|
||||
INSERT INTO "tnetwork_component_group" ("id_sg", "name", "parent") VALUES (13,'UCD Mibs (Linux, UCD-SNMP)',12);
|
||||
INSERT INTO "tnetwork_component_group" ("id_sg", "name", "parent") VALUES (14,'WMI',12);
|
||||
SELECT setval('tnetwork_component_group_id_sg_seq', (SELECT (SELECT MAX(id_sg) FROM tnetwork_component_group)));
|
||||
|
||||
-- Network profile
|
||||
INSERT INTO "tnetwork_profile" ("id_np", "name", "description") VALUES (1,'Basic Network Monitoring','This includes basic SNMP, ICMP, and TCP checks.');
|
||||
|
@ -318,6 +330,7 @@ INSERT INTO "tnetwork_profile" ("id_np", "name", "description") VALUES (3,'Basic
|
|||
INSERT INTO "tnetwork_profile" ("id_np", "name", "description") VALUES (4,'Full SNMP Monitoring','');
|
||||
INSERT INTO "tnetwork_profile" ("id_np", "name", "description") VALUES (5,'Linux Server','Full Monitoring of a Linux server services.');
|
||||
INSERT INTO "tnetwork_profile" ("id_np", "name", "description") VALUES (6,'Basic WMI monitoring','Basic monitoring of a Windows host.');
|
||||
SELECT setval('tnetwork_profile_id_np_seq', (SELECT (SELECT MAX(id_np) FROM tnetwork_profile)));
|
||||
|
||||
INSERT INTO "tnetwork_profile_component" ("id_nc", "id_np") VALUES (24,1);
|
||||
INSERT INTO "tnetwork_profile_component" ("id_nc", "id_np") VALUES (25,1);
|
||||
|
@ -367,23 +380,29 @@ INSERT INTO "tnetwork_profile_component" ("id_nc", "id_np") VALUES (202,6);
|
|||
|
||||
-- GIS Data
|
||||
INSERT INTO "tgis_map" VALUES (1,'Sample',-3.708187,40.42056,0,16,'',-3.708187,40.42056,0,0,1);
|
||||
SELECT setval('tgis_map_id_tgis_map_seq', (SELECT (SELECT MAX(id_tgis_map) FROM tgis_map)));
|
||||
INSERT INTO "tgis_map_connection" VALUES (1,'OpenStreetMap','OSM','{\"type\":\"OSM\",\"url\":\"http://tile.openstreetmap.org/${z}/${x}/${y}.png\"}',19,16,-3.708187,40.42056,0,-3.708187,40.42056,0,0);
|
||||
SELECT setval('tgis_map_connection_id_tmap_connection_seq', (SELECT (SELECT MAX(id_tmap_connection) FROM tgis_map_connection)));
|
||||
INSERT INTO "tgis_map_has_tgis_map_connection" VALUES (1,1,'2010-03-01 09:46:48',1);
|
||||
INSERT INTO "tgis_map_layer" VALUES (1,'Group All',1,0,1,0);
|
||||
SELECT setval('tgis_map_layer_id_tmap_layer_seq', (SELECT (SELECT MAX(id_tmap_layer) FROM tgis_map_layer)));
|
||||
|
||||
-- example alert template
|
||||
INSERT INTO "talert_commands" VALUES (10,'Remote agent control','/usr/share/pandora_server/udp_client.pl _address_ 41122 "_field1_"','This command is used to send commands to the Pandora FMS agents with the UDP server enabled. The UDP server is used to order agents (Windows and UNIX) to "refresh" the agent execution: that means, to force the agent to execute and send data to s',0);
|
||||
SELECT setval('talert_commands_id_seq', (SELECT (SELECT MAX(id) FROM talert_commands)));
|
||||
|
||||
INSERT INTO "talert_actions" VALUES (1,'Mail to XXX',1,'yourmail@domain.es','[PANDORA] Alert from agent _agent_ on module _module_','',0,0);
|
||||
INSERT INTO "talert_actions" VALUES (2,'Restart agent',10,'REFRESH AGENT','','',0,0);
|
||||
SELECT setval('talert_actions_id_seq', (SELECT (SELECT MAX(id) FROM talert_actions)));
|
||||
|
||||
INSERT INTO "talert_templates" VALUES (1,'Critical condition','This is a generic alert template to fire on condition CRITICAL',1,'','','Hello, this is an automated email coming from Pandora FMS\r\n\r\nThis alert has been fired because a CRITICAL condition in one of your monitored items:\r\n\r\nAgent : _agent_\r\nModule: _module_\r\nModule description: _moduledescription_\r\nTimestamp _timestamp_\r\nCurrent value: _data_\r\n\r\nThanks for your time.\r\n\r\nBest regards\r\nPandora FMS\r\n','critical','',1,0.00,0.00,86400,1,0,'12:00:00','12:00:00',1,1,1,1,1,1,1,1,'[PANDORA] Alert RECOVERED for CRITICAL status on _agent_ / _module_','Hello, this is an automated email coming from Pandora FMS\r\n\r\nThis alert has been RECOVERED from a CRITICAL condition in one of your monitored items:\r\n\r\nAgent : _agent_\r\nModule: _module_\r\nModule description: _moduledescription_\r\nTimestamp _timestamp_\r\nCurrent value: _data_\r\n\r\nThanks for your time.\r\n\r\nBest regards\r\nPandora FMS\r\n',4,0);
|
||||
INSERT INTO "talert_templates" VALUES (2,'Manual alert','This is a template used to fire manual alerts, condition defined here never will be executed. Use this template to assign to your actions/commands used to do remote management (Agent restart, execute commands on server, etc).',NULL,'','','','max_min','',1,0.00,1.00,86400,1,0,'12:00:00','12:00:00',1,1,1,1,1,1,1,0,'','',1,0);
|
||||
INSERT INTO "talert_templates" VALUES (3,'Warning condition','This is a generic alert template to fire on WARNING condition.',1,'','','Hello, this is an automated email coming from Pandora FMS

This alert has been fired because a WARNING condition in one of your monitored items:

Agent : _agent_
Module: _module_
Module description: _moduledescription_
Timestamp _timestamp_
Current value: _data_

Thanks for your time.

Best regards
Pandora FMS
','warning','',1,0.00,0.00,86400,1,0,'12:00:00','12:00:00',1,1,1,1,1,1,1,1,'[PANDORA] Alert RECOVERED for WARNING status on _agent_ / _module_','Hello, this is an automated email coming from Pandora FMS

This alert has been RECOVERED from a WARNING condition in one of your monitored items:

Agent : _agent_
Module: _module_
Module description: _moduledescription_
Timestamp _timestamp_
Current value: _data_

Thanks for your time.

Best regards
Pandora FMS
',3,0);
|
||||
SELECT setval('talert_templates_id_seq', (SELECT (SELECT MAX(id) FROM talert_templates)));
|
||||
|
||||
-- treport_custom_sql Data
|
||||
INSERT INTO "treport_custom_sql" ("id", "name", "sql") VALUES (1, 'Monitoring Report Agent', 'select direccion, nombre, comentarios, (select nombre from tgrupo where tgrupo.id_grupo = tagente.id_grupo) as "group" from tagente;');
|
||||
INSERT INTO "treport_custom_sql" ("id", "name", "sql") VALUES (2, 'Monitoring Report Modules', 'select (select tagente.nombre from tagente where tagente.id_agente = tagente_modulo.id_agente) as agent_name, nombre , (select tmodule_group.name from tmodule_group where tmodule_group.id_mg = tagente_modulo.id_module_group) as module_group, module_interval from tagente_modulo where delete_pending = 0 order by agent_name;');
|
||||
INSERT INTO "treport_custom_sql" ("id", "name", "sql") VALUES (3, 'Monitoring Report Alerts', 'select t1.nombre as agent_name, t2.nombre as module_name, (select talert_templates.name from talert_templates where talert_templates.id = t3.id_alert_template) as template, (select group_concat(t02.name) from talert_template_module_actions as t01 inner join talert_actions as t02 on t01.id_alert_action = t02.id where t01.id_alert_template_module = t3.id group by t01.id_alert_template_module) as actions from tagente as t1 inner join tagente_modulo as t2 on t1.id_agente = t2.id_agente inner join talert_template_modules as t3 on t2.id_agente_modulo = t3.id_agent_module order by agent_name, module_name;');
|
||||
INSERT INTO "treport_custom_sql" ("id", "name", "sql") VALUES (4, 'Group view', 'select t1.nombre, (select count(t3.id_agente) from tagente as t3 where t1.id_grupo = t3.id_grupo) as agents, (SELECT COUNT(t4.id_agente) FROM tagente as t4 WHERE t4.id_grupo = t1.id_grupo AND t4.disabled = 0 AND t4.ultimo_contacto < NOW() - (intervalo / (1/2))) as agent_unknown, (SELECT COUNT(tagente_estado.id_agente_estado) FROM tagente_estado, tagente, tagente_modulo WHERE tagente.id_grupo = t1.id_grupo AND tagente.disabled = 0 AND tagente.id_agente = tagente_estado.id_agente AND tagente_estado.id_agente_modulo = tagente_modulo.id_agente_modulo AND tagente_modulo.disabled = 0 AND utimestamp > 0 AND tagente_modulo.id_tipo_modulo NOT IN(21,22,23,24,100) AND (UNIX_TIMESTAMP(NOW()) - tagente_estado.utimestamp) >= (tagente_estado.current_interval / (1/2))) as monitor_unknow, (SELECT COUNT(tagente_estado.id_agente_estado) FROM tagente_estado, tagente, tagente_modulo WHERE tagente.id_grupo = t1.id_grupo AND tagente.disabled = 0 AND tagente.id_agente = tagente_estado.id_agente AND tagente_estado.id_agente_modulo = tagente_modulo.id_agente_modulo AND tagente_modulo.disabled = 0 AND tagente_modulo.id_tipo_modulo NOT IN (21,22,23,24) AND utimestamp = 0) as monitor_no_init, (SELECT COUNT(tagente_estado.id_agente_estado) FROM tagente_estado, tagente, tagente_modulo WHERE tagente.id_grupo = t1.id_grupo AND tagente.disabled = 0 AND tagente_estado.id_agente = tagente.id_agente AND tagente_estado.id_agente_modulo = tagente_modulo.id_agente_modulo AND tagente_modulo.disabled = 0 AND estado = 0 AND ((UNIX_TIMESTAMP(NOW()) - tagente_estado.utimestamp) < (tagente_estado.current_interval / (1/2)) OR (tagente_modulo.id_tipo_modulo IN(21,22,23,24,100))) AND (utimestamp > 0 OR (tagente_modulo.id_tipo_modulo IN(21,22,23,24)))) as monitor_ok, (SELECT COUNT(tagente_estado.id_agente_estado) FROM tagente_estado, tagente, tagente_modulo WHERE tagente.id_grupo = t1.id_grupo AND tagente.disabled = 0 AND tagente_estado.id_agente = tagente.id_agente AND tagente_estado.id_agente_modulo = tagente_modulo.id_agente_modulo AND tagente_modulo.disabled = 0 AND estado = 1 AND ((UNIX_TIMESTAMP(NOW()) - tagente_estado.utimestamp) < (tagente_estado.current_interval / (1/2)) OR (tagente_modulo.id_tipo_modulo IN(21,22,23,24,100))) AND utimestamp > 0) as monitor_critical, (SELECT COUNT(talert_template_modules.id) FROM talert_template_modules, tagente_modulo, tagente_estado, tagente WHERE tagente.id_grupo = t1.id_grupo AND tagente_modulo.id_agente = tagente.id_agente AND tagente_estado.id_agente_modulo = tagente_modulo.id_agente_modulo AND tagente_modulo.disabled = 0 AND tagente.disabled = 0 AND talert_template_modules.id_agent_module = tagente_modulo.id_agente_modulo AND times_fired > 0) as monitor_alert_fired from tgrupo as t1 where 0 < (select count(t2.id_agente) from tagente as t2 where t1.id_grupo = t2.id_grupo)');
|
||||
|
||||
SELECT setval('treport_custom_sql_id_seq', (SELECT (SELECT MAX(id) FROM treport_custom_sql)));
|
||||
|
|
Loading…
Reference in New Issue