forked from lesovsky/pgscv
-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merging configuration from environment variables and configuration fi…
…le (#15) Co-authored-by: stolbov_sa <[email protected]> Co-authored-by: Mikhail Grigorev <[email protected]>
- Loading branch information
1 parent
7ac8ac0
commit 261b9be
Showing
4 changed files
with
289 additions
and
12 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
11 changes: 11 additions & 0 deletions
11
internal/pgscv/testdata/pgscv-disable-collectors-example.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,11 @@ | ||
disable_collectors: | ||
- system | ||
- another-disabled-collector | ||
listen_address: "127.0.0.1:12345" | ||
services: | ||
"postgres": | ||
service_type: "postgres" | ||
conninfo: "host=127.0.0.1 port=5432 dbname=pgscv_fixtures user=pgscv" | ||
"pgbouncer:6432": | ||
service_type: "pgbouncer" | ||
conninfo: "host=127.0.0.1 port=6432 dbname=pgbouncer user=pgscv password=pgscv" |
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,45 @@ | ||
listen_address: "127.0.0.1:8888" | ||
services: | ||
"postgres": | ||
service_type: "postgres" | ||
conninfo: "host=127.0.0.1 port=5432 dbname=pgscv_fixtures user=pgscv" | ||
defaults: | ||
postgres_username: "testuser" | ||
postgres_password: "testpassword" | ||
pgbouncer_username: "testuser2" | ||
pgbouncer_password: "testapassword2" | ||
disable_collectors: | ||
- fisrt-disabled-collector | ||
- second-disabled-collector | ||
collectors: | ||
postgres/custom: | ||
echo: "example" | ||
subsystems: | ||
activity: | ||
query: "select datname as database,xact_commit,xact_rollback,blks_read as read,blks_write as write from pg_stat_database" | ||
metrics: | ||
- name: xact_commit_total | ||
usage: COUNTER | ||
labels: | ||
- database | ||
value: xact_commit | ||
description: "description" | ||
- name: "blocks_total" | ||
usage: COUNTER | ||
labels: | ||
- database | ||
labeled_values: | ||
access: [ "read", "write" ] | ||
description: "description" | ||
bgwriter: | ||
query: "select maxwritten_clean from pg_stat_bgwriter" | ||
metrics: | ||
- name: "maxwritten_clean_total" | ||
usage: COUNTER | ||
value: maxwritten_clean | ||
description: "description" | ||
authentication: | ||
username: user | ||
password: supersecret | ||
keyfile: example.key | ||
certfile: example.cert |