I am trying to find an efficient way to display the growth of a number of a type of requests over a period of time.
I managed to create a graph (see below) that shows what we want, but it needs to have indices from the beginning of the specific project, which means that we need to keep a lot of indices just for counting those requests, when we actually need logs only for few weeks back.
I have tried using a watcher that would query all requests of that type, but I was unable to get the
result.input.payload.hits.total in a visualisation.
Would a scenario like this be possible:
- Set a watcher to get the count of all requests
- Edit the watcher to get the total hits and date from the previous execution and then somehow return the sum of the total hits and hits from that date to now
- Make a graph using the sum from the watcher?
This way we could cleanup old indices that we don't need and use the watcher index instead.