Splunk Dashboard Tags: Init
<init> tag is one of the most used tokens in the Splunk dashboard. If you are using the Splunk dashboard for a long time then you must have seen these in the Splunk dashboard. We use this token to load any token on the page load. Whenever the dashboard will load token defined within the init tag will load.
- PDF scheduling is disabled for dashboards and forms that include an <init> element.
- Token settings made within the <init> element override any settings made in URL query string parameters.
- Token setting on page load is only supported for Simple XML dashboards.
Here from lines number 6 to 8, I have used the <init> tag, within that, I have set a token “app_name”, and the value of that token is defined as “my_app_name”. Then that token is passed to the below token.
Here is the dashboard.
<dashboard> <label>Init Tag</label> <search> <query>index=main app=$app_name|s$</query> </search> <init> <set token="app_name">my_app_name</set> </init> <row> <panel> <title>Activity Monitoring: $app_name$</title> </panel> </row> </dashboard>
I hope this blog “Splunk Dashboard Tags: Init” will help you to gather more knowledge on Splunk dashboard tags.