Hi,
We are using the PagerDuty connector and have a rule that triggers on any error logs. We want to be able to pass the errors messages in the custom_details
attribute, which is required to valid JSON.
This is what we have defined in the `custom_details` section.
{
"rule_name": "{{rule.name}}",
"all_error_messages": "{{#context.hits}} Error: {{{_source.message}}} ------- {{/context.hits}}",
"error_count": "{{context.value}}",
"see_error_logs": "{{context.link}}",
"see_rule": "{{rule.url}}"
}
If the _source.message
contains a string that includes \n
then the action never succeeds, but also doesn’t fail - I’m not sure where to find any logs regarding the execution of this action and possibly an error message?
I suspect that the \n
that are part of the message breaks the JSON and invalidates it causing the action to not succeed.
Any help on this issue will be greatly appreciated. Thanks!