I need to test some logic I have written in Kibana (Vega scripts). For this I require quite a bit of data to generate the graphs. I am currently doing this manually wiht statements such as:
post /metrics-hardware-xxx/_doc {"@timestamp":"2023-03-11T15:00", "system_Status": 1 } post /metrics-hardware-xxx/_doc {"@timestamp":"2023-03-11T15:01", "system_Status": 1 } post /metrics-hardware-xxx/_doc {"@timestamp":"2023-03-11T15:02", "system_Status": 0 }
BUt I would like to have some kind of for loop where I can loop through timestamps 1 per minute over several days and assign a random system status either 0,1,2.
Is this possible in Elastic?
It is straightforward with a stored procedure in most sql DBs, but I am not sure where to start , and seems there is not much info on the web.
I asked ElasticSearch support directly and their answer confirms comment from @Paulo . It seems it is impossible to do that directly in Elastic, they recommend:
I have decided to use the c# client which seems to be the most flexible.