Faidon Liambotis has uploaded a new change for review.
https://gerrit.wikimedia.org/r/259237
Change subject: nagios_common: kill all the love
......................................................................
nagios_common: kill all the love
Remove the ❤❤❤❤❤ suffices and $lover_name. I'm really no fun.
Change-Id: I5d21f7d405d8ae0169c7d5d5bb0b228f164d7bcb
---
M modules/nagios_common/manifests/notification_commands.pp
M modules/nagios_common/templates/notification_commands.cfg.erb
M modules/shinken/manifests/init.pp
3 files changed, 5 insertions(+), 11 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/37/259237/1
diff --git a/modules/nagios_common/manifests/notification_commands.pp
b/modules/nagios_common/manifests/notification_commands.pp
index 6487153..2aa1709 100644
--- a/modules/nagios_common/manifests/notification_commands.pp
+++ b/modules/nagios_common/manifests/notification_commands.pp
@@ -17,10 +17,6 @@
# The group which should own the check config files.
# Defaults to 'icinga'
#
-# [*lover_name*]
-# Name of thing that gives the recipient love when notifying
-# them via email of bad things that have happened
-#
# [*irc_dir_path*]
# Directory containing files that are used by ircecho to
# echo notifications to IRC
@@ -30,7 +26,6 @@
$config_dir = '/etc/icinga',
$owner = 'icinga',
$group = 'icinga',
- $lover_name = 'Icinga',
$irc_dir_path = '/var/log/icinga',
) {
file { "${config_dir}/notification_commands.cfg":
diff --git a/modules/nagios_common/templates/notification_commands.cfg.erb
b/modules/nagios_common/templates/notification_commands.cfg.erb
index 7d69d7c..f0dc091 100644
--- a/modules/nagios_common/templates/notification_commands.cfg.erb
+++ b/modules/nagios_common/templates/notification_commands.cfg.erb
@@ -16,7 +16,7 @@
# used as a template for this definition (optional)
# <objectname> = object name of command definition, referenced by other
# command definitions that use it as a template (optional)
-# <commandname> = name of the command, as recognized/used by <%= @lover_name
%>
+# <commandname> = name of the command
# <commandline> = command line
#
################################################################################
@@ -26,24 +26,24 @@
# 'host-notify-by-email' command definition
define command{
command_name host-notify-by-email
- command_line /usr/bin/printf "%b" "❤❤❤❤❤ <%= @lover_name %>
❤❤❤❤❤\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState:
$HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time:
$LONGDATETIME$\nLove, <%= @lover_name %>" | /usr/bin/mail -s "Host $HOSTSTATE$
alert for $HOSTNAME$!" $CONTACTEMAIL$
+ command_line /usr/bin/printf "%b" "Notification Type:
$NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress:
$HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$" | /usr/bin/mail
-s "Host $HOSTSTATE$ alert for $HOSTNAME$!" $CONTACTEMAIL$
}
# 'notify-by-email' command definition
define command{
command_name notify-by-email
- command_line /usr/bin/printf "%b" "❤❤❤❤❤ <%= @lover_name %>
❤❤❤❤❤\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost:
$HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time:
$LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$\nLove, <%= @lover_name
%>" | /usr/bin/mail -s "** $NOTIFICATIONTYPE$ alert - $HOSTALIAS$/$SERVICEDESC$
is $SERVICESTATE$ **" $CONTACTEMAIL$
+ command_line /usr/bin/printf "%b" "Notification Type:
$NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress:
$HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional
Info:\n\n$SERVICEOUTPUT$" | /usr/bin/mail -s "** $NOTIFICATIONTYPE$ alert -
$HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$
}
# 'notify-by-sms-gateway' command definitions
define command{
command_name host-notify-by-sms-gateway
- command_line echo "Host $HOSTALIAS$ is $HOSTSTATE$\nInfo:
$HOSTOUTPUT$\nTime: $LONGDATETIME$ <3, <%= @lover_name %>" | /usr/bin/mail -s
"Host $HOSTSTATE$ alert for $HOSTNAME$!" $CONTACTADDRESS1$
+ command_line echo "Host $HOSTALIAS$ is $HOSTSTATE$\nInfo:
$HOSTOUTPUT$\nTime: $LONGDATETIME$" | /usr/bin/mail -s "Host $HOSTSTATE$ alert
for $HOSTNAME$!" $CONTACTADDRESS1$
}
define command{
command_name notify-by-sms-gateway
- command_line echo "$SERVICEDESC$ on $HOSTNAME$ is $SERVICESTATE$:
$SERVICEOUTPUT$ $SERVICEACKAUTHOR$ $SERVICEACKCOMMENT$ at $LONGDATETIME$ <3,
<%= @lover_name %>" | /usr/bin/mail -s "nagios" $CONTACTADDRESS1$
+ command_line echo "$SERVICEDESC$ on $HOSTNAME$ is $SERVICESTATE$:
$SERVICEOUTPUT$ $SERVICEACKAUTHOR$ $SERVICEACKCOMMENT$ at $LONGDATETIME$" |
/usr/bin/mail -s "nagios" $CONTACTADDRESS1$
}
# global IRC output for operations
diff --git a/modules/shinken/manifests/init.pp
b/modules/shinken/manifests/init.pp
index 8875c00..eb84456 100644
--- a/modules/shinken/manifests/init.pp
+++ b/modules/shinken/manifests/init.pp
@@ -105,7 +105,6 @@
group => 'shinken',
notify => Service['shinken'],
require => Package['shinken'],
- lover_name => 'Shinken',
irc_dir_path => '/var/log/ircecho',
}
--
To view, visit https://gerrit.wikimedia.org/r/259237
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I5d21f7d405d8ae0169c7d5d5bb0b228f164d7bcb
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Faidon Liambotis <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits