Change looks fine, but see comment inline. You'll also likely need to rebase
this change.
Diff comments:
> diff --git a/hooks/upgrade-charm b/hooks/upgrade-charm
> index 19e736c..6afea93 100755
> --- a/hooks/upgrade-charm
> +++ b/hooks/upgrade-charm
> @@ -161,8 +161,13 @@ def enable_pagerduty_config():
> os.remove(pagerduty_cron)
>
> # Update contacts for admin
> + contactgroup_members = hookenv.config("contactgroup-members")
> + if enable_pagerduty:
> + contactgroup_members += ", pagerduty"
Now that this is configurable, it is probably worth checking to ensure that
contactgroup_members does not already include pagerduty (not sure what nagios
will do if there are duplicates, my guess is notify twice...).
> +
> template_values = {'enable_pagerduty': enable_pagerduty,
> - 'admin_email': hookenv.config('admin_email')}
> + 'admin_email': hookenv.config('admin_email'),
> + 'contactgroup_members': contactgroup_members}
>
> with open('hooks/templates/contacts-cfg.tmpl', 'r') as f:
> templateDef = f.read()
--
https://code.launchpad.net/~hopem/nagios-charm/+git/nagios-charm/+merge/376818
Your team Nagios Charm developers is requested to review the proposed merge of
~hopem/nagios-charm:bug/1844658 into nagios-charm:master.
--
Mailing list: https://launchpad.net/~nagios-charmers
Post to : [email protected]
Unsubscribe : https://launchpad.net/~nagios-charmers
More help : https://help.launchpad.net/ListHelp