kennel 1.57.1 → 1.57.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/dashboard.rb +1 -1
- data/lib/kennel/models/monitor.rb +5 -4
- data/lib/kennel/models/record.rb +5 -2
- data/lib/kennel/models/slo.rb +1 -2
- 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: edff257eab30fa336ef8a067c7d02a5c4cfdb919b2381cbb88593e7292f4bef7
|
|
4
|
+
data.tar.gz: d166cc4f9bba2c73edf292e5d2a6e1e4e190125a04b608594b0e78055755134c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b69c79b3ab7b34499bf4760d36ea54401b10e1bd0d68b37e4b39796b0a4fb48909a18fcbd724db619d95abf92f9585f094ec11c5d6c0332c3e4880c52654e977
|
|
7
|
+
data.tar.gz: ec9060115f34e789d1706e0165cd30fd5fb72c1451c6fa4b5df00b57fec18335ed81b960444a03424c5cf727fab6d32184357e0a442b93d86b2405b246f073e5
|
|
@@ -15,7 +15,7 @@ module Kennel
|
|
|
15
15
|
}.freeze
|
|
16
16
|
SUPPORTED_DEFINITION_OPTIONS = [:events, :markers, :precision].freeze
|
|
17
17
|
|
|
18
|
-
settings :
|
|
18
|
+
settings :title, :description, :definitions, :widgets, :layout_type
|
|
19
19
|
|
|
20
20
|
defaults(
|
|
21
21
|
description: -> { "" },
|
|
@@ -4,11 +4,12 @@ module Kennel
|
|
|
4
4
|
class Monitor < Record
|
|
5
5
|
include OptionalValidations
|
|
6
6
|
|
|
7
|
-
API_LIST_INCOMPLETE = false
|
|
8
7
|
RENOTIFY_INTERVALS = [0, 10, 20, 30, 40, 50, 60, 90, 120, 180, 240, 300, 360, 720, 1440].freeze # minutes
|
|
9
8
|
QUERY_INTERVALS = ["1m", "5m", "10m", "15m", "30m", "1h", "2h", "4h", "1d"].freeze
|
|
10
9
|
OPTIONAL_SERVICE_CHECK_THRESHOLDS = [:ok, :warning].freeze
|
|
11
|
-
READONLY_ATTRIBUTES = superclass::READONLY_ATTRIBUTES + [
|
|
10
|
+
READONLY_ATTRIBUTES = superclass::READONLY_ATTRIBUTES + [
|
|
11
|
+
:multi, :matching_downtimes, :overall_state_modified, :overall_state
|
|
12
|
+
]
|
|
12
13
|
|
|
13
14
|
# defaults that datadog uses when options are not sent, so safe to leave out if our values match their defaults
|
|
14
15
|
MONITOR_OPTION_DEFAULTS = {
|
|
@@ -21,8 +22,8 @@ module Kennel
|
|
|
21
22
|
DEFAULT_ESCALATION_MESSAGE = ["", nil].freeze
|
|
22
23
|
|
|
23
24
|
settings(
|
|
24
|
-
:query, :name, :message, :escalation_message, :critical, :
|
|
25
|
-
:ok, :
|
|
25
|
+
:query, :name, :message, :escalation_message, :critical, :type, :renotify_interval, :warning, :timeout_h, :evaluation_delay,
|
|
26
|
+
:ok, :no_data_timeframe, :notify_no_data, :notify_audit, :tags, :critical_recovery, :warning_recovery, :require_full_window,
|
|
26
27
|
:threshold_windows, :new_host_delay
|
|
27
28
|
)
|
|
28
29
|
|
data/lib/kennel/models/record.rb
CHANGED
|
@@ -4,18 +4,20 @@ module Kennel
|
|
|
4
4
|
class Record < Base
|
|
5
5
|
LOCK = "\u{1F512}"
|
|
6
6
|
READONLY_ATTRIBUTES = [
|
|
7
|
-
:deleted, :
|
|
8
|
-
:modified_at, :overall_state_modified, :overall_state, :api_resource
|
|
7
|
+
:deleted, :id, :created, :created_at, :creator, :org_id, :modified, :modified_at, :api_resource
|
|
9
8
|
].freeze
|
|
10
9
|
REQUEST_DEFAULTS = {
|
|
11
10
|
style: { width: "normal", palette: "dog_classic", type: "solid" },
|
|
12
11
|
conditional_formats: [],
|
|
13
12
|
aggregator: "avg"
|
|
14
13
|
}.freeze
|
|
14
|
+
API_LIST_INCOMPLETE = false
|
|
15
15
|
|
|
16
16
|
class ValidationError < RuntimeError
|
|
17
17
|
end
|
|
18
18
|
|
|
19
|
+
settings :id, :kennel_id
|
|
20
|
+
|
|
19
21
|
class << self
|
|
20
22
|
private
|
|
21
23
|
|
|
@@ -56,6 +58,7 @@ module Kennel
|
|
|
56
58
|
attr_reader :project
|
|
57
59
|
|
|
58
60
|
def initialize(project, *args)
|
|
61
|
+
raise ArgumentError, "First argument must be a project, not #{project.class}" unless project.is_a?(Project)
|
|
59
62
|
@project = project
|
|
60
63
|
super(*args)
|
|
61
64
|
end
|
data/lib/kennel/models/slo.rb
CHANGED
|
@@ -3,14 +3,13 @@ module Kennel
|
|
|
3
3
|
module Models
|
|
4
4
|
class Slo < Record
|
|
5
5
|
READONLY_ATTRIBUTES = superclass::READONLY_ATTRIBUTES + [:type_id, :monitor_tags]
|
|
6
|
-
API_LIST_INCOMPLETE = false
|
|
7
6
|
DEFAULTS = {
|
|
8
7
|
description: nil,
|
|
9
8
|
query: nil,
|
|
10
9
|
monitor_ids: []
|
|
11
10
|
}.freeze
|
|
12
11
|
|
|
13
|
-
settings :
|
|
12
|
+
settings :type, :description, :thresholds, :query, :tags, :monitor_ids, :monitor_tags, :name
|
|
14
13
|
|
|
15
14
|
defaults(
|
|
16
15
|
id: -> { nil },
|
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.57.
|
|
4
|
+
version: 1.57.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: 2019-11-
|
|
11
|
+
date: 2019-11-14 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|