Skip to main content

Prometheus App

About

Prometheus is an open-source systems monitoring and alerting toolkit.

CLI Args

Various operations aspects can be set in the command line. To adjust Prometheus command line options, edit /app/data/env.sh using the File manager and adjust cli_options variable as needed. For example:

    export cli_options="--storage.tsdb.retention.time=25d --storage.tsdb.path=/app/data/storage"
``

Be sure to restart the app after making any changes.

## Custom Config

[Custom config](https://prometheus.io/docs/prometheus/latest/configuration/configuration/) can be added in `/app/data/config/prometheus.yml` using the [File manager](../knowledge_base/apps.md#file-manager).

Be sure to restart the app after making any changes.

## Accessing the HTTP API Endpoint

From the official [prometheus.io/docs](https://prometheus.io/docs/prometheus/latest/querying/api/) most examples use the URL `http://localhost:9090/api/v1/`.
For the Cloudron app `https` is used and the port `:9090` needs to be left out.

As an example our Prometheus is running at `pm.demo.cloudron.io` and we want to use Prometheus in Grafana.
Then we need to use the full `https://pm.demo.cloudron.io` URL and basic auth.