obfuscurity / backstop

HTTP service for submitting metrics to Graphite
Other
297 stars 31 forks source link

installing backstop #25

Open skotzkoj opened 8 years ago

skotzkoj commented 8 years ago

Hi I've attempted to install backstop into an Ubuntu 15 vm where I have Graphite also installed. I followed the steps with the following settings:

$ cd /tmp/ git clone https://github.com/obfuscurity/backstop.git $ cd backstop $ bundle install $ export CARBON_URLS= "carbon://localhost:2003" $ export PREFIXES= test,system_io_by_size,system_totals $ foreman start

All works as expected so far. How ever when I try to formulate a rest post command the example provided indicates backstop is listening on port 443, but I find no process that is running on this port. I found the process kicked off after foreman start is listening on port 5000 but rest commands to this port return this:

command I run from within my vm: graphite@jeffs-ubuntu:~/backstop$ curl --data '{"metric" :"test" , "value" : "100", "measure_time" : "2016-07-01"}' http://localhost:5000/publish/note

error returned:

RuntimeError: missing PREFIXES /home/graphite/backstop/lib/backstop/config.rb:4:in env!' /home/graphite/backstop/lib/backstop/config.rb:10:inprefixes' /home/graphite/backstop/lib/backstop/web.rb:97:in block in <class:Application>' /var/lib/gems/2.1.0/gems/sinatra-1.4.7/lib/sinatra/base.rb:1611:incall' /var/lib/gems/2.1.0/gems/sinatra-1.4.7/lib/sinatra/base.rb:1611:in block in compile!' /var/lib/gems/2.1.0/gems/sinatra-1.4.7/lib/sinatra/base.rb:975:in[]' /var/lib/gems/2.1.0/gems/sinatra-1.4.7/lib/sinatra/base.rb:975:in block (3 levels) in route!' /var/lib/gems/2.1.0/gems/sinatra-1.4.7/lib/sinatra/base.rb:994:inroute_eval' /var/lib/gems/2.1.0/gems/newrelic_rpm-3.16.0.318/lib/new_relic/agent/instrumentation/sinatra.rb:139:in route_eval_with_newrelic' /var/lib/gems/2.1.0/gems/sinatra-1.4.7/lib/sinatra/base.rb:975:inblock (2 levels) in route!' /var/lib/gems/2.1.0/gems/sinatra-1.4.7/lib/sinatra/base.rb:1015:in block in process_route' /var/lib/gems/2.1.0/gems/sinatra-1.4.7/lib/sinatra/base.rb:1013:incatch' /var/lib/gems/2.1.0/gems/sinatra-1.4.7/lib/sinatra/base.rb:1013:in process_route' /var/lib/gems/2.1.0/gems/newrelic_rpm-3.16.0.318/lib/new_relic/agent/instrumentation/sinatra.rb:119:inprocess_route_with_newrelic' /var/lib/gems/2.1.0/gems/sinatra-1.4.7/lib/sinatra/base.rb:973:in block in route!' /var/lib/gems/2.1.0/gems/sinatra-1.4.7/lib/sinatra/base.rb:972:ineach' /var/lib/gems/2.1.0/gems/sinatra-1.4.7/lib/sinatra/base.rb:972:in route!' /var/lib/gems/2.1.0/gems/sinatra-1.4.7/lib/sinatra/base.rb:1085:inblock in dispatch!' /var/lib/gems/2.1.0/gems/sinatra-1.4.7/lib/sinatra/base.rb:1067:in block in invoke' /var/lib/gems/2.1.0/gems/sinatra-1.4.7/lib/sinatra/base.rb:1067:incatch' /var/lib/gems/2.1.0/gems/sinatra-1.4.7/lib/sinatra/base.rb:1067:in invoke' /var/lib/gems/2.1.0/gems/sinatra-1.4.7/lib/sinatra/base.rb:1082:indispatch!' /var/lib/gems/2.1.0/gems/newrelic_rpm-3.16.0.318/lib/new_relic/agent/instrumentation/sinatra.rb:164:in dispatch_and_notice_errors_with_newrelic' /var/lib/gems/2.1.0/gems/newrelic_rpm-3.16.0.318/lib/new_relic/agent/instrumentation/sinatra.rb:150:inblock in dispatch_with_newrelic' /var/lib/gems/2.1.0/gems/newrelic_rpm-3.16.0.318/lib/new_relic/agent/instrumentation/controller_instrumentation.rb:363:in perform_action_with_newrelic_trace' /var/lib/gems/2.1.0/gems/newrelic_rpm-3.16.0.318/lib/new_relic/agent/instrumentation/sinatra.rb:147:indispatch_with_newrelic' /var/lib/gems/2.1.0/gems/sinatra-1.4.7/lib/sinatra/base.rb:907:in block in call!' /var/lib/gems/2.1.0/gems/sinatra-1.4.7/lib/sinatra/base.rb:1067:inblock in invoke' /var/lib/gems/2.1.0/gems/sinatra-1.4.7/lib/sinatra/base.rb:1067:in catch' /var/lib/gems/2.1.0/gems/sinatra-1.4.7/lib/sinatra/base.rb:1067:ininvoke' /var/lib/gems/2.1.0/gems/sinatra-1.4.7/lib/sinatra/base.rb:907:in call!' /var/lib/gems/2.1.0/gems/sinatra-1.4.7/lib/sinatra/base.rb:895:incall' /var/lib/gems/2.1.0/gems/newrelic_rpm-3.16.0.318/lib/new_relic/rack/agent_hooks.rb:30:in traced_call' /var/lib/gems/2.1.0/gems/newrelic_rpm-3.16.0.318/lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:incall' /var/lib/gems/2.1.0/gems/newrelic_rpm-3.16.0.318/lib/new_relic/rack/browser_monitoring.rb:32:in traced_call' /var/lib/gems/2.1.0/gems/newrelic_rpm-3.16.0.318/lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:incall' /var/lib/gems/2.1.0/gems/rack-protection-1.5.3/lib/rack/protection/xss_header.rb:18:in call' /var/lib/gems/2.1.0/gems/newrelic_rpm-3.16.0.318/lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:incall' /var/lib/gems/2.1.0/gems/rack-protection-1.5.3/lib/rack/protection/path_traversal.rb:16:in call' /var/lib/gems/2.1.0/gems/newrelic_rpm-3.16.0.318/lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:incall' /var/lib/gems/2.1.0/gems/rack-protection-1.5.3/lib/rack/protection/json_csrf.rb:18:in call' /var/lib/gems/2.1.0/gems/newrelic_rpm-3.16.0.318/lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:incall' /var/lib/gems/2.1.0/gems/rack-protection-1.5.3/lib/rack/protection/base.rb:49:in call' /var/lib/gems/2.1.0/gems/newrelic_rpm-3.16.0.318/lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:incall' /var/lib/gems/2.1.0/gems/rack-protection-1.5.3/lib/rack/protection/base.rb:49:in call' /var/lib/gems/2.1.0/gems/newrelic_rpm-3.16.0.318/lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:incall' /var/lib/gems/2.1.0/gems/rack-protection-1.5.3/lib/rack/protection/frame_options.rb:31:in call' /var/lib/gems/2.1.0/gems/newrelic_rpm-3.16.0.318/lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:incall' /var/lib/gems/2.1.0/gems/rack-1.6.4/lib/rack/logger.rb:15:in call' /var/lib/gems/2.1.0/gems/newrelic_rpm-3.16.0.318/lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:incall' /var/lib/gems/2.1.0/gems/sinatra-1.4.7/lib/sinatra/base.rb:212:in call' /var/lib/gems/2.1.0/gems/newrelic_rpm-3.16.0.318/lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:incall' /var/lib/gems/2.1.0/gems/rack-1.6.4/lib/rack/head.rb:13:in call' /var/lib/gems/2.1.0/gems/newrelic_rpm-3.16.0.318/lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:incall' /var/lib/gems/2.1.0/gems/sinatra-1.4.7/lib/sinatra/show_exceptions.rb:25:in call' /var/lib/gems/2.1.0/gems/newrelic_rpm-3.16.0.318/lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:incall' /var/lib/gems/2.1.0/gems/sinatra-1.4.7/lib/sinatra/base.rb:182:in call' /var/lib/gems/2.1.0/gems/newrelic_rpm-3.16.0.318/lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:incall' /var/lib/gems/2.1.0/gems/sinatra-1.4.7/lib/sinatra/base.rb:2013:in call' /var/lib/gems/2.1.0/gems/sinatra-1.4.7/lib/sinatra/base.rb:1487:inblock in call' /var/lib/gems/2.1.0/gems/sinatra-1.4.7/lib/sinatra/base.rb:1787:in synchronize' /var/lib/gems/2.1.0/gems/sinatra-1.4.7/lib/sinatra/base.rb:1487:incall' /var/lib/gems/2.1.0/gems/newrelic_rpm-3.16.0.318/lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in call' /var/lib/gems/2.1.0/gems/rack-1.6.4/lib/rack/tempfile_reaper.rb:15:incall' /var/lib/gems/2.1.0/gems/rack-1.6.4/lib/rack/lint.rb:49:in _call' /var/lib/gems/2.1.0/gems/rack-1.6.4/lib/rack/lint.rb:37:incall' /var/lib/gems/2.1.0/gems/rack-1.6.4/lib/rack/showexceptions.rb:24:in call' /var/lib/gems/2.1.0/gems/rack-1.6.4/lib/rack/commonlogger.rb:33:incall' /var/lib/gems/2.1.0/gems/sinatra-1.4.7/lib/sinatra/base.rb:219:in call' /var/lib/gems/2.1.0/gems/rack-1.6.4/lib/rack/chunked.rb:54:incall' /var/lib/gems/2.1.0/gems/rack-1.6.4/lib/rack/content_length.rb:15:in call' /var/lib/gems/2.1.0/gems/thin-1.7.0/lib/thin/connection.rb:86:inblock in pre_process' /var/lib/gems/2.1.0/gems/thin-1.7.0/lib/thin/connection.rb:84:in catch' /var/lib/gems/2.1.0/gems/thin-1.7.0/lib/thin/connection.rb:84:inpre_process' /var/lib/gems/2.1.0/gems/thin-1.7.0/lib/thin/connection.rb:53:in process' /var/lib/gems/2.1.0/gems/thin-1.7.0/lib/thin/connection.rb:39:inreceive_data' /var/lib/gems/2.1.0/gems/eventmachine-1.2.0.1/lib/eventmachine.rb:194:in run_machine' /var/lib/gems/2.1.0/gems/eventmachine-1.2.0.1/lib/eventmachine.rb:194:inrun' /var/lib/gems/2.1.0/gems/thin-1.7.0/lib/thin/backends/base.rb:73:in start' /var/lib/gems/2.1.0/gems/thin-1.7.0/lib/thin/server.rb:162:instart' /var/lib/gems/2.1.0/gems/rack-1.6.4/lib/rack/handler/thin.rb:19:in run' /var/lib/gems/2.1.0/gems/rack-1.6.4/lib/rack/server.rb:286:instart' /var/lib/gems/2.1.0/gems/rack-1.6.4/lib/rack/server.rb:147:in start' /var/lib/gems/2.1.0/gems/rack-1.6.4/bin/rackup:4:in<top (required)>' /usr/local/bin/rackup:23:in load' /usr/local/bin/rackup:23:in

'

ENV: graphite@jeffs-ubuntu:~/backstop$ echo $PREFIXES test,system_io_by_size,system_totals

help a noob out?

Thanks in advance.

obfuscurity commented 8 years ago

@skotzkoj Sorry for the slow response. I'm not sure why I put an https protocol scheme in the example config, it doesn't support https natively (although it could with a little work). It's been so long I just don't remember why it was documented like that.

As far as your PREFIXES issue, your export command looks invalid. Can you run echo $PREFIXES to make sure it has a valid string?

obfuscurity commented 8 years ago

Oh, wrt the https scheme I was probably using Heroku's SSL feature.