-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prometheus and Grafana on stats.<domain> #838
Conversation
If this adds a new subdomain, |
You can also extend the list at |
Maybe there should be two tables for the DNS settings in |
Done!
Done!
Enabling it in the first place was actually a mistake. I am new to Docker and quite rusty on Ansible, so I started just copypasting stuff from other services. Only to find out in the process how it actually works. I found out that all images I used support amd64, arm32 and arm64. I also find out that self-building didn't even actually work. So I disabled it. I also tested it on my (arm64) rockpro64 and everything works just as well as it did on my amd64 VM and deployed it to my main personal homeserver :) Demo at https://stats.glitch.im/ (should be online 24/7, feel free poke me if it breaks or anything) |
I rebased and edited the commits enabling and then disabling self-building so it's as if it never happened :) |
What do you think about renaming the domain name for Grafana from While
On the other hand:
|
Those are all good improvements I think. Like I said, most of this is new to me, I am learning as I go :) |
I'm getting confused by some of the variables, I think there needs to be a cleanup for better defaults.
There might be users who collect the metrics on an external time series DB. They probably don't need Grafana nor Prometheus in the homeserver.
Then for additional fine tuning, the admin user or the node-exporter can be configured. The admin user should also be disabled if possible unless explicitly set up by the user. |
Yeah, this is opening pandora's box in a way.. One could also say that we need to hook Prometheus to the SMTP server, so people can set up Alerts, etc. Then there's the people who will use a separate Prometheus installation and separate Grafana. They'd want to just expose matrix_synapse_metrics_enabled: true
matrix_nginx_proxy_proxy_synapse_metrics: true
matrix_nginx_proxy_proxy_synapse_metrics_basic_auth_enabled: true
# The HTTP Basic Auth user is always `prometheus`
matrix_nginx_proxy_proxy_synapse_metrics_basic_auth_key: "password" Then, #456 is coming along and each worker exposes its own metrics. I'm not sure how those should be handled. I think we shouldn't get overly obsessed with this and just try to launch something. Even now, it seems good enough. Documentation around edge cases can be improved. People who want SMTP support for alerts or want to monitor workers, etc., can also jump in and contribute in the future. |
Initial attempt. Seems to work fine. Only tested on debian amd64 so far
Basic system stats, to show stuff the synapse metrics can't show such as resource usage by bridges, etc Seems to work fine as well. This too has only been tested on debian amd64 so far
By running it in a more privileged container with access to the host network stack and such
Using the hardcoded IP did break while I was messing with IPv6 stuff on the other branch
Rebased on current master, and updated grafana and prometheus-node-exporter to latest versions. Yes, we might need more documentation to expose how flexible this can be. But for the common usecase (just exploring performance metrics of your new shiny homeserver) it works just fine. |
The quotes around "host" for both `--pid` and `--net` were causing trouble for me: > docker: --pid: invalid PID mode. and: > docker: Error response from daemon: network "host" not found. I've also changed the `-v` call to `--mount` for consistency with the rest of the playbook.
We mainly switch the anonymous metrics viewing variable to false, along with other wording changes.
It seems like it doesn't cause any issues for any of these services.
…e-exporter, matrix-synapse)
.. and other documentation improvements.
You rebasing made my changes disappear, but I rebased as well ;) Our poll in the support room indicated that people prefer I've made a few minor changes and merged this! I've gotten rid of the explicit Something else we might wish to do in the future is to adjust Thanks a lot for the huge amount of work on this, @Peetz0r! 👍 |
The Node Exporter is missing some data because it isn't fully effective inside the container, but most of it works.
Tested in debian 10 amd64 (in a vm) and on my RockPro64 running debian testing/bullseye/11.
Demo: https://stats.glitch.im/