Unable to get statistical units in cloudwatch when sending pgbouncer metrics through telegraf to cloudwatch

45 views Asked by At

Cloudwatch Metric Dashboard with No units

this is the configuration I am using to collect metrics local psql pgbouncer db to Cloudwatch, this is working perfectly, but not getting units for the metrics in Cloudwatch. it is showing no units


[[outputs.cloudwatch]]
  region = "eu-west-1" # replace with your AWS region
  namespace = "Telegraph-PGBouncer/Metrics" # replace with your namespace

[[inputs.pgbouncer]]
  ## Connection details
  address = "host=localhost port=6432 user=admin sslmode=disable dbname=pgbouncer"
  ## Specific commands to run
  show_commands = ["stats", "pools", "database", "lists"]

To add the units for the metrics, I added the below list, In pgbouncer psql DB metric name without prefix of pgbouncer_ and in cloudwatch it is adding a prefix of pgbouncer_. To avoid confusion added both configurations for same metric. And the configurantion is valid by test command, and it is valid. there are no errors in log file also.

what is the correct configuration to achieve for adding the units to metrics?

  [[inputs.pgbouncer.tags]]
    metric_name = "pgbouncer_total_xact_count"
    unit = "transactions"

  [[inputs.pgbouncer.tags]]`your text`
    metric_name = "total_xact_count"
    unit = "transactions"

  [[inputs.pgbouncer.tags]]
    metric_name = "pgbouncer_total_query_count"
    unit = "queries"

  [[inputs.pgbouncer.tags]]
    metric_name = "total_query_count"
    unit = "queries"

  [[inputs.pgbouncer.tags]]
    metric_name = "pgbouncer_total_received"
    unit = "bytes"

  [[inputs.pgbouncer.tags]]
    metric_name = "total_received"
    unit = "bytes" 
0

There are 0 answers