Database Reference
In-Depth Information
Metrics logs
Heroku Postgres has a log statement that provides metrics on database usage. This feature
is important to monitor the behavior of the database over time.
The metrics information helps you improve database configurations, and identify critical is-
sues, it also teaches you how to improve your application's architecture.
To view the metrics logs, you should use the heroku logs command by filtering
through the heroku-postgres process, as shown in the following example:
$ heroku logs -p heroku-postgres -t --app your-app-name
2014-11-02T00:35:38+00:00 app[heroku-postgres]:
source=HEROKU_POSTGRESQL_CHARCOAL
sample#current_transaction=179097
sample#db_size=61229240bytes sample#tables=38
sample#active-connections=9 sample#waiting-connections=0
sample#index-cache-hit-rate=0.99999
sample#table-cache-hit-rate=1 sample#load-avg-1m=0.395
sample#load-avg-5m=0.44 sample#load-avg-15m=0.435
sample#read-iops=17.042 sample#write-iops=1.7437
sample#memory-total=7629452kB sample#memory-free=64876kB
sample#memory-cached=6838076kB
sample#memory-postgres=364248kB
Tip
The information on the metrics is available in the standard, premium, and enterprise plans.
The following list will help you understand every piece of information available for each
attribute.
• The logs show the timestamp of the period measurement.
source : This is the database associated with data measurement.
sample#db_size : The byte number contained in the database. This includes all
tables and indexes, including the database bloat data.
sample#tables : The table numbers in the database.
sample#active-connections : The connection numbers established in the database.
sample#current_transaction : The current transaction ID.
Search WWH ::




Custom Search