I’ve been tyring to deploy monitoring system to collect server metric and Log.
I know Loki can collect Log.
but I don’t know Loki can collect server metric like CPU, DISK iops and Process state.
So would you let me know if Loki can collect server metric?
I think you may have some of the tools confused a bit, hopefully I can clarify it for you.
- Loki is a log storage / query platform. It does not collect anything by itself.
- You can collect server metrics such as CPU and disk usage. What agents you use typically depend on what metrics platform you use. If you use mimir/prometheus, you can use node exporter or Grafana Alloy. If you use InfluxDB you can use telegraf. If you use other metrics platform then you might want to do some research on your own.
- You CAN transform metrics into logs and send to Loki, but this is generally not a good idea and I would advise you to not attempt this.
Hi Thank for your answer.
I have not used Loki So I don’t know Loki
So basically you’re telling me that “Loki” can collect only log?
So to collect server metrics such as CPU and disk usage I have to use other tools such as prometheus or influxdb?
I’m not good at enlglish.
please understand me
No, you don’t use Loki to collect logs. You would use Loki to store and analyze logs, and you’d use something else to collect logs.
In Grafana’s LGTM stack, you’d have the following tools:
- Loki: log storage
- Mimir: metrics storage
- Tempo: trace storage
- Grafana Alloy: agent to collect logs and metrics
So to answer your question you’d run Loki, then use Grafana Alloy to collect logs and send to Loki. You can of course use other log collection agents, as long as they can send to Loki.
Thank you for your great answer.
Now I’ve 100 % uderstood what you are saying.
So you’re telling me that “Loki” doesn’t collect logs “Loki” can store and analyze logs.
What I want to deploy is monitoring service that store logs and server metric using only “Loki”.
but It is not possible.
If I want to store logs and server metric I have to use Loki and Mimir.
Is it correct?
That is correct.
Logs and metrics are two very different thing, and I don’t think you’d find many solutions that can do both at the same time without some sort of tradeoff.
Thank you appreciate!
I have to find other way.