We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi @mr-karan, Thanks for making calert, we just deployed it at Pix4D and we're really happy with it!
We noticed the following issue. Take an alert where, for example, the summary field contains " characters:
"
# test-payload.json { "alerts": [ { "status": "firing", "annotations": { "summary": "Server \"foo\" is down" } } ] }
Now send this to calert
curl -XPOST -d @test-payload.json http://localhost:6000/create?room_name=test -i
The following message shows up in the targeted Hangouts Chat channel (using the default message template):
summary: Server "foo" is down
In this case, I'd expect the double quotes to be kept and not escaped.
The text was updated successfully, but these errors were encountered:
@wagdav Thanks for reporting. I'll investigate this.
Sorry, something went wrong.
@mr-karan Did you have a chance to take a look at this?
If you could point me to a place in the code where the problem could happen I could try to submit a PR with a fix.
Thanks!
@wagdav Been caught up with some things, my bad. Feel free to take this up
This is the part where I try to decode the alertmanager payload: https://github.com/mr-karan/calert/blob/master/api.go#L95
Over here, is when I transform this payload to what Google Chat expects: https://github.com/mr-karan/calert/blob/master/api.go#L100
I guess we should check for unescaped characters while populating the template, which is here:
calert/helper.go
Line 31 in 6eabd82
mr-karan
Successfully merging a pull request may close this issue.
Hi @mr-karan,
Thanks for making calert, we just deployed it at Pix4D and we're really happy with it!
We noticed the following issue. Take an alert where, for example, the summary field contains
"
characters:Now send this to calert
The following message shows up in the targeted Hangouts Chat channel (using the default message template):
In this case, I'd expect the double quotes to be kept and not escaped.
The text was updated successfully, but these errors were encountered: