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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6d1cc43aa92bfd88e9cc7c7f33f1c91aaafc0c5a936e2c8dc0d153c20f7bfc85
4
- data.tar.gz: e1f75c40c4c9a9d38438a2563241193172bc56e020f6ff3b3295dc8485ae415d
3
+ metadata.gz: ed091ba0fa4fda310e5444a6e01fd21cf03f2b19dee5c7d4b0988a61855ca28e
4
+ data.tar.gz: 8a720d21972b01c5863722bf56834eccbcaf91ebcd949512142239afa364ec77
5
5
  SHA512:
6
- metadata.gz: 1715277a99ad67ec234522351420712d3c69b617f8ca8cb05118a5d5207ff236177d08183c1315284f4219afd269051745fe6231c771bda943194b0ea2ce6724
7
- data.tar.gz: cbf498bd57f5668806fab7142048e8e4864ebc745f094189ecc9993bd75a288dc994bac582bbc00ce2eaa704a36916066247ce9fd460d4e861733dc5df7b5843
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] = true unless options.key?(: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
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Kennel
3
- VERSION = "1.144.2"
3
+ VERSION = "1.145.0"
4
4
  end
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.144.2
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-09-28 00:00:00.000000000 Z
11
+ date: 2023-10-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: diff-lcs