send-nagios-notification: Use a codeblock rather than a block quote.
This ensures that Humbug receives the verbatim text of the Nagios body, rather than a slightly modified version. Tested by running manually. (imported from commit 7e0eea0b230fd8c5552860acfb7372099598f036)
This commit is contained in:
parent
f65b130b45
commit
506eac99d6
|
@ -40,8 +40,8 @@ msg['content'] = '**%s**: %s is %s' % (opts.type, thing, opts.state)
|
||||||
# We will be more conservative and handle just this one escape sequence.
|
# We will be more conservative and handle just this one escape sequence.
|
||||||
output = (opts.output + '\n' + opts.long_output.replace(r'\n', '\n')).strip()
|
output = (opts.output + '\n' + opts.long_output.replace(r'\n', '\n')).strip()
|
||||||
if output:
|
if output:
|
||||||
# Block-quote any command output.
|
# Put any command output in a code block.
|
||||||
msg['content'] += ('\n\n' + '\n'.join('> ' + ln for ln in output.splitlines()))
|
msg['content'] += ('\n\n~~~~\n' + output + "\n~~~~\n")
|
||||||
|
|
||||||
client = humbug.Client(
|
client = humbug.Client(
|
||||||
email = 'humbug+nagios@humbughq.com',
|
email = 'humbug+nagios@humbughq.com',
|
||||||
|
|
Loading…
Reference in a new issue