ripienaar / graphite-graph-dsl

A small DSL to describe graphite graphs
http://www.devco.net/
Apache License 2.0
167 stars 43 forks source link

graph_columns #15

Open corbosman opened 12 years ago

corbosman commented 12 years ago

I cant seem to be able to override the default graph_columns in a graph-specific dash.yaml. No matter what I do, the central gdash.yaml setting is used.

ripienaar commented 12 years ago

you'll need to provide more details of exactly what you are trying

corbosman commented 12 years ago

Actually, it seems to be a problem when graph_columns is 1, gdash even crashed if I set graph_columns to 1 in gdash.yaml

corbosman commented 12 years ago

Ok,

gdash.yaml:

:graphite: http://graphite.xs4all.net :templatedir: /data/gdash/graph_templates :options: :title: XS4ALL gdash :prefix: "" :graph_columns: 2 :whisper_dir: "/data/graphite/storage/whisper" :interval_filters:

dash.yaml:

:name: Readmail :description: Number of unique logins :options: :graph_columns: 1

This doesnt show 1 column in that graph, but still 2 columns. Tried with and without the :options: line.

Also, if I set :graph_columns: 1 in gdash.yaml, I get this error (latest git clone)

NoMethodError - undefined method rindex' for #<Hash:0x7f87d29598e8>: /data/gdash/lib/gdash/../../views/dashboard.erb:11:inevaluate_source' /data/gdash/lib/gdash/../../views/dashboard.erb:10:in each' /data/gdash/lib/gdash/../../views/dashboard.erb:10:inevaluate_source' /data/gdash/lib/gdash/../../views/dashboard.erb:8:in each' /data/gdash/lib/gdash/../../views/dashboard.erb:8:inevaluate_source' /var/lib/gems/1.8/gems/tilt-1.3.3/lib/tilt/template.rb:144:in cached_evaluate' /var/lib/gems/1.8/gems/tilt-1.3.3/lib/tilt/template.rb:127:inevaluate' /var/lib/gems/1.8/gems/tilt-1.3.3/lib/tilt/template.rb:76:in render' /var/lib/gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:636:inrender' /var/lib/gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:522:in erb' ./lib/gdash/sinatra_app.rb:134:inGET /:category/:dash/?*' /var/lib/gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:1211:in call' /var/lib/gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:1211:incompile!' /var/lib/gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:785:in []' /var/lib/gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:785:inroute!' /var/lib/gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:801:in route_eval' /var/lib/gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:785:inroute!' /var/lib/gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:822:in process_route' /var/lib/gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:820:incatch' /var/lib/gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:820:in process_route' /var/lib/gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:784:inroute!' /var/lib/gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:783:in each' /var/lib/gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:783:inroute!' /var/lib/gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:886:in dispatch!' /var/lib/gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:719:incall!' /var/lib/gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:871:in invoke' /var/lib/gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:871:incatch' /var/lib/gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:871:in invoke' /var/lib/gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:719:incall!' /var/lib/gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:705:in call' /var/lib/gems/1.8/gems/rack-protection-1.2.0/lib/rack/protection/xss_header.rb:22:incall' /var/lib/gems/1.8/gems/rack-protection-1.2.0/lib/rack/protection/path_traversal.rb:16:in call' /var/lib/gems/1.8/gems/rack-protection-1.2.0/lib/rack/protection/json_csrf.rb:17:incall' /var/lib/gems/1.8/gems/rack-protection-1.2.0/lib/rack/protection/base.rb:47:in call' /var/lib/gems/1.8/gems/rack-protection-1.2.0/lib/rack/protection/xss_header.rb:22:incall' /var/lib/gems/1.8/gems/rack-1.4.1/lib/rack/nulllogger.rb:9:in call' /var/lib/gems/1.8/gems/rack-1.4.1/lib/rack/head.rb:9:incall' /usr/lib/ruby/1.8/phusion_passenger/rack/request_handler.rb:92:in process_request' /usr/lib/ruby/1.8/phusion_passenger/abstract_request_handler.rb:207:inmain_loop' /usr/lib/ruby/1.8/phusion_passenger/rack/application_spawner.rb:118:in run' /usr/lib/ruby/1.8/phusion_passenger/rack/application_spawner.rb:65:inspawn_application' /usr/lib/ruby/1.8/phusion_passenger/utils.rb:184:in safe_fork' /usr/lib/ruby/1.8/phusion_passenger/rack/application_spawner.rb:58:inspawn_application' /usr/lib/ruby/1.8/phusion_passenger/rack/application_spawner.rb:41:in spawn_application' /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:159:inspawn_application' /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:287:in handle_spawn_application' /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:insend' /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in main_loop' /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:196:instart_synchronously' /usr/lib/phusion_passenger/passenger-spawn-server:61

bookest commented 11 years ago

I think this is the same problem I ran into with gdash. A fix is here: https://github.com/ripienaar/gdash/pull/79

bookest commented 11 years ago

I was mistaken - the crash has already been fixed by a recent change in gdash.