Monitoring your Heroku Postgres Database

There are two axes of database monitoring. One axis is immediate insight. You can see what is happening right now, getting just-in-time visibility to solve problems and observe production behavior as it happens. The other axis is historical monitoring. This provides long-term persistence and reporting on the most important metrics over time, helping you make better decisions and understand trends.

With Heroku Postgres, you can get immediate insight with the pg-extras CLI plugin. Furthermore, we provide key metrics about your database right in your logs already for all applications.

For storage and reporting of your most important metrics, you can quickly set up rich historical reporting with Librato, which is available in our Add-ons marketplace. In this post, we walk through how to get started with Heroku Postgres monitoring for immediate visibility and long-term insight.

A healthy value for your cache hit will be as close to 100% as possible

It Starts with Logs

Heroku automatically collates and routes logs from every part of your app into a single channel, providing truly comprehensive, extensible, app-centric logging. With production Postgres databases on Heroku, robust logs and key metrics from your persistence level are routed directly into this stream. Key data including table-cache-hit, db_size, active-connections and more, outputting directly into your Heroku logs periodically. You can get immediate visibility into this stream by combining tail with a filter argument:

$ heroku logs --tail --ps heroku-postgres

Even better than viewing these logs manually is you can configure a log drain to be able to send your logs elsewhere. Fortunately when taking advantage of some of our add-ons they can automatically consume these logs without having to configure anything else.

Getting started with Librato

Librato is one such add-on that consumes your Heroku logs and gives you the ability to monitor on historical trends and set up alerts. You can get started with it right away by provisioning the add-on:

$ heroku addons:add librato

Librato will now be automatically consuming data from your Heroku logs and you can simply open it up to get immediate visibility into your Heroku Postgres cache hit, database connections, and insight around request queueing. If you have log runtime metrics already enabled on your application then you’ll see those insights as well.

Going further

While the initial dashboard is already helpful, you can gain additional insights by adding your own instruments to your dashboard. And if you need data thats not already available in your Heroku log stream you can add custom data yourself.

WebSockets Now in Public Beta

We’re excited to announce that WebSocket functionality is now available on Heroku in public beta. We can’t wait to see the powerful and creative real-time apps you’ll build. In this post, we show how to get up and running with WebSockets and demonstrate the functionality with two sample apps you can get on GitHub.

Editor's Note: Features added through Heroku Labs are experimental and are subject to change.

Read more →

Extended Validation SSL Certificates on Heroku

Heroku is now using Extended Validation SSL Certificates for most of our Heroku-owned applications. This allows you to tell at a glance if an URL belongs to Heroku itself, or is merely hosted on us.

Fancy Pants cert in action

Read more →

WAL-E and Continuous Protection with Heroku Postgres

Heroku Postgres is Heroku’s database-as-a-service product. With Heroku Postgres, you can easily provision and scale a Postgres database for your Heroku application, or as a stand-alone service. Recently, we’ve blogged about PostgreSQL 9.3 on Heroku and how you can use Heroku Postgres dataclips to build awesome business dashboards with your data. In this post, we talk about how Heroku Postgres delivers continuous protection for your business data using WAL-E, an open source application for archiving PostgreSQL WAL (Write Ahead Log) files quickly, continuously and with a low operational burden.

Read more →

How SpaceGlasses Builds the Future with Heroku

Editor's note: This is a guest post from Michael Buckbee of Meta/SpaceGlasses.

SpaceGlasses are augmented reality glasses that actually work. They let people control systems with a gesture, see virtual objects on top of the real world and create technology that would make Tony Stark proud.

Prior to joining Meta, I had developed and managed a number of high traffic Rails sites. I was brought on to help move the company’s website from a single static launch page to being an e-commerce platform and to help lay the groundwork for the company’s app store.

We chose to build on top of Heroku as we are moving very quickly, need to have a lots of flexibility and don’t have the time or budget to provision our own infrastructure from scratch.

As the site’s traffic has rapidly grown from tens of thousands to hundreds of thousands of visitors a day being on Heroku has only made more sense.

Read more →

Browse the blog archives or subscribe to the full-text feed.