Open jeeveeyes opened 11 years ago
Update on this :
I am able to get the nice-looking Pencil UI when I edit views/global.erb and truncate the file starting from this line till the end of the file ,
<% if !@cluster.psuedo %>
I get the Pencil UI although my metric is not visible. I think it might be a simple config issue from now on and I shall double check the config files.
After getting my dashboard , graph and metric config closely modelled after the examples, I am able to view my metrics on Pencil !
Looks great and am playing with various other options available.
Thanks.
War story: Once when I could not see my metric but rather only a place holder graphic image, I opened that image in a seperate browser tab. It turned out to be an image of a traceback that the Graphite Webapp had thrown when it tried to render the metric. From that I could see that it was a time zone related (Pytz library) error. Upgrading the Pytz version on my system seemed to make graphite happy and after that the graph in Pencil came up fine.
Hi,
I am using Pencil (rewrite branch 0.4.0a ) and have built and installed the Pencil gem properly.
I have a test metric up that shows up in Graphite's webUI and I tried to pull the same into Pencil. The test metric is in the format mysrv.server.testmetric where mysrv is the name of the host.
When I browse the Pencil home page at:9292 , I get the below error :
pencil
I, [2012-11-29T07:49:00.916454 #17168] INFO -- : no :manifest key for webapp, using default == Sinatra/1.3.3 has taken the stage on 9292 for development with backup from Mongrel 192.168.114.58 - - [29/Nov/2012 07:49:07] "GET / HTTP/1.1" 302 - 0.0092 NoMethodError - undefined method
each' for nil:NilClass: /usr/lib/ruby/gems/1.8/gems/pencil-0.4.0a/lib/../views/global.erb:43:in
evaluate_source' /usr/lib/ruby/gems/1.8/gems/pencil-0.4.0a/lib/../views/global.erb:37:ineach' /usr/lib/ruby/gems/1.8/gems/pencil-0.4.0a/lib/../views/global.erb:37:in
evaluate_source' /usr/lib/ruby/gems/1.8/gems/tilt-1.3.3/lib/tilt/template.rb:144:incached_evaluate' /usr/lib/ruby/gems/1.8/gems/tilt-1.3.3/lib/tilt/template.rb:127:in
evaluate' /usr/lib/ruby/gems/1.8/gems/tilt-1.3.3/lib/tilt/template.rb:76:inrender' /usr/lib/ruby/gems/1.8/gems/sinatra-1.3.3/lib/sinatra/base.rb:686:in
render' /usr/lib/ruby/gems/1.8/gems/sinatra-1.3.3/lib/sinatra/base.rb:572:inerb' /usr/lib/ruby/gems/1.8/gems/pencil-0.4.0a/lib/pencil.rb:120:in
GET /dash/:cluster/?' /usr/lib/ruby/gems/1.8/gems/sinatra-1.3.3/lib/sinatra/base.rb:1264:incall' /usr/lib/ruby/gems/1.8/gems/sinatra-1.3.3/lib/sinatra/base.rb:1264 /usr/lib/ruby/gems/1.8/gems/sinatra-1.3.3/lib/sinatra/base.rb:835:in
[]' /usr/lib/ruby/gems/1.8/gems/sinatra-1.3.3/lib/sinatra/base.rb:835:inroute!' /usr/lib/ruby/gems/1.8/gems/sinatra-1.3.3/lib/sinatra/base.rb:851:in
route_eval' /usr/lib/ruby/gems/1.8/gems/sinatra-1.3.3/lib/sinatra/base.rb:835:inroute!' /usr/lib/ruby/gems/1.8/gems/sinatra-1.3.3/lib/sinatra/base.rb:872:in
process_route' /usr/lib/ruby/gems/1.8/gems/sinatra-1.3.3/lib/sinatra/base.rb:870:incatch' /usr/lib/ruby/gems/1.8/gems/sinatra-1.3.3/lib/sinatra/base.rb:870:in
process_route' /usr/lib/ruby/gems/1.8/gems/sinatra-1.3.3/lib/sinatra/base.rb:834:inroute!' /usr/lib/ruby/gems/1.8/gems/sinatra-1.3.3/lib/sinatra/base.rb:833:in
each' /usr/lib/ruby/gems/1.8/gems/sinatra-1.3.3/lib/sinatra/base.rb:833:inroute!' /usr/lib/ruby/gems/1.8/gems/sinatra-1.3.3/lib/sinatra/base.rb:936:in
dispatch!' /usr/lib/ruby/gems/1.8/gems/sinatra-1.3.3/lib/sinatra/base.rb:769:incall!' /usr/lib/ruby/gems/1.8/gems/sinatra-1.3.3/lib/sinatra/base.rb:921:in
invoke' /usr/lib/ruby/gems/1.8/gems/sinatra-1.3.3/lib/sinatra/base.rb:921:incatch' /usr/lib/ruby/gems/1.8/gems/sinatra-1.3.3/lib/sinatra/base.rb:921:in
invoke' /usr/lib/ruby/gems/1.8/gems/sinatra-1.3.3/lib/sinatra/base.rb:769:incall!' /usr/lib/ruby/gems/1.8/gems/sinatra-1.3.3/lib/sinatra/base.rb:755:in
call' /usr/lib/ruby/gems/1.8/gems/rack-1.4.1/lib/rack/logger.rb:15:incall' /usr/lib/ruby/gems/1.8/gems/rack-protection-1.2.0/lib/rack/protection/xss_header.rb:22:in
call' /usr/lib/ruby/gems/1.8/gems/rack-protection-1.2.0/lib/rack/protection/path_traversal.rb:16:incall' /usr/lib/ruby/gems/1.8/gems/rack-protection-1.2.0/lib/rack/protection/json_csrf.rb:17:in
call' /usr/lib/ruby/gems/1.8/gems/rack-protection-1.2.0/lib/rack/protection/base.rb:47:incall' /usr/lib/ruby/gems/1.8/gems/rack-protection-1.2.0/lib/rack/protection/xss_header.rb:22:in
call' /usr/lib/ruby/gems/1.8/gems/rack-1.4.1/lib/rack/logger.rb:15:incall' /usr/lib/ruby/gems/1.8/gems/rack-1.4.1/lib/rack/commonlogger.rb:20:in
call_without_check' /usr/lib/ruby/gems/1.8/gems/sinatra-1.3.3/lib/sinatra/base.rb:136:incall' /usr/lib/ruby/gems/1.8/gems/sinatra-1.3.3/lib/sinatra/base.rb:129:in
call' /usr/lib/ruby/gems/1.8/gems/rack-1.4.1/lib/rack/head.rb:9:incall' /usr/lib/ruby/gems/1.8/gems/sinatra-1.3.3/lib/sinatra/showexceptions.rb:21:in
call' /usr/lib/ruby/gems/1.8/gems/sinatra-1.3.3/lib/sinatra/base.rb:99:incall' /usr/lib/ruby/gems/1.8/gems/sinatra-1.3.3/lib/sinatra/base.rb:1389:in
call' /usr/lib/ruby/gems/1.8/gems/sinatra-1.3.3/lib/sinatra/base.rb:1471:insynchronize' /usr/lib/ruby/gems/1.8/gems/sinatra-1.3.3/lib/sinatra/base.rb:1389:in
call' /usr/lib/ruby/gems/1.8/gems/rack-1.4.1/lib/rack/handler/mongrel.rb:77:inprocess' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:159:in
process_client' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:158:ineach' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:158:in
process_client' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:inrun' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in
initialize' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:innew' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in
run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:ininitialize' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in
new' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:inrun' /usr/lib/ruby/gems/1.8/gems/rack-1.4.1/lib/rack/handler/mongrel.rb:38:in
run' /usr/lib/ruby/gems/1.8/gems/sinatra-1.3.3/lib/sinatra/base.rb:1350:inrun!' /usr/lib/ruby/gems/1.8/gems/pencil-0.4.0a/bin/pencil:4 /usr/bin/pencil:23:in
load' /usr/bin/pencil:23The Sinatra debug error page shows up with something like :
NoMethodError at /dash/global undefined method `each' for nil:NilClass file: global.erb location: evaluate_source line: 43
My pencil.yml is
cat pencil.yml
:graphite_url: http:///graphite
:port: 9292
:host_sort: "sensible"
:metric_format: "%h.%m" #%m metric, %h host
:templates_dir: "./conf"
:refresh_rate: 60 # refresh rate for images in seconds
careful! these are properties as specified by the graphite-dsl now
:default_url_opts: :width: 1400 :height: 400 :fontsize: 15 :template: "noc" :ymin: 0 :margin: 5 :thickness: 2
:webapp: true :default_views:
My conf/global/testmet.graph :
-- mode: ruby --
title 'mysrv test metric' area :stacked
field :testmetric, :alias => "testmetric", :color => 'yellow', :data => "server.testmetric"
As per the wiki guidelines on configuration , I left the data unqualified i.e I omitted that host details. IOW, instead of :data => "mysrv.server.testmetric" I gave :data => "server.testmetric"
Any pointers on what could be wrong in this setup ?