Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to monitor a Heroku postgres database

NewRelic gives nice database analyses, however it seems to track only the web app's transactions.

I have independently managed servers which query and load my Heroku postgresql database. Is there a way I can get diagnostics and analysis of the database activity so that it will include all connections to it?

like image 539
Jonathan Livni Avatar asked Sep 24 '13 06:09

Jonathan Livni


People also ask

How do I check my PostgreSQL database on Heroku?

All Heroku Postgres databases have a corresponding Heroku application. You can find the application name on the database page at data.heroku.com. Your database is attached to the Heroku app and is accessible via an app config var containing the database URL, even if you host no code in the application itself.

How do I check my Heroku database records?

"You could run heroku pg:psql to fire up a Postgres console, then issue \d to see all tables, and \d tablename to see details for a particular table." You can also type select * from tablename; to view the table contents.

How do I monitor Heroku?

Set up an APM tool by installing a Heroku add-on. The Monitoring category includes APM tools like New Relic APM, Scout APM, and Solarwinds AppOptics. After you've provisioned the add-on and configured your app to use it, you can: Identify your slowest endpoints and look for opportunities to optimize them.


1 Answers

New Relic application monitoring will only collect data on database queries that are part of a web transaction or background task that is being monitored. If you're using one of New Relic's supported languages to query your database, you may be able to track that code as a background task (see https://newrelic.com/docs/features/monitoring-background-processes). If you would like a general monitoring plugin for your postgresql database, you could check out the postgresql plugin for New Relic (created and supported by Boundless): http://newrelic.com/plugins/boundless/109.

like image 164
lauradiane Avatar answered Oct 11 '22 08:10

lauradiane