Skip to content

Commit

Permalink
Merge pull request rancher#199 from Bourne-ID/master
Browse files Browse the repository at this point in the history
Add Not Null (API states has-value) to Alerts/Metric
  • Loading branch information
rawmind0 authored Dec 4, 2019
2 parents fea6d6f + 77660e5 commit 4b844fe
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions rancher2/schema_alert_rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const (
metricRuleComparisonLessOrEqual = "less-or-equal"
metricRuleComparisonLessThan = "less-than"
metricRuleComparisonNotEqual = "not-equal"
metricRuleComparisonNotNull = "has-value"
nodeRuleConditionCPU = "cpu"
nodeRuleConditionMem = "mem"
nodeRuleConditionNotReady = "notready"
Expand Down Expand Up @@ -50,6 +51,7 @@ var (
metricRuleComparisonLessOrEqual,
metricRuleComparisonLessThan,
metricRuleComparisonNotEqual,
metricRuleComparisonNotNull,
}
nodeRuleConditions = []string{
nodeRuleConditionCPU,
Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/clusterAlertRule.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ The following attributes are exported:
* `duration` - (Required) Metric rule duration (string)
* `expression` - (Required) Metric rule expression (string)
* `threshold_value` - (Required) Metric rule threshold value (float64)
* `comparison` - (Optional) Metric rule comparison. Supported values : `"equal" | "greater-or-equal" | "greater-than" | "less-or-equal" | "less-than" | "not-equal"`. Default: `equal` (string)
* `comparison` - (Optional) Metric rule comparison. Supported values : `"equal" | "greater-or-equal" | "greater-than" | "less-or-equal" | "less-than" | "not-equal" | "has-value"`. Default: `equal` (string)
* `description` - (Optional) Metric rule description (string)

### `node_rule`
Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/projectAlertRule.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ The following attributes are exported:
* `duration` - (Required) Metric rule duration (string)
* `expression` - (Required) Metric rule expression (string)
* `threshold_value` - (Required) Metric rule threshold value (float64)
* `comparison` - (Optional) Metric rule comparison. Supported values : `"equal" | "greater-or-equal" | "greater-than" | "less-or-equal" | "less-than" | "not-equal"`. Default: `equal` (string)
* `comparison` - (Optional) Metric rule comparison. Supported values : `"equal" | "greater-or-equal" | "greater-than" | "less-or-equal" | "less-than" | "not-equal" | "has-value"`. Default: `equal` (string)
* `description` - (Optional) Metric rule description (string)

### `pod_rule`
Expand Down

0 comments on commit 4b844fe

Please sign in to comment.