Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions attributes/gdash.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,20 @@
default.gdash.prefix = nil
default.gdash.refresh_rate = 60
default.gdash.columns = 2
default.gdash.graph_width = 500
default.gdash.graph_height = 250
default.gdash.graphite_whisperdb = "/opt/graphite/storage/whisper"
default.gdash.port = 9292
default.gdash.interface = node[:ipaddress]
default.gdash.categories = []
default.gdash.dashboards = Mash.new
default.gdash.interval_filters = [ { label: "Last Hour", from: "-1hour", to: "now" },
{ label: "Last Day", from: "-1day", to: "now" },
{ label: "Last Week", from: "-1week", to: "now" },
{ label: "Last Month", from: "-1month", to: "now" },
{ label: "Last Year", from: "-1year" }, to: "now" ]
default.gdash.intervals = [ { label: "1 hour", from: "-1hour" },
{ label: "2 hour", from: "-2hour" },
{ label: "1 day", from: "-1day" },
{ label: "1 month", from: "-1month" },
{ label: "1 year", from: "-1year" } ]
28 changes: 10 additions & 18 deletions templates/default/gdash.yaml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,16 @@
:prefix: <%= node.gdash.prefix %>
:refresh_rate: <%= node.gdash.refresh_rate %>
:graph_columns: <%= node.gdash.columns %>
:graph_width: 500
:graph_height: 250
:graph_width: <%= node.gdash.graph_width %>
:graph_height: <%= node.gdash.graph_height %>
:whisper_dir: <%= node.gdash.graphite_whisperdb %>
:interval_filters:
- :label: Last Hour
:from: -1hour
:to: now
- :label: Last Day
:from: -1day
- :label: Last Week
:from: -1week
- :label: Last Month
:from: -1month
- :label: Last Year
:from: -1year
<% node.gdash.interval_filters.each do |interval| %>
- :label: <%= interval[:label] %>
:from: <%= interval[:from] %>
:to: <%= interval[:to] || "now" %>
<% end %>
:intervals:
- [ "-1hour", "1 hour" ]
- [ "-2hour", "2 hour" ]
- [ "-1day", "1 day" ]
- [ "-1month", "1 month" ]
- [ "-1year", "1 year" ]
<% node.gdash.intervals.each do |interval| %>
- [ "<%= interval[:from] %>", "<%= interval[:label] %>" ]
<% end %>