portertech-sensu 1.10.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +961 -0
  3. data/MIT-LICENSE.txt +20 -0
  4. data/README.md +65 -0
  5. data/exe/sensu-api +10 -0
  6. data/exe/sensu-client +10 -0
  7. data/exe/sensu-install +195 -0
  8. data/exe/sensu-server +10 -0
  9. data/lib/sensu/api/http_handler.rb +434 -0
  10. data/lib/sensu/api/process.rb +79 -0
  11. data/lib/sensu/api/routes/aggregates.rb +196 -0
  12. data/lib/sensu/api/routes/checks.rb +44 -0
  13. data/lib/sensu/api/routes/clients.rb +171 -0
  14. data/lib/sensu/api/routes/events.rb +86 -0
  15. data/lib/sensu/api/routes/health.rb +45 -0
  16. data/lib/sensu/api/routes/info.rb +37 -0
  17. data/lib/sensu/api/routes/request.rb +44 -0
  18. data/lib/sensu/api/routes/resolve.rb +32 -0
  19. data/lib/sensu/api/routes/results.rb +153 -0
  20. data/lib/sensu/api/routes/settings.rb +23 -0
  21. data/lib/sensu/api/routes/silenced.rb +182 -0
  22. data/lib/sensu/api/routes/stashes.rb +107 -0
  23. data/lib/sensu/api/routes.rb +88 -0
  24. data/lib/sensu/api/utilities/filter_response_content.rb +44 -0
  25. data/lib/sensu/api/utilities/publish_check_request.rb +107 -0
  26. data/lib/sensu/api/utilities/publish_check_result.rb +39 -0
  27. data/lib/sensu/api/utilities/resolve_event.rb +29 -0
  28. data/lib/sensu/api/utilities/servers_info.rb +43 -0
  29. data/lib/sensu/api/utilities/transport_info.rb +43 -0
  30. data/lib/sensu/api/validators/check.rb +55 -0
  31. data/lib/sensu/api/validators/client.rb +35 -0
  32. data/lib/sensu/api/validators/invalid.rb +8 -0
  33. data/lib/sensu/cli.rb +69 -0
  34. data/lib/sensu/client/http_socket.rb +217 -0
  35. data/lib/sensu/client/process.rb +655 -0
  36. data/lib/sensu/client/socket.rb +207 -0
  37. data/lib/sensu/client/utils.rb +53 -0
  38. data/lib/sensu/client/validators/check.rb +53 -0
  39. data/lib/sensu/constants.rb +17 -0
  40. data/lib/sensu/daemon.rb +396 -0
  41. data/lib/sensu/sandbox.rb +19 -0
  42. data/lib/sensu/server/filter.rb +227 -0
  43. data/lib/sensu/server/handle.rb +201 -0
  44. data/lib/sensu/server/mutate.rb +92 -0
  45. data/lib/sensu/server/process.rb +1646 -0
  46. data/lib/sensu/server/socket.rb +54 -0
  47. data/lib/sensu/server/tessen.rb +170 -0
  48. data/lib/sensu/utilities.rb +398 -0
  49. data/lib/sensu.rb +3 -0
  50. data/sensu.gemspec +36 -0
  51. metadata +322 -0
data/CHANGELOG.md ADDED
@@ -0,0 +1,961 @@
1
+ # Change Log
2
+ This project adheres to [Semantic Versioning](http://semver.org/).
3
+
4
+ This CHANGELOG follows the format listed [here](https://github.com/sensu-plugins/community/blob/master/HOW_WE_CHANGELOG.md)
5
+
6
+ ## [Unreleased]
7
+
8
+ ## [1.9.0] - 2019-12-18
9
+
10
+ ### Fixed
11
+ - Fixed check subdue times resolution, now including nanoseconds.
12
+ - API 204 no content responses now return a nil body.
13
+ - Fixed Travis CI testing (RabbitMQ was missing on Xenial).
14
+
15
+ ### Added
16
+ - Added support for discarding oversized transport messages to protect
17
+ Sensu, e.g. {"sensu":{"server": {"max_message_size": 2097152}}}.
18
+
19
+ ## [1.8.0] - 2019-07-09
20
+
21
+ ### Added
22
+ - The sensu-server results and keepalives Sensu Transport pipes are now
23
+ configurable. These values should only be set/changed when creating
24
+ active-active Sensu deployments, leveraging the RabbitMQ shovel plugin for
25
+ cross site check result and keepalive replication.
26
+
27
+ ## [1.7.1] - 2019-07-08
28
+
29
+ ### Fixed
30
+ - Now using sensu-transport 8.3.0 which will trigger a reconnect when trying to publish to RabbitMQ when in a disconnected state.
31
+ - Use `--no-document` when installing gems via `sensu-install` instead of deprecated `--no-ri --no-rdoc`.
32
+
33
+ ## [1.7.0] - 2019-02-19
34
+
35
+ ### Added
36
+ - Added a response body to the api health endpoint including transport consumer & message counts.
37
+ - Bump sensu-extensions to 1.11.0 to add support for built-in sensu-extensions-deregistration handler.
38
+ - Added an eventmachine globbal catch-all error handler.
39
+
40
+ ### Fixed
41
+ - Token substitution will now only split on the first instance of the pipe character.
42
+ - Use `deep_dup` in api token substitution to prevent an issue where substitution could use an incorrect value.
43
+ - Redacted attributes are now redacted from the `/clients` and `/clients/:client` routes.
44
+ - Server registry entires that fail to expire are now cleaned up.
45
+ - Improved error logging.
46
+
47
+ ## [1.6.2] - 2018-12-07
48
+
49
+ ### Fixed
50
+ - Fixed Redis Sentinel DNS resolution error handling. Sentinel DNS
51
+ hostname resolution is now done upfront, an IP address is provided to
52
+ EventMachine.
53
+
54
+ ## [1.6.1] - 2018-10-23
55
+
56
+ ### Fixed
57
+ - Now using sensu-transport 8.2.0 which fixes an issue where Sensu would freeze when trying to reconnect to RabbitMQ.
58
+
59
+ ## [1.6.0] - 2018-10-12
60
+
61
+ ### Fixed
62
+ - Now using EventMachine version 1.2.7 to allow newer compiler versions to build this project.
63
+
64
+ ### Added
65
+ - Add additional sensitive information to default redaction list.
66
+ - Added API DELETE /check/:check_name that will deletes all results & history for a given check name.
67
+
68
+ ### Changed
69
+ - Replace proxy check result commands with their original definition value.
70
+ - Now using sensu-transport 8.1.0 to use separate RabbitMQ transport connections for improved flow control.
71
+
72
+ ## [1.5.0] - 2018-09-04
73
+
74
+ ### Fixed
75
+ - Bumped sensu-extensions to version 1.10.0 to include subscription support in the check dependencies filter.
76
+ - Improved check result validation by applying existing validation rules from sensu-settings to check results created using the API and the client socket.
77
+
78
+ ## [1.4.3] - 2018-07-23
79
+
80
+ ### Fixed
81
+ - Prevent check results from being published with an empty source attribute.
82
+ - Use handler extension definitions when logging rather than handler extension objects.
83
+ - Added validation for ttl attribute in results API.
84
+ - Fixed case where proxy checks with token substitution can retain previous values.
85
+
86
+ ## [1.4.2] - 2018-05-10
87
+
88
+ ### Fixed
89
+ - Fixed API GET /results, results were incorrectly reported under a single client name.
90
+
91
+ ## [1.4.1] - 2018-05-04
92
+
93
+ ### Fixed
94
+ - Include em-http-request Ruby gem in runtime dependencies.
95
+
96
+ ## [1.4.0] - 2018-05-02
97
+
98
+ ### Added
99
+ - Sensu call-home mechanism, the Tessen client (opt-in). It sends anonymized data about the Sensu installation to the Tessen hosted service (Sensu Inc), on sensu-server startup and every 6 hours thereafter. All data reports are logged for transparency/awareness and transmitted over HTTPS. The anonymized data currently includes the flavour of Sensu (Core or Enterprise), the Sensu version, and the Sensu client and server counts.
100
+ - API list endpoints (e.g. /events) now all support pagination.
101
+
102
+ ### Changed
103
+ - Support for writing multiple check results to the client socket (in one payload).
104
+ - Improved event last_ok, now updating the value when storing latest check results for better accuracy.
105
+
106
+ ### Fixed
107
+ - Include child process (e.g. check execution) stop (SIGTERM/KILL) error message in timeout output. This helps when debugging defunct/zombie processes, e.g. "Execution timed out - Unable to TERM/KILL the process: Operation not permitted".
108
+
109
+ ## [1.3.3] - 2018-04-18
110
+
111
+ ### Fixed
112
+ - Posix spawn is now only used on x86_64 and i386 systems. (undo revert, a red herring)
113
+ - Now pinning FFI to 1.9.21, newer versions segfault on CentOS 6
114
+
115
+ ## [1.3.2] - 2018-04-17
116
+
117
+ ### Fixed
118
+ - Reverted posix spawn on only x86_64 and i386 systems, causing segfault on CentOS 6.
119
+
120
+ ## [1.3.1] - 2018-04-12
121
+
122
+ ### Fixed
123
+ - Posix spawn is now only used on x86_64 and i386 systems. This fixes Sensu on platforms where FFI is unable to compile.
124
+
125
+ ## [1.3.0] - 2018-03-09
126
+
127
+ ### Fixed
128
+ - Sensu TCP event handlers will no longer connect to a socket if the provided event data is nil or empty. (#1734)
129
+ - The RabbitMQ transport will now reconnect after failing to resolve DNS, instead of independently retrying broker hostname resolution. This fixes retry timer backoff and allows the transport to connect to another eligible broker after failing to resolve a hostname.
130
+
131
+ ### Added
132
+ - Redis TLS connection support. Sensu Redis connections can now be configured to use TLS, this includes the Sensu server and Redis transport connections! The Sensu Redis configuration definition now includes the optional "tls" (or "ssl") attribute, a hash containing TLS options (`"private_key_file"`, `"cert_chain_file"`, and `"verify_peer"`).
133
+ - The Sensu client TCP/UDP socket can now be disabled via configuration.
134
+ - The Sensu client configuration definition now includes the socket "enabled" attribute, which defaults to `true`, and it can be set to `false` in order to disable the socket. (#1799)
135
+ - The Sensu Ruby gems are now cryptographically signed. To learn more about Ruby gem signing, [please refer to the RubyGems security guide](http://guides.rubygems.org/security/). (#1819)
136
+ - The Sensu API POST /clients endpoint no longer requires client subscriptions to be specified. (#1795)
137
+ - All Sensu event handler types now include event ID in log events.
138
+
139
+ ## [1.2.1] - 2018-02-06
140
+ ### Fixed
141
+ - Fixed a bug in which sensitive values deeply nested in arrays would not have been redacted.
142
+
143
+ ## [1.2.0] - 2017-12-05
144
+ ### Added
145
+ - Scheduled maintenance, Sensu now gives users the ability to silence a check and/or client subscriptions at a predetermined time (`begin` epoch timestamp), with an optional expiration (in seconds), enabling users to silence events in advance for scheduled maintenance windows.
146
+
147
+ - The Sensu API now logs the "X-Request-ID" header, making it much easier to trace a request/response. If the API client does not provide a request ID, the API generates one for the request (UUID).
148
+ - The Sensu API `/results/*` endpoints now include check history in the
149
+ result data.
150
+ - Check token substitution is now supported in check "source".
151
+
152
+ ## [1.1.3] - 2017-11-24
153
+ ### Fixed
154
+ - Fixed a bug in the Sensu client that broke check hooks named after numeric statuses (e.g. `"2"`) and `"non-zero"`, they were never executed unless the client had a local check definition. (#1773)
155
+
156
+ ## [1.1.2] - 2017-10-27
157
+
158
+ ### Fixed
159
+ - Fixed a bug in the Sensu client HTTP socket that caused the Sensu client to crash when the the local client definition did not specify `"http_socket"` settings and the `/info` or `/results` endpoints were accessed.
160
+
161
+ - Fixed a bug in the Sensu client HTTP socket that caused the Sensu client
162
+ to consider an HTTP content-type that included media-type information as
163
+ invalid, discarding possibly valid content.
164
+
165
+ ## [1.1.1] - 2017-10-10
166
+ ### Fixed
167
+ - Fixed a bug in check TTL monitoring that caused the Sensu server to crash. Check TTL member deletion, following the deletion of the associated check result, would produce an uncaught error.
168
+
169
+ ## [1.1.0] - 2017-09-27
170
+ ### Fixed
171
+ - Added initial timestamp to proxy client definitions. The Uchiwa and Sensu dashboards will no longer display "Invalid Date".
172
+ - Deleting check history when deleting an associated check result.
173
+
174
+ ### Added
175
+ - Check hooks, commands run by the Sensu client in response to the result of the check command execution. The Sensu client will execute the appropriate configured hook command, depending on the check execution status (e.g. 1). Valid hook names include (in order of precedence): "1"-"255", "ok", "warning", "critical", "unknown", and "non-zero". The check hook command output, status, executed timestamp, and duration are captured and published in the check result. Check hook commands can optionally receive JSON serialized Sensu client and check definition data via STDIN.
176
+ - Check STDIN. A boolean check definition attribute, `"stdin"`, when set to `true` instructs the Sensu client to write JSON serialized Sensu client and check definition data to the check command process STDIN. This attribute cannot be used with existing Sensu check plugins, nor Nagios plugins etc, as the Sensu client will wait indefinitely for the check process to read and close STDIN.
177
+ - Splayed proxy check request publishing. Users can now splay proxy check requests (optional), evenly, over a window of time, determined by the check interval and a configurable splay coverage percentage. For example, if a check has an interval of 60s and a configured splay coverage of 90%, its proxy check requests would be splayed evenly over a time window of 60s * 90%, 54s, leaving 6s for the last proxy check execution before the the next round of proxy check requests for the same check. Proxy check request splayed publishing can be configured with two new check definition attributes, within the `proxy_requests` scope, `splay` (boolean) to enable it and `splay_coverage` (integer percentage, defaults to `90`).
178
+ - Configurable check output truncation (for storage in Redis). Check output truncation can be manually enabled/disabled with the check definition attribute "truncate_output", e.g.`"truncate_output": false`. The output truncation length can be configured with the check definition attribute "truncate_output_length", e.g. `"truncate_output_length": 1024`. Check output truncation is still enabled by default for metric checks, with `"type": "metric"`.
179
+ - Sensu client HTTP socket basic authentication can how be applied to all endpoints (not just `/settings`), via the client definition http_socket attribute "protect_all_endpoints", e.g. `"protect_all_endpoints": true`.
180
+
181
+ ### Other
182
+
183
+ Improved check TTL monitoring performance.
184
+
185
+ The Sensu extension run log event log level is now set to debug (instead
186
+ of info) when the run output is empty and the status is 0.
187
+
188
+ ## [1.0.3] - 2017-08-25
189
+ ### Fixed
190
+ - Now using EventMachine version 1.2.5 in order to support larger EM timer intervals. EM timers are used by the Sensu check scheduler and many other Sensu components.
191
+
192
+ ## [1.0.2] - 2017-07-27
193
+ ### Fixed
194
+ - Addressed an issue with client keepalive transport acknowledgments. We discovered a situation where poor Redis performance could negatively impact client keepalive processing, potentially triggering a compounding failure that the Sensu server is unable to recover from. Moving acknowledgments to the next tick of the EventMachine reactor avoids the situation entirely.
195
+
196
+ ## [1.0.1] - 2017-07-24
197
+ ### Fixed
198
+ - Fixed Sensu configuration validation, it was not being applied.
199
+
200
+ ## [1.0.0] - 2017-07-11
201
+ ### Fixed
202
+ - Sensu handler severities filtering now accounts for flapping events.
203
+ - Fixed Sensu Redis connection on error reconnect, no longer reusing the existing EventMachine connection handler.
204
+
205
+ ### Added
206
+ - Added Sensu API event endpoint alias "incidents", e.g. `/incidents`, `/incidents/:client/:check`.
207
+
208
+ ### Changed
209
+ - Improved Sensu client keepalive configuration validation, now including
210
+ coverage for check low/high flap thresholds etc.
211
+ - Improved Sensu client socket check result validation, now including coverage for check low/high flap thresholds etc.
212
+ - The `sensu-install` tool now notifies users when it is unable to successfully install an extension, when the environment variable EMBEDDED_RUBY is set to `false`.
213
+
214
+ - Added the Sensu `RELEASE_INFO` constant, containing information about the Sensu release, used by the API `/info` endpoint and Server registration.
215
+
216
+
217
+
218
+ ## [0.29.0] - 2017-03-29
219
+ ### Fixed
220
+ - The built-in filter `occurrences` now supports `refresh` for flapping
221
+ events (action `flapping`).
222
+ - Force the configured Redis port to be an integer, as some users make the
223
+ mistake of using a string.
224
+
225
+ ### Added
226
+ - Sensu server tasks, replacing the Sensu server leader functionality, distributing certain server responsibilities amongst the running Sensu servers. A server task can only run on one Sensu server at a time. Sensu servers partake in an election process to become responsible for one or more tasks. A task can failover to another Sensu server.
227
+ - Sensu API response object filtering for any GET request. Filtering is done with one or more dot notation query parameters, beginning with `filter.`, to specify object attributes to filter by, e.g. `/events?filter.client.environment=production&filter.check.contact=ops`.
228
+ - Added API endpoint GET `/settings` to provided the APIs running configuration. Sensitive setting values are redacted by default, unless the query parameter `redacted` is set to `false`, e.g. `/settings?redacted=false`.
229
+ - Added support for invalidating a Sensu client when deleting it via the Sensu API DELETE `/clients/:name` endpoint, disallowing further client keepalives and check results until the client is either successfully removed from the client registry or for a specified duration of time. To invalidate a Sensu client until it is deleted, the query parameter `invalidate` must be set to `true`, e.g. `/clients/app01.example.com?invalidate=true`. To invalidate the client for a certain amount of time (in seconds), the query parameter `invalidate_expire` must be set as well, e.g. `/clients/app01.example.com?invalidate=true&invalidate_expire=300`.
230
+ - Added a Sensu settings hexdigest, exposed via the Sensu API GET `/info` endpoint, providing a means to determine if a Sensu server's configuration differs from the rest.
231
+ - Added a proxy argument to `sensu-install`. To use a proxy for Sensu plugin and extension installation with `sensu-install`, use the `-x` or `--proxy` argument, e.g. `sensu-install -e statsd --proxy http://proxy.example.com:8080`.
232
+ - Added support for issuing proxy check requests via the Sensu API POST `/request` endpoint.
233
+ - The Sensu API now logs response times.
234
+ - The Sensu API now returns a 405 (Method Not Allowed) when an API endpoint does not support a HTTP request method, e.g. `PUT`, and sets the HTTP header "Allow" to indicate which HTTP request methods are supported by the requested endpoint.
235
+ - Added a built-in filter for check dependencies, `check_dependencies`, which implements the check dependency filtering logic in the Sensu Plugin library.
236
+ - Added default values for Sensu CLI options `config_file` (`"/etc/sensu/config.json"`) and `config_dirs` (`["/etc/sensu/conf.d"]`). These defaults are only applied when the associated file and/or directory exist.
237
+
238
+ ### Changed
239
+ - Added a Rubocop configuration file and rake tasks for a slow introduction.
240
+
241
+ ## [0.28.5] - 2017-03-23
242
+ ### Fixed
243
+ - Fixed check `subdue` and filter `when` features when a time window spans over `00:00:00`, crossing the day boundary.
244
+
245
+ ## [0.28.4] - 2017-03-10
246
+ ### Fixed
247
+ - In the interest of addressing a regression causing duplicate check execution requests, code added in 0.28.0 to account for task scheduling drift has been removed.
248
+
249
+ ## [0.28.3] - 2017-03-09
250
+ ### Fixed
251
+ - The Sensu client now includes check source when tracking in progress check executions. These changes are necessary to allow the Sensu client to execute on several concurrent proxy check requests.
252
+
253
+ ## [0.28.2] - 2017-03-03
254
+ ### Fixed
255
+ - Clients created via /clients API endpoint now have a per-client subscription added automatically, ensuring they can be silenced.
256
+
257
+ ## [0.28.1] - 2017-03-01
258
+ ### Fixed
259
+ - Check requests with `proxy_requests` attributes are no longer overridden by local check definitions.
260
+ - Updated Oj (used by the sensu-json library) to the latest release (2.18.1) for Ruby 2.4 compatibility.
261
+
262
+ ## [0.28.0] - 2017-02-23
263
+ ### Fixed
264
+ - The Sensu interval timers, used for scheduling tasks, now account for drift. The check request and standalone execution scheduler timers are now more accurate.
265
+ - Fixed a bug in the Sensu `deep_merge()` method that was responsible for
266
+ mutating arrays of the original provided objects.
267
+
268
+ ### Added
269
+ - Added proxy check requests to improve Sensu's ability to monitor external resources that have an associated Sensu proxy client. Publish a check request to the configured `subscribers` (e.g. `["round-robin:snmp_pollers"]`) for every Sensu client in the registry that matches the configured client attributes in `client_attributes` on the configured `interval` (e.g. `60`). Client tokens in the check definition (e.g. `"check-snmp-if.rb -h :::address::: -i eth0"`) are substituted prior to publishing the check request. The check request check `source` is set to the client `name`.
270
+ - Schedule check requests and standalone executions with the Cron syntax.
271
+ - Added the Sensu server registry, containing information about the running Sensu servers. Information about the Sensu servers is now accessible via the Sensu API `/info` endpoint.
272
+ - Added two optional attributes to Sensu API POST `/request`, `"reason"` and `"creator"`, for additional context. The check request reason and creator are added to the check request payload under `"api_requested"` and become part of the check result.
273
+ - Added event IDs to event handler log events for additional context, making it easier to trace an event through the Sensu pipeline.
274
+
275
+ ## [0.27.1] - 2017-02-17
276
+ ### Fixed
277
+ - Check subdue and filter when time windows now account for GMT offsets.
278
+ - Non UTF-8 characters in check tokens are now removed.
279
+ - Fixed filter name logging when an event is filtered.
280
+
281
+ ### Changed
282
+ - Failed pipe handler executions are now logged with the error log level.
283
+ - Sensu server now adds a unique per-client subscription to client keepalives when missing. This is to enable built-in event silencing for older Sensu clients (< 0.26).
284
+
285
+ ## [0.27.0] - 2017-01-26
286
+ ### Breaking Changes
287
+
288
+ - The CONFIG_DIR environment variable has been renamed to CONFD_DIR. This environment varible is used to specify the directory path where Sensu processes will load any JSON config files for deep merging. If you are using /etc/default/sensu to specify a custom value for CONFIG_DIR, please update it to the new CONFD_DIR variable name.
289
+
290
+ ### Fixed
291
+ - Silenced resolution events with silencing `"expire_on_resolve": true` are now handled.
292
+
293
+ ### Added
294
+ - Sensu client HTTP socket for check result input and informational queries. The client HTTP socket provides several endpoints, `/info`, `/results`, and `/settings`. Basic authentication is supported, which is required for certain endpoints, i.e. `/settings`. The client HTTP socket is configurable via the Sensu client definition, `"http_socket": {}`.
295
+ - Hostnames are now resolved prior to making connection attempts, this applies to the Sensu Transport (i.e. RabbitMQ) and Redis connections. This allows Sensu to handle resolution failures and enables failover via DNS and services like Amazon AWS ElastiCache.
296
+ - Added API endpoint `/silenced/ids/:id` for fetching a silence entry by id.
297
+ - Added check attribute `ttl_status`, allowing checks to set a different TTL event check status (default is `1` warning).
298
+ - Added client deregistration attribute `status`, allowing clients to set a different event check status for their deregistration events (default is `1` warning).
299
+ - Added Rubygems cleanup support to `sensu-install`, via the command line argument `-c/--clean` when installing one or more plugins and/or extensions. If a version is provided for the plugin(s) or extension(s), all other installed versions of them will be removed, e.g. `sensu-install -e snmp-trap:0.0.19 -c`. If a version is not provided, all installed versions except the latest will be removed.
300
+
301
+ ### Changes
302
+ - Added the filter name to event filtered log events.
303
+ - Check TTL events now have the check interval overridden to the TTL monitoring interval, this change allows event occurrence filtering to work as expected.
304
+
305
+ ## [0.26.5] - 2016-10-12
306
+ ### Fixed
307
+ - Sensu client no longer fails to validate the client configuration when the automatic per-client subscription is the client's only subscription.
308
+
309
+ ## [0.26.4] - 2016-10-05
310
+ ### Fixed
311
+ - Sensu check extension executions are now properly tracked and the Sensu client now guards against multiple concurrent executions of the same extension.
312
+
313
+ ## [0.26.3] - 2016-09-21
314
+ ### Fixed
315
+ - Adjusted regular expression pattern to completely address scenarios where valid subscription names were not allowed via API `/silenced/subscriptions/:subscription` endpoint, e.g. `client:foo-bar-baz`.
316
+
317
+ ## [0.26.2] - 2016-09-20
318
+ ### Fixed
319
+ - Added logic to ensure proxy clients receive a per-client subscription upon creation so that they can be silenced via /silenced API.
320
+ - Updated API publish_check_result helper to address a condition where events could not be successfully deleted for clients configured with a signature.
321
+ - Fixed regexp in API which prevented retrieval of silence entries when requesting subscriptions containing a colon (e.g. `client:foo`, `roundrobin:bar`) on the `/silenced/subscriptions/:subscription` endpoint.
322
+ - Fixed a condition where processing check results with an invalid signature failed to complete. This often manifest as timeouts when waiting for sensu-server processes to terminate.
323
+
324
+ ### Changes
325
+ - Default value for `client` settings has changed from `nil` to `{}`.
326
+
327
+ ## [0.26.1] - 2016-09-07
328
+ ### Fixes
329
+ - Fixed a Sensu server settings bug that cause sensu-server to required a client definition in order to start.
330
+
331
+ ## [0.26.0] - 2016-09-06
332
+ ### Breaking Changes
333
+ - Subdue now ONLY applies to check scheduling via check definitions, it has been removed from handlers (no more `"at": "handler"`). The subdue configuration syntax has changed, please refer to the [0.26 subdue documentation](https://sensuapp.org/docs/0.26/reference/checks.html#subdue-attributes).
334
+
335
+ ### Fixed
336
+ - Increased the maximum number of EventMachine timers from 100k to 200k, to accommodate very large Sensu installations that execute over 100k checks.
337
+ - Only attempt to schedule standalone checks that have an interval.
338
+ - Standalone checks are no longer provided by the Sensu API /checks endpoint.
339
+ - Check TTL events are no longer created if the associated Sensu client has a current keepalive event.
340
+ - Fixed a Sensu API /results endpoint race condition that caused incomplete response content.
341
+
342
+ ### Added
343
+ - Event silencing is now built into Sensu Core! The Sensu API now provides a set of /silenced endpoints, for silencing one or more subscriptions and/or checks. Silencing applies to all event handlers by default, the new handler definition attribute `handle_silenced` can be used to disable it for a handler. Metric check events (OK) bypass event silencing.
344
+
345
+ - Subdue now ONLY applies to check scheduling via check definitions, it has been removed from handlers (no more `"at": "handler"`). The Sensu client standalone check execution scheduler now supports subdue. The subdue configuration syntax has changed, please refer to the [0.26 subdue documentation](https://sensuapp.org/docs/0.26/reference/checks.html#subdue-attributes).
346
+
347
+ - Event filters now support time windows, via the filter definition attribute `"when": {}`. The configuration syntax is the same as check subdue.
348
+ - Sensu Extensions are now loaded from Rubygems! The Sensu installer, `sensu-install`, can now be used to install Sensu Extensions, e.g. `sensu-install -e system-profile`. Extensions gems must be enabled via Sensu configuration, please refer to the [0.26 extensions documentation](https://sensuapp.org/docs/0.26/reference/extensions.html#configuring-sensu-to-load-extensions).
349
+ - A check can now be a member of more than one aggregate, via the check
350
+ definition attribute `"aggregates": []`.
351
+ - Every Sensu client now creates/subscribes to its own unique client subscription named after it, e.g. `client:i-424242`. This unique client subscription allows Sensu checks to target a single client (host) and enables silencing events for a single client.
352
+
353
+ ## [0.25.7] - 2016-08-09
354
+ ### Fixed
355
+ - Fixed the Sensu API 204 status response string, changing "No Response" to the correct string "No Content".
356
+
357
+ ## [0.25.6] - 2016-07-28
358
+ ### Fixed
359
+ - Check results for unmatched tokens now include an executed timestamp.
360
+ - API aggregates max_age now guards against check results with a `nil` executed timestamp.
361
+
362
+ ## [0.25.5] - 2016-07-12
363
+ ### Fixed
364
+ - Reverted the Sensu API race condition fix, it was a red herring. Desired behaviour has been restored.
365
+ - Custom check definition attributes are now included in check request payloads, fixing check attribute token substitution for pubsub checks.
366
+ - Transport connectivity issues are now handled while querying the Transport for pipe stats for API `/info` and `/health`.
367
+
368
+ ## [0.25.4] - 2016-06-20
369
+ ### Fixed
370
+ - Fixed a race condition bug in the Sensu API where the `@redis` and
371
+ `@transport` objects were not initialized before serving API requests.
372
+
373
+ ## 0.25.3 - 2016-06-17
374
+
375
+ ### Fixed
376
+ - Fixed a bug in the Sensu API where it was unable to set the CORS HTTP headers when the API had not been configured (no `"api": {}` definition).
377
+
378
+ ## [0.25.2] - 2016-06-16
379
+ ### Fixed
380
+ - The Sensu API now responds to HEAD requests for GET routes.
381
+ - The Sensu API now responds to unsupported HTTP request methods with a 404 (Not Found), i.e. PUT.
382
+
383
+ ## [0.25.1] - 2016-06-14
384
+ ### Fixed
385
+ - The Sensu API now sets the HTTP response header "Connection" to "close". Uchiwa was experiencing intermittent EOF errors. [#1340](https://github.com/sensu/sensu/issues/1340)
386
+
387
+ ## [0.25.0] - 2016-06-13
388
+
389
+ ### Breaking Changes
390
+ - Sensu API legacy singular resources, e.g. `/check/:check_name`, have been removed. Singular resources were never documented and have not been used by most community tooling, e.g. Uchiwa, since the early Sensu releases.
391
+
392
+ ### Fixes
393
+ - Fixed a critical bug in Sensu client `execute_check_command()` where a check result would contain a check command with client tokens substituted, potentially exposing sensitive/redacted client attribute values.
394
+
395
+ ### Added
396
+ - The Sensu API has been rewritten to use EM HTTP Server, removing Rack and Thin as API runtime dependencies. The API no longer uses Rack async, making for cleaner HTTP request logic and much improved HTTP request and response logging.
397
+ - Sensu client auto de-registration on sensu-client process stop is now supported by the Sensu client itself, no longer depending on the package init script. The package init script de-registration functionality still remains, but is considered to be deprecated at this time.
398
+
399
+ ## [0.24.1] - 2016-06-07
400
+ ### Fixed
401
+ - Fixed a critical bug in Sensu server `resume()` which caused the server to crash when querying the state of the Sensu Transport connection before it had been initialized. [#1321](https://github.com/sensu/sensu/pull/1321)
402
+
403
+ ### Changed
404
+ - Updated references to unmatched tokens, i.e. check result output message, to better represent the new scope of token substitution. [#1322](https://github.com/sensu/sensu/pull/1322)
405
+
406
+ ## [0.24.0] - 2016-06-06
407
+ ### Breaking Changes
408
+ - Sensu check ["Aggregates 2.0"](https://github.com/sensu/sensu/issues/1218) breaks the existing Sensu API aggregate endpoints.
409
+ - Sensu API GET /health endpoint, failed health checks now respond with a
410
+ `412` (preconditions failed) instead of a `503`.
411
+
412
+ ### Added
413
+ - Persistent Sensu event IDs, event occurrences for a client/check pair will now have the same event ID until the event is resolved.
414
+
415
+ - Added a CLI option/argument to cause the Sensu service to validate its compiled configuration settings and exit with the appropriate exit code, e.g. `2` for invalid. The CLI option is `--validate_config`. This feature is now used when restarting a Sensu service to first validate the new configuration before stopping the running service.
416
+ - Improved tracking of in progress check result processing, no longer potentially losing check results when restarting the Sensu server service.
417
+ - Check results for proxy clients (a.k.a JIT clients) will now have a check "origin" set to the client name of the result producer.
418
+ - Configurable Sensu Spawn concurrent child process limit (checks, mutators, & pipe handlers). The default limit is still `12` and the EventMachine threadpool size is automatically adjusted to accommodate a larger limit.
419
+ - Sensu check ["Aggregates 2.0"](https://github.com/sensu/sensu/issues/1218).
420
+ - Sensu client token substitution is now supported in every check definition attribute value, no longer just the check command.
421
+
422
+ ### Changed
423
+ - Event data check type now explicitly defaults to "standard".
424
+
425
+ ### Fixed
426
+ - Sensu API GET /health endpoint, failed health check now responds with a
427
+ `412` (preconditions failed) instead of a `503`.
428
+ - Sensu API POST /clients endpoint can now create clients in the registry that are expected to produce keepalives, and validates clients with the Sensu Settings client definition validator.
429
+ - The Sensu API now listens immediately on service start, even before it has successfully connected to Redis and the Sensu Transport. It will now respond with a `500` response, with a descriptive error message, when it has not yet initialized its connections or it is reconnecting to either Redis or the Sensu Transport. The API /info and /health endpoints will still respond normally while reconnecting.
430
+
431
+ ### Changed
432
+ - Updated Thin (used by Sensu API) to the latest version, 1.6.4.
433
+ - JrJackson is now used to parse JSON when Sensu is running on JRuby.
434
+
435
+ ## [0.23.3] - 2016-05-26
436
+ ### Fixes
437
+ - Fixed child process write/read deadlocks when writing to STDIN or reading from STDOUT/ERR, when the data size exceeds the pipe buffers.
438
+ - Fixed child process spawn timeout deadlock, now using stdlib Timeout.
439
+
440
+ ## [0.23.2] - 2016-04-25
441
+ ### Fixed
442
+ - Fixed client socket check result publishing when the client has a signature. The client signature is now added to the check result payload, making it valid.
443
+
444
+ ### Added
445
+ - Added client socket check result check TTL validation.
446
+
447
+ ## [0.23.1] - 2016-04-15
448
+ ### Fixed
449
+ - The pure Ruby EventMachine reactor is used when running on Solaris.
450
+
451
+ ## [0.23.0] - 2016-04-04
452
+ ### Breaking Changes
453
+ - Dropped support for Rubies < 2.0.0, as they have long been EOL and have proven to be a hindrance and security risk.
454
+ - The Sensu Transport API changed. Transports are now a deferrable, they must call `succeed()` once they have fully initialized. Sensu now waits for its transport to fully initialize before taking other actions.
455
+
456
+ ### Fixed
457
+ - Performance improvements. Dropped MultiJson in favour of Sensu JSON, a lighter weight JSON parser abstraction that supports platform specific parsers for Sensu Core and Enterprise. The Oj JSON parser is once again used for Sensu Core. Used https://github.com/JuanitoFatas/fast-ruby and benchmarks as a guide to further changes.
458
+ - Using EventMachine 1.2.0, which brings several changes and [improvements]( https://github.com/eventmachine/eventmachine/blob/master/CHANGELOG.md#1201-march-15-2016)
459
+
460
+ ### Added
461
+ - Redis Sentinel support for HA Redis. Sensu services can now be configured to query one or more instances of Redis Sentinel for a Redis master. This feature eliminates the last need for HAProxy in highly available Sensu configurations. To configure Sensu services to use Redis Sentinel, hosts and ports of one or more Sentinel instances must be provided, e.g. `"sentinels": [{"host": "10.0.1.23", "port": 26479}]`.
462
+ - Added a CLI option/argument to cause the Sensu service to print (output to STDOUT) its compiled configuration settings and exit. The CLI option is `--print_config` or `-P`.
463
+ - Added token substitution to filter eval attributes, providing access to event data, e.g. `"occurrences": "eval: value == :::check.occurrences:::"`.
464
+ - The pure Ruby EventMachine reactor is used when running on AIX.
465
+ - The Sensu 0.23 packages use Ruby 2.3.
466
+
467
+ ## [0.22.2] - 2016-03-16
468
+ ### Fixed
469
+ - FFI library loading no longer causes a load error on AIX & Solaris.
470
+
471
+ ### Removed
472
+ - Removed unused cruft from extension API `run()` and `safe_run()`. Optional `options={}` was never implemented in Sensu Core and event data `dup()` never provided the necessary protection that it claimed (only top level hash object).
473
+
474
+ ## [0.22.1] - 2016-03-01
475
+ ### Fixed
476
+ - Performance improvements. Using frozen constants for common values and comparisons. Reduced the use of block arguments for callbacks.
477
+ - Improved RabbitMQ transport channel error handling.
478
+ - Fixed client signatures inspection/comparison when upgrading from a
479
+ previous release.
480
+
481
+ ## [0.22.0] - 2016-01-29
482
+
483
+ ### Added
484
+ - Client registration events are optionally created and processed (handled, etc.) when a client is first added to the client registry. To enable this functionality, configure a "registration" handler definition on Sensu server(s), or define a client specific registration handler in the client definition, e.g. `{"client": "registration": {"handler": "debug"}}`.
485
+ - Client auto de-registration on sensu-client process stop is now supported by the Sensu package init script. Setting `CLIENT_DEREGISTER_ON_STOP=true` and `CLIENT_DEREGISTER_HANDLER=example` in `/etc/default/sensu` will cause the Sensu client to publish a check result to trigger the event handler named "example", before its process stops.
486
+ - Added support for Sensu client signatures, used to sign client keepalive and check result transport messages, for the purposes of source (publisher) verification. The client definition attribute "signature" is used to set the client signature, e.g. `"signature": "6zvyb8lm7fxcs7yw"`. A client signature can only be set once, the client must be deleted from the registry before its signature can be changed or removed. Client keepalives and check results that are not signed with the correct signature are logged (warn) and discarded. This feature is NOT a replacement for existing and proven security measures.
487
+ - The Sensu plugin installation tool, `sensu-install`, will no longer install a plugin if a or specified version has already been installed.
488
+ - The Sensu client socket now supports UTF-8 encoding.
489
+
490
+ ## [0.21.0]- 2015-11-13
491
+
492
+ ### Breaking Changes
493
+ - Using the Sensu embedded Ruby for Sensu checks, mutators, and handlers has become a common practice. The Sensu 0.21 packages changed the default
494
+ value of `EMBEDDED_RUBY` from `false` to `true`, allowing Sensu plugins to use the embedded Ruby by default. This change makes it easier to get started with Sensu.
495
+
496
+ ### Fixed
497
+ - Improved the Sensu test suite to reduce the number of timeout triggered failures. These changes make Sensu development much more pleasant.
498
+ - Fixed a few inline documentation typos, e.g. sbuded -> subdued.
499
+ - Moved the Sensu bins (e.g. `sensu-client`) from `bin` to `exe` to avoid the conflict with Ruby bundler bin stubs.
500
+ - Fixed Sensu API and client socket input validation, no longer accepting
501
+ multi-line values.
502
+ - Fixed check request publishing for checks that make use of check extensions, e.g. `"extension": "check_http_endpoints`.
503
+ - Fixed the handler `"filters"` bug that caused Sensu to mutate handler definitions, removing filters for successive executions.
504
+ - Fixed Sensu API POST /request endpoint check request publishing to round-robin client subscriptions.
505
+ - Fixed the Windows job handle leak when spawning processes for checks.
506
+ - Updated the Redis client library (em-redis-unified) to remove duplicate
507
+ Ruby hash key warnings.
508
+
509
+ ### Added
510
+ - Added a Sensu plugin installation tool, `sensu-install`, making it easier to install Sensu community plugins. The `sensu-install` tool will use the appropriate Ruby when installing plugins. The tool aims to produce verbose and useful output to help when debugging plugin installation issues.
511
+ - Added the Sensu API DELETE /results/:client/:check endpoint, supporting check result deletion via the Sensu API. This feature allows users to clean up "stale" check result data for checks that have been removed.
512
+ - Added the Sensu API POST /results endpoint, supporting check result input via the Sensu API. The JIT client feature added in 0.20 enabled this functionality. Services that do not have access to a local Sensu client socket can make use of this feature.
513
+
514
+ ## [0.20.6] - 2015-09-22
515
+ ### Fixed
516
+ - Removed the use of `EM::Iterator` from event filtering, replacing it with `Proc` and `EM::next_tick`. `EM::Iterator` creates anonymous classes that cannot be garbage collected on JRuby.
517
+ - The Sensu API will remove a client immediately if there are no current events for it. The API will continue to monitor the current event count for the client to be deleted, deleting the client when there are no longer current events or after a timeout of 5 seconds.
518
+ - The Sensu API will no longer crash while fetching check result data for a
519
+ client that is being deleted.
520
+
521
+ ### Removed
522
+ - Removed sensu-em as a dependency, now using upstream EventMachine 1.0.8.
523
+
524
+ ## [0.20.5] - 2015-09-09
525
+ ### Fixed
526
+ - Updated sensu-spawn to 1.4.0, adding a mutex to ChildProcess Unix POSIX spawn, allowing safe execution on Ruby runtimes with real threads (JRuby).
527
+ - Fixed metric check output truncation when output is empty.
528
+
529
+ ## [0.20.4] - 2015-08-28
530
+ ### Fixed
531
+ - Improved check output truncation. Metric check output is truncated to a single line and 256 characters. Standard check output is not modified.
532
+ - Fixed API /results endpoint, now including all results in a single response (unless pagination is used).
533
+ - Locked amq-protocol to 1.9.2, as 2.x.x does not work on older Rubies.
534
+ - Fixed pipe handler output logging on JRuby.
535
+
536
+ ## [0.20.3] - 2015-08-11
537
+ ### Fixed
538
+ - Improved Sensu server leader election and resignation. Changes include the use of a unique leader ID to help guard against cases where there could be multiple leaders.
539
+ - Fixed bridge extensions; they now receive all event data, including events that normally do not result in an action (e.g. OK check results).
540
+
541
+ ## [0.20.2] - 2015-08-06
542
+ ### Fixed
543
+ - The Sensu API `/clients` route/endpoint is now capable of handling missing client data for a client in the registry.
544
+ - Sensu configuration file loading will now properly follow a link once.
545
+
546
+ ## [0.20.1] - 2015-07-27
547
+ ### Fixed
548
+ - Resolving an event, that includes a check TTL, with the Sensu API will remove the check from TTL monitoring, until another check result with a TTL is received.
549
+ - Added a timestamp to Sensu event data, recording the time of event
550
+ creation.
551
+ - Fixed RabbitMQ transport connection AMQP heartbeat monitoring, the AMQP
552
+ library was sending heartbeat frames on closed connections.
553
+ - The RabbitMQ transport now resets (close connection, etc.) when making
554
+ periodic reconnect attempts. The periodic reconnect timer delay will now
555
+ be incremented by 2 on every attempt, to a maximum of 20 seconds.
556
+
557
+ ## [0.20.0] - 2015-07-09
558
+ ### Fixed
559
+ - The Sensu event action is now correctly set to "create" for metric check events.
560
+ - Updated MultiJson and Childprocess to the latest versions, which include improvements and bug fixes.
561
+ - Sensu now sets the `SENSU_LOADED_TEMPFILE` environment variable to a temporary file path, a file containing the colon delimited list of loaded configuration files for the Sensu service (e.g.`/tmp/sensu_client_loaded_files`). This new temporary file and environment variable (`SENSU_LOADED_TEMPFILE`) replaced `SENSU_CONFIG_FILES`, which has been removed, due to the exec ARG_MAX (E2BIG) error when spawning processes after loading many configuration files (e.g. > 2000).
562
+
563
+ ### Added
564
+ - Sensu services now optionally load connection and client configuration from environment variables. This feature makes it easier to operate Sensu in containerized environments, e.g. Docker. Sensu services read configuration from the following variables: `SENSU_TRANSPORT_NAME`, `RABBITMQ_URL`, `REDIS_URL`, `SENSU_CLIENT_NAME`, `SENSU_CLIENT_ADDRESS`, `SENSU_CLIENT_SUBSCRIPTIONS`, and `SENSU_API_PORT`
565
+
566
+ ## [0.19.2] - 2015-06-08
567
+ ### Fixed
568
+ - Updated sensu-em to fix UDP handlers when running on JRuby, open files
569
+ were not being closed/released properly.
570
+
571
+ ## [0.19.1] - 2015-06-04
572
+ ### Fixed
573
+ - Now using an EventMachine timer for the TCP handler connection timeout, as `pending_connect_timeout()` and `comm_inactivity_timeout()` are not currently supported on all platforms.
574
+ - Updated Thin and UUID tools to the latest versions, which include
575
+ improvements and bug fixes.
576
+
577
+ ## [0.19.0] - 2015-06-01
578
+ ### Fixed
579
+ - POSIX spawn libraries are now loaded upfront/immediately, not at child process creation. This removes the possibility of load race conditions when real threads are used.
580
+ - Many Ruby EventMachine fixes and improvements, including FD_CLOEXEC for the Sensu client UDP socket.
581
+ - Fixed event resolution for flapping events.
582
+ - Check source is now published in check requests if configured. Including
583
+ - the check source in check requests fixes JIT clients for standard (pubsub) check executions and adds context to client check execution log events.
584
+ - JIT clients now have a Sensu version, set to the Sensu server version.
585
+
586
+ ### Added
587
+ - Redis Sensu transport, a built-in alternative to the default RabbitMQ transport. The Redis transport is currently considered experimental. Configuring the transport name to be `redis` will enable the Redis transport instead of RabbitMQ, e.g. `{"transport": {"name": "redis"}}`.
588
+ - Round-robin client subscriptions, allowing check requests to be sent to a single client in a subscription in a round-robin fashion. To create a round-robin subscription, start its name with `roundrobin:` to specify the type, e.g. "roundrobin:elasticsearch". Any check that targets the `"roundrobin:elasticsearch"` subscription will have its check requests sent to clients in a round-robin fashion.
589
+ - Stale check result detection, using a defined check `ttl` and stored check results. Sensu is now able to monitor check results, ensuring that checks with a defined TTL (time to live) continue to be executed by clients. For example, a standalone check could have an interval of 30 seconds and a ttl of 50 seconds, Sensu would expect a result at least once every 50 seconds.
590
+ - Check results API routes/endpoints: `/results`, `/results/:client`, and `/results/:client/:check`. These new check result API routes/endpoints enable new tooling, such as green light dashboards.
591
+
592
+ ## [0.18.1] - 2015-05-11
593
+ ### Fixed
594
+ - Check source is now validated for check results written to the Sensu
595
+ client socket(s), using the same regular expression as the configuration
596
+ attribute validator.
597
+ - The latest versions of Ruby Sinatra and Async Sinatra are now used,
598
+ which include many improvements and bug fixes.
599
+ - Added a caret to the beginning of API routes/endpoints that use regular
600
+ expressions, fixing a bug that caused the wrong route/endpoint to be
601
+ called, e.g. `/clients/client`.
602
+ - Check results written to the Sensu client socket(s) now have a default
603
+ executed timestamp, equal to the current Unix/epoch time.
604
+
605
+ ## [0.18.0] - 2015-05-05
606
+ ### Fixed
607
+ - The Sensu client sockets (TCP/UDP) are now stopped/closed before the
608
+ process is stopped.
609
+
610
+ ### Added
611
+ - Dynamic (or JIT) client creation (in the registry) for check results for a nonexistent client or a check source. Sensu clients can now monitor an external resource on its behalf, using a check `source` to create a JIT client for the resource, used to store the execution history and provide context within event data. JIT client data in the registry can be managed/updated via the Sensu API, POST `/clients`.
612
+ - Storing the latest check result for every client/check pair. This data is currently exposed via the API at `/clients/:client/history` and will be used by several upcoming features.
613
+ - The Sensu API now listens on TCP port `4567` by default.
614
+ - Sensu server leader election lock timestamps now include milliseconds to reduce the chance of a conflict when attempting to elect a new leader.
615
+ - Sensu transport "reconnect_on_error" now defaults to `true`. For the
616
+ RabbitMQ transport, this means AMQP channel errors will result in a
617
+ reconnect. The Sensu transport will always reconnect when there is a loss
618
+ of connectivity.
619
+
620
+ ### Changed
621
+ - Sensu server "master" election is now "leader" election.
622
+ - Configuration file encoding is now forced to 8-bit ASCII and UTF-8 BOMs
623
+ are removed if present.
624
+
625
+ ## [0.17.2] - 2015-04-08
626
+ ### Fixed
627
+ - Fixed a bug where the Sensu server was unable to stop due to the handling event count not being decremented when events were filtered.
628
+
629
+ ## [0.17.1] - 2015-03-30
630
+ ### Added
631
+ - Check requests can now include a check "extension" to run, instead of a
632
+ command.
633
+
634
+ ### Changed
635
+ - Always merge check requests with local check definitions if they exist.
636
+
637
+ ## [0.17.0] - 2015-03-17
638
+ ### Fixed
639
+ - Fixed TLS/SSL on Windows.
640
+ - Fixed event filtering with event action, eg. `"action": "create"`.
641
+ - Bumped MultiJSON to 1.11.0, to make adapters read IO objects prior to
642
+ load.
643
+
644
+ ### Added
645
+ - Improved Sensu client keepalive event check output.
646
+ - Hashed initial check request/execution scheduling splay, consistent over process restarts/reloads.
647
+ - Handler output with multiple lines is now logged as a single log event.
648
+ - Support for Sensu filter extensions.
649
+ - Check definitions can now specify a Sensu check extension to run,
650
+ "extension", instead of a command.
651
+ - Sensu transport "reconnect_on_error" configuration option, to enable
652
+ transport reconnect in the event of an unexpected error. This is set to
653
+ false by default, as some errors are unrecoverable. The Sensu transport
654
+ will always reconnect when there is a loss of connectivity.
655
+ - Sensu Redis "reconnect_on_error" configuration option, to enable Redis
656
+ reconnect in the event of an unexpected error. This is set to false by
657
+ default, as some errors are unrecoverable. The Redis client will always
658
+ reconnect when there is a loss of connectivity.
659
+
660
+ ### Changed
661
+ - Restructured and documented Sensu core with YARD.
662
+
663
+ ## [0.16.0] - 2014-10-31
664
+ ### Fixed
665
+ - Fixed RabbitMQ transport configuration backwards compatibility.
666
+
667
+ ## [0.15.0] - 2014-10-31
668
+ ### Added
669
+ - RabbitMQ transport now supports multiple broker connection options,
670
+ enabling connection fail-over to brokers in a cluster without
671
+ using a load balancer.
672
+
673
+ ## [0.14.0] - 2014-09-29
674
+ ### Fixed
675
+ - Child process manager now supports check output larger than the max OS
676
+ buffer size. The parent process was waiting on the child to exit before closing its write end of the pipe.
677
+ - Client & server are now guarding against invalid JSON transport payloads.
678
+
679
+ ### Added
680
+ - Client socket now supports sending a result via a TCP stream. This feature allows check results to have larger output (metrics, backtraces, etc).
681
+ - API now supports CORS (configurable).
682
+ - Check "source" attribute validation; it must be a string, event data
683
+ consumers no longer have to validate it.
684
+
685
+ ## [0.13.1] - 2014-07-28
686
+
687
+ ### Fixed
688
+ Fixed event occurrence count.
689
+
690
+ ## [0.13.0] - 2014-06-12
691
+ ### Breaking Changes
692
+ - API GET /events now provides all event data, the same data passed to event handlers.
693
+ - AMQP handler type ("amqp") has been replaced by "transport".
694
+ - Standalone check results are no longer merged with check definitions residing on the server(s).
695
+ - Removed the generic extension type.
696
+ - Extension stop() no longer takes a callback, and is called when the
697
+ eventmachine reactor is stopped.
698
+
699
+ ### Fixed
700
+ - Clients now only load instances of check extensions, and servers load
701
+ everything but check extensions.
702
+ - Fixed standalone check scheduling, no longer mutating definitions.
703
+ - Fixed command token substitution, allowing for the use of colons and
704
+ working value defaults.
705
+ - Log events are flushed when the eventmachine reactor stops.
706
+ - Dropped the Oj JSON parser, heap allocation issues and memory leaks.
707
+ - Client RabbitMQ queues are no longer server named (bugs), they are now
708
+ composed of the client name, Sensu version, and the timestamp at creation.
709
+
710
+ ### Added
711
+ - Abstracted the transport layer, opening Sensu up to alternative messaging services.
712
+ - Event bridge extension type, allowing all events to be relayed to other
713
+ services.
714
+ - Client keepalives now contain the Sensu version.
715
+ - Support for nested handler sets (not deep).
716
+ - Setting validation reports all invalid definitions before Sensu exits.
717
+
718
+ ### Changed
719
+ - Server master election lock updates and queries are more frequent.
720
+
721
+ ## [0.12.6] - 2014-02-19
722
+ ### Breaking Changes
723
+
724
+ - The "profiler" extension type `Sensu::Extension::Profiler` is now "generic" `Sensu::Extension::Generic`.
725
+
726
+ ## [0.12.5] - 2014-01-20
727
+ ### Fixed
728
+ - Fixed handler severity filtering, check history is an array of strings.
729
+
730
+ ## [0.12.4] - 2014-01-17
731
+ ### Fixed
732
+ - Fixed filter "eval:" on Ruby 2.1.0, and logging errors.
733
+ - Fixed handler severity filtering when event action is "resolve". Events
734
+ with an action of "resolve" will be negated if the severity conditions have not been met since the last OK status.
735
+
736
+ ## [0.12.3] - 2013-12-19
737
+ ### Breaking Changes
738
+ - The pipe handler and mutator concurrency limit is now imposed by
739
+ `EM::Worker`. A maximum of 12 processes may be spawned at a time.
740
+
741
+ ## [0.12.2] - 2013-11-22
742
+ ### Fixed
743
+ - RabbitMQ connection closed errors are now rescued when attempting to publish to an exchange, while Sensu is reconnecting.
744
+
745
+ ### Changed
746
+ - API routes now have an optional trailing slash.
747
+ - RabbitMQ initial connection timeout increased from 10 to 20 seconds.
748
+
749
+ ## [0.12.1] - 2013-11-02
750
+ ### Fixed
751
+ - Fixed a config loading bug where Sensu was not ignoring files without a
752
+ valid JSON object.
753
+ - Fixed `handling event` log line data for extensions.
754
+
755
+ ### Added
756
+ - API GET `/stashes` now returns stash expiration information, time
757
+ remaining in seconds. eg. [{"path": "foo", "content":{"bar": "baz"},
758
+ "expire": 3598}].
759
+
760
+ ## [0.12.0] - 2013-10-28
761
+ ### Breaking Changes
762
+ - Deprecated API endpoints, `/check/request` and `/event/resolve`, have been removed. Please use `/request` and `/resolve`.
763
+
764
+ ### Fixed
765
+ - Added additional AMQP library version constraints.
766
+ - Improved API POST data validation.
767
+
768
+ ### Added
769
+ - API stashes can now expire, automatically removing themselves after `N`
770
+ seconds, eg. '{"path": "foo", "content":{"bar": "baz"}, "expire": 600}'.
771
+
772
+ ## [0.11.3] - 2013-10-23
773
+ ### Fixed
774
+ - Fixed redacting sensitive information in log lines during configuration
775
+ loading.
776
+ - Fixed AMQP library dependency version resolution.
777
+ - Changed to an older version of the JSON parser, until the source of a
778
+ memory leak is identified.
779
+
780
+ ## [0.11.2] - 2013-10-23
781
+ ### Added
782
+
783
+ - Sensu profiler extension support.
784
+ - Added logger() to the extension API, providing access to the Sensu logger.
785
+
786
+ ## [0.11.1] - 2013-10-16
787
+ ### Fixed
788
+ - Updated "em-redis-unified" dependency version lock, fixing Redis
789
+ reconnect when using authentication and/or select database.
790
+
791
+ ## [0.11.0] - 2013-10-02
792
+ ### Breaking Changes
793
+ - Extensions compatible with previous versions of Sensu will NO LONGER FUNCTION until they are updated for Sensu 0.11.x! Extensions are an experimental feature and not widely used.
794
+ - Sensu settings are now part of the extension API & are no longer passed
795
+ as an argument to run.
796
+
797
+ - TCP handlers no longer have a socket timeout, instead they have a
798
+ handler timeout for consistency.
799
+
800
+ ### Fixed
801
+ - Sensu passes a dup of event data to mutator & handler extensions to
802
+ prevent mutation.
803
+ - Extension runs are wrapped in a begin/rescue block, a safety net.
804
+ - UDP handler now binds to "0.0.0.0".
805
+ - Faster JSON parser.
806
+ - AMQP connection heartbeats will no longer attempt to use a closed channel.
807
+ - Missing AMQP connection heartbeats will result in a reconnect.
808
+ - The keepalive & result queues will now auto-delete when there are no active consumers. This change stops the creation of a keepalive/result backlog, stale data that may overwhelm the recovering consumers.
809
+ - Improved Sensu client socket check validation.
810
+ - AMQP connection will time out if the vhost is missing, there is a lack
811
+ of permissions, or authentication fails.
812
+
813
+ ### Added
814
+ - You can specify the Sensu log severity level using the -L (--log_level)
815
+ CLI argument, providing a valid level (eg. warn).
816
+ - You can specify custom sensitive Sensu client key/values to be redacted from log events and keepalives, eg. `"client": { "redact": [ "secret_access_key" ] }`.
817
+ - You can configure the Sensu client socket (UDP & TCP), bind & port, eg.
818
+ `"client": { "socket": { "bind": "0.0.0.0", "port": 4040 } }`.
819
+ - Handlers & mutators can now have a timeout, in seconds.
820
+ - You can configure the RabbitMQ channel prefetch value (advanced), eg. "rabbitmq": { "prefetch": 100 }.
821
+
822
+ ## [0.10.2] - 2013-07-18
823
+ ### Fixed
824
+ - Fixed redacting passwords in client data, correct value is now provided
825
+ to check command token substitution.
826
+
827
+ ## [0.10.1] - 2013-07-17
828
+ ### Fixed
829
+ - Catches nil exit statuses, returned from check execution.
830
+ - Empty command token substitution defaults now work. eg. "-f :::bar|:::"
831
+ - Specs updated to run on OS X, bash compatibility.
832
+
833
+ ### Added
834
+ - You can specify multiple Sensu service configuration directories,
835
+ using the -d (--config_dir) CLI argument, providing a comma delimited
836
+ list.
837
+ - A post initialize hook ("post_init()") was added to the extension API,
838
+ enabling setup (connections, etc.) within the event loop.
839
+
840
+ ## [0.10.0] - 2013-06-27
841
+ ### Breaking Changes
842
+ - Client & check names must not contain spaces or special characters.
843
+ The valid characters are: `a-z, A-Z, 0-9, "_", ".", and "-"`.
844
+ - "command_executed" was removed from check results, as it may contain sensitive information, such as credentials.
845
+
846
+ ### Fixed
847
+ - Fixed nil check status when check does not exit.
848
+ - Fixed the built-in debug handler output encoding (JSON).
849
+
850
+ ### Added
851
+ - Passwords in client data (keepalives) and log events are replaced with "REDACTED", reducing the possibility of exposure. The following attributes will have their values replaced: `"password", "passwd", and "pass"`.
852
+
853
+ ## [0.9.13] - 2013-05-20
854
+ ### Fixed
855
+ - Validating check results, as bugs in older Sensu clients may produce invalid or malformed results.
856
+ - Improved stale client monitoring, to better handle client deletions.
857
+ - Improved check validation, names must not contain spaces or special
858
+ characters, & an "interval" is not required when "publish" is false.
859
+
860
+ ### Added
861
+ - The Sensu API now provides /health, an endpoint for connection & queue monitoring. Monitor Sensu health with services like Pingdom.
862
+ - Sensu clients can configure their own keepalive handler(s) & thresholds.
863
+ - Command substitution tokens can have default values (eg. `:::foo.bar|default:::`).
864
+ - Check result (& event) data now includes "command_executed", the command after token substitution.
865
+
866
+ ## [0.9.12] - 2013-04-03
867
+ ### Breaking Changes
868
+ - The Sensu API stashes route changed, GET /stashes now returns an array of stash objects, with support for pagination. The API no longer uses POST for multi-get.
869
+ - Sensu services no longer have config file or directory defaults. Configuration paths a left to packaging.
870
+
871
+ ### Fixed
872
+ - All Sensu API 201 & 202 status responses now return a body.
873
+ - The Sensu server now "pauses" when reconnecting to RabbitMQ. Pausing the Sensu server when reconnecting to RabbitMQ fixes an issue when it is also reconnecting to Redis.
874
+ - Keepalive checks now produce results with a zero exit status, fixing keepalive check history.
875
+ - Replaced the JSON parser with a faster implementation.
876
+ - Replaced the Sensu logger with a more lightweight & EventMachine friendly implementation. No more TTY detection with colours.
877
+ - Improved config validation.
878
+
879
+ ### Added
880
+ - The Sensu API now provides client history, providing a list of executed checks, their status histories, and last execution timestamps. The client history endpoint is /clients/\<client-name\>/history, which returns a JSON body.
881
+ - The Sensu API can now bind to a specific address. To bind to an address, use the API configuration key "bind", with a string value (eg. "127.0.0.1").
882
+ - A stop hook was added to the Sensu extension API, enabling gracefull
883
+ stop for extensions. The stop hook is called before the event loop comes to a halt.
884
+ - The Sensu client now supports check extensions, checks the run within the Sensu Ruby VM, for aggresive service monitoring & metric collection.
885
+ - Sensu runs on Ruby 2.0.0p0.
886
+
887
+ ## [0.9.11] - 2013-02-22
888
+ ### Breaking Changes
889
+ - Removed /info "health" in favor of RabbitMQ & Redis "connected".
890
+
891
+ ### Fixed
892
+ - No longer using the default AMQP exchange or publishing directly to queues.
893
+ - Removed API health filter, as the Redis connection now recovers.
894
+ - Fixed config & extension directory loading on Windows.
895
+ - Client socket handles non-ascii input.
896
+
897
+ ### Added
898
+ - API aggregate age filter parameter.
899
+
900
+ ## [0.9.10] - 2013-01-30
901
+ ### Breaking Changes
902
+ - Extensions have access to settings.
903
+
904
+ ### Fixed
905
+ - Client queue names are now determined by the broker (RabbitMQ).
906
+ - Improved zombie reaping.
907
+
908
+ ### Added
909
+ - Handlers can be subdued like checks, suppression windows.
910
+
911
+ ## [0.9.9] - 2013-01-14
912
+ ### Fixed
913
+ - Server is now using basic AMQP QoS (prefetch), just enough back pressure.
914
+ - Improved check execution scheduling.
915
+ - Fixed server execute command method error handling.
916
+ - Events with a resolve action bypass handler severity filtering.
917
+ - Check flap detection configuration validation.
918
+
919
+ ### Added
920
+ - RabbitMQ keepalives & results queue message and consumer counts available via the API (/info).
921
+ - Aggregate results available via the API when using a parameter `(?results=true)`.
922
+ - Event filters; filtering events for handlers, using event attribute matching.
923
+ - TCP handler socket timeout, which defaults to 10 seconds.
924
+ - Check execution timeout.
925
+ - Server extensions (mutators & handlers).
926
+
927
+ ## [0.9.8] - 2012-11-15
928
+ ### Fixed
929
+ - Fixed flap detection.
930
+ - Gracefully handle possible failed RabbitMQ authentication.
931
+ - Catch and log AMQP channel errors, which cause the channel to close.
932
+ - Fixed API event resolution handling, for events created by standalone checks.
933
+ - Minor performance improvements.
934
+
935
+ ### Added
936
+ - Aggregates, pooling and summarizing check results, very handy for monitoring a horizontally scaled or distributed system.
937
+ - Event handler severities, only handle events that have specific
938
+ severities.
939
+
940
+ ## [0.9.7] - 2012-09-20
941
+ ### Breaking Changes
942
+ - AMQP handlers can no longer use `"send_only_check_output": true`, but instead have access to the built-in mutators `"mutator": "only_check_output"` and `"mutator": "only_check_output_split"`.
943
+ - Ruby 1.8.7-p249 is no longer supported, as the AMQP library no longer does. Please use the Sensu APT/YUM packages which contain an embedded Ruby.
944
+ - Client expects check requests to contain a command, be sure to upgrade servers prior to upgrading clients.
945
+ - Check subdue options have been modified, "start" is now "begin".
946
+
947
+ ### Fixed
948
+ - Improved RabbitMQ and Redis connection recovery.
949
+ - Fixed API POST input validation.
950
+ - Redis client connection heartbeat.
951
+ - Improved graceful process termination.
952
+ - Improved client socket ping/pong.
953
+ - Strict dependency version locking.
954
+ - Adjusted logging level for metric events.
955
+
956
+ ### Added
957
+ - Event data mutators, manipulate event data and its format prior to
958
+ sending to a handler.
959
+ - TCP and UDP handler types, for writing event data to sockets.
960
+ - API resources now support singular & plural, Rails friendly.
961
+ - Client safe mode, require local check definition in order to execute a check, disable for simpler deployment (default).