-
Notifications
You must be signed in to change notification settings - Fork 387
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'enterprise' of falbala.23loc.com:fnordmetric
- Loading branch information
Showing
40 changed files
with
1,632 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
Deployment | ||
---------- | ||
|
||
### Deploy on Ubuntu | ||
|
||
upstart script etc | ||
|
||
|
||
### Deploy on EC2 | ||
|
||
ready made ami |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Examples | ||
-------- | ||
|
||
here be dragons |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
HTTP API | ||
-------- | ||
|
||
FIXPAUL: blah blah | ||
|
||
### GET /metric/:key | ||
|
||
Retrieves a metric's value(s) at a specified point in time or in a specified time interval | ||
|
||
Parameters: | ||
|
||
<table> | ||
<tr> | ||
<th>key <i>(mandatory)</i></th> | ||
<td> | ||
key of this metric (e.g. my-counter-sum-15) | ||
</td> | ||
</tr> | ||
<tr> | ||
<th>since / until</th> | ||
<td> | ||
when the since and until parameters are set, all values in the supplied time | ||
interval are returned. values can be a timestamp or a timespec like... since/until | ||
are mutually exclusive with at | ||
</td> | ||
</tr> | ||
<tr> | ||
<th>at</th> | ||
<td> | ||
if set, returns a single value at this point in time. content can be a timestamp | ||
or a timespec like -3m... mutually exclusive with since/until | ||
</td> | ||
</tr> | ||
<tr> | ||
<th>format</th> | ||
<td> | ||
response format csv, json or xml (also use HTTP-Accept) | ||
</td> | ||
</tr> | ||
</table> | ||
<br /> | ||
|
||
Examples: | ||
|
||
>> GET /metric/total_sales_in_euro-sum-30?at=-5m&format=json | ||
<< HTTP/1.1 200 OK | ||
<< ... | ||
<< { "value": 23426 } | ||
|
||
>> GET /metric/total_sales_in_euro-sum-30?since=-2min&until=now&format=json | ||
<< HTTP/1.1 200 OK | ||
<< ... | ||
<< { "values": { 1360804571: 4233, 1360804581: 4636, 1360804591: 3621, ... } } | ||
|
||
|
||
### POST /metric/:key | ||
|
||
Sample/add a value to a metric. | ||
|
||
Parameters: | ||
|
||
<table> | ||
<tr> | ||
<th>key <i>(mandatory)</i></th> | ||
<td> | ||
key of this metric (e.g. my-counter-sum-15) | ||
</td> | ||
</tr> | ||
<tr> | ||
<th>value <i>(mandatory)</i></th> | ||
<td> | ||
the value to add/sample to this metric | ||
</td> | ||
</tr> | ||
</table> | ||
<br /> | ||
|
||
Examples: | ||
|
||
>> POST /metric/total_sales_in_euro-sum-30?value=351 | ||
<< HTTP/1.1 201 CREATED | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
FnordMetric Enterprise | ||
---------------------- | ||
|
||
FnordMetric Enterprise is a JVM-based timeseries database. It's a key-value store | ||
(much like redis or memcached) where each key holds a "measurement". There are | ||
different measurement methods like sum, mean, min/max, 90th percentile, etc. You | ||
continuously add data to these keys/measurements which is aggregated and periodically | ||
persisted. | ||
|
||
FnordMetric Enterprise features disk persistence, a HTTP, TCP and UDP API, native | ||
WebSockets support, CSV/JSON Export and a turnkey-ready HTML5 visualization solution | ||
(FnordMetric UI). FnordMetric Enterprise can be used as a drop-in replacement for | ||
StatsD+Graphite (it is a lot faster, see Benchmarks). | ||
|
||
|
||
### Semantics | ||
|
||
There are three basic operations: `add_sample`, `value_at` and `values_in` that | ||
add a sample to an ongoing measurement, retrieve the measurement value at a | ||
specified time, or retrieve all aggregated measurement values in a specified time | ||
interval. | ||
|
||
The measurement method and flush_interval are implicitly specified by the key; | ||
all keys have to be postfixed with "$method-$flush_timeout". For example if | ||
you want a key "response_time" to operate in average/mean mode and flush every 60 | ||
seconds, use the key `response_time-mean-60`, for a key "total_clicks" that | ||
aggregates/sums a value and flushes every hour, you could use "total_clicks.sum-3600" | ||
|
||
|
||
### In-memory vs. disk storage | ||
|
||
FnordMetric Enterprise stores the values as 64bit double precision floats. | ||
|
||
With an example flush timeout of 10 seconds, one metric uses 0.065 MB of | ||
memory per day or 0.4 MB per week. The default ring buffer size is x,. | ||
|
||
That means with only 4GB of ram, you could access the last month of data of | ||
2500 counters/measurements with 10 second granularity all from the in-memory | ||
ringbuffers (without ever hitting a HDD). | ||
|
||
Requests that can not be served from memory require one sequential disk read. | ||
|
||
|
||
### FnordMetric Enterprise vs. StatsD | ||
|
||
+ allows for flush intervals as low as one second | ||
+ rendered in the browser, interactive | ||
+ much much more scalable | ||
+ highly customizable with css | ||
+ requires only a single deployment | ||
+ i18n (proper timezones in graphs due to in browser rendering etc) |
Oops, something went wrong.