Many thanks guys so far. You are the best 🙂
ok basicaly this is my complete thing:
inputcsv test.csv
| stats
count(eval(STATUS="ACTIVE")) as success_count
count(eval(STATUS!="ACTIVE")) as failure_count
by DATABASE_NAME| eval percentage=(success_count/(success_count+failure_count))*100
I'm checking the STATUS field. If it's == ACTIVE, then count it as success,
if it's other then ACTIVE it counts as fail.
At the end I'm converting it to percentage.
The only thing I need is to count it as fail ONLY after 3 continuous fails after each other
Many thanks for the suggestions 🙂
... View more