PostgreSQL Vector source
Get more insights into the operation of your PostgreSQL databases with our Vector PostgreSQL integration.
Vector has a PostgreSQL source that collects metrics from PostgreSQL databases. When these PostgreSQL metrics are sent to AppSignal, the metrics from this Vector source will be shown in our PostgreSQL automatic dashboard. This dashboard will tell you more about:
- how many records were selected, inserted, updated and deleted.
- how many transactions were committed and rolled back.
- how many deadlocks were detected.
- how many temporary files were written during the operation of the database.
To send Vector PostgreSQL data to AppSignal you need to configure the PostgreSQL source and AppSignal sink in your Vector configuration. We'll be using the TOML configuration file as an example.
- Add a new source of the
postgresql_metricssource type to your configuration file. The name of the source is the second part in
soures.postgresql, not the
[sources.postgresql] type = "postgresql_metrics"
- Configure the source's
endpointsoption with the PostgreSQL connection string for your database. Replace the variables (
$VARIABLE_NAME) with the values for your database.toml
[sources.postgresql] type = "postgresql_metrics" endpoints = ["postgresql://$POSTGRES_USER:$POSTGRES_PASSWORD@postgres:5432/$POSTGRES_DB"]
appsignalsink to include the name of the
[sinks.appsignal] inputs = ["postgresql"] # Other config
Shown below is an example
vector.toml configuration file. Your Vector configuration method may be different.
[sources.postgresql] type = "postgresql_metrics" endpoints = ["postgresql://$POSTGRES_USER:$POSTGRES_PASSWORD@postgres:5432/$POSTGRES_DB"] [sinks.appsignal] type = "appsignal" inputs = ["postgresql"] push_api_key = "Your app-level Push API key"