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

Prometheus job config for PostgreSQL has incorrect username

    Details

    • Type: Admin & Maintenance Task
    • Status: Done
    • Priority: High
    • Resolution: Done
    • Affects Version/s: 1.14.0
    • Fix Version/s: 1.14.0
    • Component/s: None
    • Labels:
      None

      Description

      1. Install PMM with enabled authorisation
        docker run -d -p 443:443 --restart always  -e SERVER_USER=admin -e SERVER_PASSWORD=pmmadmin --volumes-from pmm-data --name pmm-server perconalab/pmm-server:201809041158
        
      2. Add PostgreSQL to monitoring
        sudo pmm-admin add postgresql --user=postgres --password=qweqwe --port=5433
        [linux:metrics] OK, now monitoring this system.
        [postgresql:metrics] OK, now monitoring PostgreSQL metrics using DSN postgresql:***@:5433/postgres
        nailya.kutlubaeva@bm-dell02-qanqa01:~/download$ psql -U postgres -W
        Password for user postgres: 
        psql (10.5 (Ubuntu 10.5-1.pgdg14.04+1))
        Type "help" for help.
      3. Check Prometheus targets page and run check-network
        Result:
        sudo pmm-admin check-network 
        ------------------- ------------------ ------------------ ------- ---------- ---------
        SERVICE TYPE        NAME               REMOTE ENDPOINT    STATUS  HTTPS/TLS  PASSWORD 
        ------------------- ------------------ ------------------ ------- ---------- ---------
        linux:metrics       bm-dell02-qanqa01  10.10.11.50:42000  OK      YES        YES
        mysql:metrics       bm-dell02-qanqa01  10.10.11.50:42002  OK      YES        YES
        postgresql:metrics  bm-dell02-qanqa01  10.10.11.50:42005  DOWN    YES        YES
        

      Prometheus job config from Postgresql:

      job_name: postgresql
        scrape_interval: 4s
        scrape_timeout: 4s
        metrics_path: /metrics
        scheme: http
        consul_sd_configs:
        - server: localhost:8500
          datacenter: dc1
          tag_separator: ','
          scheme: http
          allow_stale: true
          refresh_interval: 30s
          services:
          - postgresql:metrics
        basic_auth:
          username: pmm
          password: <secret>

        Smart Checklist

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  alexey.palazhchenko Alexey Palazhchenko
                  Reporter:
                  nailya.kutlubaeva Nailya Kutlubaeva
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Time Tracking

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