This article covers an overview of all the knobs that you can tweak to align the runtime with your needs.

Promitor runtime is configured by mounting a volume to /config/runtime.yaml.

We provide the capability to override te runtime YAML via environment variables, if you have the need for it.

Here is a complete example of the runtime YAML:

server:
  httpPort: 80 # Optional. Default: 80
prometheus:
  metricUnavailableValue: NaN # Optional. Default: NaN
  enableMetricTimestamps: false # Optional. Default: true
  scrapeEndpoint:
    baseUriPath: /metrics # Optional. Default: /metrics
metricsConfiguration:
  absolutePath: /config/metrics-declaration.yaml # Optional. Default: /config/metrics-declaration.yaml
telemetry:
  applicationInsights:
    instrumentationKey: ABC # Optional. Note: Required to be specified when turned on
    isEnabled: false # Optional. Default: false
    verbosity: trace # Optional. Default: N/A
  containerLogs:
    isEnabled: true # Optional. Default: true
    verbosity: trace # Optional. Default: N/A
  defaultVerbosity: error # Optional. Default: error

Note: Using Promitor v0.x? Use environment variables to configure the runtime.

Runtime

The Promitor runtime is flexible and allows you to configure it to meet your needs:

Example:

server:
  httpPort: 80 # Optional. Default: 80

Prometheus Scraping Endpoint

Promitor automatically scrapes Azure Monitor and makes the information available based on the metrics configuration.

The behavior of this can be configured to fit your needs:

Example:

prometheus:
  metricUnavailableValue: NaN # Optional. Default: NaN
  enableMetricTimestamps: false # Optional. Default: true
  scrapeEndpoint:
    baseUriPath: /metrics # Optional. Default: /metrics

Metric Configuration

Promitor will scrape the Azure Monitor metrics that are configured via a metric declaration YAML.

The behavior of this is configurable:

Example:

metricsConfiguration:
  absolutePath: /config/metrics-declaration.yaml # Optional. Default: /config/metrics-declaration.yaml

Telemetry

We provide insights in how our runtime is doing and is written to one or more sinks.

You can determine what telemetry sinks you want and what the default verbosity should be via the runtime YAML.

General telemetry information can be configured:

To learn more about the configured sinks and their configuration, see “Telemetry Sinks”.

Example:

telemetry:
  applicationInsights:
    # [...]
  containerLogs:
    # [...]
  defaultVerbosity: error # Optional. Default: error

Telemetry Sinks

Promitor provides the telemetry, but it’s up to you to choose where you want to send it to.

We currently support the following sinks:

Container Logs

Promitor can send telemetry to stdout/stderr.

In order to enable use this sink, the following configuration needs to be provided:

Example:

telemetry:
  containerLogs:
    isEnabled: true # Optional. Default: true
    verbosity: trace # Optional. Default: N/A
  defaultVerbosity: error # Optional. Default: error

Azure Application Insights

Promitor can send telemetry to Azure Application Insights when there is a need to.

It currently supports:

In order to enable use this sink, the following configuration needs to be provided:

Example:

telemetry:
  applicationInsights:
    instrumentationKey: ABC # Optional. Note: Required to be specified when turned on
    isEnabled: false # Optional. Default: false
    verbosity: trace # Optional. Default: N/A
  containerLogs:
    isEnabled: true # Optional. Default: true
    verbosity: trace # Optional. Default: N/A
  defaultVerbosity: error # Optional. Default: error

Overriding configuration with environment variables

In certain scenarios you’d like to override what was configured in the runtime YAML. Therefor we provide the capability to override them via environment variables.

Every environment variable should be prefixed with PROMITOR_YAML_OVERRIDE_ followed by the YAML hierarchy where every level is replaced with __ rather than a tab. Environment variables are not case sensitive.

Our runtime configuration API endpoint allows you to verify if it was overriden and returns what will be used to run Promitor.

:warning: Depending on the configuration that is changed it may be required to restart Promitor, for example changing the HTTP port.

Example

Let’s say we want to override the following HTTP port:

server:
  httpPort: 80

An environment variable called PROMITOR_YAML_OVERRIDE_server__httpPort can be provided which specifies the new port.

← back