Docs » Building Rules in a v2 Detector

Building Rules in a v2 Detector

If you are editing a detector that was created programmatically using the SignalFx v2 API, the process for creating and editing rules is different from the process for building rules for detectors created in the SignalFx application, as described in Building detector rules.

  • To add rules, edit the code in the SignalFlow tab.
  • To edit rules, you can either edit the SignalFlow code or make changes in the Alert Rules tab, as described below.
../_images/v2-rule.png

Rule name

Enter a brief description of the rule, such as “Disk almost full.” The rule name is displayed on the Alerts page and in notifications.

Alert condition

The alert condition is specified in the SignalFlow code.

Severity

Specify the importance of the alerts generated by this rule. SignalFx has 5 severity labels: Critical, Major, Minor, Warning and Info. Each severity label has a different color, and event markers appear on charts in the associated color.

You can create multiple rules to generate alerts with different severity levels for similar conditions, for example:

  • Critical alert for the alert condition Resource Running Out set to low trigger sensitivity
  • Major alert for the same condition set to medium sensitivity
  • Minor alert for same the condition set to high sensitivity

Another example might be:

  • Critical alert for the alert condition Heartbeat Check where the value for Hasn’t reported for is 60 minutes
  • Major alert for the same condition set at 30 minutes
  • Minor alert for same the condition set at 15 minutes

The easiest way to do this is to create a rule at one severity, select Clone from the rule’s Actions menu on the right side of the screen, then edit the settings and severity.

Notifications

Specify where notification messages should be sent when alerts are triggered or cleared. Recipients are considered subscribers to a rule.

For more information, see Alert recipients.