Hi! I'm using postgres_exporter with extended metrics, but I see only 
default metrics in the output. What could be the problem? 
 */opt/postgres_exporter/metrics.yaml:*

table_stats:
  query: "select quote_ident(ut.relname) as tag_table_name, 
pg_total_relation_size(relid)/1024 as total_relation_size_b from 
pg_stat_user_tables ut join pg_class c on c.oid = ut.relid where not 
exists(select 1 from pg_locks where relation = relid and mode = 
'AccessExclusiveLock' and granted)" and c.relpersistence != 't'"
  metrics:
    - tag_table_name:
        usage: "LABEL"
        description: "Name of this table"
    - total_relation_size_b:
        usage: "COUNTER"
        description: "Table size"

*Start of postgres_exporter service:*
/usr/local/bin/postgres_exporter --disable-default-metrics 
--disable-settings-metrics 
--extend.query-path=/opt/postgres_exporter/metrics.yaml
*Output:* 
# curl -s http://localhost:9187/metrics | grep table
# HELP go_memstats_buck_hash_sys_bytes Number of bytes used by the 
profiling bucket hash table.

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/3a180616-95ca-4dce-af93-561861d7da8en%40googlegroups.com.

Reply via email to