From 7c778ae8818b949dfa5fd71b1aea7dd58e2f5e23 Mon Sep 17 00:00:00 2001 From: daniacs Date: Fri, 20 Oct 2017 14:36:12 -0200 Subject: [PATCH] Update postgresql.c A simple way collectd to identify itself to pg_stat_activity view. --- src/postgresql.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/postgresql.c b/src/postgresql.c index 3b702aee..b122dfe5 100644 --- a/src/postgresql.c +++ b/src/postgresql.c @@ -340,6 +340,7 @@ static int c_psql_connect(c_psql_database_t *db) { C_PSQL_PAR_APPEND(buf, buf_len, "sslmode", db->sslmode); C_PSQL_PAR_APPEND(buf, buf_len, "krbsrvname", db->krbsrvname); C_PSQL_PAR_APPEND(buf, buf_len, "service", db->service); + C_PSQL_PAR_APPEND(buf, buf_len, "application_name", "collectd_postgresql"); db->conn = PQconnectdb(conninfo); db->proto_version = PQprotocolVersion(db->conn); -- 2.11.0