CSV exporter for Prometheus

599 views
Skip to first unread message

Ramaraju Datla

unread,
Jan 13, 2020, 1:25:05 PM1/13/20
to Prometheus Users
Hi Team,

We have log file is CSV format which contains all the application information latency and various reports. we need this log file to be exported to Prometheus so that we can expose it to grafana and get the  trends.

need help on any custom exported available to achieve this.

Thanks,
Ramaraju

Brian Candler

unread,
Jan 13, 2020, 2:57:40 PM1/13/20
to Prometheus Users
Sorry, you can't backfill prometheus with historical data.  It has to be collected in real time.

Have a look at other products: e.g.
- InfluxDB
- VictoriaMetrics (which is prometheus-compatible but supports backfill - you can query it from grafana as a prometheus source)
- other data sources supported by grafana

Ben Kochie

unread,
Jan 13, 2020, 4:40:08 PM1/13/20
to Ramaraju Datla, Prometheus Users
If it's a log file you can tail for data, I would recommend mtail to parse and turn it into metrics.


Latency information can be observed into histograms with nice results.

--
You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/292f146b-abdc-4a3a-a030-9a2703eef4f9%40googlegroups.com.

Alexander Golikov

unread,
Jan 14, 2020, 10:40:21 AM1/14/20
to Prometheus Users
Hello,
I solved the similar task with parsing of CSV files from Java application and holding it until for Prometheus pulls.
Yes, I lose some time diff in representation, but it is no matter for me.
This is written on Python, you could look it as example and write the same for your needs. Also this code does rsync copy of csv files to remote host, you don't need it.
csv-exporter-example.py
Reply all
Reply to author
Forward
0 new messages