Skip to content

Commit 15d4a99

Browse files
committed
chore: Add valueFunction to alert policies
1 parent b9e11c7 commit 15d4a99

7 files changed

+28
-7
lines changed

alert-policies/hardware-sentry/battery-charge.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ type: STATIC
77
nrql:
88
query: "FROM Metric SELECT latest(hw.battery.charge) FACET site, host.name"
99

10+
# Function used to aggregate the NRQL query value(s) for comparison to the terms.threshold (Default: SINGLE_VALUE)
11+
valueFunction: SINGLE_VALUE
12+
1013
# List of Critical and Warning thresholds for the condition
1114
terms:
1215
- priority: CRITICAL
@@ -26,4 +29,4 @@ terms:
2629
# Time in seconds; 120 - 3600
2730
thresholdDuration: 300
2831
# How many data points must be in violation for the duration
29-
thresholdOccurrences: ALL
32+
thresholdOccurrences: ALL

alert-policies/hardware-sentry/connector-status.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ type: STATIC
66
nrql:
77
query: "FROM Metric SELECT latest(hardware_sentry.connector.status) WHERE state = 'degraded' FACET site, host.name"
88

9+
# Function used to aggregate the NRQL query value(s) for comparison to the terms.threshold (Default: SINGLE_VALUE)
10+
valueFunction: SINGLE_VALUE
11+
912
# List of Critical and Warning thresholds for the condition
1013
terms:
1114
- priority: CRITICAL
@@ -16,4 +19,4 @@ terms:
1619
# Time in seconds; 120 - 3600
1720
thresholdDuration: 300
1821
# How many data points must be in violation for the duration
19-
thresholdOccurrences: ALL
22+
thresholdOccurrences: ALL

alert-policies/hardware-sentry/device-status(crit).yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ type: STATIC
77
nrql:
88
query: "FROM Metric SELECT latest(hw.status) WHERE state IN ('failed') OR battery.state = 'failed' FACET site, host.name"
99

10+
# Function used to aggregate the NRQL query value(s) for comparison to the terms.threshold (Default: SINGLE_VALUE)
11+
valueFunction: SINGLE_VALUE
12+
1013
# List of Critical and Warning thresholds for the condition
1114
terms:
1215
- priority: CRITICAL
@@ -17,4 +20,4 @@ terms:
1720
# Time in seconds; 120 - 3600
1821
thresholdDuration: 300
1922
# How many data points must be in violation for the duration
20-
thresholdOccurrences: ALL
23+
thresholdOccurrences: ALL

alert-policies/hardware-sentry/device-status(warn).yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ type: STATIC
77
nrql:
88
query: "FROM Metric SELECT latest(hw.battery.charge) FACET site, host.name"
99

10+
# Function used to aggregate the NRQL query value(s) for comparison to the terms.threshold (Default: SINGLE_VALUE)
11+
valueFunction: SINGLE_VALUE
12+
1013
# List of Critical and Warning thresholds for the condition
1114
terms:
1215
- priority: WARNING
@@ -17,4 +20,4 @@ terms:
1720
# Time in seconds; 120 - 3600
1821
thresholdDuration: 300
1922
# How many data points must be in violation for the duration
20-
thresholdOccurrences: ALL
23+
thresholdOccurrences: ALL

alert-policies/hardware-sentry/host-nonresponsive.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ type: STATIC
66
nrql:
77
query: "SELECT latest(hardware_sentry.host.up) FROM Metric FACET host.id"
88

9+
# Function used to aggregate the NRQL query value(s) for comparison to the terms.threshold (Default: SINGLE_VALUE)
10+
valueFunction: SINGLE_VALUE
11+
912
# List of Critical and Warning thresholds for the condition
1013
terms:
1114
- priority: CRITICAL
@@ -16,4 +19,4 @@ terms:
1619
# Time in seconds; 120 - 3600
1720
thresholdDuration: 300
1821
# How many data points must be in violation for the duration
19-
thresholdOccurrences: ALL
22+
thresholdOccurrences: ALL

alert-policies/hardware-sentry/missing-devices.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ type: STATIC
66
nrql:
77
query: "SELECT latest(hw.status) FROM Metric WHERE state = 'present' FACET host.name"
88

9+
# Function used to aggregate the NRQL query value(s) for comparison to the terms.threshold (Default: SINGLE_VALUE)
10+
valueFunction: SINGLE_VALUE
11+
912
# List of Critical and Warning thresholds for the condition
1013
terms:
1114
- priority: CRITICAL
@@ -16,4 +19,4 @@ terms:
1619
# Time in seconds; 120 - 3600
1720
thresholdDuration: 300
1821
# How many data points must be in violation for the duration
19-
thresholdOccurrences: ALL
22+
thresholdOccurrences: ALL

alert-policies/hardware-sentry/physical-disk-cap.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ type: STATIC
66
nrql:
77
query: "SELECT latest(hw.physical_disk.endurance_utilization) FROM Metric FACET host.id"
88

9+
# Function used to aggregate the NRQL query value(s) for comparison to the terms.threshold (Default: SINGLE_VALUE)
10+
valueFunction: SINGLE_VALUE
11+
912
# List of Critical and Warning thresholds for the condition
1013
terms:
1114
- priority: CRITICAL
@@ -25,4 +28,4 @@ terms:
2528
# Time in seconds; 120 - 3600
2629
thresholdDuration: 300
2730
# How many data points must be in violation for the duration
28-
thresholdOccurrences: ALL
31+
thresholdOccurrences: ALL

0 commit comments

Comments
 (0)