Git Product home page Git Product logo

sensu-admin's Introduction

ATTENTION: The sensu-admin project is no longer maintained. Please consider using Uchiwa or Sensu Enterprise Dashboard instead. @amdprophet 2015-12-17

Sensu Admin

Sensu-admin is a web application to interface with the sensu-api, it displays events and clients and can silence events etc.

Getting Started

rake db:migrate
rake db:seed

Make sure your post-deploy task runs “whenever –update-crontab from the rails cwd”

The seed file creates a user account named [email protected] with a password of secret.

Database

sensu-admin uses the database very lightly, so you can use sqlite instead of mysql. bundling –without mysql will not require the mysql libraries. The User, Downtime and Log models are all that use the database currently so unless you have very high throughput it should result in little usage.

TODO

High Priority

  • Fix cookbook for deployment

  • Settings displaying environments, api settings

  • Silence events en mass

Medium Priority

  • Lazy load events, clients, etc in mobile

  • Silence all

  • Use sensu config for production sensu-admin – github.com/sensu/sensu/blob/master/lib/sensu/settings.rb

  • Do not render out all modals into the html, do like you do with the main modal on events and render via ajax

  • Make sure that downtimes and silence events have pre defined descriptions that you can set (dropdown)

  • Fix bug where if a check output has no spaces it can blow out the list (because it will not wrap)

  • Add keepalive into downtime checks

Low Priority

  • Make a downtime info page

  • Log Downtime schedule, execution, and completion

  • Silence based on an attribute (es, rs)

  • Make the JQuery mobile version auto-update events if possible

  • Move mobile and desktop assets into their own directories and cleanup

  • Notify the user if whenever cronjobs have not run recently, namely when scheduling a downtime.

sensu-admin's People

Contributors

amdprophet avatar andytinycat avatar asebastian avatar growse avatar hmarr avatar joshpasqualetto avatar petere avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sensu-admin's Issues

Is this project still active?

Just wondering the state of this project.

I am submitted a pull-request 4 months ago fixing the chef cookbook. It has not been acknowledged or looked at.

I also don't believe this application works with the latest version of sensu 0.13. I have it deployed and can't seem to get it to connect to the api.

Any update would be great. Just trying to figure out if this is a viable product to use or if we should focus our attention elsewhere.

Thanks!

doesn't support api authorization

i check the code the sensu-admin doesn't support sensu api authorization
when i remove the username and password from api ,it works fine

Error in "Request Check" Manually

I'm trying to run a check manually and get this error, how I can solve it?


Started POST "/checks/cron_check/submit" for x.x.x.x at 2014-04-16 22:22:40 -0300
Processing by ChecksController#submit_check as /
Parameters: {"subscribers"=>"all, webservers", "check"=>"cron_check"}
User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 LIMIT 1
Setting Load (0.2ms) SELECT "settings".* FROM "settings" WHERE "settings"."name" = 'use_environments' LIMIT 1
Setting Load (0.2ms) SELECT "settings".* FROM "settings" WHERE "settings"."name" = 'api_server' LIMIT 1
Setting Load (0.2ms) SELECT "settings".* FROM "settings" WHERE "settings"."name" = 'configure_server' LIMIT 1
Completed 500 Internal Server Error in 17ms

NoMethodError (undefined method 'code' for false:FalseClass):
app/models/check.rb:5:in submit_check' app/controllers/checks_controller.rb:8:insubmit_check'

Rendered /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/actionpack-3.2.14/lib/action_dispatch/middleware/templates/rescues/_trace.erb (3.1ms)
Rendered /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/actionpack-3.2.14/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (2.3ms)
Rendered /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/actionpack-3.2.14/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (22.7ms)


Regards.

It would be awesome if sensu's admin interface, or its dashboard (whatever) could display the metrics data it gathers from checks

If you examine most other monitoring packages out there, you get a comprehensive listing of all the checks for a particular host, and you don't have do tie it all together yourself. Examples: newrelic, scout, zenoss, copperegg. If you click on a host in the list of hosts, you get all the graphs and alerts for that host.

Maybe I just don't get it?

I think I would find a reason to love sensu if it did this. But I must move on and evaluate something else.

Cron jobs depend on Ruby, but it is not installed in a recipe

On my machine running a base Chef role and sensu, sensu-dashboard, and sensu-admin, the cronjobs for sensu-admin fail:

carmstrong@monitoring:/var/log$ sudo -u sensu-admin crontab -l
 
 
Begin Whenever generated tasks for: /opt/sensu/admin/website/releases/d094cc55605c687f970fbe30010453d0a172cb26/config/schedule.rb
0,5,10,15,20,25,30,35,40,45,50,55 * * * * /bin/bash -l -c 'cd /opt/sensu/admin/website/releases/d094cc55605c687f970fbe30010453d0a172cb26 && script/rails runner -e production '''Downtime.process_downtimes''''

0,20,40 * * * * /bin/bash -l -c 'cd /opt/sensu/admin/website/releases/d094cc55605c687f970fbe30010453d0a172cb26 && script/rails runner -e production '''Stash.clear_expired_stashes''''

End Whenever generated tasks for: /opt/sensu/admin/website/releases/d094cc55605c687f970fbe30010453d0a172cb26/config/schedule.rb

carmstrong@monitoring:/var/log$ sudo -u sensu-admin /bin/bash -l -c 'cd /opt/sensu/admin/website/releases/d094cc55605c687f970fbe30010453d0a172cb26 && script/rails runner -e production '''Downtime.process_downtimes''''
/usr/bin/env: ruby: No such file or directory

carmstrong@monitoring:/var/log$ sudo -u sensu-admin /bin/bash -l -c 'cd /opt/sensu/admin/website/releases/d094cc55605c687f970fbe30010453d0a172cb26 && script/rails runner -e production '''Stash.clear_expired_stashes''''
/usr/bin/env: ruby: No such file or directory

I'm willing to fix this by having the cookbook depend on ruby and then include it in default.rb, but I wanted to make sure that was the preferred method first.

undefined local variable or method `api_setup_path'

Just trying to get started here. Git cloned your repo in an Ubuntu Precise vagrant VM. Ran bundle install --without mysql --path .bundles
bundle exec rackup config.ru

I point a browser to the 9292 port and login with [email protected] and I get a traceback starting with:

undefined local variable or method `api_setup_path' for #EventsController:0x7fcb10d36b10

NoMethodError in AggregatesController#index

NoMethodError in AggregatesController#index

undefined method `each' for false:FalseClass

Rails.root: /root/sensu-admin

Application Trace | Framework Trace | Full Trace

app/models/aggregate.rb:4:in `full_hash'
app/controllers/aggregates_controller.rb:3:in `index'

No license info in sensu-admin

I notice there's currently no license file in sensu-admin, and no particular license mentioned in the readme. Would it be possible to get a license mentioned somewhere?

unable to silence a check because of JavaScript error on submit

Screenshot:
screenshot from 2013-08-20 16 50 00

When I hit submit on the above page, I get the below JavaScript error in my console on (Firefox 22.0 Ubuntu 12.04 LTS). The API Version is 0.10.2 with sensu-admin v0.0.6

TypeError: $(...).val(...) is undefined
anonymous()applic...6b75.js (line 262)
anonymous()applic...6b75.js (line 2)
anonymous()applic...6b75.js (line 2)
... get source for: http://sensu.domain.com/assets/application-3e0a0cc5d55d34a5a...Line 262

Let me know if I can provide any additional information to help pin point the issue.

Events and Aggregates pages not rendering properly

The Events page loads the Status Client Check Output Action Issued column headers, but nothing more. And 'aggregates' simply loads a gray background. The navigation header and mobile site footer are there as expected.

From within Chrome, the console is showing the following exception:
Uncaught SyntaxError: Unexpected end of input assets/application-8aa73ec26a978ae28715da2d1c109cf4.js:260

My nginx config is essentially this file: https://github.com/sensu/sensu-admin-chef/blob/master/templates/default/sensu-admin-nginx.conf.erb (minus the assets location block).

Has anyone else experienced this when using nginx + sensu-admin?

Resolve action throwing exceptions

When clicking on resolve button(s) in sensu-admin Unicorn is throwing exceptions as it can't find routes fot this event - at least that's what I decrypted from the logs:

Started POST "/events/sensu.common.staging/chef_error_check/resolve" for 127.0.0.1 at 2013-01-14 00:44:36 +0000

ActionController::RoutingError (No route matches [POST] "/events/sensu.common.staging/chef_error_check/resolve"):
actionpack (3.2.8) lib/action_dispatch/middleware/debug_exceptions.rb:21:in call' actionpack (3.2.8) lib/action_dispatch/middleware/show_exceptions.rb:56:incall'
railties (3.2.8) lib/rails/rack/logger.rb:26:in call_app' railties (3.2.8) lib/rails/rack/logger.rb:16:incall'
actionpack (3.2.8) lib/action_dispatch/middleware/request_id.rb:22:in call' rack (1.4.1) lib/rack/methodoverride.rb:21:incall'
rack (1.4.1) lib/rack/runtime.rb:17:in call' rack (1.4.1) lib/rack/lock.rb:15:incall'
actionpack (3.2.8) lib/action_dispatch/middleware/static.rb:62:in call' rack-cache (1.2) lib/rack/cache/context.rb:136:inforward'
rack-cache (1.2) lib/rack/cache/context.rb:143:in pass' rack-cache (1.2) lib/rack/cache/context.rb:155:ininvalidate'
rack-cache (1.2) lib/rack/cache/context.rb:71:in call!' rack-cache (1.2) lib/rack/cache/context.rb:51:incall'
railties (3.2.8) lib/rails/engine.rb:479:in call' railties (3.2.8) lib/rails/application.rb:223:incall'
railties (3.2.8) lib/rails/railtie/configurable.rb:30:in method_missing' unicorn (4.4.0) lib/unicorn/http_server.rb:535:inprocess_client'
unicorn (4.4.0) lib/unicorn/http_server.rb:610:in worker_loop' unicorn (4.4.0) lib/unicorn/http_server.rb:491:inspawn_missing_workers'
unicorn (4.4.0) lib/unicorn/http_server.rb:141:in start' unicorn (4.4.0) bin/unicorn:121:in<top (required)>'
/opt/sensu/admin/website/shared/bundle/ruby/1.9.1/bin/unicorn:23:in load' /opt/sensu/admin/website/shared/bundle/ruby/1.9.1/bin/unicorn:23:in

'

I made a video of it too:
http://www.youtube.com/watch?v=xxx5vm6b9Nk

NoMethodError in Downtimes#new

CentOS 6.3, RVM, Ruby 1.9.3 and Rails 3.2.8.

NoMethodError in Downtimes#new

Showing /root/sensu-admin/app/views/downtimes/_form.html.haml where line #89 raised:

undefined method `description' for #<Check:0x00000005a92b08>
Extracted source (around line #89):

86:             - check_checked = [email protected]_checks.find_by_name(check.name).nil?
87:             %tr{:rel => "downtime_check_table_row", :misc => "#{check.name}"}
88:               %td.toggle_box= check.name
89:               %td.toggle_box= check.description
90:               %td.check_box{:filter => "false"}
91:                 - if check_checked
92:                   %input{:name => 'downtime[check_ids][]', :value => "#{check.name}", :type => "checkbox", :checked => "true"}

extreme slowness with large number of events

We consistently process several thousand events (~10,000/day) every day and at any point in time there might be a thousand active events in the console. Sensu-admin seems to render these events individualy and it can take up to 2 minutes to render the events page:

  Rendered events/_output.html.haml (0.5ms)
  Rendered events/_actions.html.haml (3.5ms)
  Rendered events/_issued.html.haml (0.8ms)
  Rendered events/_status.html.haml (0.3ms)
  Rendered events/_output.html.haml (0.5ms)
  Rendered events/_actions.html.haml (3.0ms)
  Rendered events/_issued.html.haml (0.9ms)
Completed 200 OK in 61683ms (Views: 868.0ms | ActiveRecord: 3.5ms)

Any suggestions on changes we can make to speed this up somewhat?

Thanks!

'Sorry, something went wrong' with Apache + Passenger using the production environment

Hello,

I've installed sensu-admin on RHEL6.3, using the standard apache RPM along with passenger installed from the latest gem (3.0.19). Using the last master, as of right now.

In order to get it to run, I had to change 2 things:

  • Under $sensu-admin-root/config/environments/production.rb, I had to change config.assets.compile to true.
  • Had to force in my vhost to use the development environment, because otherwise I would the the following error in $sendu-admin-root/log/production.log:

Connecting to database specified by database.yml
Started GET "/users/sign_in" for 172.28.80.84 at Fri Jan 11 13:40:02 -0500 2013
Processing by Devise::SessionsController#new as HTML
Rendered devise/shared/_links.erb (1.9ms)
Rendered devise/sessions/new.html.erb within layouts/application (16.8ms)
Compiled aggregates.css (1ms) (pid 3105)
Compiled api.css (1ms) (pid 3105)
Completed 500 Internal Server Error in 403ms

ActionView::Template::Error (File to import not found or unreadable: font-awesome.
Load path: Sass::Rails::Importer(/var/www/html/app/assets/stylesheets/bootstrap_and_overrides.css.scss)
(in /var/www/html/app/assets/stylesheets/bootstrap_and_overrides.css.scss)):
7: %title= content_for?(:title) ? yield(:title) : "Sensu Admin"
8: %meta{:content => "Sensu-admin is an admin application for viewing, silencing and resolving events from the sensu-api. In addition to exposing many other api related things.", :name => "description"}
9: %meta{:content => "Sonian DevOps Josh Pasqualetto [email protected]", :name => "author"}
10: = stylesheet_link_tag "application", :media => "all"
11: = javascript_include_tag "application"
12: = csrf_meta_tags
13: = favicon_link_tag
app/assets/stylesheets/bootstrap_and_overrides.css.scss:1
app/views/layouts/application.html.haml:10:in `_app_views_layouts_application_html_haml__739240043_70044868133500'

I had created the database using 'rake db:migration RAILS_ENV=production' followed by 'rake db:seed RAILS_ENV=production'.

For now, I can live with using the 'development' environment. Just thought you guys would like to know.

undefined method `primary_role'

CentOS 6.3, RVM, Ruby 1.9.3 and Rails 3.2.8. Launched and clicked "Clients":

undefined method `primary_role' for #<Client:0x00000002d29a18>

Extracted source (around line #32):

29:         %td.subpopover{'data-content' => client.subscriptions.join(', ')}
30:           = format_subscriptions(client.subscriptions)
31:           %i.icon-chevron-right
32:         %td.moreinfo= client.primary_role
33:         %td.moreinfo= time_ago_in_words(Time.at(client.timestamp))
34:         %td.moreinfo
35:           %i.icon-zoom-in

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.