AdguardTeam / AdGuardHome

Network-wide ads & trackers blocking DNS server
https://adguard.com/adguard-home.html
GNU General Public License v3.0
25.5k stars 1.83k forks source link

Metrics endpoint for Prometheus #516

Open prologic opened 5 years ago

prologic commented 5 years ago

Let's please add an /metris endpoint to service up metrics to Prometheus. We should be able to expose all of the internal stats already exposed in the UI plus all the standard Go runtime stats.

kamontat commented 1 year ago

Can we bring this features to live? I can help but will need some guide.

ReSearchITEng commented 1 year ago

First, thank you for the wonderful adguard project!

Unfortunately the old github project https://github.com/ebrianne/adguard-exporter by @ebrianne project disappeared, and the previous docker-hub images no longer work (at least for latest adguard fail), is it possible to bring prometheus metrics back into picture?

Metrics is especially important for projects like adguard, so one can identify bottlenecks in the infrastructure, make statistics, etc.

PS: pi-hole has a very strong exporter project, and it's very actively maintained, it would be really nice to enhance this wonderful adguard project as well, especially that there are PRs like @radhus's.

ReSearchITEng commented 1 year ago

Found some forks of original (https://github.com/ebrianne/adguard-exporter which was deleted): https://github.com/csfreak/adguard-exporter https://github.com/sapslaj/adguard-exporter

There are also other older projects, but they are very limited in scope (processes only /control/stats) compared with what @ebianne' version had (see dashboard https://web.archive.org/web/20221224153716/https://raw.githubusercontent.com/ebrianne/adguard-exporter/master/grafana/dashboard.json ; it had ~19 forks). Here are those older limited ones: https://github.com/l13t/adguard_exporter (seems most up to date fork) https://github.com/povilasv/pihole_exporter/compare/master...darookee:adguard_exporter:master https://github.com/darookee/adguard_exporter

yuha0 commented 10 months ago

@ReSearchITEng The very last version from ebrianne/adguard-exporter still works with the latest AdGuardHome release for me. What was the problem you encountered?

(I don't know what happened to that project, but if the author ever come across this post, I just want to say I have used the exporter for years and got a ton of value out of it. So thank you for all the work you put into the project, and wish you all the best!)

Hi @ainar-g , (since you were the person originally linked that project in AdGuardHome's README) just FYI that this link is now 404: https://github.com/AdguardTeam/AdGuardHome/blob/1e0ff4d4379b216c02405330f82d2fefec74bcd6/README.md?plain=1#L466-L468

Finally here's another +1 and hope that AdGuardHome could implement metrics natively. A metrics system is critical for long term analysis, and allows the project to integrate with tons of monitoring/alerting systems out there automagically. Also, it also paves the path for #573, which leads to better scalability and reliability.

henrywhitaker3 commented 7 months ago

If anyone still wants this, I've just made https://github.com/henrywhitaker3/adguard-exporter for getting prometheus metrics out of adguard