Class: Graphite::MyGraph
Instance Attribute Summary
Attributes inherited from Graph
#allow_children, #id, #leaf, #name, #url
Class Method Summary collapse
-
.find_by_name(name) ⇒ Object
Returns a graph by name.
Instance Method Summary collapse
Methods inherited from Graph
descend_to_leaf, find_all_by_query, find_by_query_and_path
Methods inherited from Base
authenticate, connection, get, set_connection
Class Method Details
.find_by_name(name) ⇒ Object
Returns a graph by name
18 19 20 |
# File 'lib/graphite/my_graph.rb', line 18 def self.find_by_name(name) MyGraph.find_by_query_and_path(name,name.split(".").first).first end |
Instance Method Details
#delete! ⇒ Object
13 14 15 |
# File 'lib/graphite/my_graph.rb', line 13 def delete! MyGraph.get("/composer/mygraph/",:action => "delete", :graphName => name,:url => url.gsub("&","%26")) end |
#save! ⇒ Object
6 7 8 9 10 11 |
# File 'lib/graphite/my_graph.rb', line 6 def save! MyGraph.get("/composer/mygraph/",:action => "save", :graphName => name,:url => url.gsub("&","%26")) Munin2Graphite::Config.log.debug("Saving: #{name} ") Munin2Graphite::Config.log.debug(" url: #{url} ") end |