Merge lp://staging/~lucio.torre/txstatsd/webserver-for-extra-data into lp://staging/txstatsd
Proposed by
Lucio Torre
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Lucio Torre | ||||
Approved revision: | 73 | ||||
Merged at revision: | 72 | ||||
Proposed branch: | lp://staging/~lucio.torre/txstatsd/webserver-for-extra-data | ||||
Merge into: | lp://staging/txstatsd | ||||
Diff against target: |
474 lines (+278/-14) 10 files modified
txstatsd/metrics/histogrammetric.py (+30/-1) txstatsd/metrics/timermetric.py (+22/-0) txstatsd/server/configurableprocessor.py (+1/-9) txstatsd/server/httpinfo.py (+60/-0) txstatsd/server/processor.py (+11/-1) txstatsd/service.py (+8/-1) txstatsd/tests/metrics/test_histogrammetric.py (+15/-0) txstatsd/tests/stats/test_exponentiallydecayingsample.py (+1/-1) txstatsd/tests/test_httpinfo.py (+128/-0) txstatsd/tests/test_service.py (+2/-1) |
||||
To merge this branch: | bzr merge lp://staging/~lucio.torre/txstatsd/webserver-for-extra-data | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Sidnei da Silva | Approve | ||
Review via email:
|
Commit message
add a webserver for nagios and extra data not in time series format
Description of the change
$ PYTHONPATH=. twistd statsd -c sample.conf
$ telnet localhost 11111
Trying ::1...
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
foo.metric:100|ms
foo.metric:110|ms
^]q
telnet> q
Connection closed.
$ curl http://
[0.0, 2.0]
A nice histogram!
Also add /status that checks that process time and flush time are 0.7x of flush_interval
To post a comment you must log in.
Please make the /status resource return pure json, without the OK/ERROR. Or even encode that in the json with {'status': 'OK'} or {'status':'ERROR'}. Alternatively, OK == HTTP Status 200, Error == HTTP Status 500.
It's probably a good idea to return the histogram under a json structure instead of as a plain list, that way it's easier to extend it in the future to return more info if needed without breaking existing parsing. Eg: {'histogram': [..values..]}.