A Postgres Metrics Dashboard

#Pome

Pome stands for Postgres Metrics. Pome is a PostgreSQL Metrics Dashboard to keep track of the health of your database. This project is at a very early stage and there are a lot of missing features, but I'm hoping to be able to make the project progress quickly. You can read more about the motivation behind Pome here

Join the chat at https://gitter.im/rach/pome

##How to install Pome

Pome provides pre-built binaries with the releases, but you can also use the Go packaging system:

go get github.com/rach/pome

Then to update Pome:

go get -u github.com/rach/pome

To install Go, you can follow the Go documentation or use your internal packaging system.

##How to run Pome

The command line provides some help on how to use Pome:

$> pome --help
usage: Pome --username=USERNAME [<flags>] <DBNAME>
A Postgres Metrics Dashboard.

Flags:
     --help               Show context-sensitive help (also try --help-long and --help-man).
 -h, --host=HOSTNAME      database server host (default: localhost)
 -p, --port=PORT          database server port (default: 2345)
 -s, --sslmode=require    database SSL mode (default: disable)
 -W, --password=PASSWORD
 -U, --username=USERNAME
     --version            Show application version.

Args:
  <DBNAME>

If your database doesn't have a password set, then you can run Pome like this:

 $> pome -U myuser mydatabase
 2015/12/09 12:09:43 Starting Pome 0.1.0
 2015/12/09 12:09:43 Application will be available at http://127.0.0.1:2345

If your database is protected by a password, then you need to pass it as an argument. In the future, Pome will prompt the user for the password (see this issue).

Once Pome is running, you can access the dashboard via your browser and you should see an interface like this:

Home screenshot

##Which metrics does Pome provide

Right now, Pome collects the following metrics:

  • Database size
  • Tables size
  • Indexes size
  • Number of Connections
  • Ratio of the most bloated table
  • Ratio of the most bloated index
  • Total of wasted bytes due to bloat in tables
  • Total of wasted bytes due to bloat in indexes
  • The bloat ratio on individual tables and indexes
  • Wasted bytes per table

There are a lot of other metrics that will be added soon, like:

  • Unused indexes
  • Cache hit ratio
  • Amount of wal files
  • Transactions per second
  • Number of queries longer than 5s and 5min
  • Etc

If you are interested in monitoring CPU, disk IO ... This will need to be done via another tool. Pome will only be collecting data which can be gathered through Postgres

##Why build Pome?

Context

PostgreSQL is incredibly stable, especially with small databases. You too often see databases in the wild without the care of a loving DBA. This can give the illusion that everything is alright even when your database is slowly getting worse. A lot of things can be analyzed within postgres to get a health status but sadly it misses a simple tool to use for less experienced people.

Goals

This project follows 3 principles: Simplicity, Opinionated, Batteries included.

Simplicity, the project aims to be easy to deploy and run. It's why Pome can run as a binary. The project also aims to feel like the psql command and uses common arguments.

Opinionated, Pome has the goal to be pre-configured and analyse commonly useful metrics. We want the project to have sensible defaults. In the future, the tool will allow some level of configuration but without compromising Simplicity.

Batteries Included, Pome is built to be accessed via a web interface. The web app is shipped within the binary and Pome is taking care of serving the assets (HTML, js, CSS). Pome is not built to be a public facing tool so performance in delivering assets was not a concern. It should be possible to run the frontend individually if it's a concern for you. Pome tries to not depend on any dependency which cannot be shipped with the binary and it's one of the reasons why Pome is stateless right now.

What Pome is not and won't be

Pome isn't aiming to be a tool for humongous Postgres instances which are already in the hands of a DBA who can have the time to setup more advanced monitoring tools. Pome won't be an alternative to a more configurable tool like collectd.

##Can I use Pome in Production?

If the database is heavily used then I would avoid it for now until we get more load testing and more configuration options.

##Supported PostgreSQL Versions

The tool has been developed and tested against PG 9.4 and it should be working on the future versions. Pome doesn't have the intent to support older versions because it may require to have different SQL statements for different versions but if there are some requests it will be considered.

##Stateless

Pome is stateless (at least for now) to keep the tool simple. I did consider using few options:

  • using an external time series database
  • using the current PostgreSQL database (as pg_diagnose does)
  • using an embedded key/value database for Go like bolt. But at the end, I decided to keep it simple and store the last 120 metrics in-memory with the trade-offs that it implies. Let see where Pome goes, so that may change.

##Contributing

This project had also some learning motivation, as I had never written a Go project and hadn't touched react for a while. I may have made some mistakes or didn't follow some good practices for which I would appreciate some feedbacks.

Otherwise, there are a few tasks which can be done if you want to help

  • Suggesting new metrics
  • Testing the tools and submitting issues
  • Reviewing and Improving the current code codebase. Both languages used are not my daily programming language so I probably did beginner mistakes
  • Correcting my English. Sorry, I'm not a native English speaker so mistakes will happen
  • Report issues
  • Solving bugs from the issue trackers

##Inspirations

When Pome was only a rough idea, I checked online what already existed and I found a few similar projects which inspired me:

Pome has a different goal from the tools above.

##Licence

Pome is licensed under Apache V2 license, the full license text can be found here

Owner
Comments
  • ParseInt error when scanning table

    ParseInt error when scanning table

    2016/01/05 11:42:24 Starting Pome 0.1.0
    2016/01/05 11:42:24 Application will be available at http://127.0.0.1:2345
    2016/01/05 11:42:24 sql: Scan error on column index 3: converting string "1.1198464e+07" to a int: strconv.ParseInt: parsing "1.1198464e+07": invalid syntax
    

    Using version 804786ebf1ed5665049178b657f425b612b8c66d

  • Scan error

    Scan error

    Tried starting it up and got the following error:

    2016/01/05 10:33:02 Starting Pome 0.1.0
    2016/01/05 10:33:02 Application will be available at http://127.0.0.1:2345
    2016/01/05 10:33:02 sql: Scan error on column index 3: converting string "6.55917056e+08" to a int: strconv.ParseInt: parsing "6.55917056e+08": invalid syntax
    

    Could it be because of our use of bigints?

  • Generate bindata on build

    Generate bindata on build

    Right now, changing the web source does nothing if you don't run go-bindata and create a new bindata.go file. I think this is probably a bit confusing to people looking to expand on the project and a bit of a VCS-antipattern. Typically with projects that use generated source code (see protobuf, thrift, etc), there is a "gen" stage that is done before the "build" stage.

    We could implement this with a Makefile that builds bindata.go.

    Let me know how you feel about this.

  • Start using one of the go web framework/libs to handle the routing and context

    Start using one of the go web framework/libs to handle the routing and context

    I did the first version using the built-in http package as I had never used go before. It's quite limited and it will help to have gzip and others.

    So far, I liked http://www.gorillatoolkit.org/ as it's more of library than a framework. Any suggestion are welcomed.

  • url is shorten

    url is shorten

    i can't connect probably because the url is shorten

    $ pome xxxxxxxx:xxxxxxxxxxxxxxxx@ec2-xx-xxx-xxx-xxx.xx-xxxx-x.xxxxxxxx.xxxxxxx.com:5432/xxxxxxxx
    2016/01/07 14:03:15 Starting Pome 0.1.1
    2016/01/07 14:03:15 Application will be available at http://127.0.0.1:2345
    2016/01/07 14:03:15 pq: database "pome xxxxxxxx:[email protected]" does not exist
    

    (anonymized console)

  • Bump jquery from 2.2.4 to 3.4.1 in /static

    Bump jquery from 2.2.4 to 3.4.1 in /static

    Bumps jquery from 2.2.4 to 3.4.1.

    Commits
    • 75f7e96 3.4.1
    • 7dddb19 Core: Make isAttached work with iOS 10.0-10.2
    • 6c1e7db Event: Prevent leverageNative from registering duplicate dummy handlers
    • 24d71ac Event: Fix handling of multiple async focus events
    • b4fadc9 Build: Test on Node.js 12, stop testing on Node.js 6 & 11
    • 0d4af52 Build: Fix unresolved jQuery reference in finalPropName
    • 22caea8 Build: Updating the 3.4-stable version to 3.4.1-pre
    • 59ea765 Release: update AUTHORS.txt
    • 7c1ef15 Release: update version to 3.4.0-pre
    • d940bc0 Build: Update Sizzle from 2.3.3 to 2.3.4
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot ignore this [patch|minor|major] version will close this PR and stop Dependabot creating any more for this minor/major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

  • Add option to specify listening host

    Add option to specify listening host

    As the subject says. This allows the user to start pome and accept connections on the public interface, thus the postgresql stats can be accessed on a remote server without having to create a SSH tunnel.

  • Add a Gitter chat badge to README.md

    Add a Gitter chat badge to README.md

    rach/pome now has a Chat Room on Gitter

    @rach has just created a chat room. You can visit it here: https://gitter.im/rach/pome.

    This pull-request adds this badge to your README.md:

    Gitter

    If my aim is a little off, please let me know.

    Happy chatting.

    PS: Click here if you would prefer not to receive automatic pull-requests from Gitter in future.

  • Web tests

    Web tests

    Added some basic tests for the web handlers and moved a couple of things around in web.go to make the file structure clearer.

    I branched this off develop.

  • -p is not database port

    -p is not database port

    https://github.com/rach/pome/blob/3c140aa121b820ba1fce3f0a75478b74c871f7a1/main.go#L31

    should fix usage or change option name to -P instead of -p. because someone may want real -p for connecting database with custom port.

  • Bump node-sass from 3.13.1 to 4.14.1 in /static

    Bump node-sass from 3.13.1 to 4.14.1 in /static

    Bumps node-sass from 3.13.1 to 4.14.1.

    Release notes

    Sourced from node-sass's releases.

    v4.14.1

    Community

    Fixes

    Supported Environments

    OS Architecture Node
    Windows x86 & x64 0.10, 0.12, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14
    OSX x64 0.10, 0.12, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14
    Linux* x86 & x64 0.10, 0.12, 1, 2, 3, 4, 5, 6, 7, 8**, 9**, 10**^, 11**^, 12**^, 13**^, 14**^
    Alpine Linux x64 6, 8, 10, 11, 12, 13, 14
    FreeBSD i386 amd64 10, 12, 13

    *Linux support refers to Ubuntu, Debian, and CentOS 5+ ** Not available on CentOS 5 ^ Only available on x64

    v4.14.0

    Features

    Fixes

    Supported Environments

    OS Architecture Node
    Windows x86 & x64 0.10, 0.12, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14
    OSX x64 0.10, 0.12, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14
    Linux* x86 & x64 0.10, 0.12, 1, 2, 3, 4, 5, 6, 7, 8**, 9**, 10**^, 11**^, 12**^, 13**^, 14**^
    Alpine Linux x64 6, 8, 10, 11, 12, 13, 14
    FreeBSD i386 amd64 10, 12, 13

    *Linux support refers to Ubuntu, Debian, and CentOS 5+ ** Not available on CentOS 5 ^ Only available on x64

    v4.13.1

    Community

    Changelog

    Sourced from node-sass's changelog.

    v4.14.0

    https://github.com/sass/node-sass/releases/tag/v4.14.0

    v4.13.1

    https://github.com/sass/node-sass/releases/tag/v4.13.1

    v4.13.0

    https://github.com/sass/node-sass/releases/tag/v4.13.0

    v4.12.0

    https://github.com/sass/node-sass/releases/tag/v4.12.0

    v4.11.0

    https://github.com/sass/node-sass/releases/tag/v4.11.0

    v4.10.0

    https://github.com/sass/node-sass/releases/tag/v4.10.0

    v4.9.4

    https://github.com/sass/node-sass/releases/tag/v4.9.4

    v4.9.3

    https://github.com/sass/node-sass/releases/tag/v4.9.3

    v4.9.2

    https://github.com/sass/node-sass/releases/tag/v4.9.2

    v4.9.1

    https://github.com/sass/node-sass/releases/tag/v4.9.1

    v4.9.0

    https://github.com/sass/node-sass/releases/tag/v4.9.0

    v4.8.3

    https://github.com/sass/node-sass/releases/tag/v4.8.3

    v4.8.2

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

  • Bump jquery from 2.2.4 to 3.5.0 in /static

    Bump jquery from 2.2.4 to 3.5.0 in /static

    Bumps jquery from 2.2.4 to 3.5.0.

    Commits
    • 7a0a850 3.5.0
    • 8570a08 Release: Update AUTHORS.txt
    • da3dd85 Ajax: Do not execute scripts for unsuccessful HTTP responses
    • 065143c Ajax: Overwrite s.contentType with content-type header value, if any
    • 1a4f10d Tests: Blacklist one focusin test in IE
    • 9e15d6b Event: Use only one focusin/out handler per matching window & document
    • 966a709 Manipulation: Skip the select wrapper for <option> outside of IE 9
    • 1d61fd9 Manipulation: Make jQuery.htmlPrefilter an identity function
    • 04bf577 Selector: Update Sizzle from 2.3.4 to 2.3.5
    • 7506c9c Build: Resolve Travis config warnings
    • Additional commits viewable in compare view
    Maintainer changes

    This version was pushed to npm by mgol, a new releaser for jquery since your current version.


    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

  • Add option to use a different web root

    Add option to use a different web root

    It should be possible to service static content and request under a different web root then the default /.

    This would simplify setting up the service behind a nginx or Apache2 proxy under different location, e.g. /pome

  • Commit Ratio Metric

    Commit Ratio Metric

    Can be useful to detect issues. check_prostgres calculate it like this: https://github.com/bucardo/check_postgres/blob/master/check_postgres.pl#L4208-L4217

    Only need some small modification

The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.

The open-source platform for monitoring and observability. Grafana allows you to query, visualize, alert on and understand your metrics no matter wher

Jan 3, 2023
Go starter project with Gin, Viper, postgres , redis, zap, prometheus metrics etc setup

Go REST Service Starter/Boilerplate Easily extendible REST API Service boilerplate aiming to follow idiomatic go and best practice. Any feedback and p

Jun 23, 2022
Alert dashboard for Prometheus Alertmanager
Alert dashboard for Prometheus Alertmanager

karma Alert dashboard for Prometheus Alertmanager. Alertmanager >=0.19.0 is required as older versions might not show all receivers in karma, see issu

Dec 30, 2022
A flexible process data collection, metrics, monitoring, instrumentation, and tracing client library for Go
A flexible process data collection, metrics, monitoring, instrumentation, and tracing client library for Go

Package monkit is a flexible code instrumenting and data collection library. See documentation at https://godoc.org/gopkg.in/spacemonkeygo/monkit.v3 S

Dec 14, 2022
Very powerful server agent for collecting & sending logs & metrics with an easy-to-use web console.
Very powerful server agent for collecting & sending logs & metrics with an easy-to-use web console.

logkit-community 中文版 Introduce Very powerful server agent for collecting & sending logs & metrics with an easy-to-use web console. logkit-community De

Dec 29, 2022
Metrics dashboards on terminal (a grafana inspired terminal version)

Grafterm Visualize metrics dashboards on the terminal, like a simplified and minimalist version of Grafana for terminal. Features Multiple widgets (gr

Jan 6, 2023
gin-gonic/gin metrics for prometheus.
gin-gonic/gin  metrics for prometheus.

gin-metrics gin-gonic/gin metrics exporter for Prometheus. 中文 Introduction gin-metrics defines some metrics for gin http-server. There have easy way t

Jan 1, 2023
Pixie gives you instant visibility by giving access to metrics, events, traces and logs without changing code.
Pixie gives you instant visibility by giving access to metrics, events, traces and logs without changing code.

Pixie gives you instant visibility by giving access to metrics, events, traces and logs without changing code.

Jan 4, 2023
gosivy - Real-time visualization tool for Go process metrics
 gosivy - Real-time visualization tool for Go process metrics

Gosivy tracks Go process's metrics and plot their evolution over time right into your terminal, no matter where it's running on. It helps you understand how your application consumes the resources.

Nov 27, 2022
Go runtime metrics stack on your local computer.
Go runtime metrics stack on your local computer.

Goal This repository provides a docker-compose for Go runtime metrics stack on your local computer. It is using influxdb and grafana, it based on the

Oct 8, 2021
A Postgres Metrics Dashboard
A Postgres Metrics Dashboard

#Pome Pome stands for Postgres Metrics. Pome is a PostgreSQL Metrics Dashboard to keep track of the health of your database. This project is at a very

Dec 22, 2022
Terraform-grafana-dashboard - Grafana dashboard Terraform module

terraform-grafana-dashboard terraform-grafana-dashboard for project Requirements

May 2, 2022
Github-workflow-dashboard - WEB and CLI dashboard for github action workflows
Github-workflow-dashboard - WEB and CLI dashboard for github action workflows

CLI capable of retrieving github action workflows stats Example usage Dashboard

Aug 30, 2022
The metrics-agent collects allocation metrics from a Kubernetes cluster system and sends the metrics to cloudability

metrics-agent The metrics-agent collects allocation metrics from a Kubernetes cluster system and sends the metrics to cloudability to help you gain vi

Jan 14, 2022
Simple to do list API with Gin and Gorm (with Postgres)Simple to do list API with Gin and Gorm (with Postgres)

go-todo Simple to do list API with Gin and Gorm (with Postgres) Docker Clone this repository and run: docker-compose up You can then hit the followin

Aug 29, 2022
Go-postgres - go-postgres library provide NoSQL functionality which can execute queries with pool of connections

GO Postgres go-postgres library provide NoSQL functionality which can execute queries with pool of connections. What is this repository for? Establish

Dec 31, 2021
A golang implementation of endlessh exporting Prometheus metrics, visualized by a Grafana dashboard.
A golang implementation of endlessh exporting Prometheus metrics, visualized by a Grafana dashboard.

endlessh-go A golang implementation of endlessh exporting Prometheus metrics, visualized by a Grafana dashboard. Introduction Endlessh is a great idea

Dec 23, 2022
Exporter your cypress.io dashboard into prometheus Metrics

Cypress.io dashboard Prometheus exporter Prometheus exporter for a project from Cypress.io dashboards, giving the ability to alert, make special opera

Feb 8, 2022
The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.

The open-source platform for monitoring and observability. Grafana allows you to query, visualize, alert on and understand your metrics no matter wher

Jan 3, 2023
Go starter project with Gin, Viper, postgres , redis, zap, prometheus metrics etc setup

Go REST Service Starter/Boilerplate Easily extendible REST API Service boilerplate aiming to follow idiomatic go and best practice. Any feedback and p

Jun 23, 2022