kennel 2.12.1 → 2.12.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/kennel/models/monitor.rb +14 -8
- data/lib/kennel/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e5fd8e04a85ff166271cdf705344e6d0a55f8bc313ef761260673061ec475da3
|
|
4
|
+
data.tar.gz: a9c6b0f6f8adcf33bd3cd9cd02e1d437332bcd79d2705134aea43139b0ea179b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: df94a5253b481df52ae71ab3c8cff4d6e8f2608d310d86de481090ef5397f99593aeadc99a73e262d227de0ab67ec0f3d6dff74db5f485ceefd67d7d20bf1706
|
|
7
|
+
data.tar.gz: 6f5f299ecf2381df854102ee2b501b8521746b68055414ec898e5b0cb3aefbc256b9ba1f47af44c5364f8e4e5c3eb462333459b9d52dcf5f5c062a541afa06f0
|
|
@@ -33,6 +33,7 @@ module Kennel
|
|
|
33
33
|
DEFAULT_ESCALATION_MESSAGE = ["", nil].freeze
|
|
34
34
|
ALLOWED_PRIORITY_CLASSES = [NilClass, Integer].freeze
|
|
35
35
|
SKIP_NOTIFY_NO_DATA_TYPES = ["event alert", "event-v2 alert", "log alert"].freeze
|
|
36
|
+
ON_MISSING_DATA_UNSUPPORTED_TYPES = ["composite", "datadog-usage alert"].freeze
|
|
36
37
|
MINUTES_PER_UNIT = {
|
|
37
38
|
"m" => 1,
|
|
38
39
|
"h" => 60,
|
|
@@ -155,14 +156,19 @@ module Kennel
|
|
|
155
156
|
action ||= "default" if type == "event-v2 alert"
|
|
156
157
|
|
|
157
158
|
# TODO: mark setting action && !notify.nil? at all as invalid
|
|
158
|
-
if action
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
159
|
+
if action
|
|
160
|
+
if ON_MISSING_DATA_UNSUPPORTED_TYPES.include?(type)
|
|
161
|
+
invalid! :invalid_no_data_config, "cannot use on_missing_data with #{type} monitor"
|
|
162
|
+
end
|
|
163
|
+
if timeframe
|
|
164
|
+
invalid! :invalid_no_data_config, "set either no_data_timeframe or on_missing_data"
|
|
165
|
+
end
|
|
166
|
+
if action != "default" && type == "query alert" && query.to_s.include?("default_zero(") # is allowed for log alert for example
|
|
167
|
+
invalid! :invalid_no_data_config, "set on_missing_data to `default` when using default_zero"
|
|
168
|
+
end
|
|
169
|
+
if action == "resolve" && timeout_h.to_i != 0
|
|
170
|
+
invalid! :invalid_no_data_config, "timeout_h cannot be set and non-zero when on_missing_data is `resolve`"
|
|
171
|
+
end
|
|
166
172
|
end
|
|
167
173
|
|
|
168
174
|
# on_missing_data cannot be used with notify_no_data + no_data_timeframe
|
data/lib/kennel/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: kennel
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.12.
|
|
4
|
+
version: 2.12.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Michael Grosser
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-01-
|
|
11
|
+
date: 2026-01-13 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: diff-lcs
|