spantaleev / matrix-docker-ansible-deploy

🐳 Matrix (An open network for secure, decentralized communication) server setup using Ansible and Docker
GNU Affero General Public License v3.0
4.92k stars 1.05k forks source link

Datasource ${DS_PROMETHEUS} was not found for synapse dashboard #2834

Open e-g1gor opened 1 year ago

e-g1gor commented 1 year ago

Describe the bug

Grafana synapse dashboard not work. Probably related to https://github.com/grafana/grafana/issues/10786#issuecomment-392377975 and https://github.com/grafana/grafana/issues/11018

Synapse dashboard settings in graphana UI

json variables

For comparison, working node-exporter settings

variables

To Reproduce My vars.yml file looks like this:

ntfy_enabled: true
matrix_homeserver_implementation: "synapse"
matrix_playbook_reverse_proxy_type: "playbook-managed-traefik"

matrix_synapse_federation_enabled: false
matrix_synapse_federation_domain_whitelist: []
matrix_synapse_allow_public_rooms_over_federation: false
matrix_synapse_federation_port_enabled: false
matrix_nginx_proxy_proxy_matrix_federation_api_enabled: false
matrix_synapse_reverse_proxy_companion_federation_api_enabled: false
matrix_synapse_enable_registration: false
matrix_synapse_enable_registration: false
matrix_synapse_enable_registration_without_verification: false
matrix_synapse_report_stats: false
matrix_synapse_admin_enabled: true

devture_traefik_config_log_level: "DEBUG"
devture_traefik_dashboard_enabled: true
devture_traefik_dashboard_hostname: "{{ matrix_server_fqn_matrix }}"
devture_traefik_dashboard_basicauth_enabled: true

prometheus_enabled: true
prometheus_node_exporter_enabled: true
prometheus_postgres_exporter_enabled: true
matrix_prometheus_nginxlog_exporter_enabled: true

grafana_enabled: true
grafana_anonymous_access: false

Fresh install

Expected behavior A clear and concise description of what you expected to happen.

Matrix Server:

timlepes commented 1 year ago

I am having the same problem. I only encountered the problem after upgrading. Previously, I had been using the included Prometheus/Grafana stuff as it was back in February, I believe. Everything was fine.

There was a change made on 2023-03-21 - The matrix-prometheus role lives independently now since my prior update. After updating and including the changes, I now get the same error as reported here in my Grafana dasahboard: "Datasource named ${DS_PROMETHEUS} was not found".

I am not very familiar with Grafana or how to configure it, as my only experience has been through this playbook. I am going to attempt to find my "raw json" and see if I can figure out how to set my UIDs to null, as suggested in the (very old) linked Grafana project issues. In the meantime, I am hoping that adding myself to the issue will help raise it. If there is anything I can provide from my configuration, let me know and I'll be happy to post it.

QEDeD commented 1 year ago

Also experiencing this.

sarah4d2 commented 1 year ago

We're also seeing this after enabling Prometheus and Grafana in vars.yml on an existing install (Debian x86_64).

MichaelSasser commented 1 year ago

I don't think it's an issue with the playbook. In the Dashboard's JSON model is quite a mishmash of datasource UIDs for the "prometheus" datasource type. For example:

If you decide on one by replacing the others in Settings -> JSON Model (including the respective variables), everything works as expected.


Related issue: https://github.com/matrix-org/synapse/issues/16405 (closed as fixed) Related PR: https://github.com/matrix-org/synapse/pull/16471 (merged)

joecool1029 commented 11 months ago

@e-g1gor are you still affected? We're not able to reproduce the error for a month or so, it appears the fix has landed. Please close if it's resolved on your end.

QEDeD commented 11 months ago

Looks like the issue is resolved for me at least.