Cant seem to find out how to do this.
My company provides APIs as a Service and use an API Gateway.
In order to bill the customer for their usage, i need to keep a record of their Total No. Of API Calls on a monthly basis.
I can get this data from Loki and create a Graph in Grafana. But, Loki seems to be made for keeping data for a short period of time (probably 14 days on average?). After that, its best to delete it cause the loki storage would go into terabytes.
Im find with deleting the logs, but what i need most is a historical graph of the usage.
Meaning, i dont need the logs itself, but i need to be able to keep the counts (total number of api calls per month) and express it in a graph.
Ideally, id like to be able to keep the graph as long as 5 years so i can see the trend of the API Calls over the years.
How do i do this with Loki and Grafana?