The jinja2format
command returns events with a one new field,
formatted_template
, unless you specify an result
option.
The following example will output the rendered template into
formatted_template
field:
| makeresults count=1
| eval celsius = random()%100
| eval name = "Joe"
| jinja2format "It's {{ celsius }} degrees, {{ name }}!"
In this example, we override the output field:
| makeresults count=1
| eval celsius = random()%100
| eval name = "Joe"
| eval template="It's {{ celsius }} degrees, {{ name }}!"
| jinja2format result=out template
Please refer to the official documentation for more details.
Less restrictive permissions, as it might have been causing problems in some installations.
As a Splunkbase app developer, you will have access to all Splunk development resources and receive a 10GB license to build an app that will help solve use cases for customers all over the world. Splunkbase has 1000+ apps from Splunk, our partners and our community. Find an app for most any data source and user need, or simply create your own with help from our developer portal.