Code Monkey home page Code Monkey logo

hawkfx's Introduction

Explorer for Hawkular

NOTE

You need a version of Java8 later than 8u45, and as of now JRuby 9.1.5 is required, as later versions have a problem that prevents JRubyFX from working correctly.

Hawkular is a set of components for Monitoring. This explorer connects to a Hawkular server and allows to browse trough inventory and view entities, graph metrics.

screenshot
Figure 1. Main screen with availability pop-up

Other functions include listing of all metrics on a system, listing of Events/Alerts, injection of Events, injection of metric values and a few more things.

event list
Figure 2. Events list

Running

The explorer requires JRuby in version 9+ and Java8

If you are using rvm you can select it via

rvm use jruby-9.1.5.0

install and use bundler to install the required gems

gem install bundler

bundle install

then run:

jruby -G -S hawkfx.rb

Some ruby version managers (such as rbenv) do not provide a jruby binary directly, if the previous command do not work you can try running the application using bundler, like this:

bundle exec ruby hawkfx.rb

Using SSL

There is a blog post on the Hawkular blog that describes how to use SSL in Hawkular and HawkFX.

hawkfx's People

Contributors

cfcosta avatar jmazzitelli avatar josejulio avatar jshaughn avatar pilhuhn avatar

Stargazers

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

Watchers

 avatar  avatar

hawkfx's Issues

X-axis not completely ordered by date

image

If you look at the right, you'll see the green line going right then left, and looking at the date on the X-axis around the right they are not properly ordered

Support OpenShift auth

with Bearer token

[17:39:15] you should have a third field "bearer token" which just takes a string
[17:39:25] if Bearer token is specified, you can ignore the username and password fields
[17:39:40] and to connect to h-metrics with it, the http client should pass the Authorization header with value
[17:39:53] Bearer
[17:39:54] is the tenant also needed in that case?
[17:40:01] yes, we still need tenant
[17:40:04] ok
[17:40:11] Authorization: Bearer my-token-string
[17:40:23] (note: you don't base64 encode it - that is only for Basic auth)

Error when click on root of tree

Using Metrics Only (not sure it matters), if I click on the root of the tree in the left side (the node named "Metrics"), I get the following backtrace in the log. The UI doesn't complain or change.

Exception in thread "JavaFX Application Thread" org.jruby.exceptions.RaiseException: (NoMethodError) undefined method `kind' for #<Java::JavafxSceneControl::TreeItem:0xfc90289>
    at org.jruby.RubyBasicObject.method_missing(org/jruby/RubyBasicObject.java:1606)
    at RUBY.method_missing(/Users/jfrey/.gem/jruby/2.3.0/gems/jrubyfx-1.1.1-java/lib/jrubyfx/dsl.rb:103)
    at RUBY.method_missing(/Users/jfrey/.gem/jruby/2.3.0/gems/jrubyfx-1.1.1-java/lib/jrubyfx/core_ext/precompiled.rb:1696)
    at RUBY.block in initialize(/Users/jfrey/projects/external/hawkfx/lib/metrics_only_cell_factory.rb:30)

Error when cliking File -> Events/Alerts

Using Metrics Only, and clicking on Events/Alerts, I get the following backtrace in the log. The UI doesn't complain or fail, but the menu item should probably be greyed out.

Exception in thread "JavaFX Application Thread" org.jruby.exceptions.RaiseException: (NoMethodError) undefined method `alerts' for nil:NilClass
    at RUBY.alerts(/Users/jfrey/projects/external/hawkfx/lib/hawk.rb:18)
    at RUBY.display_items(/Users/jfrey/projects/external/hawkfx/lib/alert_controller.rb:52)
    at RUBY.update_time_range(/Users/jfrey/projects/external/hawkfx/lib/alert_controller.rb:38)
    at org.jruby.RubyMethod.call(org/jruby/RubyMethod.java:115)
    at RUBY.call_back(/Users/jfrey/projects/external/hawkfx/lib/time_picker.rb:47)
    at RUBY.initialize(/Users/jfrey/projects/external/hawkfx/lib/time_picker.rb:16)
    at RUBY.finish_initialization(/Users/jfrey/.gem/jruby/2.3.0/gems/jrubyfx-1.1.1-java/lib/jrubyfx/controller.rb:271)
    at RUBY.initialize_controller(/Users/jfrey/.gem/jruby/2.3.0/gems/jrubyfx-1.1.1-java/lib/jrubyfx/controller.rb:244)
    at RUBY.new(/Users/jfrey/.gem/jruby/2.3.0/gems/jrubyfx-1.1.1-java/lib/jrubyfx/controller.rb:154)
    at Users.jfrey.$_dot_gem.jruby.$2_dot_3_dot_0.gems.jrubyfx_minus_1_dot_1_dot_1_minus_java.lib.jrubyfx.module.build(/Users/jfrey/.gem/jruby/2.3.0/gems/jrubyfx-1.1.1-java/lib/jrubyfx/module.rb:92)
    at RUBY.method_missing(/Users/jfrey/.gem/jruby/2.3.0/gems/jrubyfx-1.1.1-java/lib/jrubyfx/dsl.rb:108)
    at RUBY.initialize(/Users/jfrey/projects/external/hawkfx/lib/alert_controller.rb:14)
    at RUBY.finish_initialization(/Users/jfrey/.gem/jruby/2.3.0/gems/jrubyfx-1.1.1-java/lib/jrubyfx/controller.rb:271)
    at RUBY.load_into(/Users/jfrey/.gem/jruby/2.3.0/gems/jrubyfx-1.1.1-java/lib/jrubyfx/controller.rb:136)
    at RUBY.show_alerts(/Users/jfrey/projects/external/hawkfx/lib/hawk_main_controller.rb:65)
    at RUBY.handle(/Users/jfrey/.gem/jruby/2.3.0/gems/jrubyfx-fxmlloader-0.4.1-java/lib/fxmlloader/elts.rb:521)

Double buttons in UI

I'm not sure how this started to happen, and it definitely didn't happen the very first time I launched HawkFX, but I am getting double buttons now every time I run it. Not sure what I can give to help debug it.

hawk fx 2016-08-03 12-52-00

Unable to run hawkfx on Fedora 25

Hi,

I have openshift origin latest master.
Although this tool is more focused on hawkular. I saw this blog post using this tool.
I attempted this before and it seemed to work

[zhassan@localhost hawkfx]$ gem install bundler
Successfully installed bundler-1.14.6
1 gem installed
[zhassan@localhost hawkfx]$ bundle install 
Using rake 10.5.0
Using concurrent-ruby 1.0.5 (java)
Using i18n 0.8.1
Using minitest 5.10.1
Using thread_safe 0.3.6 (java)
Using public_suffix 2.0.5
Using ast 2.3.0
Using safe_yaml 1.0.4
Using diff-lcs 1.3
Using unf 0.1.4 (java)
Using event_emitter 0.2.5
Using hashdiff 0.3.2
Using mime-types-data 3.2016.0521
Using netrc 0.11.0
Using websocket 1.2.4
Using jruby-openssl 0.9.20 (java)
Using jrubyfx-fxmlloader 0.4.1 (java)
Using polyglot 0.3.5
Using powerpack 0.1.1
Using rainbow 2.2.1
Using rspec-support 3.5.0
Using ruby-progressbar 1.8.1
Using unicode-display_width 1.1.3
Using shoulda-context 1.2.2
Using simple-websocket-vcr 0.0.4
Using vcr 3.0.3
Using yard 0.9.8
Using bundler 1.14.6
Using tzinfo 1.2.2
Using addressable 2.5.0
Using parser 2.4.0.0
Using crack 0.4.3
Using domain_name 0.5.20170223
Using mime-types 3.1
Using websocket-client-simple 0.3.0
Using jrubyfx 1.2.0 (java)
Using treetop 1.6.8
Using rspec-core 3.5.4
Using rspec-expectations 3.5.0
Using rspec-mocks 3.5.0
Using activesupport 5.0.2
Using rubocop 0.41.2
Using webmock 2.3.2
Using http-cookie 1.0.3
Using rspec 3.5.0
Using shoulda-matchers 2.8.0
Using rest-client 2.0.1
Using shoulda 3.5.0
Using hawkular-client 2.8.0
Bundle complete! 16 Gemfile dependencies, 49 gems now installed.
Use `bundle show [gemname]` to see where a bundled gem is installed.
[zhassan@localhost hawkfx]$ jruby -G -S hawkfx.rb
JavaFX runtime not found.  Please install Java 7u6 or newer or set environment variable JFX_DIR to the folder that contains jfxrt.jar 
If you have Java 7u6 or later, this is a bug. Please report to the issue tracker on github. Include your OS version, 32/64bit, and architecture (x86, ARM, PPC, etc)

cannot run after upgrading rvm/jruby

I have two Fedora 23 machines. One upgraded OK, the other did not. I cannot run hawkfx on this laptop of mine.

$ java -version
java version "1.8.0_45"
Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)
$ rvm use jruby-9.1.5.0
Using /home/mazz/.rvm/gems/jruby-9.1.5.0
$ bundle install
Using rake 10.5.0
Using concurrent-ruby 1.0.5 (java)
Using i18n 0.8.1
Using minitest 5.10.1
Using thread_safe 0.3.6 (java)
Using public_suffix 2.0.5
Using ast 2.3.0
Using safe_yaml 1.0.4
Using diff-lcs 1.3
Using unf 0.1.4 (java)
Using event_emitter 0.2.5
Using hashdiff 0.3.2
Using mime-types-data 3.2016.0521
Using netrc 0.11.0
Using websocket 1.2.4
Using jruby-openssl 0.9.20 (java)
Using jrubyfx-fxmlloader 0.4.1 (java)
Using polyglot 0.3.5
Using powerpack 0.1.1
Using rainbow 2.2.1
Using rspec-support 3.5.0
Using ruby-progressbar 1.8.1
Using unicode-display_width 1.1.3
Using shoulda-context 1.2.2
Using simple-websocket-vcr 0.0.4
Using vcr 3.0.3
Using yard 0.9.8
Using bundler 1.14.6
Using tzinfo 1.2.2
Using addressable 2.5.0
Using parser 2.4.0.0
Using crack 0.4.3
Using domain_name 0.5.20170223
Using mime-types 3.1
Using websocket-client-simple 0.3.0
Using jrubyfx 1.2.0 (java)
Using treetop 1.6.8
Using rspec-core 3.5.4
Using rspec-expectations 3.5.0
Using rspec-mocks 3.5.0
Using activesupport 5.0.2
Using rubocop 0.41.2
Using webmock 2.3.2
Using http-cookie 1.0.3
Using rspec 3.5.0
Using shoulda-matchers 2.8.0
Using rest-client 2.0.1
Using shoulda 3.5.0
Using hawkular-client 2.8.0
Bundle complete! 16 Gemfile dependencies, 49 gems now installed.
Use `bundle show [gemname]` to see where a bundled gem is installed.

But when I try to run:

$ jruby -G -S hawkfx.rb
libGL error: failed to open drm device: Permission denied
libGL error: failed to load driver: nouveau
/home/mazz/.rvm/gems/jruby-9.1.5.0/gems/jrubyfx-fxmlloader-0.4.1-java/lib/fxmlloader/elts.rb:158: warning: `<<' after local variable or literal is interpreted as binary operator
/home/mazz/.rvm/gems/jruby-9.1.5.0/gems/jrubyfx-fxmlloader-0.4.1-java/lib/fxmlloader/elts.rb:158: warning: even though it seems like here document
Exception running Application:
#<NameError: uninitialized constant ValueElement::Logging
Did you mean?  Logger>
org/jruby/RubyModule.java:3346:in `const_missing'
/home/mazz/.rvm/gems/jruby-9.1.5.0/gems/jrubyfx-fxmlloader-0.4.1-java/lib/fxmlloader/value_elts.rb:149:in `processValue'
/home/mazz/.rvm/gems/jruby-9.1.5.0/gems/jrubyfx-fxmlloader-0.4.1-java/lib/fxmlloader/value_elts.rb:67:in `processStartElement'
/home/mazz/.rvm/gems/jruby-9.1.5.0/gems/jrubyfx-fxmlloader-0.4.1-java/lib/jrubyfx-fxmlloader.rb:440:in `processStartElement'
/home/mazz/.rvm/gems/jruby-9.1.5.0/gems/jrubyfx-fxmlloader-0.4.1-java/lib/jrubyfx-fxmlloader.rb:351:in `load'
/home/mazz/.rvm/gems/jruby-9.1.5.0/gems/jrubyfx-1.2.0-java/lib/jrubyfx/controller.rb:129:in `load_into'
/home/mazz/.rvm/gems/jruby-9.1.5.0/gems/jrubyfx-1.2.0-java/lib/jrubyfx/core_ext/stage.rb:82:in `fxml'
hawkfx.rb:18:in `block in start'
org/jruby/RubyBasicObject.java:1667:in `instance_eval'
/home/mazz/.rvm/gems/jruby-9.1.5.0/gems/jrubyfx-1.2.0-java/lib/jrubyfx/module.rb:49:in `with'
hawkfx.rb:17:in `start'
/home/mazz/.rvm/gems/jruby-9.1.5.0/gems/jrubyfx-1.2.0-java/lib/jrubyfx/java_fx_impl.rb:119:in `block in launch_app_after_platform'

Refresh all available feeds.

When I was trying to add some new feeds to hawkular, I would like to refresh to see if I created it successfully. But it seems that there's no such a function, I think it would be great to have it. ๐Ÿ˜„

Metrics mode no longer starts

Error is

Exception in thread "JavaFX Application Thread" org.jruby.exceptions.RaiseException: (NameError) uninitialized constant Hawkular::Alerts::AlertsClient
Did you mean?  RestClient
	at org.jruby.RubyModule.const_missing(org/jruby/RubyModule.java:3340)
	at RUBY.login(/Users/hrupp/src/hawkfx/lib/hawk_login_controller.rb:83)
	at RUBY.handle(/Users/hrupp/.rvm/gems/jruby-9.1.12.0/gems/jrubyfx-fxmlloader-0.4.1-java/lib/fxmlloader/elts.rb:521)

Unable to list metrics

Hi,
When I was try to list all metrics, I clicked 'list metrics' in the menu that popped down. But nothing happened. Here's the exception in the terminal:

Exception in thread "JavaFX Application Thread" org.jruby.exceptions.RaiseException: (NoMethodError) undefined method `metricscounters' for Hawk:Module
        at RUBY.list_metrics(/Users/akuo/Developer/hawkular/hawkfx/lib/hawk_main_controller.rb:73)
        at RUBY.handle(/Users/akuo/.rvm/gems/jruby-9.1.2.0/gems/jrubyfx-fxmlloader-0.4.1-java/lib/fxmlloader/elts.rb:521)

Thanks!

Cannot connect to standalone hawkular-metrics

I am using the standalone hawkular-metrics provided as a homebrew package here: https://github.com/hawkular/homebrew-hawkular . Unfortunately, HawkFX can't connect. I think it's trying to access http://localhost:8080/hawkular/inventory/status, but since inventory doesn't exist in the standalone package, it returns a 404.

Note that the error I get in the little box is

Error: <html><head><title>Error</title></head><body>404 - Not Found</body></html>

It might be a helpful feature to show what URL it's trying to connect to when there's an error. The reason I'm guessing it's trying to hit inventory/status above is because I changed the server URL to http://localhost:8080/hawkular/metrics and instead the different error I got is

Error: RESTEASY003210: Could not find resource for full path: http://localhost:8080/hawkular/metrics/hawkular/inventory/status

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.