diff --git a/dashboards/rzl.erb b/dashboards/rzl.erb index f67b6e4..0d5f89a 100644 --- a/dashboards/rzl.erb +++ b/dashboards/rzl.erb @@ -18,9 +18,13 @@ $(function() {
-
  • + +
  • +
    +
  • diff --git a/jobs/grafana.rb b/jobs/grafana.rb index 521d554..a08a7fc 100644 --- a/jobs/grafana.rb +++ b/jobs/grafana.rb @@ -5,7 +5,7 @@ begin # Instatiates an empty data hash. This will store our variables and associated Xively value. data = {} - grafana_data = HTTParty.post('http://kunterbunt.vm.rzl/api/datasources/proxy/1/render', { :body => 'target=alias(rzl.service.heizung.temp.beamerplattform%2C%20\'Temperatur_Beamerplattform\')&from=-24h&until=now&format=json&maxDataPoints=10'}) + grafana_data = HTTParty.post('http://kunterbunt.vm.rzl/api/datasources/proxy/1/render', { :body => 'target=alias(rzl.service.heizung.temp.beamerplattform%2C%20\'Temperatur_Beamerplattform\')&target=alias(scale(rzl.service.power.hauptraum.power%2C%200.001)%2C%20\'Stromverbrauch_Hauptraum\')&from=-24h&until=now&format=json&maxDataPoints=50'}) # This code assigns the variables to incoming Xively data and stores the result in a hash grafana_data.each do |n| data[n['target']] = n diff --git a/jobs/status.rb b/jobs/status.rb index aa1272e..a7ebbd3 100644 --- a/jobs/status.rb +++ b/jobs/status.rb @@ -1,6 +1,6 @@ require 'net/http' require 'uri' -require 'json' +require 'JSON' url = URI.parse("http://s.rzl.so/api/full.json")