Uploaded image for project: 'Percona Monitoring and Management'
  1. Percona Monitoring and Management
  2. PMM-3353

postgres_exporter does not work with PostgreSQL 11

    XMLWordPrintable

    Details

      Description

      User impact: User can't see metrics from Postgres
      Steps to reproduce:

      1. Install PostgreSQL 11
      2. Add PostgreSQL to PMM
      3. Check pmm-postgres-metrics.logs:
        Actual result:
        ="2018-12-06T14:56:18+05:30" level=info msg="Starting postgres_exporter (version=, branch=, revision=)" source="postgres_exporter.go:1132"
        time="2018-12-06T14:56:18+05:30" level=info msg="Build context (go=go1.10.1, user=, date=)" source="postgres_exporter.go:1133"
        time="2018-12-06T14:56:18+05:30" level=info msg="Established new database connection." source="postgres_exporter.go:1015"
        time="2018-12-06T14:56:18+05:30" level=info msg="Semantic Version Changed: 0.0.0 -> 11.1.0" source="postgres_exporter.go:945"
        panic: Unknown unit for runtime variable: "B"
        goroutine 49 [running]:
        main.(*pgSetting).metric(0xc4201d1b80, 0xc420249da0, 0x5)
         /tmp/go/src/github.com/percona/postgres_exporter/cmd/postgres_exporter/pg_setting.go:69 +0x52b
        main.querySettings(0xc420220060, 0xc42022a000, 0x0, 0x0)
         /tmp/go/src/github.com/percona/postgres_exporter/cmd/postgres_exporter/pg_setting.go:38 +0x215
        main.(*Exporter).scrape(0xc420226000, 0xc420220060)
         /tmp/go/src/github.com/percona/postgres_exporter/cmd/postgres_exporter/postgres_exporter.go:1068 +0x4a8
        main.(*Exporter).Collect(0xc420226000, 0xc420220060)
         /tmp/go/src/github.com/percona/postgres_exporter/cmd/postgres_exporter/postgres_exporter.go:787 +0x3c
        main.(*Exporter).Describe(0xc420226000, 0xc420222060)
         /tmp/go/src/github.com/percona/postgres_exporter/cmd/postgres_exporter/postgres_exporter.go:780 +0xb0
        github.com/percona/postgres_exporter/vendor/github.com/prometheus/client_golang/prometheus.(*Registry).Register.func1(0x978500, 0xc420226000, 0xc420222060)
         

        Expected result: No errors in logs, Metrics from PostgreSQL are displayed on dashboards

      Original report: postgres_exporter does not work with PostgreSQL v11 because of a new Postgres unit suffix "B".  https://github.com/wrouesnel/postgres_exporter/commit/5452a3aac633fc331513398a862db863b10277bc in wrouesnel's repo is a fix.

        Smart Checklist

          Attachments

            Activity

              People

              • Assignee:
                roma.novikov Roma Novikov
                Reporter:
                cwhitehurst Clay Whitehurst
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - Not Specified
                  Not Specified
                  Logged:
                  Time Spent - 1 hour, 10 minutes
                  1h 10m