Skip to content
This repository has been archived by the owner on Dec 6, 2022. It is now read-only.

Commit

Permalink
add some dets
Browse files Browse the repository at this point in the history
  • Loading branch information
ripienaar committed Aug 19, 2015
1 parent e6d83fe commit 538f2a1
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 0 deletions.
32 changes: 32 additions & 0 deletions README.md
@@ -0,0 +1,32 @@
What?
=====

A plugin for BitBar to show Sensu events

![Screenshot](screenshot.png)

Setup?
------

Install [BitBar](https://github.com/matryer/bitbar) and copy the ```sensu.1m.rb``` file to the directory
you choose as your plugin directory.

You can monitor multiple Sensu installs by just copying the file to a new name, the frequency of updates
can be set by changing ```1m``` to ```5m``` in the file name. See the BitBar docs for more options

Edit the contants at the top of each script to your taste:

```ruby
SENSU_NAME="Sensu" # text appearing on the menu in green/red/yello
SENSU_HOST="http://sensu.example.net:4567/" # your sensu api
DASHBOARD_URL="http://uchiwa.example.net/#/events" # a link that will open if you click on an event
PROXY="http://10.1.4.1" # set to nil to avoid using a proxy
SHOW_EVENTS=5 # how many events to show in the drop down
```

And enjoy

Contact?
========

R.I.Pienaar / rip@devco.net / @ripienaar / http://devco.net/
Binary file added screenshot.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions sensu.1m.rb
Expand Up @@ -44,6 +44,10 @@
issues[0..SHOW_EVENTS].each do |issue|
puts "%s - %s | color=%s href=%s" % [issue[:client], issue[:check], COLORS[issue[:status]], DASHBOARD_URL]
end

if issues.size > SHOW_EVENTS
puts "...and %d more" % issues.size - SHOW_EVENTS
end
end
else
puts "%s | color=%s" % [SENSU_NAME, COLORS[2]]
Expand Down

0 comments on commit 538f2a1

Please sign in to comment.