https://kotlinlang.org logo
Title
j

jorge.rego

10/08/2020, 9:21 AM
Hi all I’ve written an article in Medium about how to monitor Ktor API server with Prometheus & Grafana. I hope this can help you somehow. It took me a bit of time to integrate and build the dashboard I’ve shared, so it may save some of your time if you are looking for something similar. https://medium.com/@math21/how-to-monitor-a-ktor-server-using-grafana-bab54a9ac0dc
👀 9
This is a starting point, with a single instance, but it can be easily scaled up using Consul and an instance registration so you can display multiple instances metrics. Some changes are needed to achieve that though
Comments and PR’s are welcome, all constructive feedback is appreciated!
r

Rémy

10/08/2020, 11:28 AM
Thanks 🙏
j

jorge.rego

10/08/2020, 11:57 AM
Let me know if you have some questions, I will be around to help
👌 1
r

Rémy

11/05/2020, 11:55 AM
Hello, I tried several days ago, but Grafana didn’t found any logs...
When I call the backend endpoint for metric, it works.
j

jorge.rego

11/07/2020, 2:55 PM
Hi @Rémy Could you add the datasource in Grafana? while adding it, there is a button to test connection to Prometheus. Is Grafana saying it is working? Sorry for the late reply, I was really busy this week.
r

Rémy

11/07/2020, 7:54 PM
No worries 🙂 I’ve imported the datasource into Grafana but it said it was always down. Even after a while. I didn’t investigate more in it... Here my repo if you have time to check, and if you want obviously, if I didn’t make some mistakes (https://github.com/remylavergne/spotfinder-backend/tree/develop) Thanks :)
👍 1
j

jorge.rego

11/07/2020, 7:58 PM
I will have a look
❤️ 1
Ey @Rémy PR is done to develop. Have a look. If you want I can explain you a bit about the mistake made. This makes Grafana work so I believe this is fixing your problem
Magic!
r

Rémy

11/07/2020, 10:00 PM
Awesome, I look this now 🙂
The localhost error into the docker-compose YAML... Such a dumb error ahahah Thank you very much for your time, help, and teaching ;)
j

Jorge R

11/07/2020, 10:55 PM
Hahaha it only happens to the best ones! Happy to help!