Skip to content

Cannot add new metric to configuration db via web UI #664

@pashagolub

Description

@pashagolub

Discussed in #663

Originally posted by emreyaniktr March 10, 2025
Hello, I am using the Pgwatch3 docker container version. I want to get metrics from PostgreSQL Clusters. I want to add new metrics via Pgwatch UI but I have not been able to do it. I am trying to add metrics with the New option at http://127.0.0.1:8080/metrics. The metric definitions I added are as follows.

Name: test_emre
gauges: *
SQLS:

select /* pgwatch_generated */
(extract(epoch from now()) * 1e9)::int8 as epoch_ns,
(sum((pg_stat_file('pg_wal/' || name)).size))::int8 as wal_size_b
from pg_ls_waldir()

After adding the metric, I get a Success response, but I can't see this metric on the metrics screen, in metrics.yaml, or in the pgwatch.metric table. Is this feature currently active? Has anyone tested it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingconfigConfiguration store relatedmetricsMetrics related issues

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions