Quantcast
Channel: Questions in topic: "splunk-enterprise"
Viewing all articles
Browse latest Browse all 47296

How to retain the state of a variable in Splunk Add-on built via python-sdk?

$
0
0
I built a sample Splunk add-on with a simple logic of generating events with such data: {'current': 2, 'previous': 1} {'current': 3, 'previous': 2} {'current': 4, 'previous': 3} When I add the new sample add-on in my Splunk data input. It starts generating events as shown below: ![alt text][1] The above image shows that variables are not maintaining their states and Splunk calls the add-on after each 30 seconds. Kindly guide me how can I retain the previous variables values so that I can use them for a specific task. I searched a lot over the Internet but all in-vain. I can read/write data from files each time but that ain't be a good solution. [1]: /storage/temp/207040-splunk-events.png

Viewing all articles
Browse latest Browse all 47296

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>