[Rebranding] Change alert action Pandora FMS Event to Monitoring Event

This commit is contained in:
fermin831 2018-05-24 11:16:30 +02:00
parent bcb3af09ca
commit 66dfd9b171
3 changed files with 11 additions and 2 deletions

View File

@ -0,0 +1,8 @@
START TRANSACTION;
INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_docs_logo', 'default_docs.png');
INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_support_logo', 'default_support.png');
UPDATE talert_actions SET name='Monitoring Event' WHERE name='Pandora FMS Event';
COMMIT;

View File

@ -1123,6 +1123,7 @@ UPDATE talert_actions SET `field4` = 'integria',
`field9` = 'admin',
`field10` = '_alert_description_'
WHERE `id` = 4 AND `id_alert_command` = 11;
UPDATE talert_actions SET name='Monitoring Event' WHERE name='Pandora FMS Event';
ALTER TABLE talert_actions ADD COLUMN `field11` TEXT NOT NULL DEFAULT "";
ALTER TABLE talert_actions ADD COLUMN `field12` TEXT NOT NULL DEFAULT "";
ALTER TABLE talert_actions ADD COLUMN `field13` TEXT NOT NULL DEFAULT "";

View File

@ -822,7 +822,7 @@ sub pandora_execute_alert ($$$$$$$$$;$) {
if (time () >= ($action->{'last_execution'} + $threshold)) {
# Does the action generate an event?
if (safe_output($action->{'name'}) eq "Pandora FMS Event") {
if (safe_output($action->{'name'}) eq "Monitoring Event") {
$event_generated = 1;
}
@ -1290,7 +1290,7 @@ sub pandora_execute_action ($$$$$$$$$;$) {
}
# Pandora FMS Event
} elsif ($clean_name eq "Pandora FMS Event") {
} elsif ($clean_name eq "Monitoring Event") {
$field1 = subst_alert_macros ($field1, \%macros, $pa_config, $dbh, $agent, $module);
$field3 = subst_alert_macros ($field3, \%macros, $pa_config, $dbh, $agent, $module);
$field4 = subst_alert_macros ($field4, \%macros, $pa_config, $dbh, $agent, $module);