sensu-plugins-mailgun 0.0.2 → 1.0.0

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,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- ZWI0MzljOTgxMzgzOWJlZmM2MzUxNzBjZDQ5YmI1NDc1MzU0NWE0OA==
5
- data.tar.gz: !binary |-
6
- NzMyM2FkMGViYjM0OGFlYWNiYzdiOTYxZTVhMDNkZDUzNGU3MzQ1MA==
2
+ SHA1:
3
+ metadata.gz: d96dd443a7944b673e19fbf9c998b722649ab67d
4
+ data.tar.gz: 9889e16a1b0c30bd722f61bf8d1e770ed04019af
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- MGFmYTZkNmJhM2YyODFhYmZkODlkODZmM2YxZGEzYmM4NmRkMWRkMDMzYzdl
10
- OTI1MmEwMGQ0NzM2MzM2OGNkYTUwZjA2YjkyYjVmN2QyMWM1OTAyMWMwMTdl
11
- NmVkOGE4NGEyZGVjZTE1NTRjMDdhZWNkOGIyMjM5Y2ZlZGQ1OGI=
12
- data.tar.gz: !binary |-
13
- ZjcwODg3NTZjMjkyMDhiOGVjNjlkYjU1NWM3YmJhZTA1MGI2YmRlN2Q5MWRm
14
- MTA5YjAzZDUzYzdjMGUwNGYxMGQwOWI5ODMzYmI3NDMyOWU3OTkwYjdkODUy
15
- NDE4NTY2YzA4ZTQyNDNhNGRhZjQ1NjhkMWU4M2Q5NzBkNGMyYzQ=
6
+ metadata.gz: 97749880b3cc5ae8f97bd377a8ad1177db0ba41735d640996686be1dcc884744f827ba3c0f294d845828a898f78cca34ad23840722e7d34ab2723ca56ff92265
7
+ data.tar.gz: 9851acc63e8eb8b3407930623c945107ef0ca355c389d9b94d5a02e53f621d230604a5e9d365d9834dfb93eb096632e086cb5836625494885b58030176e65c97
@@ -1,12 +1,35 @@
1
- #Change Log
1
+ # Change Log
2
2
  This project adheres to [Semantic Versioning](http://semver.org/).
3
3
 
4
4
  This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachangelog.com/)
5
5
 
6
- ## Unreleased
6
+ ## [Unreleased]
7
7
 
8
- ## 0.0.1 2016-02-06
8
+ ## [1.0.0] - 2017-07-15
9
+ ### Added
10
+ - Ruby 2.3.0 testing
11
+ - Ruby 2.4.1 testing
12
+
13
+ ### Removed
14
+ - Ruby 1.9.3 testing
15
+ - Ruby 2.0 testing
16
+
17
+ ## [0.0.2] - 2016-09-25
18
+ ### Added
19
+ - check-mailgun-stats.rb
20
+ - metrics-mailgun-stats.rb
21
+
22
+ ### Fixed
23
+ - timezones and metrics
24
+ - adding runtime deps to gemspec
25
+ - losten dep pinning
26
+
27
+
28
+ ## [0.0.1] - 2016-02-06
9
29
 
10
30
  - initial release
11
31
 
12
- [Unreleased]: https://github.com/sensu-plugins/sensu-plugins-mailgun/compare/0.0.1...HEAD
32
+ [Unreleased]: https://github.com/sensu-plugins/sensu-plugins-mailgun/compare/1.0.0...HEAD
33
+ [1.0.0]: https://github.com/sensu-plugins/sensu-plugins-mailgun/0.0.2...1.0.0
34
+ [0.0.2]: https://github.com/sensu-plugins/sensu-plugins-mailgun/v0.0.1...0.0.2
35
+ [0.0.1]: https://github.com/sensu-plugins/sensu-plugins-mailgun/compare/c37c1b593dcb3c27adb3feb71fd69aa2154c4682...v0.0.1
data/README.md CHANGED
@@ -8,10 +8,19 @@
8
8
 
9
9
  ## Functionality
10
10
 
11
+ This sensu plugin is provides a metric and check for mailgun.
12
+
11
13
  ## Files
12
14
 
15
+ * check-mailgun-stats.rb
16
+ * metrics-mailgun-stats.rb
17
+
13
18
  ## Usage
14
19
 
20
+ Use metrics-mailgun-stats.rb to pull in metrics from mailgun for tags / events / domains.
21
+
22
+ check-mailgun-stats.rb is used to check events from mailgun for domains and tags, for a specific period of time during a month or week.
23
+
15
24
  ## Installation
16
25
 
17
26
  [Installation and Setup](http://sensu-plugins.io/docs/installation_instructions.html)
@@ -0,0 +1,144 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'sensu-plugin/check/cli'
4
+ require 'net/http'
5
+ require 'json'
6
+ require 'time'
7
+ require 'aws-sdk-core'
8
+ require 'tz'
9
+ require 'sensu-plugins-mailgun'
10
+
11
+ class CheckMailgunTotals < Sensu::Plugin::Check::CLI
12
+ include Common
13
+
14
+ option :domains,
15
+ short: '-q DOMAIN',
16
+ long: '--domains DOMAIN',
17
+ description: 'Comma separated list of Mailgun domains to check',
18
+ required: true,
19
+ proc: proc { |d| d.split(',') }
20
+
21
+ option :events,
22
+ short: '-e EVENT',
23
+ long: '--events EVENT',
24
+ default: ['sent'],
25
+ proc: proc { |d| d.split(',') },
26
+ description: 'Comma separated list of Mailgun events to check. Defaults to "sent"'
27
+
28
+ option :tags,
29
+ short: '-t TAGS',
30
+ long: '--tags TAGS',
31
+ default: [],
32
+ proc: proc { |d| d.split(',') },
33
+ description: 'Comma separated list of Mailgun tags to filter by.'
34
+
35
+ option :start_date,
36
+ long: '--start-date START_DATE',
37
+ description: 'The date to receive the stats starting from. YYYY-mm-DD'
38
+
39
+ option :day_of_month,
40
+ short: '-m DAY_OF_MONTH',
41
+ long: '--day-of-month DAY_OF_MONTH',
42
+ description: 'Day of month to run check',
43
+ proc: proc(&:to_i)
44
+
45
+ option :day_of_week,
46
+ short: '-d DAY_OF_WEEK',
47
+ long: '--day-of-week DAY_OF_WEEK',
48
+ description: 'Day of week to run check',
49
+ proc: proc(&:to_i)
50
+
51
+ option :hour_of_day,
52
+ short: '-h HOUR_OF_DAY',
53
+ long: '--hour-of-day HOUR_OF_DAY',
54
+ description: 'Hours of day to run check, utc',
55
+ default: 20,
56
+ proc: proc(&:to_i)
57
+
58
+ option :critical,
59
+ description: 'Count to critical at or below',
60
+ short: '-c COUNT',
61
+ long: '--critical COUNT',
62
+ default: 0,
63
+ proc: proc(&:to_i)
64
+
65
+ option :warning,
66
+ description: 'Count to warn at or below',
67
+ short: '-w WARNING',
68
+ long: '--warning WARNING',
69
+ default: 0,
70
+ proc: proc(&:to_i)
71
+
72
+ option :invert,
73
+ description: 'Invert thresholds to be maximums instead of minimums',
74
+ short: '-i',
75
+ long: '--invert',
76
+ default: false,
77
+ boolean: true
78
+
79
+ option :timezone,
80
+ short: '-z TIMEZONE',
81
+ long: '--timezone TIMEZONE',
82
+ default: 'America/New_York',
83
+ description: 'Timezone to use from ruby gem tz'
84
+
85
+ def run
86
+ curr_time = TZInfo::Timezone.get(config[:timezone]).now
87
+ if curr_time.hour != config[:hour_of_day]
88
+ ok
89
+ end
90
+
91
+ if !config[:day_of_week].nil? && curr_time.wday != config[:day_of_week]
92
+ ok
93
+ end
94
+
95
+ if !config[:day_of_month].nil? && curr_time.day != config[:day_of_month]
96
+ ok
97
+ end
98
+
99
+ merge_s3_config
100
+
101
+ total_sen = gettotal_sen config[:domains], config[:mailgunKey], config[:events], config[:tags], config[:start_date]
102
+
103
+ critical "Expected #{config[:critical]} sent, got #{total_sen}" if total_sen <= config[:critical] && !config[:invert]
104
+ critical "Expected #{config[:critical]} sent, got #{total_sen}" if total_sen > config[:critical] && config[:invert]
105
+
106
+ warning "Expected #{config[:warning]} sent, got #{total_sen}" if total_sen <= config[:warning] && !config[:invert]
107
+ warning "Expected #{config[:warning]} sent, got #{total_sen}" if total_sen > config[:warning] && config[:invert]
108
+
109
+ ok
110
+ end
111
+
112
+ def gettotal_sen(domains, mailgun_key, events, tags, start_date)
113
+ sent = domains.map do |domain|
114
+ begin
115
+ start_date_string = !start_date.nil? ? "&#{start_date}" : ''
116
+ uri = URI("https://api.mailgun.net/v3/#{domain}/stats?#{events.map { |e| "event=#{e}" }.join('&')}&limit=1#{start_date_string}")
117
+ # uri = URI("https://api.mailgun.net/beta/#{domain}/stats/total?event=#{event}&duration=2d")
118
+ req = Net::HTTP::Get.new(uri)
119
+ req.basic_auth 'api', mailgun_key
120
+
121
+ http = Net::HTTP.new(uri.hostname, uri.port)
122
+ http.use_ssl = true
123
+
124
+ res = http.request(req)
125
+ rescue => e
126
+ critical "Error talking to Mailgun API #{e}"
127
+ end
128
+ JSON.parse res.body
129
+ end
130
+
131
+ counts = sent.map do |item|
132
+ if !item.nil?
133
+ if !tags.nil? && !tags.empty? && !(tags.length == 1 && tags[0] == '')
134
+ tags.map { |tag| item['items'][0]['tags'][tag] }.select { |v| !v.nil? }.inject(0) { |a, e| a + e }
135
+ else
136
+ item['items'][0]['total_count']
137
+ end
138
+ else
139
+ 0
140
+ end
141
+ end
142
+ counts.inject(0) { |a, e| a + e }
143
+ end
144
+ end
@@ -0,0 +1,112 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # metrics-mailgun-stats.rb
4
+ #
5
+ # DESCRIPTION:
6
+ #
7
+ #
8
+ # OUTPUT:
9
+ # metric data
10
+ #
11
+ # PLATFORMS:
12
+ # Ruby environment that supports gem dependencies
13
+ #
14
+ # DEPENDENCIES:
15
+ # gem: sensu-plugin, aws-sdk
16
+ #
17
+ # USAGE:
18
+ #
19
+ # NOTES:
20
+ #
21
+ # LICENSE:
22
+ # Leon Gibat brendan.gibat@gmail.com
23
+ # Released under the same terms as Sensu (the MIT license); see LICENSE
24
+ # for details.
25
+
26
+ require 'sensu-plugin/metric/cli'
27
+ require 'net/http'
28
+ require 'json'
29
+ require 'time'
30
+ require '../lib/sensu-plugins-mailgun/common.rb'
31
+
32
+ class MetricsMailgunStats < Sensu::Plugin::Metric::CLI::Graphite
33
+ include Common
34
+
35
+ option :domains,
36
+ short: '-q DOMAIN',
37
+ long: '--domains DOMAIN',
38
+ description: 'Comma separated list of Mailgun domains to check',
39
+ required: true,
40
+ proc: proc { |d| d.split(',') }
41
+
42
+ option :events,
43
+ short: '-e EVENT',
44
+ long: '--events EVENT',
45
+ default: ['sent'],
46
+ proc: proc { |d| d.split(',') },
47
+ description: 'Comma separated list of Mailgun events to check. Defaults to "sent"'
48
+
49
+ option :tags,
50
+ short: '-t TAGS',
51
+ long: '--tags TAGS',
52
+ default: [],
53
+ proc: proc { |d| d.split(',') },
54
+ description: 'Comma separated list of Mailgun tags to filter by.'
55
+
56
+ option :start_date,
57
+ long: '--start-date START_DATE',
58
+ description: 'The date to receive the stats starting from. YYYY-mm-DD'
59
+
60
+ option :since_last_execution,
61
+ long: '--since-last-execution',
62
+ boolean: true,
63
+ description: 'If the start date should be the last '
64
+
65
+ option :scheme,
66
+ description: 'Metric naming scheme',
67
+ long: '--scheme SCHEME',
68
+ default: "#{Socket.gethostname}.mailgun.aggregates"
69
+
70
+ def run
71
+ merge_s3_config
72
+
73
+ total = total_sent config[:domains], config[:mailgunKey], config[:events], config[:tags]
74
+
75
+ output config[:scheme], total, Time.now.utc
76
+
77
+ ok
78
+ end
79
+
80
+ def total_sent(domains, mailgun_key, events, tags)
81
+ sent = domains.map do |domain|
82
+ begin
83
+ event_values = events.map { |e| "event=#{e}" }.join('&')
84
+ uri = URI("https://api.mailgun.net/v3/#{domain}/stats?#{event_values}&limit=1")
85
+ req = Net::HTTP::Get.new(uri)
86
+ req.basic_auth 'api', mailgun_key
87
+
88
+ http = Net::HTTP.new(uri.hostname, uri.port)
89
+ http.use_ssl = true
90
+
91
+ res = http.request(req)
92
+ rescue => e
93
+ critical "Error talking to Mailgun API #{e}"
94
+ end
95
+ JSON.parse res.body
96
+ end
97
+
98
+ counts = sent.map do |item|
99
+ puts item
100
+ if !item.nil?
101
+ if !tags.nil? && !tags.empty? && !(tags.length == 1 && tags[0] == '')
102
+ tags.map { |tag| item['items'][0]['tags'][tag] }.select { |v| !v.nil? }.inject(0) { |a, e| a + e }
103
+ else
104
+ item['items'][0]['total_count']
105
+ end
106
+ else
107
+ 0
108
+ end
109
+ end
110
+ counts.inject(0) { |a, e| a + e }
111
+ end
112
+ end
@@ -1 +1,2 @@
1
1
  require 'sensu-plugins-mailgun/version'
2
+ require 'sensu-plugins-mailgun/common'
@@ -0,0 +1,29 @@
1
+
2
+ module Common
3
+ def initialize
4
+ super()
5
+ end
6
+
7
+ def get_check_last_runtime(client, check)
8
+ request = RestClient::Resource.new(
9
+ "#{config[:sensu_scheme]}://#{config[:sensu_api]}:#{config[:sensu_port]}/#{client}/#{check}",
10
+ timeout: config[:sensu_timeout],
11
+ user: config[:sensu_user],
12
+ password: config[:sensu_password]
13
+ )
14
+ check = JSON.parse(request.get, symbolize_names: true)
15
+ Time.at(check[:check][:issued])
16
+ rescue RestClient::ResourceNotFound
17
+ nil
18
+ rescue Errno::ECONNREFUSED
19
+ warning 'Connection refused'
20
+ rescue RestClient::RequestFailed
21
+ warning 'Request failed'
22
+ rescue RestClient::RequestTimeout
23
+ warning 'Connection timed out'
24
+ rescue RestClient::Unauthorized
25
+ warning 'Missing or incorrect Sensu API credentials'
26
+ rescue JSON::ParserError
27
+ warning 'Sensu API returned invalid JSON'
28
+ end
29
+ end
@@ -1,8 +1,8 @@
1
1
  module SensuPluginsMailgun
2
2
  module Version
3
- MAJOR = 0
3
+ MAJOR = 1
4
4
  MINOR = 0
5
- PATCH = 2
5
+ PATCH = 0
6
6
 
7
7
  VER_STRING = [MAJOR, MINOR, PATCH].compact.join('.')
8
8
  end
metadata CHANGED
@@ -1,196 +1,212 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sensu-plugins-mailgun
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sensu-Plugins and contributors
8
8
  autorequire:
9
9
  bindir: bin
10
- cert_chain:
11
- - !binary |-
12
- LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURuakNDQW9hZ0F3SUJB
13
- Z0lCQVRBTkJna3Foa2lHOXcwQkFRVUZBREJLTVJVd0V3WURWUVFEREF4elpX
14
- NXoKZFMxd2JIVm5hVzR4SFRBYkJnb0praWFKay9Jc1pBRVpGZzF6Wlc1emRT
15
- MXdiSFZuYVc1ek1SSXdFQVlLQ1pJbQppWlB5TEdRQkdSWUNhVzh3SGhjTk1U
16
- WXdNakEwTWpNeU1qRTNXaGNOTVRjd01qQXpNak15TWpFM1dqQktNUlV3CkV3
17
- WURWUVFEREF4elpXNXpkUzF3YkhWbmFXNHhIVEFiQmdvSmtpYUprL0lzWkFF
18
- WkZnMXpaVzV6ZFMxd2JIVm4KYVc1ek1SSXdFQVlLQ1pJbWlaUHlMR1FCR1JZ
19
- Q2FXOHdnZ0VpTUEwR0NTcUdTSWIzRFFFQkFRVUFBNElCRHdBdwpnZ0VLQW9J
20
- QkFRQy9VUzNmdEkyUmQrOWQzS3JIQUw0bERsOGxhN2s2ZHA3K1RPY210VHd3
21
- YzRiMUwzV0NyeEFoClpDWms1Q3k2aUpvWUd4VHVoNittSDJZZ3ExbHZGRE4v
22
- NTh5YVRHTVFINzNRYVJjZjVnak9IMkJSQTlkUWRzWUgKYTNZYnMrbGxwVlYv
23
- ZC9kMklaYyt2RU9tc21rTFpVeEhzZFdQSTZsWTBuYXJwU2RxNHNML0lXWWZP
24
- aW1ocFFTWgpTV0t5WHg5cjM4UFpZZ0Q3djIydjloNTZkcUpQZFFPY29OODhF
25
- NkE4YTdQWTcvL1RweWdTREtuSldudkFwS1JxCjNCN0xMaFNkOTRQMHdRcGow
26
- MS9sb05Nd0FCMytGQjRRQ0UrdG1QeFYxZ1Q2ZWE4VW1SNjQrcGZKTFN0NGl5
27
- N0gKVGc5OTdCZFZqaURJdG5SYzhCSXNjVFl4S2JRai9wTEhBZ01CQUFHamdZ
28
- NHdnWXN3Q1FZRFZSMFRCQUl3QURBTApCZ05WSFE4RUJBTUNCTEF3SFFZRFZS
29
- ME9CQllFRk5McjBmZ1BmdnlWK0VneEVGRHhVcVFhU2xScE1DZ0dBMVVkCkVR
30
- UWhNQitCSFhObGJuTjFMWEJzZFdkcGJrQnpaVzV6ZFMxd2JIVm5hVzV6TG1s
31
- dk1DZ0dBMVVkRWdRaE1CK0IKSFhObGJuTjFMWEJzZFdkcGJrQnpaVzV6ZFMx
32
- d2JIVm5hVzV6TG1sdk1BMEdDU3FHU0liM0RRRUJCUVVBQTRJQgpBUUNQZTZ0
33
- RUJ0NS9uQzk1aFhvS2VLRmhrWVc5bTE2aU5YdWRKeEorZGRYcnpDc2tEMXk2
34
- ajZjQXY0a1FlUDFmClBIbDE4aDVrOWtKeElQU1IrcUkrK2JJbDE3ZUVPU096
35
- YXNMbXdzdGFNU25NN3U1UWZMcFdFWTJldVZXQkRzdGQKMmhrcG80VSswSzVT
36
- d3ptZEphMFdLQXRmS3ZkdENROGk5MllJUCtIODNFdXZDU0xwZ29aaDYzRXJx
37
- dVFVY25lbgphZmg1bHVUQkExaTFjcUJHNEFNSjBmTFdHeU9xSmFYOFA5WnN4
38
- RERXUEVCbk5TaVd2WGIrSUttSkFWTzF1VzRrClFOODNielZXU1d1bFk4Qlk2
39
- a1grSVFNd1lhelpBbEIvMTNkN2E4VTBoN0NyYjM2Sm5TUGF0aHVSemU0cUtY
40
- RlEKM2YzVFVaV3d2UmZ0Y1N1K3Z0Y0JSa00wCi0tLS0tRU5EIENFUlRJRklD
41
- QVRFLS0tLS0K
42
- date: 2016-02-07 00:00:00.000000000 Z
10
+ cert_chain: []
11
+ date: 2017-07-15 00:00:00.000000000 Z
43
12
  dependencies:
44
13
  - !ruby/object:Gem::Dependency
45
14
  name: sensu-plugin
46
15
  requirement: !ruby/object:Gem::Requirement
47
16
  requirements:
48
- - - ~>
17
+ - - "~>"
49
18
  - !ruby/object:Gem::Version
50
- version: '1.2'
19
+ version: '1.3'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.3'
27
+ - !ruby/object:Gem::Dependency
28
+ name: json
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '='
32
+ - !ruby/object:Gem::Version
33
+ version: 1.8.5
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '='
39
+ - !ruby/object:Gem::Version
40
+ version: 1.8.5
41
+ - !ruby/object:Gem::Dependency
42
+ name: tz
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - '='
46
+ - !ruby/object:Gem::Version
47
+ version: 0.0.1
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - '='
53
+ - !ruby/object:Gem::Version
54
+ version: 0.0.1
55
+ - !ruby/object:Gem::Dependency
56
+ name: tzinfo
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - '='
60
+ - !ruby/object:Gem::Version
61
+ version: 1.2.2
51
62
  type: :runtime
52
63
  prerelease: false
53
64
  version_requirements: !ruby/object:Gem::Requirement
54
65
  requirements:
55
- - - ~>
66
+ - - '='
56
67
  - !ruby/object:Gem::Version
57
- version: '1.2'
68
+ version: 1.2.2
58
69
  - !ruby/object:Gem::Dependency
59
70
  name: bundler
60
71
  requirement: !ruby/object:Gem::Requirement
61
72
  requirements:
62
- - - ~>
73
+ - - "~>"
63
74
  - !ruby/object:Gem::Version
64
75
  version: '1.7'
65
76
  type: :development
66
77
  prerelease: false
67
78
  version_requirements: !ruby/object:Gem::Requirement
68
79
  requirements:
69
- - - ~>
80
+ - - "~>"
70
81
  - !ruby/object:Gem::Version
71
82
  version: '1.7'
72
83
  - !ruby/object:Gem::Dependency
73
84
  name: codeclimate-test-reporter
74
85
  requirement: !ruby/object:Gem::Requirement
75
86
  requirements:
76
- - - ~>
87
+ - - "~>"
77
88
  - !ruby/object:Gem::Version
78
89
  version: '0.4'
79
90
  type: :development
80
91
  prerelease: false
81
92
  version_requirements: !ruby/object:Gem::Requirement
82
93
  requirements:
83
- - - ~>
94
+ - - "~>"
84
95
  - !ruby/object:Gem::Version
85
96
  version: '0.4'
86
97
  - !ruby/object:Gem::Dependency
87
98
  name: github-markup
88
99
  requirement: !ruby/object:Gem::Requirement
89
100
  requirements:
90
- - - ~>
101
+ - - "~>"
91
102
  - !ruby/object:Gem::Version
92
103
  version: '1.3'
93
104
  type: :development
94
105
  prerelease: false
95
106
  version_requirements: !ruby/object:Gem::Requirement
96
107
  requirements:
97
- - - ~>
108
+ - - "~>"
98
109
  - !ruby/object:Gem::Version
99
110
  version: '1.3'
100
111
  - !ruby/object:Gem::Dependency
101
112
  name: pry
102
113
  requirement: !ruby/object:Gem::Requirement
103
114
  requirements:
104
- - - ~>
115
+ - - "~>"
105
116
  - !ruby/object:Gem::Version
106
117
  version: '0.10'
107
118
  type: :development
108
119
  prerelease: false
109
120
  version_requirements: !ruby/object:Gem::Requirement
110
121
  requirements:
111
- - - ~>
122
+ - - "~>"
112
123
  - !ruby/object:Gem::Version
113
124
  version: '0.10'
114
125
  - !ruby/object:Gem::Dependency
115
126
  name: rake
116
127
  requirement: !ruby/object:Gem::Requirement
117
128
  requirements:
118
- - - ~>
129
+ - - "~>"
119
130
  - !ruby/object:Gem::Version
120
131
  version: '10.5'
121
132
  type: :development
122
133
  prerelease: false
123
134
  version_requirements: !ruby/object:Gem::Requirement
124
135
  requirements:
125
- - - ~>
136
+ - - "~>"
126
137
  - !ruby/object:Gem::Version
127
138
  version: '10.5'
128
139
  - !ruby/object:Gem::Dependency
129
140
  name: redcarpet
130
141
  requirement: !ruby/object:Gem::Requirement
131
142
  requirements:
132
- - - ~>
143
+ - - "~>"
133
144
  - !ruby/object:Gem::Version
134
145
  version: '3.2'
135
146
  type: :development
136
147
  prerelease: false
137
148
  version_requirements: !ruby/object:Gem::Requirement
138
149
  requirements:
139
- - - ~>
150
+ - - "~>"
140
151
  - !ruby/object:Gem::Version
141
152
  version: '3.2'
142
153
  - !ruby/object:Gem::Dependency
143
154
  name: rubocop
144
155
  requirement: !ruby/object:Gem::Requirement
145
156
  requirements:
146
- - - ~>
157
+ - - "~>"
147
158
  - !ruby/object:Gem::Version
148
- version: '0.37'
159
+ version: 0.40.0
149
160
  type: :development
150
161
  prerelease: false
151
162
  version_requirements: !ruby/object:Gem::Requirement
152
163
  requirements:
153
- - - ~>
164
+ - - "~>"
154
165
  - !ruby/object:Gem::Version
155
- version: '0.37'
166
+ version: 0.40.0
156
167
  - !ruby/object:Gem::Dependency
157
168
  name: rspec
158
169
  requirement: !ruby/object:Gem::Requirement
159
170
  requirements:
160
- - - ~>
171
+ - - "~>"
161
172
  - !ruby/object:Gem::Version
162
173
  version: '3.4'
163
174
  type: :development
164
175
  prerelease: false
165
176
  version_requirements: !ruby/object:Gem::Requirement
166
177
  requirements:
167
- - - ~>
178
+ - - "~>"
168
179
  - !ruby/object:Gem::Version
169
180
  version: '3.4'
170
181
  - !ruby/object:Gem::Dependency
171
182
  name: yard
172
183
  requirement: !ruby/object:Gem::Requirement
173
184
  requirements:
174
- - - ~>
185
+ - - "~>"
175
186
  - !ruby/object:Gem::Version
176
187
  version: '0.8'
177
188
  type: :development
178
189
  prerelease: false
179
190
  version_requirements: !ruby/object:Gem::Requirement
180
191
  requirements:
181
- - - ~>
192
+ - - "~>"
182
193
  - !ruby/object:Gem::Version
183
194
  version: '0.8'
184
195
  description: Sensu mailgun plugins
185
- email: <sensu-users@googlegroups.com>
186
- executables: []
196
+ email: "<sensu-users@googlegroups.com>"
197
+ executables:
198
+ - check-mailgun-stats.rb
199
+ - metrics-mailgun-stats.rb
187
200
  extensions: []
188
201
  extra_rdoc_files: []
189
202
  files:
190
203
  - CHANGELOG.md
191
204
  - LICENSE
192
205
  - README.md
206
+ - bin/check-mailgun-stats.rb
207
+ - bin/metrics-mailgun-stats.rb
193
208
  - lib/sensu-plugins-mailgun.rb
209
+ - lib/sensu-plugins-mailgun/common.rb
194
210
  - lib/sensu-plugins-mailgun/version.rb
195
211
  homepage: https://github.com/sensu-plugins/sensu-plugins-mailgun
196
212
  licenses:
@@ -208,12 +224,12 @@ require_paths:
208
224
  - lib
209
225
  required_ruby_version: !ruby/object:Gem::Requirement
210
226
  requirements:
211
- - - ! '>='
227
+ - - ">="
212
228
  - !ruby/object:Gem::Version
213
- version: 1.9.3
229
+ version: 2.1.0
214
230
  required_rubygems_version: !ruby/object:Gem::Requirement
215
231
  requirements:
216
- - - ! '>='
232
+ - - ">="
217
233
  - !ruby/object:Gem::Version
218
234
  version: '0'
219
235
  requirements: []
Binary file
data.tar.gz.sig DELETED
Binary file
metadata.gz.sig DELETED
Binary file