Configure Threshold Alerts

Take advantage of FreshTracks machine learning to generate threshold alerts.

The threshold data in FreshTracks is generated from enhanced series metric data. A threshold alert can be generated when an enhanced metric value exceeds the high boundary or low boundary thresholds for any given metric as defined by the machine learning. You can apply FreshTracks machine learning to one of your existing application metrics

Step 1: Set the Metric Flag

Add the flag 'ft_target = true" to your application metric. The exact process varies based on your particular application. This flag is required so FreshTracks can generate the machine learning entrances and exits. After FreshTracks completes its analysis, you will have the threshold series data you need to configure threshold alerts.

Step 2: Create Rules for Alerts

  1. Create a Prometheus alert rules configuration file. For detailed instructions, see the Prometheus alerting rules documentation.
- name: example
  - alert: HighCPU
    expr: ft_exit{ft_workload="freshtracks-agent", ft_metric="ft_aggregation:ft_workload:cpu_utilization_cores", ft_model="high"}
    for: 10m
      severity: page
      summary:CPU Utilization
  1. Upload the configuration file using the FreshTracks Recording Rules API

Step 3: Configure how Alerts are Sent

  1. Verify that your configuration has some some alerting rules.
  2. Create a configuration file to define where alerts are sent. For detailed instructions, see the Prometheus configuration documentation.
- name: default-receiver
  - channel: "#testing"
    text: Some text for this alert
  - alertname
  group_interval: 5m
  group_wait: 10s
  receiver: default-receiver
  repeat_interval: 1h
  1. Upload the configuration file using the FreshTracks Alertmanager API