bundles/icinga2: only include service_name in sms if it actually is a service
All checks were successful
bundlewrap/pipeline/head This commit looks good

This commit is contained in:
Franzi 2020-11-22 11:09:44 +01:00
parent 54219928e4
commit 9cace7dace
Signed by: kunsi
GPG key ID: 12E3D2136B818350

View file

@ -60,9 +60,9 @@ def log_to_syslog(message):
def notify_per_sms(): def notify_per_sms():
message = { message = {
'message': 'ICINGA: {host}/{service} is {state}: {output}'.format( 'message': 'ICINGA: {host}{service} is {state}: {output}'.format(
host=args.host_name, host=args.host_name,
service=args.service_name, service=('/'+args.service_name if args.service_name else ''),
state=args.state.upper(), state=args.state.upper(),
output=args.output output=args.output
), ),