[英]How to setup a mongodb grafana dashboard using helm bitnami/mongodb and kube-prometheus-stack
[英]How to automatically connect Grafana (with PostgreSQL instead of SQLite 3) to Prometheus when using Helm
我正在將Helm專門用於Kubernetes部署(Grafana和Prometheus)。 我為它們都指定了values.yaml文件。 效果驚人。
由於我已經將Grafana數據源從默認的sqlite3更改為PostgreSQL-數據源配置現在存儲在PostgreSQL數據庫中 。
好吧,問題在於,在我的** Grafana的values.yaml文件*中,我指定了以下數據源:
datasources: {}
datasources.yaml:
apiVersion: 1
datasources:
- name: on-premis
type: prometheus
url: http://prom-helmf-ns-monitoring-prometheus-server
access: direct
isDefault: true
...
...
grafana.ini:
paths:
data: /var/lib/grafana/data
logs: /var/log/grafana
plugins: /var/lib/grafana/plugins
analytics:
check_for_updates: true
log:
mode: console
grafana_net:
url: https://grafana.net
database:
## You can configure the database connection by specifying type, host, name, user and password
## # as separate properties or as on string using the URL property.
## # Either "mysql", "postgres" or "sqlite3", it's your choice
type: postgres
host: qa.com:5432
name: grafana
user: grafana
# If the password contains # or ; you have to wrap it with trippel quotes. Ex """#password;"""
password: passwd
ssl_mode: disable
不幸的是,這沒有效果,我必須在Grafana Web界面中手動配置到的連接-這不是我所需要的。 如何正確指定此部分?
datasources: {}
datasources.yaml:
apiVersion: 1
datasources:
- name: on-premis
type: prometheus
url: http://prom-helmf-ns-monitoring-prometheus-server
access: direct
isDefault: true
在部分數據源之后刪除“ {}”。 像這樣
datasources:
datasources.yaml:
apiVersion: 1
datasources:
- name: Prometheus
type: prometheus
url: http://prometheus-server
access: proxy
isDefault: true
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.