Alerting: Add threshold expression (#55102)

This commit is contained in:
Gilles De Mey
2022-09-26 16:05:44 +02:00
committed by GitHub
parent f7a3e50b23
commit 9aa61ddd0e
8 changed files with 515 additions and 1 deletions

View File

@ -289,6 +289,8 @@ const (
TypeResample
// TypeClassicConditions is the CMDType for the classic condition operation.
TypeClassicConditions
// TypeThreshold is the CMDType for checking if a threshold has been crossed
TypeThreshold
)
func (gt CommandType) String() string {
@ -317,6 +319,8 @@ func ParseCommandType(s string) (CommandType, error) {
return TypeResample, nil
case "classic_conditions":
return TypeClassicConditions, nil
case "threshold":
return TypeThreshold, nil
default:
return TypeUnknown, fmt.Errorf("'%v' is not a recognized expression type", s)
}