cfn-guardian 0.7.13 → 0.7.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/push.yml +36 -0
- data/Dockerfile +3 -1
- data/docs/notifiers.md +2 -2
- data/lib/cfnguardian/models/alarm.rb +5 -1
- data/lib/cfnguardian/models/check.rb +2 -2
- data/lib/cfnguardian/models/event_subscription.rb +1 -0
- data/lib/cfnguardian/resources/jenkins.rb +5 -4
- data/lib/cfnguardian/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 698af7ce8ae6207dbecaba853e316c45b49f4097feb4b02109a4d4cf6e4e2e50
|
4
|
+
data.tar.gz: 37930ff02c6aac6e68bb84dc5d704523d67e2f0ec606bf4bc279f9dee987f59f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8dd7078ef3ecbf66c1a8120d029840afa9857c1478d7ce8c2bca341731af4bd7afce412add69008ec7137477b59c3f789a30cf79cfab31f5a2a2ef6810eff9e0
|
7
|
+
data.tar.gz: 23587e30e8b0fea611a60869c9b59b4acc984cb9869a5a3b16dc6d5c62a862ecf3b9adca5b5a0f45cb6868434dcfddeb1320330bbd4587647d77c21725531037
|
@@ -0,0 +1,36 @@
|
|
1
|
+
name: build image
|
2
|
+
on:
|
3
|
+
push:
|
4
|
+
branches:
|
5
|
+
- master
|
6
|
+
- feature/*
|
7
|
+
|
8
|
+
jobs:
|
9
|
+
build:
|
10
|
+
name: Build + Publish Container Image
|
11
|
+
runs-on: ubuntu-latest
|
12
|
+
|
13
|
+
steps:
|
14
|
+
- name: Check out the repo
|
15
|
+
uses: actions/checkout@v2
|
16
|
+
|
17
|
+
- name: Inject slug/short variables
|
18
|
+
uses: rlespinasse/github-slug-action@v3.x
|
19
|
+
|
20
|
+
- name: Set up Docker Buildx
|
21
|
+
uses: docker/setup-buildx-action@v1
|
22
|
+
|
23
|
+
- name: Login to GitHub Container Repository
|
24
|
+
uses: docker/login-action@v1
|
25
|
+
with:
|
26
|
+
registry: ghcr.io
|
27
|
+
username: ${{ github.repository_owner }}
|
28
|
+
password: ${{ secrets.GHCR_PUSH_TOKEN }}
|
29
|
+
|
30
|
+
- name: Build and push Container Image to GitHub Container Repository
|
31
|
+
uses: docker/build-push-action@v2
|
32
|
+
with:
|
33
|
+
context: .
|
34
|
+
file: ./Dockerfile
|
35
|
+
push: true
|
36
|
+
tags: ghcr.io/base2services/guardian:snapshot_${{env.GITHUB_REF_SLUG}}
|
data/Dockerfile
CHANGED
data/docs/notifiers.md
CHANGED
@@ -24,10 +24,10 @@ Topics:
|
|
24
24
|
Informational: arn:aws:sns:ap-southeast-2:123456789012:Informational
|
25
25
|
Custom: arn:aws:sns:ap-southeast-2:123456789012:Custom
|
26
26
|
|
27
|
-
|
27
|
+
Templates:
|
28
28
|
Ec2Instance:
|
29
29
|
GroupOverrides:
|
30
|
-
|
30
|
+
AlarmAction:
|
31
31
|
- Critical
|
32
32
|
- Custom
|
33
33
|
```
|
@@ -529,7 +529,11 @@ module CfnGuardian
|
|
529
529
|
super(resource)
|
530
530
|
@group = 'Jenkins'
|
531
531
|
@namespace = 'Ciinabox/Jenkins'
|
532
|
-
@dimensions = {
|
532
|
+
@dimensions = {
|
533
|
+
Jenkins: resource['Id'],
|
534
|
+
Label: resource['Label'],
|
535
|
+
Monitoring: 'JenkMon'
|
536
|
+
}
|
533
537
|
end
|
534
538
|
end
|
535
539
|
|
@@ -64,7 +64,7 @@ module CfnGuardian
|
|
64
64
|
@package = 'port-check'
|
65
65
|
@handler = 'handler.port_check'
|
66
66
|
@version = '356203b2a720ba0730622f978e677b88f8d0c328'
|
67
|
-
@runtime = 'python3.
|
67
|
+
@runtime = 'python3.7'
|
68
68
|
end
|
69
69
|
end
|
70
70
|
|
@@ -152,7 +152,7 @@ module CfnGuardian
|
|
152
152
|
@package = 'ecs-containder-instance-check'
|
153
153
|
@handler = 'handler.run_check'
|
154
154
|
@version = '4f650d5846d6e8d19f0139bccdeeb147f03f0dd6'
|
155
|
-
@runtime = 'python3.
|
155
|
+
@runtime = 'python3.7'
|
156
156
|
end
|
157
157
|
end
|
158
158
|
|
@@ -1,14 +1,15 @@
|
|
1
1
|
module CfnGuardian::Resource
|
2
2
|
class Jenkins < Base
|
3
|
-
|
4
3
|
def default_alarms
|
4
|
+
# evaluate this alarm every hour but only alert if there is no data point after 25 hours
|
5
5
|
alarm = CfnGuardian::Models::JenkinsAlarm.new(@resource)
|
6
|
-
alarm.name = '
|
7
|
-
alarm.metric_name = '
|
6
|
+
alarm.name = 'HealthyAgent'
|
7
|
+
alarm.metric_name = 'HealthyAgent'
|
8
8
|
alarm.statistic = 'Maximum'
|
9
9
|
alarm.treat_missing_data = 'breaching'
|
10
10
|
alarm.alarm_action = 'Warning'
|
11
|
-
alarm.period = 3600
|
11
|
+
alarm.period = 3600 # 1 hour
|
12
|
+
alarm.evaluation_periods = 24 # 24 hours
|
12
13
|
alarm.comparison_operator = 'LessThanThreshold'
|
13
14
|
alarm.threshold = 1
|
14
15
|
@alarms.push(alarm)
|
data/lib/cfnguardian/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cfn-guardian
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Guslington
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-05-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -222,6 +222,7 @@ extra_rdoc_files: []
|
|
222
222
|
files:
|
223
223
|
- ".dockerignore"
|
224
224
|
- ".github/workflows/build-gem.yml"
|
225
|
+
- ".github/workflows/push.yml"
|
225
226
|
- ".github/workflows/release-gem.yml"
|
226
227
|
- ".github/workflows/release-image.yml"
|
227
228
|
- ".gitignore"
|