-
Notifications
You must be signed in to change notification settings - Fork 413
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: add postgresql datasource example (#1076)
Co-authored-by: Hubert Stefanski <35736504+HubertStefanski@users.noreply.github.com>
- Loading branch information
1 parent
f42b7ee
commit 3a468ae
Showing
3 changed files
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
title: "Datasource types" | ||
linkTitle: "Datasource types" | ||
--- | ||
|
||
This example shows different types of datasources and how to configure them. | ||
|
||
{{< readfile file="prometheus.yaml" code="true" lang="yaml" >}} | ||
{{< readfile file="postgresql.yaml" code="true" lang="yaml" >}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
apiVersion: grafana.integreatly.org/v1beta1 | ||
kind: GrafanaDatasource | ||
metadata: | ||
name: postgresql | ||
namespace: grafana | ||
spec: | ||
instanceSelector: | ||
matchLabels: | ||
dashboards: "grafana" | ||
datasource: | ||
name: postgresql | ||
type: postgres | ||
database: postgres | ||
editable: false | ||
jsonData: | ||
connMaxLifetime: 14400 | ||
maxIdleConns: 2 | ||
maxOpenConns: 0 | ||
postgresVersion: 1400 | ||
sslmode: disable | ||
timescaledb: false | ||
access: proxy | ||
secureJsonData: | ||
password: postgres | ||
url: postgresql.namespace.svc:5432 | ||
user: postgres |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
apiVersion: grafana.integreatly.org/v1beta1 | ||
kind: GrafanaDatasource | ||
metadata: | ||
name: prometheus | ||
spec: | ||
instanceSelector: | ||
matchLabels: | ||
dashboards: "grafana" | ||
datasource: | ||
name: prom1 | ||
type: prometheus | ||
access: proxy | ||
url: http://prometheus-service:9090 | ||
isDefault: true | ||
jsonData: | ||
'tlsSkipVerify': true | ||
'timeInterval': "5s" | ||
editable: true |