-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Arnaud DEMARCQ
authored and
Arnaud DEMARCQ
committed
Nov 13, 2024
1 parent
db46624
commit 1153fa4
Showing
5 changed files
with
90 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,17 @@ | ||
|
||
name: Test Dockerd | ||
|
||
on: | ||
push: | ||
branches: | ||
- '**' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: List things | ||
run: | | ||
cd docker_run | ||
docker compose create | ||
dokcer compose run |
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,31 @@ | ||
services: | ||
database: | ||
image: ghcr.io/baosystems/postgis:12-3.3 | ||
ports: | ||
- 127.0.0.1:5432:5432 | ||
environment: | ||
POSTGRES_USER: dhis | ||
POSTGRES_DB: dhis | ||
POSTGRES_PASSWORD: &postgres_password dhis | ||
PGPASSWORD: *postgres_password # needed by psql in healthcheck | ||
healthcheck: | ||
test: ["CMD-SHELL", "psql --no-password --quiet --username $$POSTGRES_USER postgres://127.0.0.1/$$POSTGRES_DB -p 5432 --command \"SELECT 'ok'\" > /dev/null"] | ||
start_period: 120s | ||
interval: 1s | ||
timeout: 3s | ||
retries: 5 | ||
|
||
prometheusdbexporter: | ||
image: simpledotorg/prometheusdbexporter:ademarcq-13779.239 | ||
ports: | ||
- 127.0.0.1:8080:8080 | ||
environment: | ||
TODO: tada | ||
TIDI: tudu | ||
POSTGRES_PASSWORD: &postgres_password dhis | ||
PGPASSWORD: *postgres_password # needed by psql in healthcheck | ||
volumes: | ||
- ./target/tmp:/tmp | ||
- ./sources:/app/rtsl/prom_db_exporter/sources | ||
|
||
|
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,13 @@ | ||
{ | ||
"asynch": false, | ||
"type": "sql", | ||
"name": "dbHeartbeat", | ||
"query": "select 1 as value, 'database' as source;", | ||
"metrics": [{ | ||
"metricName": "postgres_heartbeat", | ||
"metricValueKey": "value", | ||
"labelsKeys": { | ||
"source": "source" | ||
} | ||
}] | ||
} |
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,14 @@ | ||
{ | ||
"asynch": false, | ||
"type": "sql", | ||
"name": "getSessionInfo", | ||
"query": "select application_name, count(*) as value from pg_stat_activity group by application_name", | ||
"metrics": [{ | ||
"metricName": "postgres_sessions_per_application_count", | ||
"metricValueKey": "value", | ||
"labelsKeys": { | ||
"application_name": "application_name" | ||
} | ||
}] | ||
} | ||
|
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,15 @@ | ||
{ | ||
"asynch": true, | ||
"type": "sql", | ||
"cron": "* * * * *", | ||
"name": "DHIS2_Trackedentityinstance", | ||
"query": "select trackedentityinstance.trackedentitytypeid, trackedentitytype.name, count(*) as value from trackedentityinstance left outer join trackedentitytype on trackedentityinstance.trackedentitytypeid = trackedentitytype.trackedentitytypeid group by trackedentityinstance.trackedentitytypeid, trackedentitytype.name", | ||
"metrics": [{ | ||
"metricName": "dhis2_trackedentityinstance_count", | ||
"metricValueKey": "value", | ||
"labelsKeys": { | ||
"trackedentitytypeid": "trackedentitytypeid", | ||
"name": "name" | ||
} | ||
}] | ||
} |