Skip to main content

Creating and Managing Alerts in Metoro

Metoro provides three methods for creating and managing alerts:
  1. Using the Metoro UI
  2. Using Kubernetes ConfigMaps
  3. Using the MetoroAlert Kubernetes custom resource — see Kubernetes Resources. You can export any existing alert as a MetoroAlert manifest from the alert page via Export → Metoro CRD Format.
MetoroAlert creates, spec updates, and deletions normally appear in Metoro in about 30 seconds. Allow up to one minute for the exporter and sync workflow to process a change. ConfigMap-managed alert creates and updates sync on the same fast path; the hourly reconcile described below remains the backstop.

Managing Alerts Using the UI

To create a new alert using the Metoro UI:
  1. Navigate to the Alerts page
  2. Click on the Create Alert button
  3. Configure your alert conditions.
  4. In the Details step, optionally add tags to group the alert with related alerts and dashboards. For more information about tag formatting and filtering, see Alert and Dashboard Tags.
For more information about alert configuration, please check the API documentation. Alerts page with Create Alert button highlighted by arrow in the top right corner You can update existing alerts by clicking on the alert name in the list. This will take you to the alert details page. You can click Edit to modify alert configuration.
You need ‘update’ permissions on alerts to edit an alert. If you don’t have these permissions, the Edit button will be disabled.
Alert detail page showing summary, conditions, chart, and Edit button highlighted by arrow

Managing Alerts Using Kubernetes ConfigMaps

For organizations that prefer Infrastructure as Code (IaC) practices, Metoro supports creating and managing alerts using Kubernetes ConfigMaps.

ConfigMap Requirements

  1. ConfigMaps must include the label metoro.io/alert: "true" to be recognized by Metoro as an alert definition.
    • ConfigMaps without this label will be ignored by Metoro.
  2. The ConfigMap data must include a key named alert.yaml with alerts and the toplevel key containing the alert definition(s).
  3. The alert definition must follow the format specified in the API documentation.
  4. Set metadata.folderPath to the folder in the Metoro filesystem where the alert should live (for example /alerts/default/team-a/). This path controls RBAC—pick a folder that matches the permissions granted to the users who need to manage the alert. If omitted, the alert defaults to /alerts/default/.

Alert Synchronization

  • Creating or updating a labelled ConfigMap normally appears in Metoro in about 30 seconds; allow up to one minute. A full reconcile additionally runs once every hour as a backstop.
  • Alerts managed via ConfigMaps cannot be edited through the UI to prevent conflicts.
  • Any changes made via the API would be overwritten during the next sync cycle.
  • If you delete a ConfigMap, the corresponding alert will not be deleted in Metoro. This is to prevent cluster outages deleting alerts etc. After removing the configmap you should subsequently delete the alert in the UI. Subsequent syncs will not recreate the alert.

Manual Synchronization

If a change hasn’t appeared yet, you can force a full sync:
  • Use the “Sync Alerts” button on the Alerts page in the Metoro UI
  • Call the endpoint GET "/api/v1/alerts/sync" with your auth token. For more information, please check the API documentation.
Alerts list page with Sync Alerts button highlighted in the header toolbar

Example ConfigMap

Please check the API documentation for the full alert definition format. Below is a simple example of a ConfigMap that defines an alert:
You have to provide an unique id for the alert to ensure that the alert can be referenced in the future.
For more examples, please check the Example Alerts section.

Threshold Units

By default the threshold is interpreted in the base unit of the queried metric (for example nanoseconds for trace durations, bytes for memory metrics). Optionally, an operator can declare the unit its threshold is expressed in with unit; Metoro converts the threshold into the metric’s own unit before evaluating it, and values reported on alert fires (notifications, the alert fire’s last value) are converted back into that unit:
Supported units: ns, us, ms, s, min, h, d (time) and By, kBy, MBy, GBy, TBy, KiBy, MiBy, GiBy, TiBy (bytes). If the unit is not compatible with the metric’s unit (for example ms against a bytes metric), the threshold is evaluated in the metric’s base unit and a warning log line is emitted to your account (environment metoro-internal, an alert_threshold_unit_mismatch event).
folderPath must point to a folder (end with /) under /alerts/. Metoro automatically provisions /alerts/ and /alerts/default/; create additional folders in the UI or API before pointing ConfigMap alerts to them.metadata.tags is optional. Tags are normalized during sync and remain read-only in the UI while the ConfigMap manages the alert. Omitting tags from a later update preserves the current set; set tags: [] to clear them.

Troubleshooting ConfigMap Alert Synchronization

If you don’t see your alerts being created or updated from ConfigMaps, the issue is most likely due to one of the following reasons:
  1. Ingestion Delay: Allow at least one full minute for your new ConfigMap definition to be ingested by Metoro. After this period, try to sync alerts manually either via the UI or the API.
  2. Missing or Incorrect Labels: Double-check that your ConfigMap has the necessary label metoro.io/alert: "true" as described in the ConfigMap Requirements section.
Invalid Alert Definition: If your alert is still not appearing, the most likely cause is an invalid alert definition format. In this case, Metoro will log an error in your account. You can find these error logs by filtering for:
  • Environment: metoro-internal
  • Service name: configmap-to-alert
These logs will contain the specific reason why your alert definition could not be processed.Logs view filtered by configmap-to-alert service showing alert sync validation error message