Code Monkey home page Code Monkey logo

newrelic_postgres_plugin's Introduction

NewRelic Postgres Plugin by Scott Shea

Note: This is a fork of the excellent Go Boundless Postgres plugin found at https://github.com/GoBoundless/newrelic_postgres_plugin. I will certainly do a pull request to ge the additional metrics into their plugin but due to a time constraint I am publishing these as a different plugin

A NewRelic Platform Postgres Plugin

The New Relic Postgres Plugin enables integrated monitoring of your Postgres database in a custom NewRelic dashboard. Currently the following metrics are recorded:

  • Index size, miss rate, and count
  • Cache miss rate
  • Idle and active connection counts
  • BGWriter metrics
  • Tuple metrics
  • Transactions committed and rolled back
  • Bloat and Waste by table
  • Count of Seq Scans by table
  • Rows & Dead Rows by table
  • Record Count by table

Requirements

Proxy host

You need a host to install the plugin on that is able to poll the desired Postgres database. That host also needs Ruby (tested with 2.2.2), and support for rubygems. Heroku is a great choice for this. A fully deployable example app is provided.

https://github.com/GoBoundless/heroku_postgres_monitor

Postgres

This plugin has been tested with with a few different Postgres version and should work with any version compatible with the pg gem.

Installation and Running

  1. Install this gem from RubyGems:

    gem install newrelic_postgres_plugin

  2. Create an installation directory (like /opt/newrelic/postgres ).

  3. In the installation directory, execute

    pg_monitor install -l LICENSE_KEY

    using the license key from your New Relic account.

  4. Edit the config/newrelic_plugin.yml file generated in step 4. Setup host/port/user/password/dbname for your postgres connection.

  5. Execute

    pg_monitor run

  6. You should now see your results in the left-hand navigation of the NewRelic web UI under a tab labeled 'Postgres'.

Heroku Instructions

Unlike the default NewRelic Postgres plugin, this plugin is designed to be fully compatible with monitoring Heroku Postgres. In fact, we've even created a simple app you can run on Heroku to monitor your existing apps.

Instructions for using Heroku as your proxy host can be found in the heroku_postgres_monitor repo.

Support

Please use Github issue for support. We will do our best to address issues in a timely fashion.

Developer Instructions

  1. Fork/Clone the repository

  2. Install bundler and run:

    bundle install

  3. Run rake -T to see rake options, including tests.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.