From: daniacs Date: Fri, 20 Oct 2017 16:36:12 +0000 (-0200) Subject: Update postgresql.c X-Git-Tag: collectd-5.8.0~31 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=7c778ae8818b949dfa5fd71b1aea7dd58e2f5e23;p=collectd.git Update postgresql.c A simple way collectd to identify itself to pg_stat_activity view. --- 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);