Alright maybe not enough coffee....I am going in circles trying to get this to display the values in the csv. Cant figure out what needs to go with the fillnull value.
index=my_data data...
See more...
Alright maybe not enough coffee....I am going in circles trying to get this to display the values in the csv. Cant figure out what needs to go with the fillnull value.
index=my_data data.environment.application="MY APP" data.environment.environment="test"
| eval estack="my_stack"
| fillnull value="prod" estack data.environment.stack
| where 'data.environment.stack'=estack
| streamstats window=1 current=False global=False values(data.result) AS nextResult BY data.componentId
| eval failureStart=if((nextResult="FAILURE" AND 'data.result'="SUCCESS"), "True", "False"), failureEnd=if((nextResult="SUCCESS" AND 'data.result'="FAILURE"), "True", "False")
| transaction data.componentId, data.environment.application, data.environment.stack startswith="failureStart=True" endswith="failureEnd=True" maxpause=15m
| stats sum(duration) as downtime by data.componentId
| inputlookup append=true Component_avail.csv
| fillnull
| addinfo
| eval uptime=(info_max_time - info_min_time)-downtime, avail=(uptime/(info_max_time - info_min_time))*100, downMins=round(downtime/60, 0)
| rename data.componentId AS Component, avail AS Availability
| table Component, Availability