Prometheus Client Configuration

Configuring the Prometheus Client

  1. Register the Prom-client as a subproject
    Figure 1. Register as sub project
  2. Adding the Client: To use the Prometheus client in your project, add a nodejs manager to the WinCC OA project with the arguments:
    promClient.js
    , followed by -f flags and YAML configuration files:
    Figure 2. Manager Properties - Node.js manager
  3. Configuration Hierarchy:

    • The first YAML file mentioned is the base configuration (e.g., defaultMetrics.yaml).
    • Subsequent YAML files (e.g., customMetricsOverride.yaml) can add or override configurations.
  4. Merged Configuration Context:

    • All specified YAML files are processed to create a single configuration context.
    • This unified context includes global variables, default labels, metric objects, and metric data.

Example arguments:

promClient.js -f metrics/defaultMetrics.yaml -f customMetricsOverride.yaml

This setup allows for flexible and hierarchical configuration of the Prometheus client, accommodating complex monitoring setups. However, it's important to note that overwriting existing metric objects isn't possible. The system only supports adding new labels to already defined metric objects