kennel 1.78.4 → 1.79.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: 23d5816783075cabd0b6a51addfe89bd0d21f4935a547fd1bfbd0c754d6f3b18
4
- data.tar.gz: 73df009d112f1af7d1500428e700ac6cdea3d99cbb36a12dd3ceef926b2f5fd4
3
+ metadata.gz: e2a8b643d03deb142461d127a97ae6ad45144cffffb3bae2925cc60cf6a1d683
4
+ data.tar.gz: 1baaa314a376a99317163a871e5ec6df10dcd33a2cdd3cbc36d2bed9283fe288
5
5
  SHA512:
6
- metadata.gz: 04a237a134852bd15c4ce7eb6a309c0f8526c656f646269ccfeaf8f148013ea6c8328bcfbaffaee53c228af1e6b79c021ff9cade7afacb8a301f4e418302dbd0
7
- data.tar.gz: 3e51d0361af539cd3aca894f51d8e28cf5ef613722c1f3a7f7b5f3f88fb74e43ab535034144d246cc0f079d5d06e9e62f488bb76257390cae4a7f0f14636984e
6
+ metadata.gz: e4a2266131f58c1d833172e95e3b87b80b49f120675b27baf5e70bd0c5cf191a1dafeb0374b407ff983b5d5e793479d79fdfd548921f161e2644df1dbb86abb8
7
+ data.tar.gz: d791193329518eb1c277a24543abe1c3d4b62621af0046bd58a3347cdab3faa74da06dcc639dcd8c4d12ac0c76536652d91ada35db63b3d2fb71c7d618afa6b8
data/Readme.md CHANGED
@@ -296,5 +296,5 @@ Author
296
296
  [Michael Grosser](http://grosser.it)<br/>
297
297
  michael@grosser.it<br/>
298
298
  License: MIT<br/>
299
- [![Build Status](https://travis-ci.org/grosser/kennel.png)](https://travis-ci.org/grosser/kennel)
299
+ ![CI](https://github.com/grosser/kennel/workflows/CI/badge.svg)
300
300
  <!-- NOT IN -->
@@ -12,6 +12,10 @@ module Kennel
12
12
  :multi, :matching_downtimes, :overall_state_modified, :overall_state, :restricted_roles
13
13
  ]
14
14
 
15
+ MONITOR_DEFAULTS = {
16
+ priority: nil
17
+ }.freeze
18
+
15
19
  # defaults that datadog uses when options are not sent, so safe to leave out if our values match their defaults
16
20
  MONITOR_OPTION_DEFAULTS = {
17
21
  evaluation_delay: nil,
@@ -27,7 +31,7 @@ module Kennel
27
31
  settings(
28
32
  :query, :name, :message, :escalation_message, :critical, :type, :renotify_interval, :warning, :timeout_h, :evaluation_delay,
29
33
  :ok, :no_data_timeframe, :notify_no_data, :notify_audit, :tags, :critical_recovery, :warning_recovery, :require_full_window,
30
- :threshold_windows, :new_host_delay
34
+ :threshold_windows, :new_host_delay, :priority
31
35
  )
32
36
 
33
37
  defaults(
@@ -46,7 +50,8 @@ module Kennel
46
50
  evaluation_delay: -> { MONITOR_OPTION_DEFAULTS.fetch(:evaluation_delay) },
47
51
  critical_recovery: -> { nil },
48
52
  warning_recovery: -> { nil },
49
- threshold_windows: -> { nil }
53
+ threshold_windows: -> { nil },
54
+ priority: -> { MONITOR_DEFAULTS.fetch(:priority) }
50
55
  )
51
56
 
52
57
  def as_json
@@ -57,6 +62,7 @@ module Kennel
57
62
  query: query.strip,
58
63
  message: message.strip,
59
64
  tags: tags.uniq,
65
+ priority: priority,
60
66
  options: {
61
67
  timeout_h: timeout_h,
62
68
  notify_no_data: notify_no_data,
@@ -129,6 +135,9 @@ module Kennel
129
135
 
130
136
  def self.normalize(expected, actual)
131
137
  super
138
+
139
+ ignore_default(expected, actual, MONITOR_DEFAULTS)
140
+
132
141
  options = actual.fetch(:options)
133
142
  options.delete(:silenced) # we do not manage silenced, so ignore it when diffing
134
143
 
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Kennel
3
- VERSION = "1.78.4"
3
+ VERSION = "1.79.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.78.4
4
+ version: 1.79.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: 2020-12-17 00:00:00.000000000 Z
11
+ date: 2020-12-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday