sensu-checks-http-response-time 0.1.5 → 0.1.6

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: dce6daebbe4ab8123c228ce40a2a4d75cb502e4e
4
- data.tar.gz: 8dfed77ea9f66738b4f151d7211fad6f2507c26d
3
+ metadata.gz: d14fde7b3a1dd003d83b47b75f2cb2cd494ac686
4
+ data.tar.gz: 57d684625342db49102de656c26967d146020266
5
5
  SHA512:
6
- metadata.gz: 9c46f5aaa76d7c8f8e74bbd9a07aeb5ade3b808041eedb3eed9c7539936220e4584a9fd0887a8e8bf5233fe3aab0ba546d8540e8cffb7c321d5b2d0b957597de
7
- data.tar.gz: b448adc8f23ec5f9463d9e816123ad7bbe3c917510afc38d99a734d2428e55f60c6b94b1ce1309249c4df94caf4a26dbbef7e4c5fa208d31f0a17909d8373378
6
+ metadata.gz: b3666ec52cf62872dc240cd0de797ca9345c0a7ea20c0e4e4f70e00af2a57071a37fde2b04807d6787d65c913b3677b14ea42b287aa9e6d90a1f2bdb2b1493ec
7
+ data.tar.gz: 5d6f49c1b1d685c75152690f0e5f0c5a58ea3aa662c06e4498b2b121f0085d84f9a3f65bd4d05342c9030a2e9008779595fc139ea559ee21e70669154d4ffb71
data/README.md CHANGED
@@ -0,0 +1,121 @@
1
+ # sensu-checks-http-response-time
2
+
3
+ Sensu gem to get http response time checks and metrics. uses curl to gather data.
4
+ Supports sudo for better access right management.
5
+ Supports user defined metric name addition if you want to test more than one resource per host. (ie. "hostname.appendstring.http_response_time.time_total 123")
6
+
7
+
8
+ ## DEPENDENCIES
9
+
10
+ obviously curl
11
+
12
+
13
+ ## INSTALLATION
14
+
15
+ This gem will give an actual installation explanation, as the default sensu plugins miss it and the sensu documentation lacks any detailed explanation.
16
+
17
+ If this gem is listed in rubygems.org, you can just go ahead and do
18
+ ~~sensu-install -p sensu-check-http-response-time~~
19
+
20
+
21
+ Updated:
22
+ As Sensu expects the naming to be "sensu-plugins-FOO", you need to do it another way:
23
+ ```
24
+ /opt/sensu/embedded/bin/gem install --no-ri --no-rdoc sensu-checks-http-response-time
25
+ ```
26
+
27
+ If this does not work for you, you can still install it; the hard way.
28
+ ```
29
+ git clone git@github.com:vmpublishing/sensu-checks-http-response-time [SOME_PATH]
30
+ cd [SOME_PATH]
31
+ /opt/sensu/embedded/bin/gem build *.gemspec
32
+ /opt/sensu/embedded/bin/gem install *.gem
33
+ ```
34
+
35
+ Alter `/opt/sensu/embedded/bin/gem` to the path to the gem-file sensu uses on your machine.
36
+
37
+
38
+ ## USAGE
39
+
40
+ ### checks
41
+
42
+ #### Parameters
43
+
44
+ | name | parameter_name | default value | required | description |
45
+ |------|----------------|---------------|----------|-------------|
46
+ | sudo | -s, --sudo | false | no | run curl with sudo (and possibly avoid running sensu as root) |
47
+ | url | -u, --URL | / | no | relative URL on the given domain |
48
+ | port | -p, --port | 80 | no | port to check on the target host |
49
+ | host | -h, --host | nil | no | alternating http-hostname for the given address, overrides the possible hostname of address |
50
+ | address | -a, --address | | yes | address to look up (ie. www.gruenderszene.de) |
51
+ | protocol | -x, --protocol | https | no | protocol to use in curl query |
52
+ | user | -U, --user | nil | no | optional basic auth username |
53
+ | pass | -P, --password | nil | no | optional basic auth password |
54
+ | method | -m, --method | GET | no | http method to use (GET, POST, DELETE, etc.) |
55
+ | body_data | -d, --body_data | nil | no | body data to send along the request |
56
+ | headers | -H, --headers | | no | set request headers, comma separated |
57
+ | user_agent | -A, --user-agent | | no | user agent string to use for the request |
58
+ | warn | -W, --warn-level | 500 | no | in ms, values above this threshold will trigger a warning notification |
59
+ | critical | -C, --critical-level | 1000 | no | in ms, values above this threshold will trigger a critical notification |
60
+
61
+ #### sample json config file
62
+ ```
63
+ {
64
+ "checks": {
65
+ "check_some_site_response_time": {
66
+ "command": "check-http-response-time.rb -h some-site.com -a 123.234.34.45 -x http -W 300 -C 800 -u /favicon.ico",
67
+ "standalone": "true",
68
+ "interval": 60,
69
+ "timeout": 360,
70
+ "ttl": 300,
71
+ "refresh": "3600",
72
+ "occurrences": 2
73
+ }
74
+ }
75
+ }
76
+ ```
77
+
78
+
79
+ ### metrics
80
+
81
+ #### Parameters
82
+
83
+ | name | parameter_name | default value | required | description |
84
+ |------|----------------|---------------|----------|-------------|
85
+ | sudo | -s, --sudo | false | no | run curl with sudo (and possibly avoid running sensu as root) |
86
+ | fields | -f, --fields | time_total,time_namelookup,time_connect,time_pretransfer,time_redirect,time_starttransfer | no | The stats fields to get from curl, comma sepparated. See curl -w |
87
+ | scheme | -C, --scheme | hostname | no | Metric naming scheme, text to prepend to metric and scheme_append |
88
+ | url | -u, --URL | / | no | relative URL on the given domain |
89
+ | port | -p, --port | 80 | no | port to check on the target host |
90
+ | host | -h, --host | nil | no | alternating http-hostname for the given address, overrides the possible hostname of address |
91
+ | address | -a, --address | | yes | address to look up (ie. www.gruenderszene.de) |
92
+ | protocol | -x, --protocol | https | no | protocol to use in curl query |
93
+ | user | -U, --user | nil | no | optional basic auth username |
94
+ | pass | -P, --password | nil | no | optional basic auth password |
95
+ | method | -m, --method | GET | no | http method to use (GET, POST, DELETE, etc.) |
96
+ | body_data | -d, --body_data | nil | no | body data to send along the request |
97
+ | headers | -H, --headers | | no | set request headers, comma separated |
98
+ | user_agent | -A, --user-agent | | no | user agent string to use for the request |
99
+
100
+ #### sample json config file
101
+ ```
102
+ {
103
+ "metrics": {
104
+ "metric_some_site_response_time": {
105
+ "type": "metric",
106
+ "command": "check-http-response-time.rb -h some-site.com -a 123.234.34.45 -x http -S somesite.somerole -u /favicon.ico",
107
+ "standalone": "true",
108
+ "interval": 60,
109
+ "timeout": 360,
110
+ "handlers": "influxdb-extension",
111
+ "ttl": 300
112
+ }
113
+ }
114
+ }
115
+ ```
116
+
117
+
118
+ ## CONTRIBUTING
119
+
120
+ Bug reports and pull requests are welcome on GitHub at https://github.com/vmpublishing/sensu-checks-http-response-time.
121
+
@@ -2,7 +2,7 @@ module SensuChecksHttpResponseTime
2
2
  module Version
3
3
  MAJOR = 0
4
4
  MINOR = 1
5
- PATCH = 5
5
+ PATCH = 6
6
6
 
7
7
  VER_STRING = [MAJOR, MINOR, PATCH].compact.join('.')
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sensu-checks-http-response-time
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - vmpublishing development