-
-
Notifications
You must be signed in to change notification settings - Fork 130
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: monitoring with grafana & prometheus
- Loading branch information
Showing
30 changed files
with
9,837 additions
and
193 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
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,46 @@ | ||
version: '3' | ||
services: | ||
pg_bouncer_exporter: | ||
image: spreaker/prometheus-pgbouncer-exporter | ||
environment: | ||
PGBOUNCER_EXPORTER_HOST: 0.0.0.0 | ||
PGBOUNCER_EXPORTER_PORT: 9127 | ||
PGBOUNCER_HOST: pg_bouncer | ||
PGBOUNCER_PORT: 6432 | ||
PGBOUNCER_USER: postgres | ||
PGBOUNCER_PASS: postgres | ||
depends_on: | ||
- pg_bouncer | ||
ports: | ||
- 9127:9127 | ||
|
||
postgres_exporter: | ||
image: quay.io/prometheuscommunity/postgres-exporter | ||
ports: | ||
- "9187:9187" | ||
environment: | ||
DATA_SOURCE_NAME: postgres://postgres:postgres@tenant_db:5432/postgres?sslmode=disable | ||
|
||
prometheus: | ||
image: prom/prometheus | ||
container_name: prometheus | ||
command: | ||
- '--config.file=/etc/prometheus/prometheus.yml' | ||
ports: | ||
- 9090:9090 | ||
restart: unless-stopped | ||
volumes: | ||
- ./monitoring/prometheus:/etc/prometheus | ||
|
||
grafana: | ||
image: grafana/grafana | ||
container_name: grafana | ||
ports: | ||
- 3000:3000 | ||
restart: unless-stopped | ||
environment: | ||
- GF_SECURITY_ADMIN_USER=admin | ||
- GF_SECURITY_ADMIN_PASSWORD=grafana | ||
volumes: | ||
- ./monitoring/grafana/config:/etc/grafana/provisioning | ||
- ./monitoring/grafana/dashboards:/var/lib/grafana/dashboards |
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 |
---|---|---|
|
@@ -24,20 +24,13 @@ RESPONSE_S_MAXAGE=0 | |
AUTH_JWT_SECRET=f023d3db-39dc-4ac9-87b2-b2be72e9162b | ||
AUTH_JWT_ALGORITHM=HS256 | ||
|
||
|
||
####################################### | ||
# Single Tenant | ||
####################################### | ||
TENANT_ID=bjhaohmqunupljrqypxz | ||
|
||
####################################### | ||
# Multi Tenancy | ||
# uncomment MULTI_TENANT=true to enable multi tenancy | ||
# the [Single Tenant] configurations will be ignored | ||
####################################### | ||
# MULTI_TENANT=true | ||
DATABASE_MULTITENANT_URL=postgresql://postgres:[email protected]:5433/postgres | ||
REQUEST_X_FORWARDED_HOST_REGEXP= | ||
REQUEST_X_FORWARDED_HOST_REGEXP=^([a-z]{20}).local.(?:com|dev)$ | ||
SERVER_ADMIN_API_KEYS=apikey | ||
AUTH_ENCRYPTION_KEY=encryptionkey | ||
|
||
|
@@ -85,7 +78,7 @@ STORAGE_BACKEND=s3 | |
####################################### | ||
# S3 Backend | ||
####################################### | ||
STORAGE_S3_BUCKET=name-of-your-s3-bucket | ||
STORAGE_S3_BUCKET=supa-storage-bucket | ||
STORAGE_S3_MAX_SOCKETS=200 | ||
STORAGE_S3_ENDPOINT=http://127.0.0.1:9000 | ||
STORAGE_S3_FORCE_PATH_STYLE=true | ||
|
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
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
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
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
This file was deleted.
Oops, something went wrong.
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,16 @@ | ||
apiVersion: 1 | ||
|
||
providers: | ||
# <string> an unique provider name. Required | ||
- name: 'Default Dashboard' | ||
# <string> name of the dashboard folder. | ||
folder: 'Storage' | ||
type: file | ||
disableDeletion: false | ||
# <int> how often Grafana will scan for changed dashboards | ||
updateIntervalSeconds: 10 | ||
allowUiUpdates: false | ||
options: | ||
# <string, required> path to dashboard files on disk. Required when using the 'file' type | ||
path: /var/lib/grafana/dashboards | ||
foldersFromFilesStructure: true |
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,10 @@ | ||
apiVersion: 1 | ||
|
||
datasources: | ||
- name: Prometheus | ||
type: prometheus | ||
url: http://prometheus:9090 | ||
isDefault: true | ||
access: proxy | ||
editable: true | ||
uid: local_prometheus |
Oops, something went wrong.