lita-sensu 0.1.0 → 0.1.1

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
  SHA1:
3
- metadata.gz: 4baba6224f27645733a5b860d864041d3a4700f6
4
- data.tar.gz: 054dc0ba79a352b44c9f562afd9ec74ec547f021
3
+ metadata.gz: 87b5befe154037c096d9e44b6d11580a41163735
4
+ data.tar.gz: 727ff8794a2b6c3d0b6b056a53b1b3a6fe68c80c
5
5
  SHA512:
6
- metadata.gz: a58e9647abdf7b512832d70091b856d44992fddee454aeb698bfd6dba2ea94046aa62d2064f749b1689428475b63b52bab4c0f40439ab3de63f0aa65992bdbc4
7
- data.tar.gz: 28a0d79bdae1df530cb1fa348f8b8ffb13513791712dcd58e6d10075996d9c0b0130fd30300841d6d80ffd98168f0c7cee0482798b33cf7697d671e9eaf89865
6
+ metadata.gz: b742b422fb67017aa01b6128138c120484873c57c481d45993b249d785cb0947480e435bba5fb6afb773b775d1c2a53ba29f481bd5125c220b20147a9f28a328
7
+ data.tar.gz: 1720affdfd77459b26c38981a45f952b5cd0002689133ea82a139777e9bcbd3726f89ea588f357b6794ede886ec6b999500b23a35a3f9f1595eea9f996a2bee3
data/README.md CHANGED
@@ -1,10 +1,12 @@
1
1
  # lita-sensu
2
2
 
3
+ [![Gem Version](http://img.shields.io/gem/v/lita-sensu.svg)](https://rubygems.org/gems/lita-sensu)
3
4
  [![Build Status](https://travis-ci.org/jlambert121/lita-sensu.png?branch=master)](https://travis-ci.org/jlambert121/lita-sensu)
4
5
  [![Coverage Status](https://coveralls.io/repos/jlambert121/lita-sensu/badge.png)](https://coveralls.io/r/jlambert121/lita-sensu)
5
6
 
6
- TODO: Add a description of the plugin.
7
+ Lita handler for working with the [Sensu](http://sensuapp.org) monitoring framework.
7
8
 
9
+ **Note**: This handler requires Lita >= 4.3.
8
10
  ## Installation
9
11
 
10
12
  Add lita-sensu to your Lita instance's Gemfile:
@@ -15,8 +17,31 @@ gem "lita-sensu"
15
17
 
16
18
  ## Configuration
17
19
 
18
- TODO: Describe any configuration attributes the plugin exposes.
20
+ The sensu handler needs to be configured with information about your sensu
21
+ installation. Add the following configuration to your `lita_config.rb`. All
22
+ parameters are optional, by default the handler will connect to 127.0.0.1:4567
23
+ for the sensu API service.
24
+
25
+ ```ruby
26
+ config.handlers.sensu.api_url = '127.0.0.1'
27
+ config.handlers.sensu.api_port = 4567
28
+ config.handlers.sensu.domain = 'mydomain.com'
29
+ ```
19
30
 
20
31
  ## Usage
21
32
 
22
- TODO: Describe the plugin's features and how to use them.
33
+ Available commands:
34
+
35
+ `sensu client <client>` - Shows information on a specific client
36
+ `sensu client <client> history` - Shows history information for a specific client
37
+ `sensu clients` - List sensu clients
38
+ `sensu events` [for <client>] - Shows current events, optionally for only a specific client
39
+ `sensu info` - Displays sensu information
40
+ `sensu remove client <client>` - Remove client from sensu
41
+ `sensu resolve event <client>[/service]` - Resolve event/all events for client
42
+ `sensu silence <hostname>[/<check>][ for <duration><units>]` - Silence event
43
+ `sensu stashes` - Displays current sensu stashes
44
+
45
+ ## License
46
+
47
+ [Apache-2.0](http://opensource.org/licenses/Apache-2.0)
@@ -17,9 +17,9 @@ module Lita
17
17
  route(/sensu clients/, :clients, help: {"sensu clients" => "List sensu clients"})
18
18
  route(/sensu events(?: for (.*))?/, :events, help: {"sensu events [for <client>]" => "Shows current events, optionally for only a specific client"})
19
19
  route(/sensu info/, :info, help: { "sensu info" => "Displays sensu information"})
20
- route(/sensu remove client (.*)/, :remove_client, help: {"sensu remove client <client>" => "Remove client from sensu"})
21
- route(/sensu resolve event (.*)(?:\/)(.*)/, :resolve, help: {"sensu resolve event <client>[/service]" => "Resolve event/all events for client"})
22
- route(/sensu silence ([^\s\/]*)(?:\/)?([^\s]*)?(?: for (\d+)(\w))?/, :silence, help: {"sensu silence <hostname>[/<check>][ for <duration><units>]" => "Silence event"})
20
+ route(/(?:sensu\s+)?remove client (.*)/, :remove_client, help: {"sensu remove client <client>" => "Remove client from sensu"})
21
+ route(/(?:sensu\s+)?resolve event (.*)(?:\/)(.*)/, :resolve, help: {"sensu resolve event <client>[/service]" => "Resolve event/all events for client"})
22
+ route(/(?:sensu\s+)?silence ([^\s\/]*)(?:\/)?([^\s]*)?(?: for (\d+)(\w))?/, :silence, help: {"sensu silence <hostname>[/<check>][ for <duration><units>]" => "Silence event"})
23
23
  route(/sensu stash(es)?/, :stashes, help: {"sensu stashes" => "Displays current sensu stashes"})
24
24
 
25
25
  def client(response)
data/lita-sensu.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "lita-sensu"
3
- spec.version = "0.1.0"
3
+ spec.version = "0.1.1"
4
4
  spec.authors = ["Justin Lambert"]
5
5
  spec.email = ["jlambert@eml.cc"]
6
6
  spec.description = "Lita plugin to interact with sensu"
@@ -9,8 +9,12 @@ describe Lita::Handlers::Sensu, lita_handler: true do
9
9
  it { is_expected.to route_command('sensu events for test1').to(:events) }
10
10
  it { is_expected.to route_command('sensu info').to(:info) }
11
11
  it { is_expected.to route_command('sensu remove client test1').to(:remove_client) }
12
+ it { is_expected.to route_command('remove client test1').to(:remove_client) }
12
13
  it { is_expected.to route_command('sensu resolve event test1/check2').to(:resolve) }
14
+ it { is_expected.to route_command('resolve event test1/check2').to(:resolve) }
15
+ it { is_expected.to route_command('resolve event test1/check2').to(:resolve) }
13
16
  it { is_expected.to route_command('sensu silence test1').to(:silence) }
17
+ it { is_expected.to route_command('silence test1').to(:silence) }
14
18
  it { is_expected.to route_command('sensu silence test1 check2').to(:silence) }
15
19
  it { is_expected.to route_command('sensu silence test1/check2').to(:silence) }
16
20
  it { is_expected.to route_command('sensu stashes').to(:stashes) }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lita-sensu
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Lambert
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-13 00:00:00.000000000 Z
11
+ date: 2015-04-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lita
@@ -137,7 +137,6 @@ files:
137
137
  - Rakefile
138
138
  - lib/lita-sensu.rb
139
139
  - lib/lita/handlers/sensu.rb
140
- - lib/lita/handlers/sensu_api.rb
141
140
  - lita-sensu.gemspec
142
141
  - locales/en.yml
143
142
  - spec/lita/handlers/sensu_spec.rb
@@ -1,10 +0,0 @@
1
- class SensuApi
2
-
3
- attr_reader :http, :config
4
-
5
- def initalize(http, config)
6
- @http = http
7
- @config = config
8
- end
9
-
10
- end