2012-10-31 Sergio Martin <sergio.martin@artica.es>

* pandoradb_data.sql
	pandoradb.data.postgreSQL.sql
	pandoradb.data.oracle.sql: Changed the default data
	of alert commands to fields customization



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7117 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
zarzuelo 2012-10-31 09:58:45 +00:00
parent 98aaeea0a7
commit 42ac739002
4 changed files with 40 additions and 33 deletions

View File

@ -1,3 +1,10 @@
2012-10-31 Sergio Martin <sergio.martin@artica.es>
* pandoradb_data.sql
pandoradb.data.postgreSQL.sql
pandoradb.data.oracle.sql: Changed the default data
of alert commands to fields customization
2012-10-30 Sergio Martin <sergio.martin@artica.es>
* include/javascript/pandora_alerts.js

View File

@ -27,16 +27,16 @@
--
BEGIN
LOCK TABLE talert_commands IN EXCLUSIVE MODE;
INSERT INTO talert_commands (id, name, command, description, internal) VALUES (1,'eMail','Internal type', 'This alert send an email using internal Pandora FMS Server SMTP capabilities (defined in each server, using:\r\n_field1_ as destination email address, and\r\n_field2_ as subject for message. \r\n_field3_ as text of message.', 1);
INSERT INTO talert_commands (id, name, command, description, internal) VALUES (2,'Internal Audit','Internal type','This alert save alert in Pandora interal audit system. Fields are static and only _field1_ is used.', 1);
INSERT INTO talert_commands (id, name, command, description, internal) VALUES (3,'Pandora FMS Event','Internal type','This alert create an special event into Pandora FMS event manager.', 1);
INSERT INTO talert_commands (id, name, command, description, internal) VALUES (4,'Pandora FMS Alertlog','echo _timestamp_ pandora _agent_ _data_ _field1_ _field2_ >> /var/log/pandora/pandora_alert.log','This is a default alert to write alerts in a standard ASCII plaintext log file in /var/log/pandora/pandora_alert.log\r\n', 0);
INSERT INTO talert_commands (id, name, command, description, internal) VALUES (5,'SNMP Trap','/usr/bin/snmptrap -v 1 -c trap_public 192.168.0.4 1.1.1.1.1.1.1.1 _agent_ _field1_','Send a SNMPTRAP to 192.168.0.4. Please review config and adapt to your needs, this is only a sample, not functional itself.', 0);
INSERT INTO talert_commands (id, name, command, description, internal) VALUES (6,'Syslog','logger -p daemon.alert Pandora Alert _agent_ _data_ _field1_ _field2_','Uses field1 and field2 to generate Syslog alert in facility daemon with "alert" level.', 0);
INSERT INTO talert_commands (id, name, command, description, internal) VALUES (7,'Sound Alert','/usr/bin/play /usr/share/sounds/alarm.wav','', 0);
INSERT INTO talert_commands (id, name, command, description, internal) 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 (id, name, command, description, internal) 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);
INSERT INTO talert_commands (id, name, command, description, internal) VALUES (10,'Validate Event','Internal type','This alert validate the events matched with a module given the agent name (_field1_) and module name (_field2_)', 1);
INSERT INTO talert_commands (id, name, command, description, internal, fields_descriptions, fields_values) VALUES (1,'eMail','Internal&#x20;type','This&#x20;alert&#x20;send&#x20;an&#x20;email&#x20;using&#x20;internal&#x20;Pandora&#x20;FMS&#x20;Server&#x20;SMTP&#x20;capabilities&#x20;&#40;defined&#x20;in&#x20;each&#x20;server,&#x20;using:&#x0d;&#x0a;_field1_&#x20;as&#x20;destination&#x20;email&#x20;address,&#x20;and&#x0d;&#x0a;_field2_&#x20;as&#x20;subject&#x20;for&#x20;message.&#x20;&#x0d;&#x0a;_field3_&#x20;as&#x20;text&#x20;of&#x20;message.',1,'[\"Destination&#x20;address\",\"Subject\",\"Text\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"]','[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"]');
INSERT INTO talert_commands (id, name, command, description, internal, fields_descriptions, fields_values) VALUES (2,'Internal&#x20;Audit','Internal&#x20;type','This&#x20;alert&#x20;save&#x20;alert&#x20;in&#x20;Pandora&#x20;interal&#x20;audit&#x20;system.&#x20;Fields&#x20;are&#x20;static&#x20;and&#x20;only&#x20;_field1_&#x20;is&#x20;used.',1,'[\"Description\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"]','[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"]');
INSERT INTO talert_commands (id, name, command, description, internal, fields_descriptions, fields_values) VALUES (3,'Pandora&#x20;FMS&#x20;Event','Internal&#x20;type','This&#x20;alert&#x20;create&#x20;an&#x20;special&#x20;event&#x20;into&#x20;Pandora&#x20;FMS&#x20;event&#x20;manager.',1,'[\"Event&#x20;text\",\"Event&#x20;type\",\"Source\",\"Agent&#x20;name&#x20;or&#x20;_agent_\",\"Event&#x20;criticity\",\"ID&#x20;extra\",\"Tags&#x20;separated&#x20;by&#x20;commas\",\"Comments\",\"Not&#x20;used\",\"Not&#x20;used\"]','[\"\",\"alert_ceased,Alert&#x20;ceased;alert_fired,Alert&#x20;fired;alert_manual_validation,Alert&#x20;manual&#x20;validation;alert_recovered,Alert&#x20;recovered;configuration_change,Configuration&#x20;change&#x20;;error,Error;critical,Monitor&#x20;Critical;normal,Monitor&#x20;Normal;going_unknown,Monitor\",\"\",\"\",\"4,Critical;1,Informational;0,Maintenance;6,Major;5,Minor;2,Normal;3,Warning\",\"\",\"\",\"\",\"\",\"\"]');
INSERT INTO talert_commands (id, name, command, description, internal, fields_descriptions, fields_values) VALUES (4,'Pandora&#x20;FMS&#x20;Alertlog','echo&#x20;_timestamp_&#x20;pandora&#x20;_agent_&#x20;_data_&#x20;_field1_&#x20;_field2_&#x20;&gt;&gt;&#x20;/var/log/pandora/pandora_alert.log','This&#x20;is&#x20;a&#x20;default&#x20;alert&#x20;to&#x20;write&#x20;alerts&#x20;in&#x20;a&#x20;standard&#x20;ASCII&#x20;&#x20;plaintext&#x20;log&#x20;file&#x20;in&#x20;/var/log/pandora/pandora_alert.log&#x0d;&#x0a;',0,'[\"Log&#x20;Info&#x20;1\",\"Log&#x20;Info&#x20;2\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"]','[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"]');
INSERT INTO talert_commands (id, name, command, description, internal, fields_descriptions, fields_values) VALUES (5,'SNMP&#x20;Trap','/usr/bin/snmptrap&#x20;-v&#x20;1&#x20;-c&#x20;_field1_&#x20;_field2_&#x20;_field3_&#x20;_field4_','Send&#x20;a&#x20;SNMPTRAP&#x20;to&#x20;192.168.0.4.&#x20;Please&#x20;review&#x20;config&#x20;and&#x20;adapt&#x20;to&#x20;your&#x20;needs,&#x20;this&#x20;is&#x20;only&#x20;a&#x20;sample,&#x20;not&#x20;functional&#x20;itself.',0,'[\"Community\",\"Destination&#x20;address\",\"OID\",\"Source&#x20;address\",\"\",\"\",\"\",\"\",\"\",\"\"]','[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"]');
INSERT INTO talert_commands (id, name, command, description, internal, fields_descriptions, fields_values) VALUES (6,'Syslog','logger&#x20;-p&#x20;daemon.alert&#x20;Pandora&#x20;Alert&#x20;_agent_&#x20;_data_&#x20;_field1_&#x20;_field2_','Uses&#x20;field1&#x20;and&#x20;field2&#x20;to&#x20;generate&#x20;Syslog&#x20;alert&#x20;in&#x20;facility&#x20;daemon&#x20;with&#x20;&quot;alert&quot;&#x20;level.',0,'[\"Log&#x20;Info&#x20;1\",\"Log&#x20;Info&#x20;2\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"]','[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"]');
INSERT INTO talert_commands (id, name, command, description, internal, fields_descriptions, fields_values) VALUES (7,'Sound Alert','/usr/bin/play /usr/share/sounds/alarm.wav','',0,NULL,NULL);
INSERT INTO talert_commands (id, name, command, description, internal, fields_descriptions, fields_values) VALUES (8,'Jabber&#x20;Alert','echo&#x20;_field3_&#x20;|&#x20;sendxmpp&#x20;-r&#x20;_field1_&#x20;--chatroom&#x20;_field2_','Send&#x20;jabber&#x20;alert&#x20;to&#x20;chat&#x20;room&#x20;in&#x20;a&#x20;predefined&#x20;server&#x20;&#40;configure&#x20;first&#x20;.sendxmpprc&#x20;file&#41;.&#x20;Uses&#x20;field3&#x20;as&#x20;text&#x20;message,&#x20;field1&#x20;as&#x20;useralias&#x20;for&#x20;source&#x20;message,&#x20;and&#x20;field2&#x20;for&#x20;chatroom&#x20;name',0,'[\"User&#x20;alias\",\"Chatroom&#x20;name\",\"Message\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"]','[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"]');
INSERT INTO talert_commands (id, name, command, description, internal, fields_descriptions, fields_values) VALUES (9,'SMS','sendsms&#x20;_field1_&#x20;_field2_','Send&#x20;SMS&#x20;using&#x20;the&#x20;Pandora&#x20;FMS&#x20;standard&#x20;SMS&#x20;device,&#x20;using&#x20;smstools.&#x20;&#x20;Uses&#x20;field2&#x20;as&#x20;text&#x20;message,&#x20;field1&#x20;as&#x20;destination&#x20;phone&#x20;&#40;include&#x20;international&#x20;prefix!&#41;',0,'[\"Destination&#x20;number\",\"Message\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"]','[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"]');
INSERT INTO talert_commands (id, name, command, description, internal, fields_descriptions, fields_values) VALUES (10,'Validate&#x20;Event','Internal&#x20;type','This&#x20;alert&#x20;validate&#x20;the&#x20;events&#x20;matched&#x20;with&#x20;a&#x20;module&#x20;given&#x20;the&#x20;agent&#x20;name&#x20;&#40;_field1_&#41;&#x20;and&#x20;module&#x20;name&#x20;&#40;_field2_&#41;',1,'[\"Agent&#x20;name\",\"Module&#x20;name\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"]','[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"]');
COMMIT;
END;;
@ -502,7 +502,7 @@ END;;
-- example alert template
BEGIN
LOCK TABLE talert_commands IN EXCLUSIVE MODE;
INSERT INTO talert_commands (id, name, command, description, internal) VALUES (10,'Remote&#x20;agent&#x20;control','/usr/share/pandora_server/udp_client.pl _address_ 41122 &quot;_field1_&quot;','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 &quot;refresh&quot; the agent execution: that means, to force the agent to execute and send data to s',0);
INSERT INTO talert_commands (id, name, command, description, internal, fields_descriptions, fields_values) VALUES (11,'Remote&#x20;agent&#x20;control','/usr/share/pandora_server/udp_client.pl&#x20;_address_&#x20;41122&#x20;&quot;_field1_&quot;','This&#x20;command&#x20;is&#x20;used&#x20;to&#x20;send&#x20;commands&#x20;to&#x20;the&#x20;Pandora&#x20;FMS&#x20;agents&#x20;with&#x20;the&#x20;UDP&#x20;server&#x20;enabled.&#x20;The&#x20;UDP&#x20;server&#x20;is&#x20;used&#x20;to&#x20;order&#x20;agents&#x20;&#40;Windows&#x20;and&#x20;UNIX&#41;&#x20;to&#x20;&quot;refresh&quot;&#x20;the&#x20;agent&#x20;execution:&#x20;that&#x20;means,&#x20;to&#x20;force&#x20;the&#x20;agent&#x20;to&#x20;execute&#x20;and&#x20;send&#x20;data',0,'[\"Command\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"]','[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"]');
COMMIT;
END;;

View File

@ -24,16 +24,16 @@
-- Dumping data for table "talert_commands"
--
INSERT INTO "talert_commands" ("id", "name", "command", "description", "internal") VALUES (1,'eMail','Internal type', 'This alert send an email using internal Pandora FMS Server SMTP capabilities (defined in each server, using:\r\n_field1_ as destination email address, and\r\n_field2_ as subject for message. \r\n_field3_ as text of message.', 1);
INSERT INTO "talert_commands" ("id", "name", "command", "description", "internal") VALUES (2,'Internal Audit','Internal type','This alert save alert in Pandora interal audit system. Fields are static and only _field1_ is used.', 1);
INSERT INTO "talert_commands" ("id", "name", "command", "description", "internal") VALUES (3,'Pandora FMS Event','Internal type','This alert create an special event into Pandora FMS event manager.', 1);
INSERT INTO "talert_commands" ("id", "name", "command", "description", "internal") VALUES (4,'Pandora FMS Alertlog','echo _timestamp_ pandora _agent_ _data_ _field1_ _field2_ >> /var/log/pandora/pandora_alert.log','This is a default alert to write alerts in a standard ASCII plaintext log file in /var/log/pandora/pandora_alert.log\r\n', 0);
INSERT INTO "talert_commands" ("id", "name", "command", "description", "internal") VALUES (5,'SNMP Trap','/usr/bin/snmptrap -v 1 -c trap_public 192.168.0.4 1.1.1.1.1.1.1.1 _agent_ _field1_','Send a SNMPTRAP to 192.168.0.4. Please review config and adapt to your needs, this is only a sample, not functional itself.', 0);
INSERT INTO "talert_commands" ("id", "name", "command", "description", "internal") VALUES (6,'Syslog','logger -p daemon.alert Pandora Alert _agent_ _data_ _field1_ _field2_','Uses field1 and field2 to generate Syslog alert in facility daemon with "alert" level.', 0);
INSERT INTO "talert_commands" ("id", "name", "command", "description", "internal") VALUES (7,'Sound Alert','/usr/bin/play /usr/share/sounds/alarm.wav','', 0);
INSERT INTO "talert_commands" ("id", "name", "command", "description", "internal") 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" ("id", "name", "command", "description", "internal") 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);
INSERT INTO "talert_commands" ("id", "name", "command", "description", "internal") VALUES (10,'Validate Event','Internal type','This alert validate the events matched with a module given the agent name (_field1_) and module name (_field2_)', 1);
INSERT INTO "talert_commands" ("id", "name", "command", "description", "internal", "fields_descriptions", "fields_values") VALUES (1,'eMail','Internal&#x20;type','This&#x20;alert&#x20;send&#x20;an&#x20;email&#x20;using&#x20;internal&#x20;Pandora&#x20;FMS&#x20;Server&#x20;SMTP&#x20;capabilities&#x20;&#40;defined&#x20;in&#x20;each&#x20;server,&#x20;using:&#x0d;&#x0a;_field1_&#x20;as&#x20;destination&#x20;email&#x20;address,&#x20;and&#x0d;&#x0a;_field2_&#x20;as&#x20;subject&#x20;for&#x20;message.&#x20;&#x0d;&#x0a;_field3_&#x20;as&#x20;text&#x20;of&#x20;message.',1,'[\"Destination&#x20;address\",\"Subject\",\"Text\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"]','[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"]');
INSERT INTO "talert_commands" ("id", "name", "command", "description", "internal", "fields_descriptions", "fields_values") VALUES (2,'Internal&#x20;Audit','Internal&#x20;type','This&#x20;alert&#x20;save&#x20;alert&#x20;in&#x20;Pandora&#x20;interal&#x20;audit&#x20;system.&#x20;Fields&#x20;are&#x20;static&#x20;and&#x20;only&#x20;_field1_&#x20;is&#x20;used.',1,'[\"Description\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"]','[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"]');
INSERT INTO "talert_commands" ("id", "name", "command", "description", "internal", "fields_descriptions", "fields_values") VALUES (3,'Pandora&#x20;FMS&#x20;Event','Internal&#x20;type','This&#x20;alert&#x20;create&#x20;an&#x20;special&#x20;event&#x20;into&#x20;Pandora&#x20;FMS&#x20;event&#x20;manager.',1,'[\"Event&#x20;text\",\"Event&#x20;type\",\"Source\",\"Agent&#x20;name&#x20;or&#x20;_agent_\",\"Event&#x20;criticity\",\"ID&#x20;extra\",\"Tags&#x20;separated&#x20;by&#x20;commas\",\"Comments\",\"Not&#x20;used\",\"Not&#x20;used\"]','[\"\",\"alert_ceased,Alert&#x20;ceased;alert_fired,Alert&#x20;fired;alert_manual_validation,Alert&#x20;manual&#x20;validation;alert_recovered,Alert&#x20;recovered;configuration_change,Configuration&#x20;change&#x20;;error,Error;critical,Monitor&#x20;Critical;normal,Monitor&#x20;Normal;going_unknown,Monitor\",\"\",\"\",\"4,Critical;1,Informational;0,Maintenance;6,Major;5,Minor;2,Normal;3,Warning\",\"\",\"\",\"\",\"\",\"\"]');
INSERT INTO "talert_commands" ("id", "name", "command", "description", "internal", "fields_descriptions", "fields_values") VALUES (4,'Pandora&#x20;FMS&#x20;Alertlog','echo&#x20;_timestamp_&#x20;pandora&#x20;_agent_&#x20;_data_&#x20;_field1_&#x20;_field2_&#x20;&gt;&gt;&#x20;/var/log/pandora/pandora_alert.log','This&#x20;is&#x20;a&#x20;default&#x20;alert&#x20;to&#x20;write&#x20;alerts&#x20;in&#x20;a&#x20;standard&#x20;ASCII&#x20;&#x20;plaintext&#x20;log&#x20;file&#x20;in&#x20;/var/log/pandora/pandora_alert.log&#x0d;&#x0a;',0,'[\"Log&#x20;Info&#x20;1\",\"Log&#x20;Info&#x20;2\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"]','[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"]');
INSERT INTO "talert_commands" ("id", "name", "command", "description", "internal", "fields_descriptions", "fields_values") VALUES (5,'SNMP&#x20;Trap','/usr/bin/snmptrap&#x20;-v&#x20;1&#x20;-c&#x20;_field1_&#x20;_field2_&#x20;_field3_&#x20;_field4_','Send&#x20;a&#x20;SNMPTRAP&#x20;to&#x20;192.168.0.4.&#x20;Please&#x20;review&#x20;config&#x20;and&#x20;adapt&#x20;to&#x20;your&#x20;needs,&#x20;this&#x20;is&#x20;only&#x20;a&#x20;sample,&#x20;not&#x20;functional&#x20;itself.',0,'[\"Community\",\"Destination&#x20;address\",\"OID\",\"Source&#x20;address\",\"\",\"\",\"\",\"\",\"\",\"\"]','[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"]');
INSERT INTO "talert_commands" ("id", "name", "command", "description", "internal", "fields_descriptions", "fields_values") VALUES (6,'Syslog','logger&#x20;-p&#x20;daemon.alert&#x20;Pandora&#x20;Alert&#x20;_agent_&#x20;_data_&#x20;_field1_&#x20;_field2_','Uses&#x20;field1&#x20;and&#x20;field2&#x20;to&#x20;generate&#x20;Syslog&#x20;alert&#x20;in&#x20;facility&#x20;daemon&#x20;with&#x20;&quot;alert&quot;&#x20;level.',0,'[\"Log&#x20;Info&#x20;1\",\"Log&#x20;Info&#x20;2\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"]','[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"]');
INSERT INTO "talert_commands" ("id", "name", "command", "description", "internal", "fields_descriptions", "fields_values") VALUES (7,'Sound Alert','/usr/bin/play /usr/share/sounds/alarm.wav','',0,NULL,NULL);
INSERT INTO "talert_commands" ("id", "name", "command", "description", "internal", "fields_descriptions", "fields_values") VALUES (8,'Jabber&#x20;Alert','echo&#x20;_field3_&#x20;|&#x20;sendxmpp&#x20;-r&#x20;_field1_&#x20;--chatroom&#x20;_field2_','Send&#x20;jabber&#x20;alert&#x20;to&#x20;chat&#x20;room&#x20;in&#x20;a&#x20;predefined&#x20;server&#x20;&#40;configure&#x20;first&#x20;.sendxmpprc&#x20;file&#41;.&#x20;Uses&#x20;field3&#x20;as&#x20;text&#x20;message,&#x20;field1&#x20;as&#x20;useralias&#x20;for&#x20;source&#x20;message,&#x20;and&#x20;field2&#x20;for&#x20;chatroom&#x20;name',0,'[\"User&#x20;alias\",\"Chatroom&#x20;name\",\"Message\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"]','[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"]');
INSERT INTO "talert_commands" ("id", "name", "command", "description", "internal", "fields_descriptions", "fields_values") VALUES (9,'SMS','sendsms&#x20;_field1_&#x20;_field2_','Send&#x20;SMS&#x20;using&#x20;the&#x20;Pandora&#x20;FMS&#x20;standard&#x20;SMS&#x20;device,&#x20;using&#x20;smstools.&#x20;&#x20;Uses&#x20;field2&#x20;as&#x20;text&#x20;message,&#x20;field1&#x20;as&#x20;destination&#x20;phone&#x20;&#40;include&#x20;international&#x20;prefix!&#41;',0,'[\"Destination&#x20;number\",\"Message\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"]','[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"]');
INSERT INTO "talert_commands" ("id", "name", "command", "description", "internal", "fields_descriptions", "fields_values") VALUES (10,'Validate&#x20;Event','Internal&#x20;type','This&#x20;alert&#x20;validate&#x20;the&#x20;events&#x20;matched&#x20;with&#x20;a&#x20;module&#x20;given&#x20;the&#x20;agent&#x20;name&#x20;&#40;_field1_&#41;&#x20;and&#x20;module&#x20;name&#x20;&#40;_field2_&#41;',1,'[\"Agent&#x20;name\",\"Module&#x20;name\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"]','[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"]');
SELECT setval('talert_commands_id_seq', (SELECT (SELECT MAX(id) FROM talert_commands)));
--
@ -418,7 +418,7 @@ 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" ("id", "name", "command", "description", "internal") VALUES (10,'Remote&#x20;agent&#x20;control','/usr/share/pandora_server/udp_client.pl _address_ 41122 &quot;_field1_&quot;','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 &quot;refresh&quot; the agent execution: that means, to force the agent to execute and send data to s',0);
INSERT INTO "talert_commands" ("id", "name", "command", "description", "internal", "fields_descriptions", "fields_values") VALUES (11,'Remote&#x20;agent&#x20;control','/usr/share/pandora_server/udp_client.pl&#x20;_address_&#x20;41122&#x20;&quot;_field1_&quot;','This&#x20;command&#x20;is&#x20;used&#x20;to&#x20;send&#x20;commands&#x20;to&#x20;the&#x20;Pandora&#x20;FMS&#x20;agents&#x20;with&#x20;the&#x20;UDP&#x20;server&#x20;enabled.&#x20;The&#x20;UDP&#x20;server&#x20;is&#x20;used&#x20;to&#x20;order&#x20;agents&#x20;&#40;Windows&#x20;and&#x20;UNIX&#41;&#x20;to&#x20;&quot;refresh&quot;&#x20;the&#x20;agent&#x20;execution:&#x20;that&#x20;means,&#x20;to&#x20;force&#x20;the&#x20;agent&#x20;to&#x20;execute&#x20;and&#x20;send&#x20;data',0,'[\"Command\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"]','[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"]');
SELECT setval('talert_commands_id_seq', (SELECT (SELECT MAX(id) FROM talert_commands)));
INSERT INTO "talert_actions" ("id", "name", "id_alert_command", "field1", "field2", "field3", "id_group", "action_threshold") VALUES (1,'Mail&#x20;to&#x20;XXX',1,'yourmail@domain.es','[PANDORA] Alert from agent _agent_ on module _module_','',0,0);

View File

@ -24,16 +24,16 @@
-- Dumping data for table `talert_commands`
--
INSERT INTO `talert_commands` (`id`, `name`, `command`, `description`, `internal`) VALUES (1,'eMail','Internal type', 'This alert send an email using internal Pandora FMS Server SMTP capabilities (defined in each server, using:\r\n_field1_ as destination email address, and\r\n_field2_ as subject for message. \r\n_field3_ as text of message.', 1);
INSERT INTO `talert_commands` (`id`, `name`, `command`, `description`, `internal`) VALUES (2,'Internal Audit','Internal type','This alert save alert in Pandora interal audit system. Fields are static and only _field1_ is used.', 1);
INSERT INTO `talert_commands` (`id`, `name`, `command`, `description`, `internal`) VALUES (3,'Pandora FMS Event','Internal type','This alert create an special event into Pandora FMS event manager.', 1);
INSERT INTO `talert_commands` (`id`, `name`, `command`, `description`, `internal`) VALUES (4,'Pandora FMS Alertlog','echo _timestamp_ pandora _agent_ _data_ _field1_ _field2_ >> /var/log/pandora/pandora_alert.log','This is a default alert to write alerts in a standard ASCII plaintext log file in /var/log/pandora/pandora_alert.log\r\n', 0);
INSERT INTO `talert_commands` (`id`, `name`, `command`, `description`, `internal`) VALUES (5,'SNMP Trap','/usr/bin/snmptrap -v 1 -c trap_public 192.168.0.4 1.1.1.1.1.1.1.1 _agent_ _field1_','Send a SNMPTRAP to 192.168.0.4. Please review config and adapt to your needs, this is only a sample, not functional itself.', 0);
INSERT INTO `talert_commands` (`id`, `name`, `command`, `description`, `internal`) VALUES (6,'Syslog','logger -p daemon.alert Pandora Alert _agent_ _data_ _field1_ _field2_','Uses field1 and field2 to generate Syslog alert in facility daemon with "alert" level.', 0);
INSERT INTO `talert_commands` (`id`, `name`, `command`, `description`, `internal`) VALUES (7,'Sound Alert','/usr/bin/play /usr/share/sounds/alarm.wav','', 0);
INSERT INTO `talert_commands` (`id`, `name`, `command`, `description`, `internal`) 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` (`id`, `name`, `command`, `description`, `internal`) 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);
INSERT INTO `talert_commands` (`id`, `name`, `command`, `description`, `internal`) VALUES (10,'Validate Event','Internal type','This alert validate the events matched with a module given the agent name (_field1_) and module name (_field2_)', 1);
INSERT INTO `talert_commands` (`id`, `name`, `command`, `description`, `internal`, `fields_descriptions`, `fields_values`) VALUES (1,'eMail','Internal&#x20;type','This&#x20;alert&#x20;send&#x20;an&#x20;email&#x20;using&#x20;internal&#x20;Pandora&#x20;FMS&#x20;Server&#x20;SMTP&#x20;capabilities&#x20;&#40;defined&#x20;in&#x20;each&#x20;server,&#x20;using:&#x0d;&#x0a;_field1_&#x20;as&#x20;destination&#x20;email&#x20;address,&#x20;and&#x0d;&#x0a;_field2_&#x20;as&#x20;subject&#x20;for&#x20;message.&#x20;&#x0d;&#x0a;_field3_&#x20;as&#x20;text&#x20;of&#x20;message.',1,'[\"Destination&#x20;address\",\"Subject\",\"Text\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"]','[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"]');
INSERT INTO `talert_commands` (`id`, `name`, `command`, `description`, `internal`, `fields_descriptions`, `fields_values`) VALUES (2,'Internal&#x20;Audit','Internal&#x20;type','This&#x20;alert&#x20;save&#x20;alert&#x20;in&#x20;Pandora&#x20;interal&#x20;audit&#x20;system.&#x20;Fields&#x20;are&#x20;static&#x20;and&#x20;only&#x20;_field1_&#x20;is&#x20;used.',1,'[\"Description\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"]','[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"]');
INSERT INTO `talert_commands` (`id`, `name`, `command`, `description`, `internal`, `fields_descriptions`, `fields_values`) VALUES (3,'Pandora&#x20;FMS&#x20;Event','Internal&#x20;type','This&#x20;alert&#x20;create&#x20;an&#x20;special&#x20;event&#x20;into&#x20;Pandora&#x20;FMS&#x20;event&#x20;manager.',1,'[\"Event&#x20;text\",\"Event&#x20;type\",\"Source\",\"Agent&#x20;name&#x20;or&#x20;_agent_\",\"Event&#x20;criticity\",\"ID&#x20;extra\",\"Tags&#x20;separated&#x20;by&#x20;commas\",\"Comments\",\"Not&#x20;used\",\"Not&#x20;used\"]','[\"\",\"alert_ceased,Alert&#x20;ceased;alert_fired,Alert&#x20;fired;alert_manual_validation,Alert&#x20;manual&#x20;validation;alert_recovered,Alert&#x20;recovered;configuration_change,Configuration&#x20;change&#x20;;error,Error;critical,Monitor&#x20;Critical;normal,Monitor&#x20;Normal;going_unknown,Monitor\",\"\",\"\",\"4,Critical;1,Informational;0,Maintenance;6,Major;5,Minor;2,Normal;3,Warning\",\"\",\"\",\"\",\"\",\"\"]');
INSERT INTO `talert_commands` (`id`, `name`, `command`, `description`, `internal`, `fields_descriptions`, `fields_values`) VALUES (4,'Pandora&#x20;FMS&#x20;Alertlog','echo&#x20;_timestamp_&#x20;pandora&#x20;_agent_&#x20;_data_&#x20;_field1_&#x20;_field2_&#x20;&gt;&gt;&#x20;/var/log/pandora/pandora_alert.log','This&#x20;is&#x20;a&#x20;default&#x20;alert&#x20;to&#x20;write&#x20;alerts&#x20;in&#x20;a&#x20;standard&#x20;ASCII&#x20;&#x20;plaintext&#x20;log&#x20;file&#x20;in&#x20;/var/log/pandora/pandora_alert.log&#x0d;&#x0a;',0,'[\"Log&#x20;Info&#x20;1\",\"Log&#x20;Info&#x20;2\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"]','[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"]');
INSERT INTO `talert_commands` (`id`, `name`, `command`, `description`, `internal`, `fields_descriptions`, `fields_values`) VALUES (5,'SNMP&#x20;Trap','/usr/bin/snmptrap&#x20;-v&#x20;1&#x20;-c&#x20;_field1_&#x20;_field2_&#x20;_field3_&#x20;_field4_','Send&#x20;a&#x20;SNMPTRAP&#x20;to&#x20;192.168.0.4.&#x20;Please&#x20;review&#x20;config&#x20;and&#x20;adapt&#x20;to&#x20;your&#x20;needs,&#x20;this&#x20;is&#x20;only&#x20;a&#x20;sample,&#x20;not&#x20;functional&#x20;itself.',0,'[\"Community\",\"Destination&#x20;address\",\"OID\",\"Source&#x20;address\",\"\",\"\",\"\",\"\",\"\",\"\"]','[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"]');
INSERT INTO `talert_commands` (`id`, `name`, `command`, `description`, `internal`, `fields_descriptions`, `fields_values`) VALUES (6,'Syslog','logger&#x20;-p&#x20;daemon.alert&#x20;Pandora&#x20;Alert&#x20;_agent_&#x20;_data_&#x20;_field1_&#x20;_field2_','Uses&#x20;field1&#x20;and&#x20;field2&#x20;to&#x20;generate&#x20;Syslog&#x20;alert&#x20;in&#x20;facility&#x20;daemon&#x20;with&#x20;&quot;alert&quot;&#x20;level.',0,'[\"Log&#x20;Info&#x20;1\",\"Log&#x20;Info&#x20;2\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"]','[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"]');
INSERT INTO `talert_commands` (`id`, `name`, `command`, `description`, `internal`, `fields_descriptions`, `fields_values`) VALUES (7,'Sound Alert','/usr/bin/play /usr/share/sounds/alarm.wav','',0,NULL,NULL);
INSERT INTO `talert_commands` (`id`, `name`, `command`, `description`, `internal`, `fields_descriptions`, `fields_values`) VALUES (8,'Jabber&#x20;Alert','echo&#x20;_field3_&#x20;|&#x20;sendxmpp&#x20;-r&#x20;_field1_&#x20;--chatroom&#x20;_field2_','Send&#x20;jabber&#x20;alert&#x20;to&#x20;chat&#x20;room&#x20;in&#x20;a&#x20;predefined&#x20;server&#x20;&#40;configure&#x20;first&#x20;.sendxmpprc&#x20;file&#41;.&#x20;Uses&#x20;field3&#x20;as&#x20;text&#x20;message,&#x20;field1&#x20;as&#x20;useralias&#x20;for&#x20;source&#x20;message,&#x20;and&#x20;field2&#x20;for&#x20;chatroom&#x20;name',0,'[\"User&#x20;alias\",\"Chatroom&#x20;name\",\"Message\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"]','[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"]');
INSERT INTO `talert_commands` (`id`, `name`, `command`, `description`, `internal`, `fields_descriptions`, `fields_values`) VALUES (9,'SMS','sendsms&#x20;_field1_&#x20;_field2_','Send&#x20;SMS&#x20;using&#x20;the&#x20;Pandora&#x20;FMS&#x20;standard&#x20;SMS&#x20;device,&#x20;using&#x20;smstools.&#x20;&#x20;Uses&#x20;field2&#x20;as&#x20;text&#x20;message,&#x20;field1&#x20;as&#x20;destination&#x20;phone&#x20;&#40;include&#x20;international&#x20;prefix!&#41;',0,'[\"Destination&#x20;number\",\"Message\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"]','[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"]');
INSERT INTO `talert_commands` (`id`, `name`, `command`, `description`, `internal`, `fields_descriptions`, `fields_values`) VALUES (10,'Validate&#x20;Event','Internal&#x20;type','This&#x20;alert&#x20;validate&#x20;the&#x20;events&#x20;matched&#x20;with&#x20;a&#x20;module&#x20;given&#x20;the&#x20;agent&#x20;name&#x20;&#40;_field1_&#41;&#x20;and&#x20;module&#x20;name&#x20;&#40;_field2_&#41;',1,'[\"Agent&#x20;name\",\"Module&#x20;name\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"]','[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"]');
--
-- Dumping data for table `tconfig`
@ -406,7 +406,7 @@ INSERT INTO `tgis_map_layer` VALUES (1,'Group All',1,0,1,0);
-- example alert template
INSERT INTO `talert_commands` (`id`, `name`, `command`, `description`, `internal`) VALUES (11,'Remote&#x20;agent&#x20;control','/usr/share/pandora_server/udp_client.pl _address_ 41122 &quot;_field1_&quot;','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 &quot;refresh&quot; the agent execution: that means, to force the agent to execute and send data to s',0);
INSERT INTO `talert_commands` (`id`, `name`, `command`, `description`, `internal`, `fields_descriptions`, `fields_values`) VALUES (11,'Remote&#x20;agent&#x20;control','/usr/share/pandora_server/udp_client.pl&#x20;_address_&#x20;41122&#x20;&quot;_field1_&quot;','This&#x20;command&#x20;is&#x20;used&#x20;to&#x20;send&#x20;commands&#x20;to&#x20;the&#x20;Pandora&#x20;FMS&#x20;agents&#x20;with&#x20;the&#x20;UDP&#x20;server&#x20;enabled.&#x20;The&#x20;UDP&#x20;server&#x20;is&#x20;used&#x20;to&#x20;order&#x20;agents&#x20;&#40;Windows&#x20;and&#x20;UNIX&#41;&#x20;to&#x20;&quot;refresh&quot;&#x20;the&#x20;agent&#x20;execution:&#x20;that&#x20;means,&#x20;to&#x20;force&#x20;the&#x20;agent&#x20;to&#x20;execute&#x20;and&#x20;send&#x20;data',0,'[\"Command\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"]','[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"]');
INSERT INTO `talert_actions` (`id`, `name`, `id_alert_command`, `field1`, `field2`, `field3`, `id_group`, `action_threshold`) VALUES (1,'Mail&#x20;to&#x20;XXX',1,'yourmail@domain.es','[PANDORA] Alert from agent _agent_ on module _module_','',0,0);