sensu 0.27.0.beta.1 → 0.27.0.beta.2

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: 768682063e96780394b30a632d9f63ea18184421
4
- data.tar.gz: 4e9c6427994c6a6c395b7b588b35d6a558648032
3
+ metadata.gz: 83adf4109f3c09848030c0d401a88af20b4cf4da
4
+ data.tar.gz: 97a18a533fe9212911742f6617c3c6ae3f755ffe
5
5
  SHA512:
6
- metadata.gz: cc2ef82b079573a137a4f943b074717565b7c503382999f82bf4db1536cec474cf65cae07b8393af75d013c63312da14caaba9de3fa73c2df567967bcf073830
7
- data.tar.gz: 3fdca42dd2b54258dd3aefdd7c20306df1fd3f97fc69ee7193d8dbe927519ef28e17e6f83159d5c18f6fd3930ee14ac82666a7fa3eced8cabde81a96c842cd7a
6
+ metadata.gz: 4324f8aa16375f7e0fdc2547bb009ae407bc56d55b322ce323a6bdb0335c40dc6a67f2d866e0e21c607e9d5b72d3042ceeab36132b74d77bd11afb8da18014bc
7
+ data.tar.gz: f30211389bb9c6a68b021f41bcbff6c9c1e8ed956b1db546e9e42de307513ffe4828473ad92cc446faefd0ab5e0a7dcdcd9d3d4a4b48fc4f763c39f5f45c5c9e
data/CHANGELOG.md CHANGED
@@ -1,17 +1,40 @@
1
1
  ## 0.27.0 - TBD
2
2
 
3
+ ### Non-backwards compatible changes
4
+
5
+ Sensu packages no longer include the embedded runit service supervisor.
6
+
7
+ Sensu packages no longer include example service scripts for the Upstart
8
+ service supervisor.
9
+
3
10
  ### Features
4
11
 
5
- Sensu client HTTP socket for check result input and informational queries.
6
- The client HTTP socket provides several endpoints, `/info`, `/results`,
7
- and `/settings`. Basic authentication is supported, which is required for
8
- certain endpoints, i.e. `/settings`. The client HTTP socket is
9
- configurable via the Sensu client definition, `"http_socket": {}`.
12
+ Sensu packages are now built using Chef's Omnibus toolchain. As a result,
13
+ the sensu-build tooling is now deprecated in favor of the sensu-omnibus
14
+ project.
15
+
16
+ Sensu packages built with the new sensu-omnibus toolchain will attempt to
17
+ install sysv init scripts or systemd unit files, depending on the
18
+ detected environment:
19
+
20
+ * If sysv init or upstart is the running init process, sysv init scripts
21
+ will be installed in /etc/init.d.
22
+ * If sysv scripts are present, the package will update them to their
23
+ latest version, even if systemd is the running init process.
24
+ * If no sysv scripts are present and systemd is the running init,
25
+ systemd unit files will be installed in /usr/lib/systemd/system
26
+
27
+ Sensu client now supports an HTTP socket for check result input and
28
+ informational queries. The client HTTP socket listens on port 3031 by
29
+ default, providing `/info`, `/results`, and `/settings` endpoints.
30
+ Basic authentication is supported, and is required for certain endpoints,
31
+ i.e. `/settings`. The client HTTP socket is configurable via the Sensu
32
+ client definition, `"http_socket": {}`.
10
33
 
11
34
  Hostnames are now resolved prior to making connection attempts, this
12
35
  applies to the Sensu Transport (i.e. RabbitMQ) and Redis connections. This
13
- allows Sensu to handle resolution failures and enables failover via DNS
14
- and services like Amazon AWS ElastiCache.
36
+ allows Sensu to better handle resolution failures and DNS failover
37
+ mechanisms used by services like AWS ElastiCache.
15
38
 
16
39
  Added API endpoint `/silenced/ids/:id` for fetching a silence entry by id.
17
40
 
@@ -1,7 +1,7 @@
1
1
  module Sensu
2
2
  unless defined?(Sensu::VERSION)
3
3
  # Sensu release version.
4
- VERSION = "0.27.0.beta.1".freeze
4
+ VERSION = "0.27.0.beta.2".freeze
5
5
 
6
6
  # Sensu check severities.
7
7
  SEVERITIES = %w[ok warning critical unknown].freeze
@@ -458,18 +458,17 @@ module Sensu
458
458
  silenced_keys << "silence:*:#{check_name}"
459
459
  @redis.mget(*silenced_keys) do |silenced|
460
460
  silenced.compact!
461
- event[:silenced] = !silenced.empty?
462
- if event[:silenced]
463
- silenced.each do |silenced_json|
464
- silenced_info = Sensu::JSON.load(silenced_json)
465
- event[:silenced_by] << silenced_info[:id]
461
+ silenced.each do |silenced_json|
462
+ silenced_info = Sensu::JSON.load(silenced_json)
463
+ if silenced_info[:expire_on_resolve] && event[:action] == :resolve
466
464
  silenced_key = "silence:#{silenced_info[:id]}"
467
- if silenced_info[:expire_on_resolve] && event[:action] == :resolve
468
- @redis.srem("silenced", silenced_key)
469
- @redis.del(silenced_key)
470
- end
465
+ @redis.srem("silenced", silenced_key)
466
+ @redis.del(silenced_key)
467
+ else
468
+ event[:silenced_by] << silenced_info[:id]
471
469
  end
472
470
  end
471
+ event[:silenced] = !event[:silenced_by].empty?
473
472
  yield(event)
474
473
  end
475
474
  else
@@ -954,7 +953,7 @@ module Sensu
954
953
  # calculated for each check result. If the time since last
955
954
  # execution is equal to or greater than the check TTL, a warning
956
955
  # check result is published with the appropriate check output.
957
- def determine_stale_check_results
956
+ def determine_stale_check_results(interval = 30)
958
957
  @logger.info("determining stale check results")
959
958
  @redis.smembers("ttl") do |result_keys|
960
959
  result_keys.each do |result_key|
@@ -970,6 +969,7 @@ module Sensu
970
969
  check[:output] = "Last check execution was "
971
970
  check[:output] << "#{time_since_last_execution} seconds ago"
972
971
  check[:status] = check[:ttl_status] || 1
972
+ check[:interval] = interval
973
973
  publish_check_result(client_name, check)
974
974
  end
975
975
  end
@@ -985,10 +985,10 @@ module Sensu
985
985
  # Set up the check result monitor, a periodic timer to run
986
986
  # `determine_stale_check_results()` every 30 seconds. The timer
987
987
  # is stored in the timers hash under `:leader`.
988
- def setup_check_result_monitor
988
+ def setup_check_result_monitor(interval = 30)
989
989
  @logger.debug("monitoring check results")
990
- @timers[:leader] << EM::PeriodicTimer.new(30) do
991
- determine_stale_check_results
990
+ @timers[:leader] << EM::PeriodicTimer.new(interval) do
991
+ determine_stale_check_results(interval)
992
992
  end
993
993
  end
994
994
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sensu
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.27.0.beta.1
4
+ version: 0.27.0.beta.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean Porter
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2016-11-23 00:00:00.000000000 Z
12
+ date: 2016-12-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: eventmachine