Coder Social home page Coder Social logo

folsom_webmachine's Introduction

folsom_webmachine

This is an application that exposes folsom metrics via http using webmachine.

usage

    > folsom_webmachine_sup:start_link().
    > application:start(folsom).

api

Query the list of available metrics:

    $ curl http://localhost:5565/_metrics

Query a specific metric:

    $ curl http://localhost:5565/_metrics/name

Create a new metric:

    $ curl -X PUT http://localhost:5565/_metrics -d '{"id": "a", "type": "counter"}' -H "Content-Type: application/json"

Update a metric:

    $ curl -X PUT http://localhost:5565/_metrics/a -d '{"value" : {"inc": 1}}' -H "Content-Type: application/json"

Delete a metric:

    $ curl -X DELETE http://localhost:5565/_metrics/a

Query Erlang VM metrics:

    $ curl http://localhost:5565/_memory

Query Erlang VM stats:

    $ curl http://localhost:5565/_statistics

Query Erlang VM information:

    $ curl http://localhost:5565/_system

output

    $ curl http://localhost:5565/_metrics/a
    {"value":{"min":1,"max":1000,"mean":322.2,"median":100,"variance":185259.19999999998,"standard_deviation":430.4174717643325,"skewness":1.2670136514902162,"kurtosis":-1.2908313302242205,"percentile":{"75":500,"95":1000,"99":1000,"999":1000},"histogram":{"10":2,"20":0,"30":0,"50":0,"100":1,"200":0,"300":0,"400":0,"500":1,"1000":1,"99999999999999":0}}}


     $ curl http://localhost:5565/_metrics/test

     {"value":{"1303483997384193":{"event":"asdfasdf"}}}


     $ curl http://localhost:5565/_memory
     {"total":11044608,"processes":3240936,"processes_used":3233888,"system":7803672,"atom":532137,"atom_used":524918,"binary":696984,"code":4358030,"ets":385192}

folsom_webmachine's People

Contributors

joewilliams avatar orbitz-other avatar tholschuh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

folsom_webmachine's Issues

Depo is usine a very old version of webmachine which depends on old version of mochiweb

Old version of mochiweb use parameterized module which has been deprecated. so this repo won't compile under Erlang R16+.

Compiled src/mochiweb_socket_server.erl
src/mochifmt_std.erl:6: parameterized modules are no longer supported
src/mochifmt_std.erl:11: variable 'THIS' is unbound
src/mochifmt_std.erl:14: variable 'THIS' is unbound
src/mochifmt_std.erl:23: variable 'THIS' is unbound

Folsom has moved

This repo is forked and likely unmaintained.

I no longer have access the folsom related projects and it seems like I probably won't in the near future. To continue maintaining them I have moved the project to https://github.com/folsom-project Please update your projects

application:start(folsom_webmachine) as a app dependency

After adding folsom_webmachine as a dependency to my projcet calling application:start(folsom_webmachine) from my own application returns ok however Observer shows that the application isnt running ?

I modified the folsom_webmachine.app.src to include the module ...

{mod, {folsom_webmachine_app, []}}

... which solves my problem as folsom_webmachine now starts correctly and can be seen as a seperate application under Observer running alongside my own application however im not sure if this is the correct approach?

Cheers,

Andy.

No metrics?

I've added folsom and folsom_cowboy to my application. Both are running, but I get no metrics, except for the vm metrics - they all seem to work. No metrics for pooler, either.

sys.config:

%%% --erlang--
[
{nebula2,
[
{cdmi_bootstrap, true},
{cdmi_location, "US-TX"},
{cdmi_metadata_module, nebula2_riak}
]
},
{lager,
[
{log_root, "/var/log/nebula2"},
{handlers,
[
{lager_console_backend, info, {colored, true}},
{lager_file_backend, [{file, "error.log"}, {level, error}]},
{lager_file_backend, [{file, "debug.log"}, {level, debug}]},
{lager_file_backend, [{file, "console.log"}, {level, info}]}
]
}
]
},
{folsom_cowboy,
[
{transport, cowboy_tcp_transport},
{transport_options, [{ip, {127, 0, 0, 1}}]}
]
},
{pooler,
[
{pools,
[
[
{name, riak_pool},
{group, riak},
{max_count, 500},
{init_count, 20},
{start_mfa, {riakc_pb_socket, start_link, ["nebriak1", 8087]}},
%% if you want to enable metrics, set this to a module with
%% an API conformant to the folsom_metrics module.
%% If this config is missing, then no metrics are sent.
{metrics_module, folsom_metrics}
]
]
}
]
}
].

{application, nebula2, [
{description, "Nebula 2 CDMI Server"},
{vsn, "0.1.0"},
{id, "git"},
{modules, []},
{registered, []},
{applications, [
lager,
kernel,
stdlib,
inets,
riakc,
crc16,
uuid,
jsx,
folsom,
cowboy,
folsom_cowboy
]},
{included_applications, [pooler, mcd]},
{mod, {nebula2_app, []}},
{env, []}
]}.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.