kennel 1.62.1 → 1.63.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: f5ad82b24cba6eef0e7733dac0b4c0f51e54fb728338112c8505ddf84284df23
4
- data.tar.gz: c6bf110be71f0296d352797ed7f8ac364dfa18e580a632ef1ad21e427da65111
3
+ metadata.gz: 7b8b30272574c9e7ad071340fefe2a6f020d2d00e499343cfa416322c1af91ea
4
+ data.tar.gz: b70c3cbfa377a9bbf023d3ada61c156519410c082702a8cd4693b95132198654
5
5
  SHA512:
6
- metadata.gz: 85b2929f6e429c64be88d96dbbfb76f057fa56d1dea6eb81668e728b214ff4cd91a6345899199f95034c75414444519d6d7f585174687866f99c20481e547172
7
- data.tar.gz: 55412cc487dffdf9de2e4f715fb3773690591753793fe2ea799677f853b3c42348e1fbc6ed13a8e7adc3d45d0fd3ac9141a825ef10d4a2066cdb58350e3632ff
6
+ metadata.gz: d9b8457368d955fc88a30608d746381d2bcbecac9997c6f9bbf650f4d7ec3487950b414a0876d7d72e3f349144ef221d1117942f9042e25e03fdc5f53e351ece
7
+ data.tar.gz: 57ce23d124ec7a8f2a6d2ff85e1adb9cd5725c19e80ba53130545924d265b6d8bedf89044f7c5e89ee49d0f060c365131b6ef7c912fe29b060dd39f6533f9eab
data/Readme.md CHANGED
@@ -2,11 +2,12 @@
2
2
 
3
3
  ![](template/github/cage.jpg?raw=true)
4
4
 
5
- Keep datadog monitors/dashboards/etc in version control, avoid chaotic management via UI.
5
+ Manage datadog monitors/dashboards/slos as code
6
6
 
7
- - Documented, reusable, automated, and searchable configuration
7
+ - Documented, reusable, and searchable
8
8
  - Changes are PR reviewed and auditable
9
- - Automated deletion when removed from code
9
+ - Updating shows diff before applying
10
+ - Automated import of existing monitors/dashboards/slos
10
11
 
11
12
  ![](template/github/screen.png?raw=true)
12
13
  <!-- NOT IN template/Readme.md -->
@@ -32,11 +32,12 @@ module Kennel
32
32
  private
33
33
 
34
34
  def load_data
35
- @data = begin
36
- Marshal.load(File.read(@file)) # rubocop:disable Security/MarshalLoad
37
- rescue StandardError
38
- {}
39
- end
35
+ @data =
36
+ begin
37
+ Marshal.load(File.read(@file)) # rubocop:disable Security/MarshalLoad
38
+ rescue StandardError
39
+ {}
40
+ end
40
41
  end
41
42
 
42
43
  def persist
@@ -21,7 +21,7 @@ module Kennel
21
21
  self.class.name
22
22
  end
23
23
 
24
- def to_json
24
+ def to_json # rubocop:disable Lint/ToJSON
25
25
  raise NotImplementedError, "Use as_json"
26
26
  end
27
27
  end
@@ -6,11 +6,12 @@ module Kennel
6
6
  DEFAULTS = {
7
7
  description: nil,
8
8
  query: nil,
9
+ groups: nil,
9
10
  monitor_ids: [],
10
11
  thresholds: []
11
12
  }.freeze
12
13
 
13
- settings :type, :description, :thresholds, :query, :tags, :monitor_ids, :monitor_tags, :name
14
+ settings :type, :description, :thresholds, :query, :tags, :monitor_ids, :monitor_tags, :name, :groups
14
15
 
15
16
  defaults(
16
17
  id: -> { nil },
@@ -18,7 +19,8 @@ module Kennel
18
19
  query: -> { DEFAULTS.fetch(:query) },
19
20
  description: -> { DEFAULTS.fetch(:description) },
20
21
  monitor_ids: -> { DEFAULTS.fetch(:monitor_ids) },
21
- thresholds: -> { DEFAULTS.fetch(:thresholds) }
22
+ thresholds: -> { DEFAULTS.fetch(:thresholds) },
23
+ groups: -> { DEFAULTS.fetch(:groups) }
22
24
  )
23
25
 
24
26
  def initialize(*)
@@ -39,8 +41,15 @@ module Kennel
39
41
  type: type
40
42
  }
41
43
 
42
- data[:query] = query if query
43
- data[:id] = id if id
44
+ if v = query
45
+ data[:query] = v
46
+ end
47
+ if v = id
48
+ data[:id] = v
49
+ end
50
+ if v = groups
51
+ data[:groups] = v
52
+ end
44
53
 
45
54
  @as_json = data
46
55
  end
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Kennel
3
- VERSION = "1.62.1"
3
+ VERSION = "1.63.0"
4
4
  end
@@ -2,11 +2,12 @@
2
2
 
3
3
  ![](github/cage.jpg?raw=true)
4
4
 
5
- Keep datadog monitors/dashboards/etc in version control, avoid chaotic management via UI.
5
+ Manage datadog monitors/dashboards/slos as code
6
6
 
7
- - Documented, reusable, automated, and searchable configuration
7
+ - Documented, reusable, and searchable
8
8
  - Changes are PR reviewed and auditable
9
- - Automated deletion when removed from code
9
+ - Updating shows diff before applying
10
+ - Automated import of existing monitors/dashboards/slos
10
11
 
11
12
  ![](github/screen.png?raw=true)
12
13
 
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.62.1
4
+ version: 1.63.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-01-22 00:00:00.000000000 Z
11
+ date: 2020-02-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday