sensu-plugins-fetch-letsencrypt 1.0.0 → 1.0.1
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
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a8b6740d363e393076fa616cfb08b710a4b8083c
|
|
4
|
+
data.tar.gz: 020cb93ced1b775fe263c76da4726f2f740f8ac1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 74f88a688446abb12a1b45740950fbc06f7465c0c6570af3afdbe8563016cabc189aac2724df313affb0327518e95e818cf643172bfddfd5d5bae04378d89e56
|
|
7
|
+
data.tar.gz: 2efd62d6d004ebaf7df3024397821d1cd76dc81cf6ec7b47164faf3269e0788cc93805dac769e2138d444e793889ba36ee77f9188fd0787ee14db6f4c845691f
|
|
@@ -37,7 +37,7 @@ class FetchLetsencryptCronjobChecker < Sensu::Plugin::Check::CLI
|
|
|
37
37
|
|
|
38
38
|
def run
|
|
39
39
|
if File.file?(config[:fetch_letsencrypt_cronjob])
|
|
40
|
-
|
|
40
|
+
unless File.open(config[:fetch_letsencrypt_cronjob]).grep(/^#.*fetch-letsencrypt.sh$/).empty?
|
|
41
41
|
age = Time.now.to_i - File.mtime(config[:fetch_letsencrypt_cronjob]).to_i
|
|
42
42
|
if age > 1800 && age <= 86_400
|
|
43
43
|
warning "fetch-letsencrypt cronjob #{config[:fetch_letsencrypt_cronjob]} exists but is inactive for more than thirty minuntes (#{age}s)!"
|
|
@@ -47,7 +47,11 @@ class FetchLetsencryptCronjobChecker < Sensu::Plugin::Check::CLI
|
|
|
47
47
|
ok "fetch-letsencrypt cronjob exists but is temporarily inactive (#{age}s)."
|
|
48
48
|
end
|
|
49
49
|
else
|
|
50
|
-
|
|
50
|
+
if File.open(config[:fetch_letsencrypt_cronjob]).grep(/^.*fetch-letsencrypt.sh$/).empty?
|
|
51
|
+
critical "fetch-letsencrypt cronjob #{config[:fetch_letsencrypt_cronjob]} exists but has no call on fetch-letsencrypt.sh"
|
|
52
|
+
else
|
|
53
|
+
ok "fetch-letsencrypt cronjob #{config[:fetch_letsencrypt_cronjob]} exists and is active."
|
|
54
|
+
end
|
|
51
55
|
end
|
|
52
56
|
else
|
|
53
57
|
critical "fetch-letsencrypt cronjob #{config[:fetch_letsencrypt_cronjob]} NOT found!"
|