consul-alerts icon indicating copy to clipboard operation
consul-alerts copied to clipboard

[question] can consul-alerts ignore \n in config keys?

Open ketzacoatl opened this issue 9 years ago • 0 comments

In going through the README I have configured consul-alerts for notifications through slack, though consul-alerts fails if there is a newline (\n). For example:

INFO[0000] unable to load custom value for "consul-alerts/config/notifiers/slack/enabled". Using default instead. Error: strconv.ParseBool: parsing "true\n": invalid syntax 

That type of sensitivity makes working with the tool a bit more difficult. For example, I am using automated tooling to mirror git to consulkv, and in doing so, each key (as a file in git) is written to consulkv with: consulkv put $KEY < $FILE_PATH

Manually writing the slack notifier configuration to KV to avoid the newlines will work (using echo -n foo), but can consul-alerts ignore the newlines for us?

ketzacoatl avatar Oct 17 '16 04:10 ketzacoatl