Dashboards & Visualizations

read application variable into xml

fresned
Path Finder

in splunk is there a way to set an application variable in any of the .conf files that is accessible in the xml file? if so please provide and example

Tags (1)
0 Karma

Drainy
Champion

I think you are looking for http://docs.splunk.com/Documentation/Splunk/5.0/admin/Timesconf

In this conf you can define your own time periods/ranges to use within Splunk. You define this within $SPLUNK_HOME/etc/apps/APPNAME/local/

0 Karma

Drainy
Champion

Have you tried creating eventtypes or macros to do the same thing? Then you only need to edit them in the manager just the once

0 Karma

fresned
Path Finder

in the XML files I have a search there are hard coded values every time the name of an item gets updated, I find I have to go through a number of xml files and updated the value each time. So was look for a way not to have to go and update each file. so I have the following;sourcetype=sourcename TestType="Order" there are 12 xml files that have TestType="Order" and when the name changed to "Orders" I have to go and change each of the searches. where if it was a variable I would only need to update it in one place one time

0 Karma

Drainy
Champion

What sort of variable do you mean then? If its not time related then no, there isn't really any way to put a value in a file and have it interpreted in the XML. To do this you would use something like the ValueSetter in sideview utils or just type it in for each XML. I'd be more interested to know what use-cases (e.g. what sort of variables) you'd want to share across many dashboards.

0 Karma

fresned
Path Finder

I may have chose a bad example. I was looking anything I may want to use as a variable, not just a time as an example. I will try and see it this will do what I need.

0 Karma

fresned
Path Finder

I would like to set this up as a variable rather than a hard coded value.

layoutPanel="panel_row1_col1" autorun="True">
Last 4 hours
True
I would like to change Last 4 hours to be something like
$VARIABLENAME$ where $VARIABLENAME$ is set
in one of the .confg files. So in one place I could set all the xml files to be
$VARIABLENAME$ ='Last 2 hours' for example.

0 Karma

Drainy
Champion

Could you give an example of what you are trying to achieve or would like to?

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...