Best way to support external mutable variable?

I have a use case where I need to incorporate the value of an external variable (say accessible via a REST call) that changes frequently into one or more visualisations (via scripting) - for example lets assume its a spot price of a commodity.

What is the best way to do that in Kibana/elasticsearch 5.x/6.x ?

I think the only way to do that would be to add that variable into your data ingestion process, each time you index a document. Then you'll have access to the historical values of that external variable, as well as the ability to grab the most recent value (depending on how often you index data). Would that work for you?

Thanks for the reply. I already do this to capture the current value at the time of indexing. However, this changes over time so I need to know the delta between the value captured at indexing and the value at present.

I guess I could do it with;

Which seems like a lot of work...

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.