asmuth / clip Goto Github PK
View Code? Open in Web Editor NEWCreate charts from the command line
Home Page: https://clip-lang.org
License: Apache License 2.0
Create charts from the command line
Home Page: https://clip-lang.org
License: Apache License 2.0
Hey,
i see how awesome fnordmetric is for ongoing, current data, but is there any plan/suggested process for importing historical data?
Thanks!
The simple example in the README raises this exception: undefined method map for nil:NilClass (NoMethodError)
The problem seems to be that a :series
option is not given to the timeseries_gauge
. Here is a working version (taken from doc/minimal_example.rb).
require "fnordmetric"
FnordMetric.namespace :simple do
timeseries_gauge :unicorns_seen,
:tick => 30.seconds,
:calculate => :average,
:series => [:num_unicorns]
event :unicorn_seen do
incr :unicorns_seen, :num_unicorns, rand(5)
end
end
FnordMetric.standalone
I'm having a hard time trying to run Fnordmetric in Heroku.
Basically, what happens is that Heroku won't allow to start the EM worker on the same dyno.
Is there a way to manually run the Fnordmetric worker using a rake command or something similar?
can you add udp access so the connection is non-blocking?
Right now I see that the time is always GMT time. It's hard for me to convert time every time I look at the chart because my local time is GMT + 7. Is there a way to configure the timezone on client browser?
How can i embed Fnordmetric via Rails Routes?
Did you cut this feature in Version 1.0?
fnordmetric really is awesome, and looks great on my local machine. However, I have trouble deploying it to heroku (and even though I haven't tried that yet, probably to other servers where it would run behind an nginx proxy.)
Apparently fnordmetric 1.0.0 uses websockets as a transport, where 0.7.x polled the server. If I understand this issue correctly imanel/websocket-rack#8 running websockets on heroku just does not work.
Is there a simple way to fall back to polling instead of websockets? Some configuration option one can set somewhere? A working project
I am aware that #73 already deals with running on heroku. The suggested soultion works, but with fnordmetric 0.7.x versions only.
If I have a dashboard named "Passive Users", I get this beauty when I try to access it:
KeyError - key not found: "PassiveUsers":
/Users/dan/.rvm/gems/ruby-1.9.2-p0@rails3tutorial/gems/fnordmetric-0.5.3/lib/fnordmetric/app.rb:111:in `fetch'
/Users/dan/.rvm/gems/ruby-1.9.2-p0@rails3tutorial/gems/fnordmetric-0.5.3/lib/fnordmetric/app.rb:111:in `block in <class:App>'
/Users/dan/.rvm/gems/ruby-1.9.2-p0@rails3tutorial/gems/sinatra-1.3.1/lib/sinatra/base.rb:1212:in `call'
/Users/dan/.rvm/gems/ruby-1.9.2-p0@rails3tutorial/gems/sinatra-1.3.1/lib/sinatra/base.rb:1212:in `block in compile!'
/Users/dan/.rvm/gems/ruby-1.9.2-p0@rails3tutorial/gems/sinatra-1.3.1/lib/sinatra/base.rb:772:in `[]'
/Users/dan/.rvm/gems/ruby-1.9.2-p0@rails3tutorial/gems/sinatra-1.3.1/lib/sinatra/base.rb:772:in `block (3 levels) in route!'
/Users/dan/.rvm/gems/ruby-1.9.2-p0@rails3tutorial/gems/sinatra-1.3.1/lib/sinatra/base.rb:788:in `route_eval'
/Users/dan/.rvm/gems/ruby-1.9.2-p0@rails3tutorial/gems/sinatra-1.3.1/lib/sinatra/base.rb:772:in `block (2 levels) in route!'
/Users/dan/.rvm/gems/ruby-1.9.2-p0@rails3tutorial/gems/sinatra-1.3.1/lib/sinatra/base.rb:821:in `block in process_route'
/Users/dan/.rvm/gems/ruby-1.9.2-p0@rails3tutorial/gems/sinatra-1.3.1/lib/sinatra/base.rb:819:in `catch'
/Users/dan/.rvm/gems/ruby-1.9.2-p0@rails3tutorial/gems/sinatra-1.3.1/lib/sinatra/base.rb:819:in `process_route'
/Users/dan/.rvm/gems/ruby-1.9.2-p0@rails3tutorial/gems/sinatra-1.3.1/lib/sinatra/base.rb:771:in `block in route!'
/Users/dan/.rvm/gems/ruby-1.9.2-p0@rails3tutorial/gems/sinatra-1.3.1/lib/sinatra/base.rb:770:in `each'
/Users/dan/.rvm/gems/ruby-1.9.2-p0@rails3tutorial/gems/sinatra-1.3.1/lib/sinatra/base.rb:770:in `route!'
/Users/dan/.rvm/gems/ruby-1.9.2-p0@rails3tutorial/gems/sinatra-1.3.1/lib/sinatra/base.rb:886:in `dispatch!'
/Users/dan/.rvm/gems/ruby-1.9.2-p0@rails3tutorial/gems/sinatra-1.3.1/lib/sinatra/base.rb:706:in `block in call!'
/Users/dan/.rvm/gems/ruby-1.9.2-p0@rails3tutorial/gems/sinatra-1.3.1/lib/sinatra/base.rb:871:in `block in invoke'
/Users/dan/.rvm/gems/ruby-1.9.2-p0@rails3tutorial/gems/sinatra-1.3.1/lib/sinatra/base.rb:871:in `catch'
/Users/dan/.rvm/gems/ruby-1.9.2-p0@rails3tutorial/gems/sinatra-1.3.1/lib/sinatra/base.rb:871:in `invoke'
/Users/dan/.rvm/gems/ruby-1.9.2-p0@rails3tutorial/gems/sinatra-1.3.1/lib/sinatra/base.rb:706:in `call!'
/Users/dan/.rvm/gems/ruby-1.9.2-p0@rails3tutorial/gems/sinatra-1.3.1/lib/sinatra/base.rb:692:in `call'
I spent some time poking around, and it looks like the API call works fine, but the JS doesn't. I can't quite find where renderDashboard is getting called in the JS to track it down further, but I'm guessing (this is completely unfounded...) that whatever is setting / reading the hash eats spaces.
The doc says: We can select user and follow them step by step but i cant get it working.
Is there a way to track user events. What I did is:
I really like this project and I think WebSocket could benefit greatly to it, did you already gave it any thoughts ?
When I saw realtime in the description I was sure websockets were used xD
ruby -v
ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-darwin10.7.4]
gem -v
1.8.11
NoMethodError - undefined method `dashboards' for nil:NilClass:
/Users/john/.rvm/gems/ruby-1.9.2-p290/gems/fnordmetric-0.5.2/haml/app.haml:26:in `evaluate_source'
/Users/john/.rvm/gems/ruby-1.9.2-p290@global/gems/tilt-1.3.3/lib/tilt/template.rb:209:in `instance_eval'
/Users/john/.rvm/gems/ruby-1.9.2-p290@global/gems/tilt-1.3.3/lib/tilt/template.rb:209:in `evaluate_source'
/Users/john/.rvm/gems/ruby-1.9.2-p290@global/gems/tilt-1.3.3/lib/tilt/template.rb:144:in `cached_evaluate'
/Users/john/.rvm/gems/ruby-1.9.2-p290@global/gems/tilt-1.3.3/lib/tilt/template.rb:127:in `evaluate'
/Users/john/.rvm/gems/ruby-1.9.2-p290@global/gems/tilt-1.3.3/lib/tilt/haml.rb:24:in `evaluate'
/Users/john/.rvm/gems/ruby-1.9.2-p290@global/gems/tilt-1.3.3/lib/tilt/template.rb:76:in `render'
/Users/john/.rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/base.rb:625:in `render'
/Users/john/.rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/base.rb:522:in `haml'
/Users/john/.rvm/gems/ruby-1.9.2-p290/gems/fnordmetric-0.5.2/lib/fnordmetric/app.rb:53:in `block in <class:App>'
/Users/john/.rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/base.rb:1212:in `call'
/Users/john/.rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/base.rb:1212:in `block in compile!'
/Users/john/.rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/base.rb:772:in `[]'
/Users/john/.rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/base.rb:772:in `block (3 levels) in route!'
/Users/john/.rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/base.rb:788:in `route_eval'
/Users/john/.rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/base.rb:772:in `block (2 levels) in route!'
/Users/john/.rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/base.rb:821:in `block in process_route'
/Users/john/.rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/base.rb:819:in `catch'
/Users/john/.rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/base.rb:819:in `process_route'
/Users/john/.rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/base.rb:771:in `block in route!'
/Users/john/.rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/base.rb:770:in `each'
/Users/john/.rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/base.rb:770:in `route!'
/Users/john/.rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/base.rb:886:in `dispatch!'
/Users/john/.rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/base.rb:706:in `block in call!'
/Users/john/.rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/base.rb:871:in `block in invoke'
/Users/john/.rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/base.rb:871:in `catch'
/Users/john/.rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/base.rb:871:in `invoke'
/Users/john/.rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/base.rb:706:in `call!'
/Users/john/.rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/base.rb:692:in `call'
/Users/john/.rvm/gems/ruby-1.9.2-p290/gems/rack-protection-1.1.4/lib/rack/protection/xss_header.rb:22:in `call'
/Users/john/.rvm/gems/ruby-1.9.2-p290/gems/rack-protection-1.1.4/lib/rack/protection/path_traversal.rb:16:in `call'
/Users/john/.rvm/gems/ruby-1.9.2-p290/gems/rack-protection-1.1.4/lib/rack/protection/json_csrf.rb:17:in `call'
/Users/john/.rvm/gems/ruby-1.9.2-p290/gems/rack-protection-1.1.4/lib/rack/protection/base.rb:47:in `call'
/Users/john/.rvm/gems/ruby-1.9.2-p290/gems/rack-protection-1.1.4/lib/rack/protection/xss_header.rb:22:in `call'
/Users/john/.rvm/gems/ruby-1.9.2-p290/gems/rack-1.3.5/lib/rack/nulllogger.rb:9:in `call'
/Users/john/.rvm/gems/ruby-1.9.2-p290/gems/rack-1.3.5/lib/rack/head.rb:9:in `call'
/Users/john/.rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/showexceptions.rb:21:in `call'
/Users/john/.rvm/gems/ruby-1.9.2-p290/gems/thin-1.2.11/lib/thin/connection.rb:84:in `block in pre_process'
/Users/john/.rvm/gems/ruby-1.9.2-p290/gems/thin-1.2.11/lib/thin/connection.rb:82:in `catch'
/Users/john/.rvm/gems/ruby-1.9.2-p290/gems/thin-1.2.11/lib/thin/connection.rb:82:in `pre_process'
/Users/john/.rvm/gems/ruby-1.9.2-p290/gems/thin-1.2.11/lib/thin/connection.rb:57:in `process'
/Users/john/.rvm/gems/ruby-1.9.2-p290/gems/thin-1.2.11/lib/thin/connection.rb:42:in `receive_data'
/Users/john/.rvm/gems/ruby-1.9.2-p290/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run_machine'
/Users/john/.rvm/gems/ruby-1.9.2-p290/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run'
/Users/john/.rvm/gems/ruby-1.9.2-p290/gems/fnordmetric-0.5.2/lib/fnordmetric.rb:43:in `start_em'
/Users/john/.rvm/gems/ruby-1.9.2-p290/gems/fnordmetric-0.5.2/lib/fnordmetric.rb:94:in `run'
/Users/john/.rvm/gems/ruby-1.9.2-p290/gems/fnordmetric-0.5.2/lib/fnordmetric/standalone.rb:5:in `block in <top (required)>'
/Users/john/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/rake.rb:634:in `call'
/Users/john/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/rake.rb:634:in `block in execute'
/Users/john/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/rake.rb:629:in `each'
/Users/john/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/rake.rb:629:in `execute'
/Users/john/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/rake.rb:595:in `block in invoke_with_call_chain'
/Users/john/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/Users/john/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/rake.rb:588:in `invoke_with_call_chain'
/Users/john/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/rake.rb:581:in `invoke'
/Users/john/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/rake.rb:2041:in `invoke_task'
/Users/john/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/rake.rb:2019:in `block (2 levels) in top_level'
/Users/john/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/rake.rb:2019:in `each'
/Users/john/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/rake.rb:2019:in `block in top_level'
/Users/john/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/rake.rb:2058:in `standard_exception_handling'
/Users/john/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/rake.rb:2013:in `top_level'
/Users/john/.rvm/gems/ruby-1.9.2-p290/gems/fnordmetric-0.5.2/lib/fnordmetric/standalone.rb:31:in `<top (required)>'
/Users/john/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
/Users/john/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
/Users/john/.rvm/gems/ruby-1.9.2-p290/gems/fnordmetric-0.5.2/lib/fnordmetric.rb:121:in `standalone'
test.rb:22:in `<main>'
Seriously!? My brain does somersaults every time I start playing with this.
In resque, there is a feature of mounting Sinatra app directly to Rails routes.
mount Resque::Server.new, :at => "/resque"
In my opinion, it's very useful and it will be possible to mount FnordMetric web frontend to Rails app with one line.
@paulasmuth, if you agree with me, I will implement this feature in pull request.
NoMethodError - undefined method dashboards' for nil:NilClass: /Users/john/.rvm/gems/ruby-1.9.2-p290/gems/fnordmetric-0.5.2/haml/app.haml:26:in
evaluate_source'
/Users/john/.rvm/gems/ruby-1.9.2-p290@global/gems/tilt-1.3.3/lib/tilt/template.rb:209:in instance_eval' /Users/john/.rvm/gems/ruby-1.9.2-p290@global/gems/tilt-1.3.3/lib/tilt/template.rb:209:in
evaluate_source'
/Users/john/.rvm/gems/ruby-1.9.2-p290@global/gems/tilt-1.3.3/lib/tilt/template.rb:144:in cached_evaluate' /Users/john/.rvm/gems/ruby-1.9.2-p290@global/gems/tilt-1.3.3/lib/tilt/template.rb:127:in
evaluate'
/Users/john/.rvm/gems/ruby-1.9.2-p290@global/gems/tilt-1.3.3/lib/tilt/haml.rb:24:in evaluate' /Users/john/.rvm/gems/ruby-1.9.2-p290@global/gems/tilt-1.3.3/lib/tilt/template.rb:76:in
render'
/Users/john/.rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/base.rb:625:in render' /Users/john/.rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/base.rb:522:in
haml'
/Users/john/.rvm/gems/ruby-1.9.2-p290/gems/fnordmetric-0.5.2/lib/fnordmetric/app.rb:53:in block in <class:App>' /Users/john/.rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/base.rb:1212:in
call'
/Users/john/.rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/base.rb:1212:in block in compile!' /Users/john/.rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/base.rb:772:in
[]'
/Users/john/.rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/base.rb:772:in block (3 levels) in route!' /Users/john/.rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/base.rb:788:in
route_eval'
/Users/john/.rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/base.rb:772:in block (2 levels) in route!' /Users/john/.rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/base.rb:821:in
block in process_route'
/Users/john/.rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/base.rb:819:in catch' /Users/john/.rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/base.rb:819:in
process_route'
/Users/john/.rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/base.rb:771:in block in route!' /Users/john/.rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/base.rb:770:in
each'
/Users/john/.rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/base.rb:770:in route!' /Users/john/.rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/base.rb:886:in
dispatch!'
/Users/john/.rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/base.rb:706:in block in call!' /Users/john/.rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/base.rb:871:in
block in invoke'
/Users/john/.rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/base.rb:871:in catch' /Users/john/.rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/base.rb:871:in
invoke'
/Users/john/.rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/base.rb:706:in call!' /Users/john/.rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/base.rb:692:in
call'
/Users/john/.rvm/gems/ruby-1.9.2-p290/gems/rack-protection-1.1.4/lib/rack/protection/xss_header.rb:22:in call' /Users/john/.rvm/gems/ruby-1.9.2-p290/gems/rack-protection-1.1.4/lib/rack/protection/path_traversal.rb:16:in
call'
/Users/john/.rvm/gems/ruby-1.9.2-p290/gems/rack-protection-1.1.4/lib/rack/protection/json_csrf.rb:17:in call' /Users/john/.rvm/gems/ruby-1.9.2-p290/gems/rack-protection-1.1.4/lib/rack/protection/base.rb:47:in
call'
/Users/john/.rvm/gems/ruby-1.9.2-p290/gems/rack-protection-1.1.4/lib/rack/protection/xss_header.rb:22:in call' /Users/john/.rvm/gems/ruby-1.9.2-p290/gems/rack-1.3.5/lib/rack/nulllogger.rb:9:in
call'
/Users/john/.rvm/gems/ruby-1.9.2-p290/gems/rack-1.3.5/lib/rack/head.rb:9:in call' /Users/john/.rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/showexceptions.rb:21:in
call'
/Users/john/.rvm/gems/ruby-1.9.2-p290/gems/thin-1.2.11/lib/thin/connection.rb:84:in block in pre_process' /Users/john/.rvm/gems/ruby-1.9.2-p290/gems/thin-1.2.11/lib/thin/connection.rb:82:in
catch'
/Users/john/.rvm/gems/ruby-1.9.2-p290/gems/thin-1.2.11/lib/thin/connection.rb:82:in pre_process' /Users/john/.rvm/gems/ruby-1.9.2-p290/gems/thin-1.2.11/lib/thin/connection.rb:57:in
process'
/Users/john/.rvm/gems/ruby-1.9.2-p290/gems/thin-1.2.11/lib/thin/connection.rb:42:in receive_data' /Users/john/.rvm/gems/ruby-1.9.2-p290/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in
run_machine'
/Users/john/.rvm/gems/ruby-1.9.2-p290/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in run' /Users/john/.rvm/gems/ruby-1.9.2-p290/gems/fnordmetric-0.5.2/lib/fnordmetric.rb:43:in
start_em'
/Users/john/.rvm/gems/ruby-1.9.2-p290/gems/fnordmetric-0.5.2/lib/fnordmetric.rb:94:in run' /Users/john/.rvm/gems/ruby-1.9.2-p290/gems/fnordmetric-0.5.2/lib/fnordmetric/standalone.rb:5:in
block in <top (required)>'
/Users/john/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/rake.rb:634:in call' /Users/john/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/rake.rb:634:in
block in execute'
/Users/john/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/rake.rb:629:in each' /Users/john/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/rake.rb:629:in
execute'
/Users/john/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/rake.rb:595:in block in invoke_with_call_chain' /Users/john/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/monitor.rb:201:in
mon_synchronize'
/Users/john/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/rake.rb:588:in invoke_with_call_chain' /Users/john/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/rake.rb:581:in
invoke'
/Users/john/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/rake.rb:2041:in invoke_task' /Users/john/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/rake.rb:2019:in
block (2 levels) in top_level'
/Users/john/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/rake.rb:2019:in each' /Users/john/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/rake.rb:2019:in
block in top_level'
/Users/john/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/rake.rb:2058:in standard_exception_handling' /Users/john/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/rake.rb:2013:in
top_level'
/Users/john/.rvm/gems/ruby-1.9.2-p290/gems/fnordmetric-0.5.2/lib/fnordmetric/standalone.rb:31:in <top (required)>' /Users/john/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in
require'
/Users/john/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in require' /Users/john/.rvm/gems/ruby-1.9.2-p290/gems/fnordmetric-0.5.2/lib/fnordmetric.rb:121:in
standalone'
test.rb:22:in `
I don't entirely follow how events get lost (would love an answer to that, actually), but below is a log snippet that's pretty consistent with what I'm seeing. Also, data only seems to actually file into the web interface (though accompanied by scads of lost events) when I restart the ruby server. Any ideas?
[11-12-28 21:22:31] events_received: , events_processed: 7533, queue_length: 0
[11-12-28 21:22:33] oops, lost an event :(
[11-12-28 21:22:34] events_received: , events_processed: 7534, queue_length: 0
[11-12-28 21:22:36] oops, lost an event :(
[11-12-28 21:22:37] events_received: , events_processed: 7535, queue_length: 0
[11-12-28 21:22:37] oops, lost an event :(
[11-12-28 21:22:38] oops, lost an event :(
[11-12-28 21:22:40] events_received: , events_processed: 7537, queue_length: 0
[11-12-28 21:22:41] oops, lost an event :(
[11-12-28 21:22:41] oops, lost an event :(
[11-12-28 21:22:41] oops, lost an event :(
[11-12-28 21:22:41] oops, lost an event :(
[11-12-28 21:22:41] oops, lost an event :(
[11-12-28 21:22:42] oops, lost an event :(
[11-12-28 21:22:43] events_received: , events_processed: 7543, queue_length: 0
[11-12-28 21:22:45] oops, lost an event :(
[11-12-28 21:22:46] events_received: , events_processed: 7544, queue_length: 0
[11-12-28 21:22:50] events_received: , events_processed: 7544, queue_length: 0
[11-12-28 21:22:52] oops, lost an event :(
[11-12-28 21:22:53] events_received: , events_processed: 7545, queue_length: 0
[11-12-28 21:22:55] oops, lost an event :(
[11-12-28 21:22:56] events_received: , events_processed: 7546, queue_length: 0
[11-12-28 21:22:59] events_received: , events_processed: 7546, queue_length: 0
[11-12-28 21:23:02] events_received: , events_processed: 7546, queue_length: 0
What is happening is, when event A is triggered it doesn't increment the guage instantly. It only increments when the same or any other event is triggered. So its always off by 1. Is this the intended behaviour?
Looks like you just add data to this timeline key, but never clean old elements.
def announce_to_timeline(event)
timeline_key = key_prefix(:timeline)
@redis.zadd(timeline_key, event[:_time], event[:_eid])
end
as result this key size is about 50% of database.
This even bigger problem then you have small ttl for events data.
:event_data_ttl => 60*5,
most element in timeline keys just point to nowhere, because events already deleted.
Also, and may be I'm wrong here, you dont even need to collect this data, when you have activated
hide_active_users
In this case, timeline data is not used at all.
Hey,
i want to enable support for certain gauges that are prone to collect a lot of data, but really i only want the top ten or so, and then an 'others' roll up group.
I'm happy to hack this in, but i'd like some pointers as to the best place to do it. It seems that the pie_widget.rb in lib/fonordmetric is a good place to start, as it's a presenter for the data... but i am concerned about what the JS is trying to do there.
thoughts?
Fnordmetric has everything it takes to create a cohort widget. It would be an awesome feature to have :)
Do I need to configure the timezone?
At the event feed, the timestamps are shown in my timezone (GMT+8).
But in the history, all the events are at 08:00:00.
The active_users screen seems handy, but I can't find any documentation on it, is that correct?
It would be nice to specify a limit on toplists, rather than displaying all of them.
e.g.
widget("Top Users",
:title => "This Week's Top Users",
:gauges => :user_pageviews_per_week,
:type => :toplist,
:width => 50,
:autoupdate => 1,
:limit => 5 # <- limits to top 5, rather than all
)
When you hide the active users tab and you don't have any other tabs specified yet, you still see the layout for the active users tab. This isn't a big deal or anything. It's just a little ugly. I'd be glad to fix it but, I need to learn the JavaScript first. Just thought I'd post on here so if someone else wanted to make a quick fix,t hey could. :-)
I had a gauge called pagevisits_per_user, which I later renamed to pagevisits_per_human.
However, the renaming, or removing of gauges with data leads to this error:
[12-09-27 16:21:48] [ERROR] reactor crashed: undefined method `field_values_at' for nil:NilClass
Any ideas how to fix this?
Edit: Seems this issue disappears when the next lot of events come in. Guess starting up the server isn't clearing obsolete data, only new events does?
The example code from the Readme for submitting events has a race condition.
redis.lpush("fnordmetric-queue", uuid)
redis.set("fnordmetric-event-#{my_uuid}", event)
redis.expire("fnordmetric-event-#{my_uuid}", 60)
I assume the receiving side does a (blocking) lPop. Following order of events can happen:
To prevent the race condition the code needs to be re-ordered to
redis.set("fnordmetric-event-#{my_uuid}", event)
redis.expire("fnordmetric-event-#{my_uuid}", 60)
redis.lpush("fnordmetric-queue", uuid)
to guarantee that any Get on the key that was Pop'd from the queue will succeed unless the key already expired.
Alternatively one could pipe the commands on the client so they are executed in one atomic step in Redis which will also save roundtrip times.
Additionally you can combine the Set and Expire into a single SETEX call.
I have a 'daily' timeline widget. When I scroll a 'tick' forward, the data points dont match the axis anymore:
Hi there,
I was unable to see where it's actually used.
Is the dependency really needed?
Best,
Tobias
Its just a suggestion/idea. Can FnordMetric be transformed to start from rackup file (using thin server/daemon)?
I think it would be easier and more convenient.
I noticed that only the first registered namespace will accept events.
I currently have two namespaces configured. Only the first will accept incoming events. If I swap them then one stops working and the other starts.
Is this an issue or not a feature yet?
Is there a way to set the retention period for a particular metric/gauge/event-type?
Is there any type of IRC for this project? I've emailed Paul Asmuth but, with no response. I'm REALLY interested in the project and would love to commit but I really want to get a feel for the direction of the project as understood by the current, main contributors. I feel the easiest way might be an IRC channel.
Maybe there could be a channel on freenode.net? Just a thought.
You can now add events by directly using redis, but isn't it nicer to use a simple API to add events?
It would also eliminate code duplication in InboundStream and App.
I've implemented a simple API in this commit: 637827f
The Sinatra app can't load assets (images, stylesheets and JS). Manually upgrading the sinatra gem to 1.3.3 solved this.
it seems some places expect _type, and others type, as the key for the event type?
{
"count": 592,
"values": [
[
["xyz", 64.0],
["abc", 40.0]
],
[
["def", 27.0],
["jkl", 24.0]
],
.....
}
why is it returning the arrays like this? should it not be one array, flatter?
Hi,
FnordMetric is a nice application, but it has a license issue: highcharts license. It contains non-commercial license which is known to be not compatible with OpenSource licenses, including the MIT license.
There are some ways to fix this issue:
I hope it helps.
Hi,
is there any chance a change allowing that would get merged ?
dashboard('Overview') do
widget "Unicorn-Sightings per 10s", {
:type => :timeline,
:gauges => :unicorns_seen_per_10s,
:include_current => true,
:autoupdate => 2,
:width => 60
}
widget "Numbers", {
:type => :numbers,
:gauges => [:unicorns_seen_per_10s, :unicorns_seen_per_min],
:autoupdate => 2
}
end
I find this syntax way more intuitive than the current one, what do you think ?
The argument to the widget method becomes its title and obviously the argument to the dashboard method becomes its title too.
I already have the code written and working.
How does unique determine when it should be uniq?
I think it needs to take a key called uniq_by. In my case, the key would be the user id of the unique page visit.
gauge :uniq_pagevisits_per_day, :tick => 1.day, :unique => true
event :pageview do
incr :uniq_pagevisits_per_day, :uniq_by => data[:user_id]
end
Hi,
(I'm new to ruby) I'm having the following error when running the simple example:
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:59:in `gem_original_require': /Library/Ruby/Gems/1.8/gems/fnordmetric-0.5.5/lib/fnordmetric.rb:67: syntax error, unexpected tIDENTIFIER, expecting tAMPER (SyntaxError)
Thin::Server.start(*opts[:web_interface], app)
^
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:59:in `require'
from my_stats_app.rb:1
My ruby version is ruby 1.8.7 (2010-01-10 patchlevel 249) [universal-darwin11.0] and using the latest fnordmetric revision.
Thanks for creating this cool project.
Any specific reason you're using intern rather than just to_sym ?
Hey,
if i have a gauge that has a number of keys (e.g. 'app version breakdown'), i'd like to go about making a pie chart of this, with percentage as a portion of the distribution.
I think this is slightly simpler to visually parse than a bar chart....
is that feasible today? is it easy to hack in?
thanks!
Hi,
If I have a lot of events fnordmetric can't keep up and the queue length keeps growing until eventually Redis is claiming all memory on the box. (queue length of 8 million). I'm not sure if the queue is the only reason to blame for Redis taking up so much memory, but maybe also data stored on the various metrics? (I'm not too sure of how everything is stored).
5.4G Redis, here is last log from fnordmetric:
events_received: 25300317, events_processed: 17397513, queue_length: 7901866
I'd like to do thin -C fnord.yml fnord.rb
to start the server daemonized. The current implementation isn't rackup friendly, so in production, I'm having to start a screen process and run the ruby file in that, which isn't very friendly.
I am new to fnordmetric.
When I started to work on it (2 day ago) it was quite hard to grasp how it really works.
I wrote some live data generator: https://gist.github.com/1579235
I will extend it now to cover all the features which are available in doc/ulm_stats.rb
It would be nice if such generator would be included in the project / would be mentioned in the Readme as it would make it easy (for fnordmetric noobies like me ;)):
. Please, let me know what do you think about it.
As it causes a lot of confusion, I think we should document how to set TTLs properly, optimize defaults and provide some redis usage benchmarks for various gauges and traffic schemas.
For example:
If somebody has higher traffic, he can reduce events TTL and sacrifice user history length but reduce Redis memory usage.
Thanks for your work on this. This is awesome!
I am trying to track what an user does on our site. So I can click on a user in the active users tab and see all the urls they have visited on the site. fnordmetric seems to support this, but am not able to configure it to do this. is there a special event like _pageview that I need to add for each user for this? If this is possible adding it to the user docs would be great.
thanks
i love the way you have Fnordmetric.namespace :x do .. end
- but is there a way to split this up to different ruby files?
it'd be cool to just include app/metrics/*.rb or something, and that would allow me to break it up by 'tab' in the app. Right now my metrics files run to 100s - 1000s of lines, and this makes debugging and such a bit nastier than it has to.
thanks!
Can you please provide some details on the distinction in the log output of events_received & events_processed?
What constitutes an event_received, and what constitutes an event_processed? e.g.
[11-12-30 09:46:43] events_received: 2, events_processed: 141, queue_length: 0
Thanks.
If you follow the example in the docs you'll get a no method error
I just tried installing the gem on a debian 5.0 machine.
# gem install fnordmetric
Building native extensions. This could take a while...
ERROR: Error installing fnordmetric:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.8 extconf.rb install fnordmetric
extconf.rb:1:in `require': no such file to load -- mkmf (LoadError)
from extconf.rb:1
Gem files will remain installed in /var/lib/gems/1.8/gems/bson_ext-1.5.2 for inspection.
Results logged to /var/lib/gems/1.8/gems/bson_ext-1.5.2/ext/cbson/gem_make.out
I'm not a Ruby user so you'll have to tell me how to get more meaningful information if needed.
I tried installing the gems mkmf-lite and mkmfmf but that didn't help.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.