Learn how to deploy and use Aptible-hosted analytics and monitoring with Grafana
aptible db:tunnel
command, then connect using psql
and run the following commands to create a sessions
database for use by Grafana:
sessions
database:
$ADMIN_PASSWORD
: Generate a strong password for your Grafana admin
user.
$SECRET_KEY
: Generate a random string (40 characters will do).
$YOUR_DOMAIN
: The domain name you intend to use to connect to Grafana (e.g. grafana.example.com
).
$DB_USERNAME
: The username for your PostgreSQL database. For a PostgreSQL database on Aptible, this will be aptible
.
$DB_PASSWORD
: The password for your PostgreSQL database.
$DB_HOST
: The host for your PostgreSQL database.
$DB_PORT
: The port for your PostgreSQL database.
📘 There are many more configuration options available in Grafana. Review Grafana’s configuration documentation for more information.
$YOUR_DOMAIN
in the example above)!
$YOUR_DOMAIN
to access Grafana. Connect using the username admin
and the password you configured above (ADMIN_PASSWORD
).
$INFLUXDB_HOST
: The hostname for your InfluxDB database. This is of the form db-$STACK-$ID.aptible.in
.
$INFLUXDB_PORT
: The port for your InfluxDB database.
$INFLUXDB_USERNAME
: The username for your InfluxDB database. Typically aptible
.
$INFLUXDB_PASSWORD
: The password.
https://foo:bar@db-qux-123.aptible.in:456
, then the parameters are:
$INFLUXDB_HOST
: db-qux-123.aptible.in
$INFLUXDB_PORT
: 456
$INFLUXDB_USERNAME
: foo
$INFLUXDB_PASSWORD
: bar
https://$INFLUXDB_HOST:$INFLUXDB_PORT
.
proxy
db
. Otherwise, use the database of your choice. - User: $INFLUXDB_USERNAME
- Password: $INFLUXDB_PASSWORD
📘 In the queries below,RSS Memory Utilization across all resources$__interval
and$timeFilter
will automatically be interpolated by Grafana. Leave those parameters as-is.
ENVIRONMENT
with the handle for your environment and HANDLE
with the handle for your app
📘 If you get an error connecting, use the aptible logs
commands to troubleshoot.
That said, an error logging in is very likely due to not properly creating thesessions
database and thesession
table in it as indicated in Configuring the database.
📘 Doing a big upgrade? If you need to downgrade, you can redeploy with a lower version. Alternatively, you can deploy a test Grafana app to ensure it works beforehand and deprovisioned the test app once complete.