How to Limit Message Length in Watcher Json File

Hello Everyone,

I have following lines on a watcher Json configuration file and I would like to trim/limit the {{_source.message}} to 3000 characters in the email alert

Can anyone help me how can we do that ?

"body": {
          "html": "<html><body><h4>{{xxx.payload.hits.total}} errors found in the xx logs</h4><br><br><table width=100% border=1>{{#xxx.payload.hits.hits}}<tr width=100%><td width=30%><b>LogId=</b>{{_id}}<br><b>Module=</b>{{_source.applicationName}}<br><b>Host=</b>{{_source.host}}<br><b>Source=</b>{{_source.source}}</td><td width=70%>{{_source.message}}</td></tr>{{/xxx.payload.hits.hits}}</table></body></html>"
        }

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.