sensu-plugins-tripwire 1.1.2 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 483994db380c9059fe6ef216453b50fa620d65be2654c58dfee611d3f280d6ea
4
- data.tar.gz: bca3d5f0d39a448e4bd4e684ec32ece0a6cb978282e54f8320cf7965b2262319
3
+ metadata.gz: 2aba033824723addddbedc5e5efbcad409cf172bf1cd1a7932638940553ca4a1
4
+ data.tar.gz: de3064fbb253d9c9afdfbf2b002f9831bc010839a0ebd6be82313ae6ac274a84
5
5
  SHA512:
6
- metadata.gz: a5d5fd4998aa9e96d0f28786f5189436a8909d7f8517cf6fb0a469b86436dfbbdf428581eb9d4ca1fa2e980373e4e9d4639977c022b6dd809034bc610e9a021f
7
- data.tar.gz: eac75735aa5f5d7bf62fd0980521c33cb0a030097a154eed123737b5ee829ce7d8eddacb70649fd49f2b38710d928d7e3a8ae48cc147a01cfaae1643a0d21cef
6
+ metadata.gz: 1a17953488f748d8ca8c74670b03f9aad69bea89caa2391ba1359d763de6a3b3efc748b437fe600d9eb93ab61324c1cf150f929d66fbe20aae598ed99c192b65
7
+ data.tar.gz: 20cd1fbe347a073c15e5884a68e940e86f030415c4b233d293c023efbd8cc5dfca2814bea784efe9044cda961a12fcb9311710e5cc2ed9dc613647b55e27fed7
data/CHANGELOG.md CHANGED
@@ -4,6 +4,11 @@ This project adheres to [Semantic Versioning](http://semver.org/).
4
4
  This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachangelog.com/)
5
5
 
6
6
  ## [Unreleased]
7
+
8
+ ## [1.2.0] - 2020-02-21
9
+ ### Added
10
+ - Support for a Tripwire configuration file (e.g. `--config-file tw.cfg`).
11
+
7
12
  ## [1.1.2] - 2020-02-18
8
13
  ### Changed
9
14
  - Using GitHub release draft to cut a release.
@@ -61,6 +61,12 @@ class TripwireCheck < Sensu::Plugin::Check::CLI
61
61
  description: 'Password to unlock the keyfile',
62
62
  required: false
63
63
 
64
+ option :configfile,
65
+ short: '-f path/to/configfile',
66
+ long: '--config-file path/to/configfile',
67
+ description: 'Configuration to use for the check',
68
+ required: false
69
+
64
70
  option :database,
65
71
  short: '-d path_or_url_to_database',
66
72
  long: '--database path_or_url_to_database. if an http url is supplied the database will be retrieved prior to the check',
@@ -76,16 +82,18 @@ class TripwireCheck < Sensu::Plugin::Check::CLI
76
82
 
77
83
  option :warn,
78
84
  short: '-w warn severity',
79
- long: '--warn warining severity',
85
+ long: '--warn warning severity',
80
86
  description: 'Tripwire severity greater than this is warning',
81
87
  required: false,
82
88
  default: '66'
83
89
 
84
90
  def run_tripwire
85
- site_key = (config[:sitekey] && "-S #{config[:sitekey]}") || ''
91
+ command = "#{config[:binary]} --check"
92
+ command << " -S #{config[:sitekey]}" if config[:sitekey]
93
+ command << " -c #{config[:configfile]}" if config[:configfile]
86
94
  database = retrieve_database
87
- database = (database && "-d #{database}") || ''
88
- `#{config[:binary]} --check #{site_key} #{database}`
95
+ command << " -d #{database}" if database
96
+ `#{command}`
89
97
  end
90
98
 
91
99
  def retrieve_database
@@ -1,8 +1,8 @@
1
1
  module SensuPluginsTripwire
2
2
  module Version
3
3
  MAJOR = 1
4
- MINOR = 1
5
- PATCH = 2
4
+ MINOR = 2
5
+ PATCH = 0
6
6
 
7
7
  VER_STRING = [MAJOR, MINOR, PATCH].compact.join('.')
8
8
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sensu-plugins-tripwire
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sensu-Plugins and contributors
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-02-19 00:00:00.000000000 Z
11
+ date: 2020-02-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sensu-plugin