nagios-dashboard 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/README.org CHANGED
@@ -6,26 +6,22 @@
6
6
  * How It Works
7
7
  Nagios-Dashboard parses the nagios status.dat file & sends the current status to clients via an HTML5 WebSocket.
8
8
 
9
- The dashboard monitors the status.dat file for changes, any modifications trigger a client update (push).
9
+ The dashboard monitors the status.dat file for changes, any modifications trigger client updates (push).
10
10
 
11
11
  Nagios-Dashboard queries a Chef server or Opscode platform organization for additional host information.
12
12
 
13
13
  * Requirements
14
- - A Linux distribution running Nagios http://www.nagios.org/
14
+ - Nagios http://www.nagios.org/
15
+ - Ruby (MRI) & RubyGems http://www.ruby-lang.org/en/
15
16
  - An OpsCode Chef server or platform oranization http://opscode.com/chef/ http://opscode.com/platform/
16
- - Credentials to query Chef, user & private key http://wiki.opscode.com/display/chef/Authentication
17
- - Ruby MRI 1.8 or 1.9 & RubyGems http://www.ruby-lang.org/en/
18
- - Bundler http://gembundler.com/
17
+ - Credentials to query Chef, user name & private key http://wiki.opscode.com/display/chef/Authentication
19
18
 
20
19
  * Install
21
- : cd opt
22
- : wget --no-check-certificate https://github.com/downloads/portertech/nagios-dashboard/nagios-dashboard.tar.gz
23
- : tar -xvf nagios-dashboard.tar
24
- : cd nagios-dashboard && bundle install
20
+ : gem install nagios-dashboard
25
21
 
26
22
  * Run
27
- : -> % ./dashboard -h
28
- : Usage: ./dashboard.rb (options)
23
+ : -> % nagios-dashboard -h
24
+ : Usage: nagios-dashboard (options)
29
25
  : -c, --chef SERVER Use a Chef SERVER
30
26
  : -d, --datfile FILE Location of Nagios status.dat FILE
31
27
  : -k, --key KEY Chef user KEY
@@ -35,3 +31,6 @@
35
31
  : -u, --user USER Chef USER name
36
32
  : -v, --verbose Output debug messages to screen
37
33
  : -h, --help Show this message
34
+
35
+ Example:
36
+ : nagios-dashboard -u user -k ~/.chef/platform/user.pem -o chef-organization -d /var/cache/nagios3/status.dat -p 8080 -v
@@ -119,7 +119,7 @@ EventMachine.run do
119
119
  end
120
120
 
121
121
  websocket_connections = Array.new
122
- EventMachine::WebSocket.start(:host => "0.0.0.0", :port => 9000) do |websocket|
122
+ EventMachine::WebSocket.start(:host => "0.0.0.0", :port => 8000) do |websocket|
123
123
  websocket.onopen do
124
124
  websocket_connections.push websocket
125
125
  log_message('client connected to websocket')
@@ -5,14 +5,20 @@ $(document).ready(function(){
5
5
  $.each(attributes['automatic']['roles'], function() {
6
6
  roles += this + ' ';
7
7
  });
8
+ var ip_address = '';
9
+ if ("ec2" in attributes['automatic']) {
10
+ ip_address = attributes['automatic']['ec2']['public_ipv4'];
11
+ } else {
12
+ ip_address = attributes['automatic']['ipaddress'];
13
+ }
8
14
  $('.chef_attributes').html(
9
15
  '<strong>Node Name: </strong><pre>'+attributes['name']+'</pre><br />'
10
- +'<strong>Public IP: </strong><pre>'+attributes['automatic']['ec2']['public_ipv4']+'</pre><br />'
16
+ +'<strong>Public IP: </strong><pre>'+ip_address+'</pre><br />'
11
17
  +'<strong>Roles: </strong><pre>'+roles+'</pre>'
12
18
  );
13
19
  });
14
20
  }
15
- ws = new WebSocket("ws://" + location.hostname + ":9000");
21
+ ws = new WebSocket("ws://" + location.hostname + ":8000");
16
22
  ws.onmessage = function(evt) {
17
23
  $("#messages").empty();
18
24
  $("#popups_container").empty();
@@ -1,5 +1,5 @@
1
1
  module Nagios
2
2
  module Dashboard
3
- VERSION = "0.0.2"
3
+ VERSION = "0.0.3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: nagios-dashboard
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.2
5
+ version: 0.0.3
6
6
  platform: ruby
7
7
  authors:
8
8
  - Sean Porter