prometheus-community / prometheus-community/postgres_exporter

Disclose default metrics queries

Open
#584 1 comment 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
3.6k
Forks
835
Avg merge
2d 4h
Merged PRs (30d)
10

Description

Proposal

Use case. Why is this important?

For folks that want to custom query only a small subset of the default metrics queries, to minimize db traffic on each Prometheus scrape (trimming it on the Prometheus side will still unnecessarily hammer the db).

I've looked through the code and found some queries in queries.go, but cannot find the queries that get the data for the pg_stat_* default metrics.

Any help appreciated.

Thanks !

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in cmd/postgres_exporter/queries.go and trace how the pg_stat_* default metrics are collected during a Prometheus scrape. Clarify which queries need to be disclosed or made selectable; done means users can identify the default queries and limit collection to the desired subset without unnecessary database work.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, postgresql, prometheus
Domain
databases, observability
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.