This repository has been archived by the owner on Aug 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Config: use map for services connection settings. Using maps we could…
… guarantee services uniqueness from config file level.
- Loading branch information
Showing
8 changed files
with
72 additions
and
53 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 |
---|---|---|
|
@@ -5,6 +5,7 @@ Index of content: | |
- [Requirements](#requirements) | ||
- [Quick start](#quick-start) | ||
- [YAML configuration](#yaml-configuration-settings) | ||
- [YAML configuration example](#yaml-configuration-file-example) | ||
- [Bootstrap and Uninstall modes](#bootstrap-and-uninstall-modes) | ||
- [Security considerations](#security-considerations) | ||
- [Troubleshooting](#troubleshooting) | ||
|
@@ -65,8 +66,8 @@ used. | |
- **api_key**: API key for accessing to Weaponry service. Default value: "". *Needed only for Weaponry clients.* | ||
|
||
|
||
- **services**: list of services to which pgSCV should connect and monitor. Defining `services` automatically disables | ||
auto-discovery. Empty by default, looking for services using auto-discovery. | ||
- **services**: dictionary of services to which pgSCV should connect and monitor. Defining `services` automatically disables | ||
auto-discovery. Empty by default, looking for services using auto-discovery. See [example](#yaml-configuration-file-example) for details. | ||
- **service_type**: type of the service, must be one of `postgres`, `pgbouncer`. | ||
- **conninfo**: connection string or DSN for connecting to service. | ||
|
||
|
@@ -94,17 +95,20 @@ auto-discovery. Empty by default, looking for services using auto-discovery. | |
|
||
- **disable_collectors**: list of [collectors](./collectors.md) which should be disabled. Default value: [] (all collectors are enabled). | ||
|
||
YAML configuration file example: | ||
### YAML Configuration file example | ||
Complete YAML configuration file example: | ||
``` | ||
listen_address: 127.0.0.1:9890 | ||
autoupdate: off | ||
no_track_mode: false | ||
send_metrics_url: https://push.weaponry.io | ||
api_key: 12345678-abcd-1234-abcd-123456789012 | ||
services: | ||
- service_type: "postgres" | ||
"postgres:5432": | ||
service_type: "postgres" | ||
conninfo: "postgres://[email protected]:5432/postgres" | ||
- service_type: "pgbouncer" | ||
"pgbouncer:6432": | ||
service_type: "pgbouncer" | ||
conninfo: "postgres://[email protected]:6432/pgbouncer" | ||
defaults: | ||
postgres_username: "monitoring" | ||
|
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 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 |
---|---|---|
@@ -1,6 +1,8 @@ | ||
listen_address: "127.0.0.1:8080" | ||
services: | ||
- service_type: "postgres" | ||
"postgres:5432": | ||
service_type: "postgres" | ||
conninfo: "host=127.0.0.1 port=5432 dbname=pgscv_fixtures user=pgscv" | ||
- service_type: "pgbouncer" | ||
"pgbouncer:6432": | ||
service_type: "pgbouncer" | ||
conninfo: "host=127.0.0.1 port=6432 dbname=pgbouncer user=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
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