tencent cloud

Cloud Log Service

Alarm Notification Variables

Download
Focus Mode
Font Size
Last updated: 2026-05-15 21:58:10
When configuring notification content, custom webhook configuration, and multi-dimensional analysis in the alarm policy, you can use the alarm notification variables to customize the alarm notification content and multi-dimensional analysis statements. This ensures that the received alarm notifications clearly and accurately describe the causes of the alarms.
Alarm variables can also be delivered to a log topic in the form of logs. For usage instructions, see Manage Notification Groups.

Quick Start

When configuring alarm policies, include the following information in the additional notification content:
Detailed log:
{{.QueryLog[0][0]}}
After the configuration is completed, it will be displayed as shown in the figure below:



When an alarm notification is received, the additional notification content is automatically replaced with the value below, which represents the most recent detailed log that triggered the alarm.
Detailed log:
{"content":{"body_bytes_sent":"33352","http_referer":"-","http_user_agent":"Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.17 Safari/537.36","remote_addr":"201.80.83.199","remote_user":"-","request_method":"GET","request_uri":"/content/themes/test-com/images/header_about.jpg","status":"404","time_local":"01/Nov/2018:01:16:31"},"fileName":"/root/testLog/nginx.log","pkg_id":"285A243662909DE3-70A","source":"172.17.0.2","time":1653831150008,"topicId":"a54de372-ffe0-49ae-a12e-c340bb2b03f2"}

Notification Variables

Variable List

Variable
Description
Example Variable Value
Shipped Log
Description
{{.RecordId}}
Alarm notification ID
76afb409-4648-xxxx-b67a-fe350129ceb4
No
Each alarm notification uses a different ID.
{{.RecordGroupId}}
Alarm group ID
52746a79-7681-495f-xxxx-2715593e625a
Yes
From alarm trigger to clearance, the ID remains the same regardless of how many notifications are sent.
When group-based trigger is enabled in an alarm policy, multiple alarms may be generated simultaneously, each corresponding to a different group and ID.
{{.UIN}}
Account ID
100007xxx827
Yes
-
{{.Nickname}}
Account nickname.
xx company
Yes
-
{{.Region}}
Region
Guangzhou
Note:
Logs are delivered in English, for example, ap-guangzhou.
Yes
-
{{.Alarm}}
Alarm policy name.
Excessive Nginx error logs
Yes
-
{{.AlarmID}}
Alarm policy ID.
notice-3abd7ad6-15b7-4168-xxxx-52e5b961a561
Yes
-
{{.Topic}}
Log Topic Name
nginxLog
Yes
-
{{.TopicId}}
Log topic ID.
a54de372-ffe0-49ae-xxxx-c340bb2b03f2
Yes
-
{{.Logset}}
Logset Name
demo_logset
No
-
{{.LogsetId}}
Logset ID
1284d7c3-a7e3-4005-xxxx-ef95ca05d02e
Yes
-
{{.QueryParams}}
Query parameters for the execution statement
[{
"TopicId": "36c6df96-a6ad-xxxx-99ec-3f0b66dea302",
"TopicName": "CDN Demo Access Log Topic_10000753xxxx"
"TopicType": "log",
"Query": "* | select approx_percentile(request_time, 0.99) as p99",
"grammarVersion": "cql",
"StartTime": 1690956330000,
"EndTime": 1690957230000,
"QueryUrlPath": "/cls/search?grammarVersion=cql&queryBase64=KiB8IHNlbGVjdCBhcHByb3hfcGVyY2VudGlsZShyZXF1ZXN0X3RpbWUsIDAuOTkpIGFzIHA5OQ%3D%3D&region=ap-chongqing&time=2023-08-02T14%3A05%3A30.000%2C2023-08-02T14%3A20%3A30.000&topic_id=36c6df96-a6ad-xxxx-99ec-3f0b66dea302"
}]
Yes
Array structure. {{.QueryParams[0]}} represents the first execution statement, {{.QueryParams[1]}} represents the second execution statement, and so on.
{{.Condition}}
Trigger Conditions
$1.errorLogCount > 1
Yes
-
{{.ConditionGroup}}
Corresponding group information when the alarm is triggered by group.
{"$1.AppName":"userManageService"}
Yes
This variable is available only when group-based trigger is enabled in the alarm policy.
{{.Level}}
Alarm level
Info
Yes
Critical
Warn
Info
{{.Level_zh}}
Alarm level
Info
No
Emergency
Warning
Info
{{.HappenThreshold}}
Number of times that the alarm triggering condition is continuously met.
1
Yes
-
{{.AlertThreshold}}
Alarm interval.
15
Yes
Unit: min.
{{.Label}}
Additional classification field.
{"service":"payService"}
Yes

{{.StartTime}}
First alarm triggering time.
2022-05-28 18:56:37
Yes
Time zone: Asia/Shanghai
{{.StartTimeUnix}}
First alarm triggering timestamp.
1653735397099
Yes
Unix timestamp in milliseconds
{{.NotifyTime}}
Notification time of this alarm.
2022-05-28 19:41:37
Yes
Time zone: Asia/Shanghai
{{.NotifyTimeUnix}}
Notification timestamp for this alarm.
1653738097099
Yes
Unix timestamp in milliseconds
{{.NotifyType}}
Alarm notification type.
1
Yes
1: alarm notification
2: clearance notification
{{.ConsecutiveAlertNums}}
Number of consecutive alarms.
2
Yes
-
{{.Duration}}
Alarm duration.
0
Yes
Unit: min.
{{.DetailUrl}}
Alarm details page URL
https://alarm.cls.tencentcs.com/MDv2xxJh
Yes
No login required
{{.QueryUrl}}
Search and analysis URL for the first execution statement
https://alarm.cls.tencentcs.com/T0pkxxMA
No
To obtain URLs for other execution statements, use {{.QueryParams}}.
{{.SilentUrl}}
Alarm blocking URL
https://alarm.cls.tencentcs.com/K6hyxxyG
Yes
No login required. Available only when {{.CanSilent}} is true, for example:
{{if .CanSilent}}{{.SilentUrl}}{{end}}.
{{.CanSilent}}
Whether Direct Alarm Blocking via {{.SilentUrl}} Is Supported
true
Yes
This value is true when the Alarm Operation Without Login feature is enabled in the notification group; otherwise, it is false.
{{.Message}}
Additional notification content
-
Yes
Indicates the additional notification content specified in the alarm policy configuration. Maximum size: 10 KB. Content exceeding this limit will be automatically truncated.
{{.TriggerParams}}
Parameters upon alarm triggering.
$1.errorLogCount=5;
Yes
When multiple results of an execution statement meet trigger criteria simultaneously, only the first result is recorded.
This variable is available only during alarm trigger instead of alarm clearance.
{{.QueryResult}}
Statement execution result.
See the description of {{.QueryResult}}.
Yes
-
{{.TriggerResult}}
Execution statement results meeting trigger criteria
See the description of {{.TriggerResult}}.
Yes
This variable is available only during alarm trigger instead of alarm clearance.
{{.QueryLog}}
Detailed logs matching the search conditions in the execution statement.
See the description of {{.QueryLog}}.
Yes
-
{{.AnalysisResult}}
Multi-dimensional analysis result.
See the description of {{.AnalysisResult}}.
Yes
This variable is available only during alarm trigger instead of alarm clearance.
{{.AnalysisResultFormat}}
Formatted multi-dimensional analysis results
-
No
The content is identical to {{.AnalysisResult}}, but the json is formatted into text, using line breaks, tables, and other forms for presentation to improve readability.
{{.AnalysisResultFormat_zh}}
Formatted multi-dimensional analysis results
-
No
AlarmExecutionStatus
Alarm policy execution result
TriggerNotice.SendSuccess
Yes
Only supports log delivery.
AlarmExecutionErrorDetail
Alarm policy execution exception details
{"TriggerFailedReason":"Parse expression failed: Invalid token: '$'","notify_result_group":null}
Yes
Only supports log delivery.
Silent
Whether the current alarm notification is silenced
All notifications are blocked: SilentAll.
Some notifications are blocked: SilentPartial.
Not blocked: NotSilent.
Yes
Only supports log delivery.
The relevant variables are described as follows:


{{.QueryResult}}


Meaning: execution results of execution statements (regardless of whether trigger criteria are met).
Description: array structure where {{.QueryResult[0]}} represents the execution result of the first execution statement, {{.QueryResult[1]}} represents the execution result of the second execution statement, and so on. Each statement can contain up to 1,000 entries with a maximum size of 10 KB. Up to 10 statements are supported, with a total maximum size of 100 KB. Content exceeding these limits will be automatically truncated.
Variable Value Example: Assume the alarm policy has two execution statements:
First execution statement: status:>=400 | select count(*) as errorLogCount.
Second execution statement: status:>=400 | select count(*) as errorLogCount,request_uri group by request_uri order by count(*) desc.
The variable values are as follows:
[
[{
"errorLogCount": 7
}],
[{
"errorLogCount": 3,
"request_uri": "/apple-touch-icon-144x144.png"
}, {
"errorLogCount": 3,
"request_uri": "/feed"
}, {
"errorLogCount": 1,
"request_uri": "/opt/node_apps/test-v5/app/themes/basic/public/static/404.html"
}]
]

{{.
TriggerResult
}}

Meaning: execution results of execution statements (trigger criteria met).
Description: array structure where {{.TriggerResult[0]}} represents the execution result of the first execution statement, {{.TriggerResult[1]}} represents the execution result of the second execution statement, and so on. Each statement can contain up to 1,000 entries with a maximum size of 10 KB. Up to 10 statements are supported, with a total maximum size of 100 KB. Content exceeding these limits will be automatically truncated.
Variable Value Example: Based on the {{.QueryResult}} variable value example above, if the trigger condition is $1.errorLogCount > 1, the variable values are as follows:
[
[{
"errorLogCount": 7
}],
[{
"errorLogCount": 3,
"request_uri": "/apple-touch-icon-144x144.png"
}, {
"errorLogCount": 3,
"request_uri": "/feed"
}]
]


{{.QueryLog}}


Description: Detailed logs matching the search conditions in the execution statement (excluding filter conditions in SQL).
Description: array structure where {{.QueryLog[0]}} represents the detailed log of the first execution statement, {{.QueryLog[1]}} represents the detailed log of the second execution statement, and so on. Each statement can contain up to 10 entries with a maximum size of 50 KB. Up to 10 statements are supported, with a total maximum size of 150 KB. Content exceeding these limits will be automatically truncated.
Example Variable Values:
[
[{
"content": {
"__TAG__": {
"pod": "nginxPod",
"cluster": "testCluster"
},
"body_bytes_sent": "32847",
"http_referer": "-",
"http_user_agent": "Opera/9.80 (Windows NT 6.1; U; en-US) Presto/2.7.62 Version/11.01",
"remote_addr": "105.86.148.186",
"remote_user": "-",
"request_method": "GET",
"request_uri": "/apple-touch-icon-144x144.png",
"status": "404",
"time_local": "01/Nov/2018:00:55:14"
},
"fileName": "/root/testLog/nginx.log",
"pkg_id": "285A243662909DE3-5CD",
"source": "172.17.0.2",
"time": 1653739000013,
"topicId": "a54de372-ffe0-49ae-a12e-c340bb2b03f2"
}, {
"content": {
"__TAG__": {
"pod": "nginxPod",
"cluster": "testCluster"
},
"body_bytes_sent": "33496",
"http_referer": "-",
"http_user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.93 Safari/537.36",
"remote_addr": "222.18.168.242",
"remote_user": "-",
"request_method": "GET",
"request_uri": "/opt/node_apps/test-v5/app/themes/basic/public/static/404.html",
"status": "404",
"time_local": "01/Nov/2018:00:54:37"
},
"fileName": "/root/testLog/nginx.log",
"pkg_id": "285A243662909DE3-5C8",
"source": "172.17.0.2",
"time": 1653738975008,
"topicId": "a54de372-ffe0-49ae-a12e-c340bb2b03f2"
}]
]


{{.AnalysisResult}}


Description: Indicates multi-dimensional analysis results.
Description: An object structure where each top-level object corresponds to the result of a multi-dimensional analysis. The key of a top-level object is the name of the multi-dimensional analysis, and its value is the result of that analysis. This variable is available only when an alarm is triggered (that is, {{.NotifyType}}=1) and is not available when the alarm recovers (that is, {{.NotifyType}}=2). Each multi-dimensional analysis is limited to a maximum of 10 KB. Up to 5 multi-dimensional analyses are supported, with a total maximum size of 50 KB. Content exceeding these limits will be automatically truncated.
Related Raw Logs: up to 10 entries per statement, subject to user configuration.
Top 5 Field Values and Percentage Statistics: up to 5 entries per statement
Custom Search and Analysis (SQL): up to 1,000 entries per statement.
Custom Search and Analysis (search): up to 10 entries per statement.
Example Variable Values:
Depending on the multi-dimensional analysis types, variable value formats vary. Examples are as follows.
Related Raw Logs
Statistics of TOP5 Fields and Their Proportions
Custom Search and Analysis (Search Only)
Custom Search and Analysis (Statistical Analysis)
{
"Detailed Logs": [{
"LogParseFailure": "I0911 11:30:28.235387 1 leaderelection.go:273] successfully renewed lease kube-system/external-attacher-leader-com-tencent-cloud-csi-cbs",
"__FILENAME__": "/var/log/tke-log-agent/test-log9-8/stdout-containerd/csi-cbs-controller-58d8c6f79f-6f48w_kube-system_csi-attacher-100034c83b26d21a6cca51ba53ebc36e81f5e6eec04165478ec3a848d105e042.log",
"__HOSTNAME__": "VM-0-38-centos",
"__INDEX_STATUS__": "",
"__PKG_LOGID__": "7C6A04E2682AF44F-D71A",
"__SOURCE__": "10.0.0.38",
"__TAG__.cluster_id": "cls-4mhq30b8",
"__TAG__.container_id": "100034c83b26d21a6cca51ba53ebc36e81f5e6eec04165478ec3a848d105e042",
"__TAG__.container_name": "csi-attacher",
"__TAG__.image_name": "ccr.ccs.tencentyun.com/tkeimages/csi-attacher:v3.0.3",
"__TAG__.namespace": "kube-system",
"__TAG__.pod_ip": "10.0.0.32",
"__TAG__.pod_label_app": "cbs-csi-controller",
"__TAG__.pod_label_metrics": "cbs-csi-controller",
"__TAG__.pod_label_pod-template-hash": "58d8c6f79f",
"__TAG__.pod_name": "csi-cbs-controller-58d8c6f79f-6f48w",
"__TAG__.pod_uid": "ab4f7b63-2cab-442c-a532-125e767d83ec",
"__TAG__.stream": "stderr",
"__TIMESTAMP__": "1757590229046"
}]
}
Here, Detailed Logs is the name of the multi-dimensional analysis configured in the alarm policy.
{
"Top URL": [{
"count": 77,
"ratio": 0.45294117647058824,
"value": "/"
}, {
"count": 20,
"ratio": 0.11764705882352941,
"value": "/favicon.ico"
}, {
"count": 7,
"ratio": 0.041176470588235294,
"value": "/blog/feed"
}, {
"count": 5,
"ratio": 0.029411764705882353,
"value": "/test-tile-service"
}, {
"count": 3,
"ratio": 0.01764705882352941,
"value": "/android-chrome-192x192.png"
}]
}
Here, Top URL is the name of the multi-dimensional analysis configured in the alarm policy.
{
"Detailed error logs": [{
"content": {
"__TAG__": {
"pod": "nginxPod",
"cluster": "testCluster"
},
"body_bytes_sent": "32847",
"http_referer": "-",
"http_user_agent": "Opera/9.80 (Windows NT 6.1; U; en-US) Presto/2.7.62 Version/11.01",
"remote_addr": "105.86.148.186",
"remote_user": "-",
"request_method": "GET",
"request_uri": "/apple-touch-icon-144x144.png",
"status": "404",
"time_local": "01/Nov/2018:00:55:14"
},
"fileName": "/root/testLog/nginx.log",
"pkg_id": "285A243662909DE3-5CD",
"source": "172.17.0.2",
"time": 1653739000013,
"topicId": "a54de372-ffe0-49ae-a12e-c340bb2b03f2"
}, {
"content": {
"__TAG__": {
"pod": "nginxPod",
"cluster": "testCluster"
},
"body_bytes_sent": "33496",
"http_referer": "-",
"http_user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.93 Safari/537.36",
"remote_addr": "222.18.168.242",
"remote_user": "-",
"request_method": "GET",
"request_uri": "/opt/node_apps/test-v5/app/themes/basic/public/static/404.html",
"status": "404",
"time_local": "01/Nov/2018:00:54:37"
},
"fileName": "/root/testLog/nginx.log",
"pkg_id": "285A243662909DE3-5C8",
"source": "172.17.0.2",
"time": 1653738975008,
"topicId": "a54de372-ffe0-49ae-a12e-c340bb2b03f2"
}]
}
Here, Detailed Error Logs is the name of the multi-dimensional analysis configured in the alarm policy.
{
"Error log URL distribution": [{
"errorLogCount": 3,
"request_uri": "/apple-touch-icon-144x144.png"
}, {
"errorLogCount": 3,
"request_uri": "/feed"
}, {
"errorLogCount": 1,
"request_uri": "/opt/node_apps/test-v5/app/themes/basic/public/static/404.html"
}]
}
Here, Error Log URL Distribution is the name of the multi-dimensional analysis configured in the alarm policy.

Variable Syntax

The variable syntax is similar to the Go Template syntax, allowing for the extraction and formatting of alarm notification variables. This enables them to be presented more clearly in the alarm notification content. All variables and variable syntax are enclosed within {{ }}, and text outside these delimiters will not be processed.

Variable Extraction

Syntax Format
{{.variable[x]}} or {{index .variable x}}
{{.variable.childNodeName}} or {{index .variable "childNodeName"}}
Syntax Description
For array variables, use {{.variable[x]}} to extract the corresponding array element by its index, where x is an integer greater than or equal to 0. This syntax is equivalent to {{index .variable x}}.
For object variables, use {{.variable.childNodeKey}} to extract the corresponding child object value by its key. This syntax is equivalent to {{index .variable "childNodeName"}}.
Note:
When the child object name contains special characters such as spaces, $, -, or consists of pure numbers, use the {{index .variable "childNodeName"}} syntax. Examples include {{index .AnalysisResult "Top URL"}}, {{index .ConditionGroup "$1.AppName"}}, and {{index .variable "123"}}.
Do not exceed the array length when using array indices to extract elements. If necessary, you can use the len function with conditional judgment syntax to determine whether the array length is exceeded.
Usage Example The value of the {{.QueryResult}} variable is:
[
[{
"errorLogCount": 7 // Extract this value.
}],
[{
"errorLogCount": 3,
"request_uri": "/apple-touch-icon-144x144.png"
}, {
"errorLogCount": 3,
"request_uri": "/feed"
}, {
"errorLogCount": 1,
"request_uri": "/opt/node_apps/test-v5/app/themes/basic/public/static/404.html"
}]
]
Obtain the value of errorLogCount from the first array using the following expression:
{{.QueryResult[0][0].errorLogCount}}
Returned results:
7

Loop Traversal

Syntax Format
{{range .variable}}
custom_content_{{.childNode1}} custom_content_{{.childNode2}}...
{{end}}
or
{{range $key,$value := .variable}}
custom_content_{{$key}} custom_content_{{$value}}...
{{end}}
Syntax Description
When the variable is an array or an object containing multiple child objects, this syntax can be used to display each element/object in a specified format.
Note:
Inside the range syntax, elements/objects from within the .variable are obtained by default. You cannot directly use the {{.UIN}} format to obtain external variables. To obtain them, create an independent variable outside the range syntax in advance, for example:
{{$UIN := .UIN}} // Create a variable
{{range .variable}}
custom_content_{{.childNode1}} custom_content_{{.childNode2}}...
{{$UIN}} // Use the variable
{{end}}
Use Case
The variable values of {{.QueryResult}} are as follows:
[
[{
"errorLogCount": 7
}],
[{
"errorLogCount": 3,
"request_uri": "/apple-touch-icon-144x144.png"
}, {
"errorLogCount": 3,
"request_uri": "/feed"
}, {
"errorLogCount": 1,
"request_uri": "/opt/node_apps/test-v5/app/themes/basic/public/static/404.html"
}]
]
To display the errorLogCount corresponding to each request_uri in the second array, use the following expression:
{{range .QueryResult[1]}}
* {{.request_uri}} error log count: {{.errorLogCount}}
{{end}}
Returned results:

* /apple-touch-icon-144x144.png error log count: 3

* /feed error log count: 3

* /opt/node_apps/test-v5/app/themes/basic/public/static/404.html error log count: 1

Conditional Judgment

Syntax Format
{{if boolen}}
xxx
{{end}}
or
{{if boolen}}
xxx
{{else}}
xxx
{{end}}
or
{{if boolen}}
xxx
{{else if boolen}}
xxx
{{end}}
Syntax Description
Execute the corresponding expressions respectively according to the conditional judgment results. The conditional judgment supports logical operations using AND, OR, and NOT, allowing for value comparisons.
eq arg1 arg2: returns true if arg1 == arg2.
ne arg1 arg2: returns true if arg1 ! = arg2.
lt arg1 arg2: returns true if arg1 < arg2.
le arg1 arg2: returns true if arg1 <= arg2.
gt arg1 arg2: returns true if arg1 > arg2.
ge arg1 arg2: returns true if arg1 >= arg2.
Use Case
The variable values of {{.QueryResult}} are as follows:
[
[{
"errorLogCount": 7
}],
[{
"errorLogCount": 3,
"request_uri": "/apple-touch-icon-144x144.png"
}, {
"errorLogCount": 3,
"request_uri": "/feed"
}, {
"errorLogCount": 1,
"request_uri": "/opt/node_apps/test-v5/app/themes/basic/public/static/404.html"
}]
]
To display the request_uri and its corresponding errorLogCount from the second array, where errorLogCount is greater than or equal to 2 and less than or equal to 100, use the following expression:
{{range .QueryResult[1]}}
{{if and (ge .errorLogCount 2) (le .errorLogCount 100)}}
* {{.request_uri}} error log count: {{.errorLogCount}}
{{end}}
{{end}}
Returned results:


* /apple-touch-icon-144x144.png error log count: 3



* /feed error log count: 3
The if statement can also be used to determine whether a field value exists. If the field value is an empty string or does not exist, it evaluates to false. For example:
{{if .QueryLog[0][0].apple}}
apple exist, value is : {{.QueryLog[0][0].apple}}
{{else}}
apple is not exist
{{end}}

Removing Whitespace Characters

Syntax Format
{{- xxx}} or {{xxx -}}
Syntax Description
The variable syntax preserves all whitespace characters (including spaces, indents, and line breaks) during execution. For example, loop iterations and conditional judgment may return results with excessive blank lines that clutter the output. In this case, you can use - at the beginning or end of {{ }} to remove leading or trailing whitespace, respectively.
Use Case
Building on the example in conditional judgment, the expression has been revised as follows:
{{- range .QueryResult[1]}}
{{- if and (ge .errorLogCount 2) (le .errorLogCount 100)}}
* {{.request_uri}} error log count: {{.errorLogCount}}
{{- end}}
{{- end}}
Returned results:
* /apple-touch-icon-144x144.png error log count: 3
* /feed error log count: 3

Variable Functions

String Functions

Function
Note:
Example
Escaping special characters
{{escape .variable}}
Escapes special characters such as " so that variables can be placed in JSON to maintain correct JSON formatting.
Variable value:
The variable value of {{.ExecuteQuery[0]}} is status:>=400 | select count(*) as "error log count".
Function example:
{{escape .ExecuteQuery[0]}}
Returned results:
status:>=400 | select count(*) as \\"error log count\\"
{{escape_markdown .variable}}
Escapes special characters such as * and # so that variables can be placed in Markdown to maintain correct Markdown formatting.
Applicable to the WeCom bot notification channel.
{{escape_markdown_html .variable}}
Escapes special characters such as * and # so that variables can be placed in Markdown to maintain correct Markdown formatting.
Applicable to the DingTalk and Feishu bot notification channels.
Extracting strings
{{substr .variable start}}
Extracts a string from the specified start position with an optional length. Both the start position and length are calculated in bytes. Generally, each letter or digit occupies 1 byte.
Variable value:
The variable value of {{.QueryLog[0][0].fileName}} is /root/testLog/nginx.log.
Function example:
{{substr .QueryLog[0][0].fileName 6 7 }}
Returned results:
testLog
{{substr .variable start length}}
{{extract .variable startStringRegex}}
Extracts a string based on the specified start string and optional end string. Both the start and end strings are specified using regular expressions.
Variable value:
The variable value of {{.QueryLog[0][0].fileName}} is /root/testLog/nginx.log.
Function example:
{{extract .QueryLog[0][0].fileName "/root/" "/nginx"}}
Returned results:
testLog
{{extract .variable startStringRegex endStringRegex}}
{{trim .variable}}
Removes leading and trailing whitespace characters from the original string.
Function example:
{{trim " Hello, World! "}}
Returned results:
Hello, World!
{{trimPrefix prefix .variable}}
Removes the specified prefix from the original string.
Function example:
{{trimPrefix "hello" "hello, world!"}}
Returned results:
, world!
{{trimSuffix suffix .variable}}
Removes the specified suffix from the original string.
Function example:
{{trimSuffix "world!" "hello, world!"}}
Returned results:
hello,
Case conversion
{{lower .variable}}
Converts all characters in the original string to lowercase.
Function example:
{{lower "HELLO WORLD"}}
Returned results:
hello world
{{upper .variable}}
Converts all characters in the original string to uppercase.
Function example:
{{upper "hello world"}}
Returned results:
HELLO WORLD
{{title .variable}}
Converts the original string to title case, capitalizing the first letter of each word and making the rest lowercase.
Function example:
{{title "hello world"}}
Returned results:
Hello World
String replacement
{{replace(oldstr,newstr,originstr)}}
Replaces a substring oldstr in the specified string originstr with another substring newstr.
Function example:
{{replace "foo" "bar" "foo bar foo"}}
Returned results:
bar bar bar
{{regexReplaceAll(regex,originstr,newstr)}}
Replaces the substring that matches the regular expression regex in the specified string originstr with the specified string newstr.
Function example:
{{regexReplaceAll "h" "hello world" "H"}}
Returned results:
Hello world
String matching
{{containstr .variable searchstring}}
Check if the variable value contains the specified string. The result can be used in conditional judgment syntax.
Variable value:
The variable value of {{.QueryLog[0][0].fileName}} is /root/testLog/nginx.log.
Function example:
{{if containstr .QueryLog[0][0].fileName "test"}}test log{{else}}non-test log{{end}}
Returned results:
test log
{{regexMatch(regex,string)}}
Determines whether the specified string matches the regular expression. If a match occurs, true is returned; otherwise, false is returned.
Function example:
{{regexMatch "^hello" "hello world"}}
Returned results:
true
Concatenating strings
{{concat .variable1 .variable2 ...}}
Concatenates the specified variables or strings together.
Function example:
{{concat .Region .Alarm}}
Returned results:
Excessive Nginx error logs in Guangzhou
Splitting strings
{{splitList delimiter string}}
Splits the string string into an array using the delimiter delimiter.
Function example:
{{splitList "," "apple,banana,orange"}}
Returned results:
["apple" "banana" "orange"]
Sorting strings
{{sortAlpha stringList}}
Sorts the list of strings in alphabetical order.
It does not sort in-place; instead, it returns a sorted copy of the list, adhering to the principle of list immutability.
Function example:
{{sortAlpha (splitList "," "banana,apple,orange")}}
Returned results:
["apple","banana","orange"]
Counting length or number of elements
{{len .variable}}
Obtains the number of elements in arrays or maps, and the length of strings. Does not support retrieving the length of numeric values.
Variable value:
The variable value of {{.QueryResult}} is
[[{"number":19778,"text":"hello"}],[]]
Function example:
{{len .QueryResult}}
{{len .QueryResult[0]}}
{{len .QueryResult[0][0]}}
{{len .QueryResult[0][0].text}}
Returned results:
2
1
2
5

Mathematical Calculation Functions

Function
Note:
Example
Addition
{{add .variable1 .variable2 ...}}
Integer (int64) addition operation
Function example:
{{ add 5 3 }}
Returned results:
8
{{addf .variable1 .variable2 ...}}
Floating-point number (float64) addition operation
Subtraction
{{sub .variable1 .variable2}}
Integer (int64) subtraction operation
Function example:
{{ sub 10 3 }}
Returned results:
7
{{subf .variable1 .variable2}}
Floating-point number (float64) subtraction operation
Division
{{div .variable1 .variable2}}
Integer (int64) division operation
Function example:
{{ div 10 2 }}
Returned results:
5
{{divf .variable1 .variable2}}
Floating-point number (float64) division operation
Modulo
{{mod .variable1 .variable2}}
Integer (int64) modulo operation
Function example:
{{ mod 10 3 }}
Returned results:
1
Multiplication
{{mul .variable1 .variable2}}
Integer (int64) multiplication operation
Function example:
{{ mul 4 5 }}
Returned results:
20
{{mulf .variable1 .variable2}}
Floating-point number (float64) multiplication operation
Minimum value
{{min .variable1 .variable2 ...}}
Minimum value from integer (int64)
Function example:
{{ min 3 7 }}
Returned results:
3
{{minf .variable1 .variable2 ...}}
Minimum value from floating-point number (float64)
Maximum Value
{{max .variable1 .variable2 ...}}
Maximum value from integer (int64)
Function example:
{{ max 3 7 }}
Returned results:
7
{{maxf .variable1 .variable2 ...}}
Maximum value from floating-point number (float64)
Rounding
{{ceil .variable}}
Rounding up
Function example:
{{ ceil 5.3 }}
Returned results:
6
{{floor .variable}}
Rounding down
Rounding
{{round .variable decimal}}
Rounds the value variable to the specified decimal place decimal.
Function example:
{{ round 5.6748 2 }}
Returned results:
5.67

Type Conversion Functions

Function
Note:
Example
{{atoi .variable}}
Converts a string to an integer.
Function example:
{{ atoi "123" }}
{{ float64 12 }}
{{ int "42" }}
{{ int64 1234 }}
{{ toString 123 }}
Returned results:
123
12
42
1234
123
{{float64 .variable}}
Converts the value to the float64 type.
{{int .variable}}
Converts the value to the int type matching the system width.
{{int64 .variable}}
Converts the value to the int64 type.
{{toString .variable}}
Converts the value to a string.

Time Functions

Function
Note:
Example
Converting a UNIX timestamp
{{fromUnixTime .variable}}
Converts UNIX timestamp (support millisecond and second timestamp) to a readable date and time. The time zone is optional, with the default set to Asia/Shanghai.
Variable value:
The variable value of {{.QueryLog[0][0].time}} is 1653893435008.
Function example:
{{fromUnixTime .QueryLog[0][0].time}}
{{fromUnixTime .QueryLog[0][0].time "Asia/Shanghai"}}
{{fromUnixTime .QueryLog[0][0].time "Asia/Tokyo"}}
Returned results:
2022-05-30 14:50:35.008 +0800 CST
2022-05-30 14:50:35.008 +0800 CST
2022-05-30 15:50:35.008 +0900 JST
{{fromUnixTime .variable "timezone"}}
Time formatting
{{date "2006-01-02 15:04:05" .variable}}
Converts the specified timestamp to a string in the specified format. The first parameter specifies the time format, based on 2006-01-02 15:04:05, which can be adjusted.
Function example:
{{date "2006-01-02" (div .NotifyTimeUnix 1000)}}
{{dateInZone "2006-01-02 15:04:05" (div .NotifyTimeUnix 1000) "Asia/Shanghai"}}
Returned results:
2025-06-10
2025-06-10 21:55:04
Description: .NotifyTimeUnix is a millisecond timestamp, which is converted to a second timestamp by dividing by 1000 using div.
{{dateInZone "2006-01-02 15:04:05" .variable timezone}}
Supports specifying the timezone, similar to the date function
{{duration .variable}}
Converts a duration in seconds to a human-readable format.
Function example:
{{duration (mul .Duration 60)}}
Returned results:
4h23m0s
Description: .Duration indicates the alarm duration in minutes, which is converted to seconds by multiplying by 60 using mul.

JSON Formatting Function

Function
Note:
Example
{{toPrettyJson .variable}}
Converts the specified parameter into a formatted JSON string for easy display.
Function example:
{{toPrettyJson .TriggerResult}}
Returned results:
[
[{
"errorLogCount": 7
}],
[{
"errorLogCount": 3,
"request_uri": "/apple-touch-icon-144x144.png"
}, {
"errorLogCount": 3,
"request_uri": "/feed"
}]
]


Codec/Encryption Functions

Function
Note:
Example
{{base64_encode .variable}}
{{base64_decode .variable}}
{{base64url_encode .variable}}
{{base64url_decode .variable}}
{{url_encode .variable}}
{{url_decode .variable}}
Encodes or decodes the specified variable or string. For Base64URL, padding characters (=) are not removed or added during encoding and decoding.
Function example:
{{base64_encode "test test"}}
{{base64_decode "dGVzdOa1i+ivlQ=="}}
{{base64url_encode "test test"}}
{{base64url_decode "dGVzdOa1i-ivlQ=="}}
{{url_encode "https://console.tencentcloud.com:80/cls?region=ap-chongqing"}}
{{url_decode "https%3A%2F%2Fconsole.cloud.tencent.com%3A80%2Fcls%3Fregion%3Dap-chongqing"}}
Returned results:
dGVzdOa1i+ivlQ==
test test
dGVzdOa1i-ivlQ==
test test
https%3A%2F%2Fconsole.cloud.tencent.com%3A80%2Fcls%3Fregion%3Dap-chongqing
https://console.tencentcloud.com:80/cls?region=ap-chongqing
{{md5 .variable}}
{{md5 .variable | base64_encode}}
{{md5 .variable | base64url_encode}}
{{sha1 .variable}}
{{sha1 .variable | base64_encode}}
{{sha1 .variable | base64url_encode}}
{{sha256 .variable}}
{{sha256 .variable | base64_encode}}
{{sha256 .variable | base64url_encode}}
{{sha512 .variable}}
{{sha512 .variable | base64_encode}}
{{sha512 .variable | base64url_encode}}
Encrypts the specified variable or string using a specific encryption algorithm. The default returned result is encoded as a hexadecimal string, which can be modified as needed to Base64 or Base64URL encoding.
Function example:
{{md5 "test"}}
{{md5 "test" | base64_encode}}
{{md5 "test" | base64url_encode}}
{{sha1 "test"}}
{{sha1 "test" | base64_encode}}
{{sha1 "test" | base64url_encode}}
{{sha256 "test"}}
{{sha256 "test" | base64_encode}}
{{sha256 "test" | base64url_encode}}
{{sha512 "test"}}
{{sha512 "test" | base64_encode}}
{{sha512 "test" | base64url_encode}}
Returned results:
098F6BCD4621D373CADE4E832627B4F6
CY9rzUYh03PK3k6DJie09g==
CY9rzUYh03PK3k6DJie09g==
A94A8FE5CCB19BA61C4C0873D391E987982FBBD3
qUqP5cyxm6YcTAhz05Hph5gvu9M=
qUqP5cyxm6YcTAhz05Hph5gvu9M=
9F86D081884C7D659A2FEAA0C55AD015A3BF4F1B2B0B822CD15D6C15B0F00A08
n4bQgYhMfWWaL+qgxVrQFaO/TxsrC4Is0V1sFbDwCgg=
n4bQgYhMfWWaL-qgxVrQFaO_TxsrC4Is0V1sFbDwCgg=
EE26B0DD4AF7E749AA1A8EE3C10AE9923F618980772E473F8819A5D4940E0DB27AC185F8A0E1D5F84F88BC887FD67B143732C304CC5FA9AD8E6F57F50028A8FF
7iaw3Ur350mqGo7jwQrpkj9hiYB3Lkc/iBml1JQODbJ6wYX4oOHV+E+IvIh/1nsUNzLDBMxfqa2Ob1f1ACio/w==
7iaw3Ur350mqGo7jwQrpkj9hiYB3Lkc_iBml1JQODbJ6wYX4oOHV-E-IvIh_1nsUNzLDBMxfqa2Ob1f1ACio_w==
{{hmac_md5 .variable "Secretkey"}}
{{hmac_md5 .variable "Secretkey" | base64_encode}}
{{hmac_md5 .variable "Secretkey" | base64url_encode}}
{{hmac_sha1 .variable "Secretkey"}}
{{hmac_sha1 .variable "Secretkey" | base64_encode}}
{{hmac_sha1 .variable "Secretkey" | base64url_encode}}
{{hmac_sha256 .variable "Secretkey"}}
{{hmac_sha256 .variable "Secretkey" | base64_encode}}
{{hmac_sha256 .variable "Secretkey" | base64url_encode}}
{{hmac_sha512 .variable "Secretkey"}}
{{hmac_sha512 .variable "Secretkey" | base64_encode}}
{{hmac_sha512 .variable "Secretkey" | base64url_encode}}
Encrypts the specified variable or string using a specific encryption algorithm. The default returned result is encoded as a hexadecimal string, which can be modified as needed to Base64 or Base64URL encoding. Secretkey is the key for the HMAC encryption algorithm and can be modified as needed.
Function example:
{{hmac_md5 "test" "Secretkey"}}
{{hmac_md5 "test" "Secretkey" | base64_encode}}
{{hmac_md5 "test" "Secretkey" | base64url_encode}}
{{hmac_sha1 "test" "Secretkey"}}
{{hmac_sha1 "test" "Secretkey" | base64_encode}}
{{hmac_sha1 "test" "Secretkey" | base64url_encode}}
{{hmac_sha256 "test" "Secretkey"}}
{{hmac_sha256 "test" "Secretkey" | base64_encode}}
{{hmac_sha256 "test" "Secretkey" | base64url_encode}}
{{hmac_sha512 "test" "Secretkey"}}
{{hmac_sha512 "test" "Secretkey" | base64_encode}}
{{hmac_sha512 "test" "Secretkey" | base64url_encode}}
Returned results:
E7B946D930658699AA668601E33E87CE
57lG2TBlhpmqZoYB4z6Hzg==
57lG2TBlhpmqZoYB4z6Hzg==
2AB64F124D932F5033EAC7AF392AC5CC4D52F503
KrZPEk2TL1Az6sevOSrFzE1S9QM=
KrZPEk2TL1Az6sevOSrFzE1S9QM=
FC49EBC05209B1359773D87C216BA85BCE0163FDE459EA37AB603EC9D8445D23
/EnrwFIJsTWXc9h8IWuoW84BY/3kWeo3q2A+ydhEXSM=
_EnrwFIJsTWXc9h8IWuoW84BY_3kWeo3q2A-ydhEXSM=
D18DF3D943F74769A8B66E43D7EF03639BB6B8B8A2EBC9976170DC58EEE58BE98478F3183E4B5AA3481DE12026AAE3843F8213B39D639EAC6EE93734EA667BC5
0Y3z2UP3R2motm5D1+8DY5u2uLii68mXYXDcWO7li+mEePMYPktao0gd4SAmquOEP4ITs51jnqxu6Tc06mZ7xQ==
0Y3z2UP3R2motm5D1-8DY5u2uLii68mXYXDcWO7li-mEePMYPktao0gd4SAmquOEP4ITs51jnqxu6Tc06mZ7xQ==

Case Study

Case 1: Displaying the Most Recent Detailed Log in the Alarm Notification

Scenarios

Add the most recent detailed log that conforms to the execution statement search conditions to the alarm notification. Present it in key:value format, with each key on a separate line, excluding any CLS preset fields and metadata fields.

Notification Content Configuration

{{range $key,$value := .QueryLog[0][0].content}}
{{if not (containstr $key "__TAG__")}}
{{- $key}}:{{$value}}
{{- end}}
{{- end}}
Here, .QueryLog[0][0] represents the most recent detailed log that matches the search conditions of the first execution statement in the alarm policy. Its value is as follows:
{
"content": {
"__TAG__": {
"a": "b12fgfe",
"c": "fgerhcdhgj"
},
"body_bytes_sent": "33704",
"http_referer": "-",
"http_user_agent": "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.3319.102 Safari/537.36",
"remote_addr": "247.0.249.191",
"remote_user": "-",
"request_method": "GET",
"request_uri": "/products/hadoop)",
"status": "404",
"time_local": "01/Nov/2018:07:54:08"
},
"fileName": "/root/testLog/nginx.log",
"pkg_id": "285A243662909DE3-210B",
"source": "172.17.0.2",
"time": 1653908859008,
"topicId": "a54de372-ffe0-49ae-a12e-c340bb2b03f2"
}

Alarm Notification Content

remote_addr:247.0.249.191
time_local:01/Nov/2018:07:54:08
http_user_agent:Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.3319.102 Safari/537.36
remote_user:-
http_referer:-
body_bytes_sent:33704
request_method:GET
request_uri:/products/hadoop)
status:404

Case 2: Displaying Detailed Logs for Multiple Execution Statements in Alarm Notifications

Scenarios

When an alarm policy contains multiple execution statements, the detailed logs corresponding to each statement are added to the alarm notification.

Notification Content Configuration

{{- range .QueryLog}}
{{- range .}}
{{.content}}
{{- end}}
{{- end}}
Here, .QueryLog represents the detailed logs that match the search conditions of all execution statements in the alarm policy (up to a maximum of 10 logs). Its value is as follows:
{
"QueryLog": [
[{
"content": {
"__TAG__": {
"pod": "nginxPod",
"cluster": "testCluster"
},
"body_bytes_sent": "32847",
"http_referer": "-",
"http_user_agent": "Opera/9.80 (Windows NT 6.1; U; en-US) Presto/2.7.62 Version/11.01",
"remote_addr": "105.86.148.186",
"remote_user": "-",
"request_method": "GET",
"request_uri": "/apple-touch-icon-144x144.png",
"status": "404",
"time_local": "01/Nov/2018:00:55:14"
},
"fileName": "/root/testLog/nginx.log",
"pkg_id": "285A243662909DE3-5CD",
"source": "172.17.0.2",
"time": 1653739000013,
"topicId": "a54de372-ffe0-49ae-a12e-c340bb2b03f2"
}, {
"content": {
"__TAG__": {
"pod": "nginxPod",
"cluster": "testCluster"
},
"body_bytes_sent": "33496",
"http_referer": "-",
"http_user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.93 Safari/537.36",
"remote_addr": "222.18.168.242",
"remote_user": "-",
"request_method": "GET",
"request_uri": "/opt/node_apps/test-v5/app/themes/basic/public/static/404.html",
"status": "404",
"time_local": "01/Nov/2018:00:54:37"
},
"fileName": "/root/testLog/nginx.log",
"pkg_id": "285A243662909DE3-5C8",
"source": "172.17.0.2",
"time": 1653738975008,
"topicId": "a54de372-ffe0-49ae-a12e-c340bb2b03f2"
}],
[{
"content": {
"__TAG__": {
"pod": "nginxPod",
"cluster": "testCluster"
},
"body_bytes_sent": "32847",
"http_referer": "-",
"http_user_agent": "Opera/9.80 (Windows NT 6.1; U; en-US) Presto/2.7.62 Version/11.01",
"remote_addr": "105.86.148.186",
"remote_user": "-",
"request_method": "GET",
"request_uri": "/apple-touch-icon-144x144.png",
"status": "404",
"time_local": "01/Nov/2018:00:55:14"
},
"fileName": "/root/testLog/nginx.log",
"pkg_id": "285A243662909DE3-5CD",
"source": "172.17.0.2",
"time": 1653739000013,
"topicId": "a54de372-ffe0-49ae-a12e-c340bb2b03f2"
}, {
"content": {
"__TAG__": {
"pod": "nginxPod",
"cluster": "testCluster"
},
"body_bytes_sent": "33496",
"http_referer": "-",
"http_user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.93 Safari/537.36",
"remote_addr": "222.18.168.242",
"remote_user": "-",
"request_method": "GET",
"request_uri": "/opt/node_apps/test-v5/app/themes/basic/public/static/404.html",
"status": "404",
"time_local": "01/Nov/2018:00:54:37"
},
"fileName": "/root/testLog/nginx.log",
"pkg_id": "285A243662909DE3-5C8",
"source": "172.17.0.2",
"time": 1653738975008,
"topicId": "a54de372-ffe0-49ae-a12e-c340bb2b03f2"
}]
]
}

Alarm Notification Content

{"__TAG__":{"pod":"nginxPod","cluster":"testCluster"},"body_bytes_sent":"32847","http_referer":"-","http_user_agent":"Opera/9.80 (Windows NT 6.1; U; en-US) Presto/2.7.62 Version/11.01","remote_addr":"105.86.148.186","remote_user":"-","request_method":"GET","request_uri":"/apple-touch-icon-144x144.png","status":"404","time_local":"01/Nov/2018:00:55:14"},
{"__TAG__":{"pod":"nginxPod","cluster":"testCluster"},"body_bytes_sent":"33496","http_referer":"-","http_user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.93 Safari/537.36","remote_addr":"222.18.168.242","remote_user":"-","request_method":"GET","request_uri":"/opt/node_apps/test-v5/app/themes/basic/public/static/404.html","status":"404","time_local":"01/Nov/2018:00:54:37"},
{"__TAG__":{"pod":"nginxPod","cluster":"testCluster"},"body_bytes_sent":"32847","http_referer":"-","http_user_agent":"Opera/9.80 (Windows NT 6.1; U; en-US) Presto/2.7.62 Version/11.01","remote_addr":"105.86.148.186","remote_user":"-","request_method":"GET","request_uri":"/apple-touch-icon-144x144.png","status":"404","time_local":"01/Nov/2018:00:55:14"},
{"__TAG__":{"pod":"nginxPod","cluster":"testCluster"},"body_bytes_sent":"33496","http_referer":"-","http_user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.93 Safari/537.36","remote_addr":"222.18.168.242","remote_user":"-","request_method":"GET","request_uri":"/opt/node_apps/test-v5/app/themes/basic/public/static/404.html","status":"404","time_local":"01/Nov/2018:00:54:37"}

Case 3: Displaying Execution Statement Results in Alarm Notifications

Scenarios

Add the statement execution results that meet the trigger conditions to the alarm notification, formatted as a list.
Alarm policy execution statement: status:>=400 | select count(*) as errorLogCount,request_uri group by request_uri order by count(*) desc Trigger condition: $1.errorLogCount > 10

Notification Content Configuration

{{range .QueryResult[0]}}
{{- if gt .errorLogCount 10}}
{{.request_uri}} error log count: {{.errorLogCount}}
{{- end}}
{{- end}}
Here, .QueryResult[0] represents the execution result of the first execution statement in the alarm policy. Its value is as follows:
[{
"errorLogCount": 161,
"request_uri": "/apple-touch-icon-144x144.png"
}, {
"errorLogCount": 86,
"request_uri": "/opt/node_apps/test-v5/app/themes/basic/public/static/404.html"
}, {
"errorLogCount": 33,
"request_uri": "/feed"
}, {
"errorLogCount": 26,
"request_uri": "/wp-login.php"
}, {
"errorLogCount": 10,
"request_uri": "/safari-pinned-tab.svg"
}, {
"errorLogCount": 7,
"request_uri": "/mstile-144x144.png"
}, {
"errorLogCount": 4,
"request_uri": "/atom.xml"
}, {
"errorLogCount": 3,
"request_uri": "/content/plugins/prettify-gc-syntax-highlighter/launch.js?ver=3.5.2?ver=3.5.2"
}]

Alarm Notification Content

/apple-touch-icon-144x144.png error log count: 161
/opt/node_apps/elastic-v5/app/themes/basic/public/static/404.html error log count: 86
/feed error log count: 33
/wp-login.php error log count: 26

Case 4: Using Execution Statement Results in Multidimensional Analysis

Scenarios

When configuring multi-dimensional analysis in an alarm policy, use the value of a specific field from the statement execution results as the filter condition for the analysis.

Alarm Policy Configuration


Here, {{.QueryResult[0][0].host}} represents the host field in the first row of the execution result for the first execution statement.
Note:
When the variable value is a string, please enclose it in quotes to comply with the rules for search and analysis statements. Use double quotation marks for search criteria, for example, "{{.QueryResult[0][0].host}}". Use single quotation marks for SQL statements, for example, '{{.QueryResult[0][0].host}}'.


Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback