Answers common questions about alert notification content, including template variables, content truncation, data formatting, and rendering errors.
How do I reference log content in a notification?
Select a variable such as labels, annotations, fire_results, or results in your content template. Reference log content in an alert notification.
How do I display trigger log content in a notification?
Alert-triggering query and analysis results are stored in the fire_results variable. Use it to display trigger log content in notifications. Content template syntax (New) and Content template variables (New).
|
Method |
Description |
|
Display as a JSON string |
|
|
Format output with known fields |
|
|
Format output with unknown fields |
|
What if alert notifications display truncated content?
Alert messages have a length limit. If the fire_results value exceeds 2 KB or any field in the fire_results results exceeds 1 KB, content is truncated. To view complete data, add the query_url variable to your content template and click the link to open the Query & Analysis page in the SLS console. Examples:
-
For Markdown templates (DingTalk), use
[View Details]({{ alert.query_url }}). -
For HTML templates (email), use
<a href="{{ alert.query_url }}">View Details</a>.
How do I format and process data in a content template?
Use Built-in template functions to format content, process strings, and calculate data in notifications. If these functions do not meet your requirements, submit a ticket to contact SLS technical support.
How do I fix a "Template render error: xxxx" fault?
The Template render error: xxxx fault indicates an invalid content template configuration. Check your configuration against the Content template syntax (New).
If the issue persists, submit a ticket to contact SLS technical support.