sensu-plugins-github 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/CHANGELOG.md +4 -0
- data/README.md +1 -0
- data/bin/check-github-system-status.rb +54 -0
- data/lib/sensu-plugins-github/version.rb +1 -1
- metadata +4 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d65eb1a17bac50f33b0f2db60f0e940366ecd4d7
|
4
|
+
data.tar.gz: ebf4b5ffba0356e7670f1cd700bdf8f1517a77e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1b76dea292fd685a82f6a5795b1ddbbef70645f8fe7da4c2dfae2c22577353cf5688cfe12c29574ba5416b8b0330fe03834b64db9278613d7206651b7d8516b9
|
7
|
+
data.tar.gz: dc3876ea3313cd91bd8ae5a47f6925f8f57184a4455f54cec387ecc9a23cb08cbbd33a64504e82632972df6b65b1cd5903f4c3ed3a35af6ccb8bd00901b1ac56
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/CHANGELOG.md
CHANGED
@@ -5,6 +5,10 @@ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachang
|
|
5
5
|
|
6
6
|
## Unreleased[unreleased]
|
7
7
|
|
8
|
+
## [1.1.0] - 2015-09-10
|
9
|
+
### Added
|
10
|
+
- check-github-system-status for checking the status of github itself
|
11
|
+
|
8
12
|
## [1.0.0] - 2015-08-14
|
9
13
|
### Added
|
10
14
|
- check-github-rate-limit.rb for checking the rate limit of a user
|
data/README.md
CHANGED
@@ -0,0 +1,54 @@
|
|
1
|
+
#! /usr/bin/env ruby
|
2
|
+
#
|
3
|
+
# check-github-system-status.rb
|
4
|
+
#
|
5
|
+
# DESCRIPTION:
|
6
|
+
# Interacts with Github Status API to check the system status of Github.com itself.
|
7
|
+
#
|
8
|
+
# OUTPUT:
|
9
|
+
#
|
10
|
+
# PLATFORMS:
|
11
|
+
# All
|
12
|
+
#
|
13
|
+
# DEPENDENCIES:
|
14
|
+
# gem: sensu-plugin
|
15
|
+
# gem: rest-client
|
16
|
+
# gem: json
|
17
|
+
#
|
18
|
+
# USAGE:
|
19
|
+
#
|
20
|
+
#
|
21
|
+
# NOTES:
|
22
|
+
#
|
23
|
+
#
|
24
|
+
# LICENSE:
|
25
|
+
# Copyright 2015 Yieldbot, devops@yieldbot.com
|
26
|
+
# Released under the same terms as Sensu (the MIT license); see LICENSE
|
27
|
+
# for details.
|
28
|
+
#
|
29
|
+
|
30
|
+
require 'sensu-plugin/check/cli'
|
31
|
+
require 'rest-client'
|
32
|
+
require 'json'
|
33
|
+
|
34
|
+
class CheckSystemStatus < Sensu::Plugin::Check::CLI
|
35
|
+
def api_request(endpoint)
|
36
|
+
request = RestClient::Resource.new(endpoint)
|
37
|
+
JSON.parse(request.get)
|
38
|
+
rescue RestClient::ResourceNotFound
|
39
|
+
warning "Resource not found (or not accessible): #{resource}"
|
40
|
+
rescue Errno::ECONNREFUSED
|
41
|
+
warning 'Connection refused'
|
42
|
+
rescue RestClient::RequestFailed => e
|
43
|
+
warning "Request failed: #{e.inspect}"
|
44
|
+
rescue RestClient::RequestTimeout
|
45
|
+
warning 'Connection timed out'
|
46
|
+
rescue JSON::ParserError
|
47
|
+
warning 'Github API returned invalid JSON'
|
48
|
+
end
|
49
|
+
|
50
|
+
def run
|
51
|
+
status_url = 'https://status.github.com/api/status.json'
|
52
|
+
ok api_request(status_url)
|
53
|
+
end
|
54
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sensu-plugins-github
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sensu Plugins and contributors
|
@@ -30,7 +30,7 @@ cert_chain:
|
|
30
30
|
8sHuVruarogxxKPBzlL2is4EUb6oN/RdpGx2l4254+nyR+abg//Ed27Ym0PkB4lk
|
31
31
|
HP0m8WSjZmFr109pE/sVsM5jtOCvogyujQOjNVGN4gz1wwPr
|
32
32
|
-----END CERTIFICATE-----
|
33
|
-
date: 2015-
|
33
|
+
date: 2015-09-10 00:00:00.000000000 Z
|
34
34
|
dependencies:
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: rest-client
|
@@ -191,6 +191,7 @@ email: "<sensu-users@googlegroups.com>"
|
|
191
191
|
executables:
|
192
192
|
- github-repo-metrics.rb
|
193
193
|
- check-user-2fa.rb
|
194
|
+
- check-github-system-status.rb
|
194
195
|
- check-github-rate-limit.rb
|
195
196
|
extensions: []
|
196
197
|
extra_rdoc_files: []
|
@@ -199,6 +200,7 @@ files:
|
|
199
200
|
- LICENSE
|
200
201
|
- README.md
|
201
202
|
- bin/check-github-rate-limit.rb
|
203
|
+
- bin/check-github-system-status.rb
|
202
204
|
- bin/check-user-2fa.rb
|
203
205
|
- bin/github-repo-metrics.rb
|
204
206
|
- lib/sensu-plugins-github.rb
|
metadata.gz.sig
CHANGED
Binary file
|