Closed GoranP closed 12 years ago
What does the following give you:
curl -H "Accept: application/json" http://localhost:9292/data?counters=cpu
goran@tenchi:~$ curl -H "Accept: application/json" http://localhost:9292/data?counters=cpu <!DOCTYPE html>
get '/data' do "Hello World" end
Ups sorry... now this more readable...
goran@tenchi:~$ curl -H "Accept: application/json" http://localhost:9292/data?counters=cpu
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
body { text-align:center;font-family:helvetica,arial;font-size:22px;
color:#888;margin:20px}
#c {margin:0 auto;width:500px;text-align:left}
</style>
</head>
<body>
<h2>Sinatra doesn’t know this ditty.</h2>
<img src='http://localhost:9292/__sinatra__/404.png'>
<div id="c">
Try this:
<pre>get '/data' do
"Hello World"
end</pre>
</div>
</body>
</html>
Should have realized this right away, the version of the the gem that isn't released doesn't match up with docs\README. In particular, commit 6823a136 made big changes to the API and routing.
You can take a look at the old README here for info on the old routes\API: https://github.com/mikeycgto/batsd-dash/blob/6823a13671ff25bec72fe63905e063302257d123/README.md
Alternatively, you can just use the code off github as opposed to rubygems. If you're using a Gemfile in your project something like the following should do the job:
gem 'batsd-dash', :git => 'git://github.com/mikeycgto/batsd-dash.git'
We need to just fix up a few front-end aspects with the project then we will release version 0.3.0 to rubygems.
works like a charm... thnx.
No problem! Hope you find this project useful.
We should be releasing the updated gem within a few days (possibly even tonight).
It is quite nice project. I like the graphs and the way you generate them through nvd3. Althought I have some problems with gauges (blocks server - ruby goes on 100%) but it is probably because of junk in my redis. If I find any issues I will send it to you. :)
Disk reads can be rather sluggish, especially with a lot of data.
If you're on the version from rubygems, there is a chance your requests without any time parameters are 'falling through' to the next retention level. We bumped down the default to 30 minutes to avoid this (e2577acdb).
Accessing multiple metrics is a known slow spot as well. We fetch each stat from the batsd data server in series not in parallel. This is something we will eventually change (going to make a ticket right now :smile:)
Using Ubuntu 12.04 I followed instructions and installed as suggested -> sudo gem install batsd-dash after that I've installed thin -> sudo gem install thin I've started rackup and it looks fine
I am using Ruby 1.9.3
Request on: http://localhost:9292/available
returns my counters and gauges in this form -> ["counters:account.activate","counters:cpu","gauges:cpu"]
But http://localhost:9292/graph#counters=cpu returns error "Sinatra doesn’t know this ditty." Same for gauges.
When I hit http://localhost:9292/counters whatever date I select I have error message "Error: Invalid metrics"
In HTML pages and Ajax requests I don't see any reference to nvd3...
Is there a solution?