Skip to content
This repository has been archived by the owner on Aug 22, 2024. It is now read-only.

Bunch of warnings: "metric value or labels are not collected, skip" #37

Open
lesovsky opened this issue May 8, 2022 · 0 comments
Open

Comments

@lesovsky
Copy link
Owner

lesovsky commented May 8, 2022

Describe the bug
A lot of messages like "metric value or labels are not collected, skip" in the log.

Steps to reproduce
Add user-defined metrics with "databases" regexp.

Expected behavior
No such messages have to be.

pgSCV startup options

listen_address: 0.0.0.0:9890
disable_collectors:
  - system
services:
  primary:
    service_type: "postgres"
    conninfo: "host=primary port=5432 dbname=postgres user=stats"
  standby:
    service_type: "postgres"
    conninfo: "host=standby port=5432 dbname=postgres user=stats"
collectors:
  postgres/custom:
    subsystems:
      connected_clients:
        databases: "postgres"
        query: |
          SELECT coalesce(host(client_addr), 'local') AS address, usename AS user, datname AS database, count(*) AS total 
          FROM pg_stat_activity
          WHERE backend_type = 'client backend'
          GROUP BY 1,2,3
        metrics:
          - name: total
            usage: GAUGE
            value: total
            labels: [ address, user, database ]
            description: "Number of client connections established to instance per address, user and database."

Errors and Logs

pgscv_1            | {"level":"warn","service":"pgscv","time":"2022-05-08T07:02:29Z","message":"metric value or labels are not collected, skip"}
pgscv_1            | {"level":"warn","service":"pgscv","time":"2022-05-08T07:02:29Z","message":"metric value or labels are not collected, skip"}
pgscv_1            | {"level":"warn","service":"pgscv","time":"2022-05-08T07:02:29Z","message":"metric value or labels are not collected, skip"}
pgscv_1            | {"level":"warn","service":"pgscv","time":"2022-05-08T07:02:29Z","message":"metric value or labels are not collected, skip"}
...

Environment (please complete the following information):

  • Used OS (or Containers): [output of cat /etc/os-release]

     NAME="Ubuntu"
     VERSION="20.04.4 LTS (Focal Fossa)"
    
  • pgSCV Version [output of pgscv --version]
    lesovsky/pgscv:v0.8.0-beta.4

  • PostgreSQL Version [output of psql -c 'select version()']
    PostgreSQL 14.2

  • Do PostgreSQL and pgSCV are running on the same host?
    yes

Additional context
none

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant