prometheus-community / postgres_exporter

A PostgreSQL metric exporter for Prometheus
Apache License 2.0
2.8k stars 739 forks source link

Set application_name for Postgres connection #352

Open mbanck opened 4 years ago

mbanck commented 4 years ago

It would be nice if postgres_exporter would set an application (like postgres-exporter or so), so that it can be better identified in pg_stat_activity amonst other backends.

neel5481 commented 4 years ago

AFAIK - you can always set "PGAPPNAME" environment variable before starting pg exporter. That configured name will be displayed in "pg_stat_activity".

cosenmarco commented 4 years ago

Suggestion works fine. Would be nice to have it documented on the README