Extract data from a Prometheus instance

Sling CLI Setup

The following credentials keys are accepted:

  • http_url (required) -> The HTTP url of the instance

  • api_key (optional) -> the token key to use to access the instance

  • user (optional) -> the username to use to access the instance via Basic Auth

  • password (optional) -> the password to use to access the instance via Basic Auth

Here are examples of setting a connection named PROMETHEUS. We must provide the type=prometheus property:

$ sling conns set PROMETHEUS type=prometheus http_url=<http_url> api_key=<api_key> 

Environment Variable

export PROMETHEUS='{type: prometheus, http_url: "<http_url>", api_key: "<api_key>" }'

Sling Env File YAML

See here to learn more about the sling env.yaml file.

    type: prometheus
    http_url: <http_url>
    api_key: <api_key>

If you are facing issues connecting, please reach out to us at, on discord or open a Github Issue here.


Last updated