Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

6530 standardize mail notifications #6570

Merged
merged 4 commits into from
Sep 6, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tests/clapi_export/clapi-configuration.txt
Original file line number Diff line number Diff line change
Expand Up @@ -184,11 +184,11 @@ VENDOR;ADD;HP-Compaq;HP and Compaq Systems
VENDOR;setparam;HP-Compaq;id;11
VENDOR;setparam;HP-Compaq;name;HP-Compaq
VENDOR;setparam;HP-Compaq;alias;HP and Compaq Systems
CMD;ADD;host-notify-by-email;1;/usr/bin/printf "%b" "***** centreon Notification *****#BR##BR#Type:$NOTIFICATIONTYPE$#BR#Host: $HOSTNAME$#BR#State: $HOSTSTATE$#BR#Address: $HOSTADDRESS$#BR#Info: $HOSTOUTPUT$#BR#Date/Time: $DATE$" | @MAILER@ -s "Host $HOSTSTATE$ alert for $HOSTNAME$!" $CONTACTEMAIL$
CMD;ADD;host-notify-by-email;1;/usr/bin/printf &quot;%b&quot; &quot;***** Centreon notification *****#BR##BR#Type: $NOTIFICATIONTYPE$#BR#Host: $HOSTALIAS$#BR#Address: $HOSTADDRESS$#BR#State: $HOSTSTATE$#BR#Since: $HOSTDURATION$#BR#Info: $HOSTOUTPUT$&quot; | @MAILER@ -s &quot;$HOSTNAME$ - $HOSTSTATE$ - $DATE$ $TIME$&quot; -r &quot;Centreon <centreon-engine>&quot; -S replyto=&quot;Centreon admin <$ADMINEMAIL$>&quot; $CONTACTEMAIL$
CMD;setparam;host-notify-by-email;enable_shell;1
CMD;setparam;host-notify-by-email;command_activate;1
CMD;setparam;host-notify-by-email;command_locked;0
CMD;ADD;service-notify-by-email;1;/usr/bin/printf &quot;%b&quot; &quot;***** centreon Notification *****#BR##BR#Notification Type: $NOTIFICATIONTYPE$#BR##BR#Service: $SERVICEDESC$#BR#Host: $HOSTALIAS$#BR#Address: $HOSTADDRESS$#BR#State: $SERVICESTATE$#BR##BR#Date/Time: $DATE$ Additional Info : $SERVICEOUTPUT$&quot; | @MAILER@ -s &quot;** $NOTIFICATIONTYPE$ alert - $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **&quot; $CONTACTEMAIL$
CMD;ADD;service-notify-by-email;1;/usr/bin/printf &quot;%b&quot; &quot;***** Centreon notification *****#BR##BR#Type: $NOTIFICATIONTYPE$#BR#Host: $HOSTALIAS$#BR#Address: $HOSTADDRESS$#BR#Service: $SERVICEDESC$#BR#State: $SERVICESTATE$#BR#Since: $SERVICEDURATION$#BR#Info: $SERVICEOUTPUT$&quot; | @MAILER@ -s &quot;$HOSTNAME$/$SERVICEDESC$ - $SERVICESTATE$ - $DATE$ $TIME$&quot; -r &quot;Centreon <centreon-engine>&quot; -S replyto=&quot;Centreon admin <$ADMINEMAIL$>&quot; $CONTACTEMAIL$
CMD;setparam;service-notify-by-email;enable_shell;1
CMD;setparam;service-notify-by-email;command_activate;1
CMD;setparam;service-notify-by-email;command_locked;0
Expand Down
4 changes: 2 additions & 2 deletions www/install/insertCommands.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
-- table `command`
--

INSERT INTO `command` (`command_id`, `command_name`, `command_line`, `command_example`, `command_type`, `graph_id`, `cmd_cat_id`) VALUES(35, 'host-notify-by-email', '/usr/bin/printf &quot;%b&quot; &quot;***** centreon Notification *****#BR##BR#Type:$NOTIFICATIONTYPE$#BR#Host: $HOSTNAME$#BR#State: $HOSTSTATE$#BR#Address: $HOSTADDRESS$#BR#Info: $HOSTOUTPUT$#BR#Date/Time: $DATE$&quot; | @MAILER@ -s &quot;Host $HOSTSTATE$ alert for $HOSTNAME$!&quot; $CONTACTEMAIL$', '', 1, NULL, NULL);
INSERT INTO `command` (`command_id`, `command_name`, `command_line`, `command_example`, `command_type`, `graph_id`, `cmd_cat_id`) VALUES(36, 'service-notify-by-email', '/usr/bin/printf &quot;%b&quot; &quot;***** centreon Notification *****#BR##BR#Notification Type: $NOTIFICATIONTYPE$#BR##BR#Service: $SERVICEDESC$#BR#Host: $HOSTALIAS$#BR#Address: $HOSTADDRESS$#BR#State: $SERVICESTATE$#BR##BR#Date/Time: $DATE$ Additional Info : $SERVICEOUTPUT$&quot; | @MAILER@ -s &quot;** $NOTIFICATIONTYPE$ alert - $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **&quot; $CONTACTEMAIL$', '', 1, NULL, NULL);
INSERT INTO `command` (`command_id`, `command_name`, `command_line`, `command_example`, `command_type`, `graph_id`, `cmd_cat_id`) VALUES(35, 'host-notify-by-email', '/usr/bin/printf &quot;%b&quot; &quot;***** Centreon notification *****#BR##BR#Type: $NOTIFICATIONTYPE$#BR#Host: $HOSTALIAS$#BR#Address: $HOSTADDRESS$#BR#State: $HOSTSTATE$#BR#Since: $HOSTDURATION$#BR#Info: $HOSTOUTPUT$&quot; | @MAILER@ -s &quot;$HOSTNAME$ - $HOSTSTATE$ - $DATE$ $TIME$&quot; -r &quot;Centreon <centreon-engine>&quot; -S replyto=&quot;Centreon admin <$ADMINEMAIL$>&quot; $CONTACTEMAIL$', '', 1, NULL, NULL);
INSERT INTO `command` (`command_id`, `command_name`, `command_line`, `command_example`, `command_type`, `graph_id`, `cmd_cat_id`) VALUES(36, 'service-notify-by-email', '/usr/bin/printf &quot;%b&quot; &quot;***** Centreon notification *****#BR##BR#Type: $NOTIFICATIONTYPE$#BR#Host: $HOSTALIAS$#BR#Address: $HOSTADDRESS$#BR#Service: $SERVICEDESC$#BR#State: $SERVICESTATE$#BR#Since: $SERVICEDURATION$#BR#Info: $SERVICEOUTPUT$&quot; | @MAILER@ -s &quot;$HOSTNAME$/$SERVICEDESC$ - $SERVICESTATE$ - $DATE$ $TIME$&quot; -r &quot;Centreon <centreon-engine>&quot; -S replyto=&quot;Centreon admin <$ADMINEMAIL$>&quot; $CONTACTEMAIL$', '', 1, NULL, NULL);
INSERT INTO `command` (`command_id`, `command_name`, `command_line`, `command_example`, `command_type`, `graph_id`, `cmd_cat_id`) VALUES(37, 'host-notify-by-epager', '/usr/bin/printf &quot;%b&quot; &quot;Host $HOSTALIAS$ is $HOSTSTATE$#BR#Info: $OUTPUT$#BR#Time: $DATETIME$\\&quot; | @MAILER@ -s \\&quot;$NOTIFICATIONTYPE$ alert - Host $HOSTNAME$ is $HOSTSTATE$\\&quot; $CONTACTPAGER$', '', 1, NULL, NULL);
INSERT INTO `command` (`command_id`, `command_name`, `command_line`, `command_example`, `command_type`, `graph_id`, `cmd_cat_id`) VALUES(38, 'service-notify-by-epager', '/usr/bin/printf &quot;%b&quot; &quot;Service: $SERVICEDESC$#BR#Host: $HOSTNAME$#BR#Address: $HOSTADDRESS$#BR#State: $SERVICESTATE$#BR#Info: $OUTPUT$#BR#Date: $DATETIME$&quot; | @MAILER@ -s &quot;$NOTIFICATIONTYPE$: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$&quot; $CONTACTPAGER$', '', 1, NULL, NULL);
INSERT INTO `command` (`command_id`, `command_name`, `command_line`, `command_example`, `command_type`, `graph_id`, `cmd_cat_id`) VALUES(89, 'host-notify-by-jabber', '$USER1$/notify_via_jabber $CONTACTPAGER$ &quot;Host &#039;$HOSTALIAS$&#039; is $HOSTSTATE$ - Info: $HOSTOUTPUT$&quot;', '', 1, 0, NULL);
Expand Down