Skip to content

Commit

Permalink
Updates for containers config (#362)
Browse files Browse the repository at this point in the history
* Update dashboard datasources to PROMETHEUS

The datasource for containers is named PROMETHEUS. Update dashboards to
use the hardcoded name.

* Add copyright to prometheus config

* Add datasource and dashboard files for containers

* Remove redundant labels from prometheus scrape

These changes were merged but don't seem to be in main
#300

* Add WAL statistics dashboard

* Create separate scrape configs for v4 and v5

Update the alertmanater label to match k8s conventions:

https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/#labels
  • Loading branch information
jmckulk authored Sep 13, 2023
1 parent 0d201b6 commit df6aa96
Show file tree
Hide file tree
Showing 10 changed files with 273 additions and 111 deletions.
16 changes: 16 additions & 0 deletions grafana/containers/crunchy_grafana_dashboards.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
###
#
# Copyright © 2017-2023 Crunchy Data Solutions, Inc. All Rights Reserved.
#
###
apiVersion: 1

providers:
- name: 'crunchy_dashboards'
orgId: 1
folder: ''
type: file
disableDeletion: false
updateIntervalSeconds: 3 #how often Grafana will scan for changed dashboards
options:
path: /etc/grafana/provisioning/dashboards
18 changes: 18 additions & 0 deletions grafana/containers/crunchy_grafana_datasource.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
###
#
# Copyright © 2017-2023 Crunchy Data Solutions, Inc. All Rights Reserved.
#
###

# config file version
apiVersion: 1

datasources:
- name: PROMETHEUS
type: prometheus
access: proxy
url: http://$PROM_HOST:$PROM_PORT
isDefault: True
editable: False
orgId: 1
version: 1
12 changes: 6 additions & 6 deletions grafana/containers/pgbackrest.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
],
"panels": [
{
"datasource": "${DS_PROMETHEUS}",
"datasource": "PROMETHEUS",
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -139,7 +139,7 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "${DS_PROMETHEUS}",
"datasource": "PROMETHEUS",
"fieldConfig": {
"defaults": {
"custom": {},
Expand Down Expand Up @@ -267,7 +267,7 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "${DS_PROMETHEUS}",
"datasource": "PROMETHEUS",
"fieldConfig": {
"defaults": {
"custom": {},
Expand Down Expand Up @@ -390,7 +390,7 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "${DS_PROMETHEUS}",
"datasource": "PROMETHEUS",
"description": "",
"fieldConfig": {
"defaults": {
Expand Down Expand Up @@ -517,7 +517,7 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "${DS_PROMETHEUS}",
"datasource": "PROMETHEUS",
"description": "",
"fieldConfig": {
"defaults": {
Expand Down Expand Up @@ -637,7 +637,7 @@
{
"allValue": null,
"current": {},
"datasource": "${DS_PROMETHEUS}",
"datasource": "PROMETHEUS",
"definition": "label_values(pg_cluster)",
"description": null,
"error": null,
Expand Down
22 changes: 11 additions & 11 deletions grafana/containers/pod_details.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "${DS_PROMETHEUS}",
"datasource": "PROMETHEUS",
"fieldConfig": {
"defaults": {
"color": {},
Expand Down Expand Up @@ -194,7 +194,7 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "${DS_PROMETHEUS}",
"datasource": "PROMETHEUS",
"fieldConfig": {
"defaults": {
"color": {},
Expand Down Expand Up @@ -323,7 +323,7 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "${DS_PROMETHEUS}",
"datasource": "PROMETHEUS",
"fieldConfig": {
"defaults": {
"custom": {},
Expand Down Expand Up @@ -456,7 +456,7 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "${DS_PROMETHEUS}",
"datasource": "PROMETHEUS",
"fieldConfig": {
"defaults": {
"custom": {},
Expand Down Expand Up @@ -568,7 +568,7 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "${DS_PROMETHEUS}",
"datasource": "PROMETHEUS",
"fieldConfig": {
"defaults": {
"custom": {},
Expand Down Expand Up @@ -675,7 +675,7 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "${DS_PROMETHEUS}",
"datasource": "PROMETHEUS",
"fieldConfig": {
"defaults": {
"custom": {},
Expand Down Expand Up @@ -791,7 +791,7 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "${DS_PROMETHEUS}",
"datasource": "PROMETHEUS",
"fieldConfig": {
"defaults": {
"custom": {},
Expand Down Expand Up @@ -962,7 +962,7 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "${DS_PROMETHEUS}",
"datasource": "PROMETHEUS",
"fieldConfig": {
"defaults": {
"custom": {},
Expand Down Expand Up @@ -1101,7 +1101,7 @@
{
"allValue": null,
"current": {},
"datasource": "${DS_PROMETHEUS}",
"datasource": "PROMETHEUS",
"definition": "label_values(pg_cluster)",
"description": null,
"error": null,
Expand All @@ -1128,7 +1128,7 @@
{
"allValue": null,
"current": {},
"datasource": "${DS_PROMETHEUS}",
"datasource": "PROMETHEUS",
"definition": "label_values({pg_cluster=\"[[cluster]]\"},pod)",
"description": null,
"error": null,
Expand Down Expand Up @@ -1172,7 +1172,7 @@
]
},
"timezone": "browser",
"title": "POD Details",
"title": "Pod Details",
"uid": "4auP6Mk7k",
"version": 1
}
42 changes: 21 additions & 21 deletions grafana/containers/postgresql_details.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
"panels": [
{
"cacheTimeout": null,
"datasource": "${DS_PROMETHEUS}",
"datasource": "PROMETHEUS",
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -166,7 +166,7 @@
},
{
"cacheTimeout": null,
"datasource": "${DS_PROMETHEUS}",
"datasource": "PROMETHEUS",
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -248,7 +248,7 @@
},
{
"cacheTimeout": null,
"datasource": "${DS_PROMETHEUS}",
"datasource": "PROMETHEUS",
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -327,7 +327,7 @@
},
{
"cacheTimeout": null,
"datasource": "${DS_PROMETHEUS}",
"datasource": "PROMETHEUS",
"description": "",
"fieldConfig": {
"defaults": {
Expand Down Expand Up @@ -407,7 +407,7 @@
},
{
"cacheTimeout": null,
"datasource": "${DS_PROMETHEUS}",
"datasource": "PROMETHEUS",
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -488,7 +488,7 @@
},
{
"cacheTimeout": null,
"datasource": "${DS_PROMETHEUS}",
"datasource": "PROMETHEUS",
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -569,7 +569,7 @@
},
{
"cacheTimeout": null,
"datasource": "${DS_PROMETHEUS}",
"datasource": "PROMETHEUS",
"description": "",
"fieldConfig": {
"defaults": {
Expand Down Expand Up @@ -654,7 +654,7 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "${DS_PROMETHEUS}",
"datasource": "PROMETHEUS",
"fieldConfig": {
"defaults": {
"custom": {},
Expand Down Expand Up @@ -769,7 +769,7 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "${DS_PROMETHEUS}",
"datasource": "PROMETHEUS",
"fieldConfig": {
"defaults": {
"custom": {},
Expand Down Expand Up @@ -888,7 +888,7 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "${DS_PROMETHEUS}",
"datasource": "PROMETHEUS",
"fieldConfig": {
"defaults": {
"custom": {},
Expand Down Expand Up @@ -999,7 +999,7 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "${DS_PROMETHEUS}",
"datasource": "PROMETHEUS",
"description": "",
"fieldConfig": {
"defaults": {
Expand Down Expand Up @@ -1124,7 +1124,7 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "${DS_PROMETHEUS}",
"datasource": "PROMETHEUS",
"fieldConfig": {
"defaults": {
"custom": {},
Expand Down Expand Up @@ -1268,7 +1268,7 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "${DS_PROMETHEUS}",
"datasource": "PROMETHEUS",
"fieldConfig": {
"defaults": {
"custom": {},
Expand Down Expand Up @@ -1370,7 +1370,7 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "${DS_PROMETHEUS}",
"datasource": "PROMETHEUS",
"fieldConfig": {
"defaults": {
"custom": {},
Expand Down Expand Up @@ -1522,7 +1522,7 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "${DS_PROMETHEUS}",
"datasource": "PROMETHEUS",
"description": "",
"fieldConfig": {
"defaults": {
Expand Down Expand Up @@ -1644,7 +1644,7 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "${DS_PROMETHEUS}",
"datasource": "PROMETHEUS",
"fieldConfig": {
"defaults": {
"custom": {},
Expand Down Expand Up @@ -1783,7 +1783,7 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "${DS_PROMETHEUS}",
"datasource": "PROMETHEUS",
"fieldConfig": {
"defaults": {
"custom": {},
Expand Down Expand Up @@ -1930,7 +1930,7 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "${DS_PROMETHEUS}",
"datasource": "PROMETHEUS",
"fieldConfig": {
"defaults": {
"custom": {},
Expand Down Expand Up @@ -2042,7 +2042,7 @@
"allFormat": "glob",
"allValue": null,
"current": {},
"datasource": "${DS_PROMETHEUS}",
"datasource": "PROMETHEUS",
"definition": "",
"description": null,
"error": null,
Expand Down Expand Up @@ -2070,7 +2070,7 @@
"allFormat": "glob",
"allValue": ".*",
"current": {},
"datasource": "${DS_PROMETHEUS}",
"datasource": "PROMETHEUS",
"definition": "label_values({pg_cluster=\"[[cluster]]\"},pod)",
"description": null,
"error": null,
Expand Down Expand Up @@ -2098,7 +2098,7 @@
"allFormat": "glob",
"allValue": ".*",
"current": {},
"datasource": "${DS_PROMETHEUS}",
"datasource": "PROMETHEUS",
"definition": "label_values({pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\"},dbname)",
"description": null,
"error": null,
Expand Down
Loading

0 comments on commit df6aa96

Please sign in to comment.