Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Postgres chart #285

Open
moshloop opened this issue Sep 12, 2024 · 0 comments
Open

Postgres chart #285

moshloop opened this issue Sep 12, 2024 · 0 comments
Assignees

Comments

@moshloop
Copy link
Member

moshloop commented Sep 12, 2024

The config item:

conf: select json_object_agg(name, concat(setting, unit)) from  pg_settings where source != 'default'

The topology:

- lookup:
    postgres:
    - connection: "connection://{{ .Values.connectionName }}"
      display:
        expr: results.rows[0].version
      name: Version query
      query: SELECT VERSION()
      results: 1
      test: {}
      transform: {}
  name: Version
- headline: true
  lookup:
    postgres:
    - connection: "connection://{{ .Values.connectionName }}"
      display:
        expr: results.rows[0].pg_size_pretty
      name: Size query
      query: SELECT pg_size_pretty(pg_database_size('mission_control'))
      results: 1
      test: {}
      transform: {}
  name: Size
- headline: true
  lookup:
    postgres:
    - connection: "connection://{{ .Values.connectionName }}"
      display:
        expr: results.rows[0].sum
      name: Active connections query
      query: SELECT sum(numbackends) FROM pg_stat_database
      results: 1
  name: Connections

Playbooks

  • Run SQL
  • Kill Connection
  • Run Maintenance
  • Vaccumm all tables
  • Reset pg_stat_tables
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants