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
↧