Monitoring Configuration

Monitoring Configuration Properties describes global configuration properties related to the monitoring of MATRIXX.

Table 1. Monitoring Configuration Properties
Property Description
global.monitoring.enabled When set to true, it is assumed that:
  • A Prometheus operator has been installed in the Kubernetes cluster, including the ServiceMonitor CRD.
  • The snmp-exporter.enabled engine monitoring property is set to false by default.
The enabled sub-charts include any relevant ServiceMonitor objects. The default value is false.
global.monitoring.usePrometheusAgent When set to true, or not set at all, the Service Monitor's endpoint only monitors the Prometheus Agent URL for MATRIXX components that support Prometheus. The default setting is true.

When set to false, the SNMP exporter is used instead.

global.monitoring.labels A dictionary of labels added to the ServiceMonitor objects to ensure that they are correctly identified by Prometheus.
Note: Create any new labels that your environment requires, but do not change any of the default MATRIXX Kubernetes labels.
global.monitoring.relabelings An array of relabelings, in addition to the default node_ip and node_name labellings, that are applied to metrics as they are processed for all ServiceMonitors.

The labelling parameters include:

  • targetLabel — The label named as the reported metric to receive the new value in replace actions. Regex capture groups are available. Mandatory for replace actions.
  • sourceLabels — A list of the candidate labels to change. Their content is concatenated using the specified separator and compared with the regex expression for replacement. Mandatory for replacement actions.
  • action — (Optional) The action to perform based on regular expression matching. Default is replace.
  • modulus — (Optional) The modulus to take of the hash of the source label values.
  • regex — (Optional) The extracted value is compared with this regular expression. The default value is (.*).
  • replacement — (Optional). A replacement value for the extracted value. Regular expression capture groups are available. The default value is $1.
  • separator — (Optional). A character to separate concatenated source label values. The default value is a semi-colon (;) .

Monitoring Label Replacement

This example replaces the __meta_kubernetes_pod_node_name label with my_node_ip and __meta_kubernetes_pod_node_name with my_node_name:
global:
 # Configuration relating to Prometheus Monitoring
  monitoring:
    # True if Prometheus monitoring should be enabled. Requires the ServiceMonitor (monitoring.coreos.com/v1) to be installed
    enabled: true
    # relabelings additional relabelings to add to service monitor
    # default relabelings already include: node_ip, node_name
    relabelings:
      - action: replace
        regex: ^(.*)$
        replacement: $1
        separator: ;
        sourceLabels: [__meta_kubernetes_pod_host_ip]
        targetLabel: my_node_ip
      - targetLabel: my_node_name
        sourceLabels: [__meta_kubernetes_pod_node_name]