kennel 1.53.1 → 1.54.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/Readme.md +6 -9
- data/lib/kennel/models/monitor.rb +1 -1
- data/lib/kennel/models/project.rb +2 -2
- data/lib/kennel/models/team.rb +1 -10
- data/lib/kennel/version.rb +1 -1
- data/template/Readme.md +6 -9
- 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: ff469d7ae1bcb0d5dc6fb5d867c9dad761b5f2d07159ea147d99620544ec2580
|
|
4
|
+
data.tar.gz: e3322d92c13faee31f51ef53042cc0c768a0c85cfa0644d4fb2dafcf67f3e03a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 18d054b93d83f78b98dabdd584fcec0a99759f32734c2808c32bb64d51042e3087ca36722c88aa61c24707999f7dbefc1aebdd16ce996c964ba3ca2595bec7df
|
|
7
|
+
data.tar.gz: d1876da783f71a72287ede64c20c9865622f409ec0857a483161cb1f2914c0e40c3a232165697bee8984ea515d34abfc0beb8eede8b42164d0b324c7805e1468
|
data/Readme.md
CHANGED
|
@@ -49,13 +49,16 @@ Keep datadog monitors/dashboards/etc in version control, avoid chaotic managemen
|
|
|
49
49
|
|
|
50
50
|
### Adding a team
|
|
51
51
|
|
|
52
|
+
- `mention` is used for all team monitors via `super()`
|
|
53
|
+
- `renotify_interval` is used for all team monitors (defaults to `0` / off)
|
|
54
|
+
- `tags` is used for all team monitors/dashboards (defaults to `team:<team-name>`)
|
|
55
|
+
|
|
52
56
|
```Ruby
|
|
53
57
|
# teams/my_team.rb
|
|
54
58
|
module Teams
|
|
55
59
|
class MyTeam < Kennel::Models::Team
|
|
56
60
|
defaults(
|
|
57
|
-
|
|
58
|
-
email: -> { "my-team@example.com" } # optional
|
|
61
|
+
mention: -> { "@slack-my-team" }
|
|
59
62
|
)
|
|
60
63
|
end
|
|
61
64
|
end
|
|
@@ -158,12 +161,6 @@ end
|
|
|
158
161
|
Some validations might be too strict for your usecase or just wrong, please [open an issue](https://github.com/grosser/kennel/issues) and
|
|
159
162
|
to unblock use the `validate: -> { false }` option.
|
|
160
163
|
|
|
161
|
-
### Monitor re-notification
|
|
162
|
-
|
|
163
|
-
Monitors inherit the re-notification setting from their `project.team`.
|
|
164
|
-
Set this to for example `renotify_interval: -> { 120 }` minutes,
|
|
165
|
-
to make alerts not get ignored by popping back up if they are still alerting.
|
|
166
|
-
|
|
167
164
|
### Linking with kennel_ids
|
|
168
165
|
|
|
169
166
|
To link to existing monitors via their kennel_id
|
|
@@ -206,7 +203,7 @@ Reuse it in multiple projects.
|
|
|
206
203
|
```Ruby
|
|
207
204
|
class Database < Kennel::Models::Project
|
|
208
205
|
defaults(
|
|
209
|
-
team: -> { Kennel::Models::Team.new(
|
|
206
|
+
team: -> { Kennel::Models::Team.new(mention: -> { '@slack-foo' }, kennel_id: -> { 'foo' }) },
|
|
210
207
|
parts: -> { [Monitors::LoadTooHigh.new(self, critical: -> { 13 })] }
|
|
211
208
|
)
|
|
212
209
|
end
|
|
@@ -27,7 +27,7 @@ module Kennel
|
|
|
27
27
|
)
|
|
28
28
|
|
|
29
29
|
defaults(
|
|
30
|
-
message: -> { "\n\n
|
|
30
|
+
message: -> { "\n\n#{project.mention}" },
|
|
31
31
|
escalation_message: -> { DEFAULT_ESCALATION_MESSAGE.first },
|
|
32
32
|
renotify_interval: -> { project.team.renotify_interval },
|
|
33
33
|
warning: -> { nil },
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
module Kennel
|
|
3
3
|
module Models
|
|
4
4
|
class Project < Base
|
|
5
|
-
settings :team, :parts, :tags, :
|
|
5
|
+
settings :team, :parts, :tags, :mention
|
|
6
6
|
defaults(
|
|
7
7
|
tags: -> { ["service:#{kennel_id}"] + team.tags },
|
|
8
|
-
|
|
8
|
+
mention: -> { team.mention }
|
|
9
9
|
)
|
|
10
10
|
|
|
11
11
|
def self.file_location
|
data/lib/kennel/models/team.rb
CHANGED
|
@@ -2,20 +2,11 @@
|
|
|
2
2
|
module Kennel
|
|
3
3
|
module Models
|
|
4
4
|
class Team < Base
|
|
5
|
-
settings :
|
|
5
|
+
settings :mention, :tags, :renotify_interval, :kennel_id
|
|
6
6
|
defaults(
|
|
7
7
|
tags: -> { ["team:#{kennel_id.sub(/^teams_/, "")}"] },
|
|
8
8
|
renotify_interval: -> { 0 }
|
|
9
9
|
)
|
|
10
|
-
|
|
11
|
-
def initialize(*)
|
|
12
|
-
super
|
|
13
|
-
invalid! "remove leading # from slack" if slack.to_s.start_with?("#")
|
|
14
|
-
end
|
|
15
|
-
|
|
16
|
-
def tracking_id
|
|
17
|
-
kennel_id
|
|
18
|
-
end
|
|
19
10
|
end
|
|
20
11
|
end
|
|
21
12
|
end
|
data/lib/kennel/version.rb
CHANGED
data/template/Readme.md
CHANGED
|
@@ -31,13 +31,16 @@ Keep datadog monitors/dashboards/etc in version control, avoid chaotic managemen
|
|
|
31
31
|
|
|
32
32
|
### Adding a team
|
|
33
33
|
|
|
34
|
+
- `mention` is used for all team monitors via `super()`
|
|
35
|
+
- `renotify_interval` is used for all team monitors (defaults to `0` / off)
|
|
36
|
+
- `tags` is used for all team monitors/dashboards (defaults to `team:<team-name>`)
|
|
37
|
+
|
|
34
38
|
```Ruby
|
|
35
39
|
# teams/my_team.rb
|
|
36
40
|
module Teams
|
|
37
41
|
class MyTeam < Kennel::Models::Team
|
|
38
42
|
defaults(
|
|
39
|
-
|
|
40
|
-
email: -> { "my-team@example.com" } # optional
|
|
43
|
+
mention: -> { "@slack-my-team" }
|
|
41
44
|
)
|
|
42
45
|
end
|
|
43
46
|
end
|
|
@@ -140,12 +143,6 @@ end
|
|
|
140
143
|
Some validations might be too strict for your usecase or just wrong, please [open an issue](https://github.com/grosser/kennel/issues) and
|
|
141
144
|
to unblock use the `validate: -> { false }` option.
|
|
142
145
|
|
|
143
|
-
### Monitor re-notification
|
|
144
|
-
|
|
145
|
-
Monitors inherit the re-notification setting from their `project.team`.
|
|
146
|
-
Set this to for example `renotify_interval: -> { 120 }` minutes,
|
|
147
|
-
to make alerts not get ignored by popping back up if they are still alerting.
|
|
148
|
-
|
|
149
146
|
### Linking with kennel_ids
|
|
150
147
|
|
|
151
148
|
To link to existing monitors via their kennel_id
|
|
@@ -188,7 +185,7 @@ Reuse it in multiple projects.
|
|
|
188
185
|
```Ruby
|
|
189
186
|
class Database < Kennel::Models::Project
|
|
190
187
|
defaults(
|
|
191
|
-
team: -> { Kennel::Models::Team.new(
|
|
188
|
+
team: -> { Kennel::Models::Team.new(mention: -> { '@slack-foo' }, kennel_id: -> { 'foo' }) },
|
|
192
189
|
parts: -> { [Monitors::LoadTooHigh.new(self, critical: -> { 13 })] }
|
|
193
190
|
)
|
|
194
191
|
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.
|
|
4
|
+
version: 1.54.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: 2019-09-
|
|
11
|
+
date: 2019-09-13 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|