Setting up a route and destination

Configuring alert rules, routes, and recipients in the management cluster GUI is not available for local alerting. Alerting must be configured in the customvalues of the monitoring module (shturval-metrics-collector) of the management cluster.

Once the rule is added to the management cluster (for local alerting or centralized), you can configure the alerting configuration:

  1. Prepare a ShturvalServicePatch to apply to the Monitoring Module Control Component (shturval-metrics-collector) specification (ssc), where set the required configuration in alertmanager.
Example configuration in ShturvalServicePatch, where the recipient is a webhook
apiVersion: ops.shturval.tech/v1beta2
kind: ShturvalServicePatch
metadata:
  name: <resource name>
spec:
  shturvalServiceConfigName: shturval-metrics-collector
  customvalues:
    alertmanager:
      enabled: true
      config:
        receivers:
          - name: blackhole # Default receiver. Must be specified
          - name: <your parameter value> 
            webhook_configs:
              - max_alerts: <your parameter value> 
                send_resolved: false
                url: <your parameter value>
        route:
          routes:
            - matchers:
              - <your parameter value>
              receiver: <your parameter value>
ParameterDescriptionData typeExample
metadata.nameName of the created PatchSSCstringmetrics-collector-config
receivers.nameOp recipient namemorestringexample-webhook
receivers.webhook_configs.max_alertsThe maximum number of alerts included in a single webhook message. Alerts exceeding this value are cut off. Default 0 (unlimited number, all alerts will be included in the message)int5
receivers.webhook_configs.urlURL: endpoint for sending HTTP requests to webhookstringhttp://example-webhook.svc/webhook
route.routes.matchersList of recipient labels where alerts will be routedstringapp = “example-webhook”
receivers.matchers.nameAlert recipient name valuestringexample-webhook
  1. Load the prepared ShturvalServicePatch into the management cluster using import manifests.
Screenshot

metricsmgmt_configpatch

Changes may take time to apply.