postgresql

Dashboard

https://github.com/wrouesnel/postgres_exporter
Last updated: 2 years ago

Start with Grafana Cloud and the new FREE tier. Includes 10K series Prometheus or Graphite Metrics and 50gb Loki Logs

Downloads: 482

Reviews: 1

    授权

    https://github.com/wrouesnel/postgres_exporter#running-as-non-superuser

    部署

    date -R
    mv /etc/timezone /etc/timezone-`date +%Y%m%d-%H%M%S`
    echo 'Asia/Shanghai' > /etc/timezone
    mv /etc/localtime /etc/localtime-`date +%Y%m%d-%H%M%S`
    cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
    
    docker pull wrouesnel/postgres_exporter
    docker rm -f postgres-exporter
    docker run -d \
      --name postgres-exporter \
      -v /etc/timezone:/etc/timezone \
      -v /etc/localtime:/etc/localtime \
      -p 9187:9187 \
      -e DATA_SOURCE_NAME="postgresql://postgres:passw0rd@172.17.10.94:5432/postgres?sslmode=disable" \
      --restart=unless-stopped \
      wrouesnel/postgres_exporter
    docker logs -f --tail 10 postgres-exporter
    

    dashboard from

    https://github.com/percona/grafana-dashboards/blob/master/dashboards/PostgreSQL_Overview.json