kennel 1.144.2 → 1.145.0
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 +5 -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: ed091ba0fa4fda310e5444a6e01fd21cf03f2b19dee5c7d4b0988a61855ca28e
|
|
4
|
+
data.tar.gz: 8a720d21972b01c5863722bf56834eccbcaf91ebcd949512142239afa364ec77
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e478b0fea488349ef09f1402f146d5d1383849f292b34fd9575378abdb547d1de00124f9063a0e4dab5f80749470013d22416198db912723cd23e2588ffdf2dc
|
|
7
|
+
data.tar.gz: f64c88e17f5b1e016c8e8503b9e098bdaf56167b5d9084c4245199bad52fd142253b9f672647597fb24c0dd4b798c1382f9b45eeaaf1cdc76c4cc04fdeb70956
|
|
@@ -60,7 +60,8 @@ module Kennel
|
|
|
60
60
|
variables: -> { MONITOR_OPTION_DEFAULTS.fetch(:variables) },
|
|
61
61
|
on_missing_data: -> { MONITOR_OPTION_DEFAULTS.fetch(:on_missing_data) },
|
|
62
62
|
notification_preset_name: -> { MONITOR_OPTION_DEFAULTS.fetch(:notification_preset_name) },
|
|
63
|
-
notify_by: -> { MONITOR_OPTION_DEFAULTS.fetch(:notify_by) }
|
|
63
|
+
notify_by: -> { MONITOR_OPTION_DEFAULTS.fetch(:notify_by) },
|
|
64
|
+
require_full_window: -> { false }
|
|
64
65
|
)
|
|
65
66
|
|
|
66
67
|
def build_json
|
|
@@ -205,7 +206,7 @@ module Kennel
|
|
|
205
206
|
# fields are not returned when set to true
|
|
206
207
|
if ["service check", "event alert"].include?(actual[:type])
|
|
207
208
|
options[:include_tags] = true unless options.key?(:include_tags)
|
|
208
|
-
options[:require_full_window] =
|
|
209
|
+
options[:require_full_window] = false unless options.key?(:require_full_window)
|
|
209
210
|
end
|
|
210
211
|
|
|
211
212
|
case actual[:type]
|
|
@@ -218,6 +219,7 @@ module Kennel
|
|
|
218
219
|
OPTIONAL_SERVICE_CHECK_THRESHOLDS.each do |t|
|
|
219
220
|
options[:thresholds][t] ||= 1
|
|
220
221
|
end
|
|
222
|
+
else # do nothing
|
|
221
223
|
end
|
|
222
224
|
|
|
223
225
|
# nil / "" / 0 are not returned from the api when set via the UI
|
|
@@ -233,12 +235,6 @@ module Kennel
|
|
|
233
235
|
|
|
234
236
|
private
|
|
235
237
|
|
|
236
|
-
def require_full_window
|
|
237
|
-
# default 'on_average', 'at_all_times', 'in_total' aggregations to true, otherwise false
|
|
238
|
-
# https://docs.datadoghq.com/ap/#create-a-monitor
|
|
239
|
-
type != "query alert" || query.start_with?("avg", "min", "sum")
|
|
240
|
-
end
|
|
241
|
-
|
|
242
238
|
def validate_json(data)
|
|
243
239
|
super
|
|
244
240
|
|
|
@@ -358,6 +354,7 @@ module Kennel
|
|
|
358
354
|
"Warning threshold (#{warning}) must be less than the alert threshold (#{critical}) with > comparison"
|
|
359
355
|
)
|
|
360
356
|
end
|
|
357
|
+
else # do nothing
|
|
361
358
|
end
|
|
362
359
|
end
|
|
363
360
|
end
|
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: 1.
|
|
4
|
+
version: 1.145.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Michael Grosser
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2023-
|
|
11
|
+
date: 2023-10-03 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: diff-lcs
|