Before You Begin
Setup Database Access for the Agent
-
Create a dedicated Heroku credential for the Agent and attach it to your database:
This creates a new
HEROKU_POSTGRESQL_<COLOR>_URLconfig var containing the connection URL the Atatus Agent should use. -
Connect to the database using the new credential and grant monitoring access:
-
Create the explain function:
Heroku Postgres does not give you superuser access. The
pg_monitor role grants the read access the Agent needs without elevated privileges.Configure Atatus Infrastructure Agent
- Install the Atatus Infrastructure agent on a host that can reach your Heroku Postgres endpoint.
-
Find the connection details from the credential you created. Run
heroku config --app <YOUR_APP>and locate theHEROKU_POSTGRESQL_<COLOR>_URLvalue matching theatatuscredential. The URL has the form: -
Update the PostgreSQL configuration file at
/etc/atatus-infra-agent/conf.d/postgresql.d/postgresql.yml:Heroku Postgres requires SSL, sossl: trueis mandatory. -
Restart the Atatus Infra Agent:
Running the Agent on a Heroku Dyno (Optional)
If you prefer to run the Atatus Infra Agent on a Heroku Dyno via the Atatus buildpack, you can derive the agent configuration from theHEROKU_POSTGRESQL_<COLOR>_URL environment variable at release time. Place a prerun script at atatus/prerun.sh (replace IVORY with your credential’s color):