heartcheck 1.3.0 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ebert.yml +3 -0
- data/CHANGELOG +5 -0
- data/README.md +1 -0
- data/lib/heartcheck/checks/base.rb +12 -1
- data/lib/heartcheck/generators/templates/config.rb +3 -0
- data/lib/heartcheck/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 45a358d7f3a8864deb797ecb5639d0e4df274c66
|
4
|
+
data.tar.gz: 530d7ecd987f302e38b41395abe67bc9a4ffced3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 55db326b56112e68f33b488d27bab4dd1d0442aae29f88a2c8f3dfe28e96fdfaadd0dd9e4b01dbaf9f915495cf7fcbe6b7133af1d73c4b662344d9507f1e1c71
|
7
|
+
data.tar.gz: 2d54d671c2944e925d935e7cc3bd6f7db53c0c1d3f2d10b4bc013dd03fbcc100ad60de6b8789a136449ebc4b1a032ca36e5af5718cce2bfd84b49d67f1dd7a46
|
data/.ebert.yml
ADDED
data/CHANGELOG
CHANGED
data/README.md
CHANGED
@@ -7,6 +7,7 @@ service, an API, etc.
|
|
7
7
|
|
8
8
|
[![Build Status](https://travis-ci.org/locaweb/heartcheck.svg)](https://travis-ci.org/locaweb/heartcheck)
|
9
9
|
[![Code Climate](https://codeclimate.com/github/locaweb/heartcheck/badges/gpa.svg)](https://codeclimate.com/github/locaweb/heartcheck)
|
10
|
+
[![Ebert](https://ebertapp.io/github/locaweb/heartcheck.svg)](https://ebertapp.io/github/locaweb/heartcheck)
|
10
11
|
|
11
12
|
## Installation
|
12
13
|
|
@@ -30,6 +30,13 @@ module Heartcheck
|
|
30
30
|
# @return [Integer] (default: 0)
|
31
31
|
attr_accessor :timeout
|
32
32
|
|
33
|
+
# An url to provide more info about the check.
|
34
|
+
# It is important to provide details about the failure, for example:
|
35
|
+
# - what is the impact
|
36
|
+
# - how to fix it
|
37
|
+
# - how to reproduce the failure
|
38
|
+
# @return [String] (default: nil)
|
39
|
+
attr_accessor :doc_url
|
33
40
|
|
34
41
|
# Create a new instance and set the default values.
|
35
42
|
#
|
@@ -188,7 +195,11 @@ module Heartcheck
|
|
188
195
|
# @return [Hash]
|
189
196
|
def format_error
|
190
197
|
lambda do |error|
|
191
|
-
error.is_a?(Hash)
|
198
|
+
if error.is_a?(Hash)
|
199
|
+
error
|
200
|
+
else
|
201
|
+
{ type: 'error', message: error, doc_url: doc_url }
|
202
|
+
end
|
192
203
|
end
|
193
204
|
end
|
194
205
|
end
|
@@ -14,6 +14,8 @@ Heartcheck.setup do |monitor|
|
|
14
14
|
# For each check you can set the folling options
|
15
15
|
# name: String => root name to show in report page (default: class.name)
|
16
16
|
# functional: Boolean => When is false your check is essential to your application (default: false)
|
17
|
+
# doc_url: String => To provide more details about the failure (optional)
|
18
|
+
# (default: nil)
|
17
19
|
# on_error: Block => to customize the errors (default: nil)
|
18
20
|
# to_validate: Block => to validate the sevices (default: nil)
|
19
21
|
#
|
@@ -23,6 +25,7 @@ Heartcheck.setup do |monitor|
|
|
23
25
|
# c.name = "filesystem"
|
24
26
|
# c.functional = true
|
25
27
|
# c.add_service(name: "my_file", path: "/var/www/my_project/my_file")
|
28
|
+
# c.doc_url = 'http://docs.com/monitoring#check-filesystem'
|
26
29
|
#
|
27
30
|
# c.on_error do |sevices|
|
28
31
|
# errors << "Custom error message for #{service[:name]}"
|
data/lib/heartcheck/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: heartcheck
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Locaweb
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-12-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|
@@ -212,6 +212,7 @@ executables:
|
|
212
212
|
extensions: []
|
213
213
|
extra_rdoc_files: []
|
214
214
|
files:
|
215
|
+
- ".ebert.yml"
|
215
216
|
- ".gitignore"
|
216
217
|
- ".rspec"
|
217
218
|
- ".rubocop.yml"
|
@@ -275,7 +276,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
275
276
|
version: '0'
|
276
277
|
requirements: []
|
277
278
|
rubyforge_project:
|
278
|
-
rubygems_version: 2.
|
279
|
+
rubygems_version: 2.6.13
|
279
280
|
signing_key:
|
280
281
|
specification_version: 4
|
281
282
|
summary: A simple way to check if your app is runnig like as expected.
|