I have an Elasticsearch/Graylog machine and I need to export the logs and import them into Loki. I wonder if it’s even possible and if it is then how. I can’t find any info about this. Any idea?
This isn’t the answer you’re asking for, but it has proved effective:
I’d send logs to ES and Loki and simply disable ES after a period of time. That way I wouldn’t need to worry about building an ETL job from ES → Loki. Hope that helps.
Thanks for the hint. The situation is the following:
- there was a time when I only had ES
- then there was a time when I had both Loki and ES simultaneously (this is about what you suggested)
- now I only have Loki but I would like to keep the old (pre-Loki) logs somehow without having to maintain ES, i.e move logs from ES to Loki.
I see. For that you’d probably need to write a bespoke exporting tool from your ES schema → Loki.