Permalink
Commits on Apr 23, 2012
  1. Update copyright year.

    mbostock committed Apr 23, 2012
  2. Remove defunct schema.

    mbostock committed Apr 23, 2012
  3. Add default dashboards.

    mbostock committed Apr 23, 2012
  4. Simplified README.

    mbostock committed Apr 23, 2012
Commits on Apr 22, 2012
  1. Update README.

    mbostock committed Apr 22, 2012
  2. Add UDP support for posting events.

    This commit also changes the emitter client so that you can easily switch
    between websockets and UDP as desired. UDP is faster, but does not detect when
    events are not sent successfully.
    mbostock committed Apr 22, 2012
Commits on Apr 20, 2012
  1. Add node-static dependency

    RISCfuture committed Apr 20, 2012
  2. Rename random emitter example.

    mbostock committed Apr 20, 2012
  3. Remove the DJI emitter.

    mbostock committed Apr 20, 2012
  4. Fix a bug with metric invalidation.

    This reverts @76a7527. That change introduced a bug because I forgot {multi:
    true}, so the collector was only invalidating the first matching first metric
    for a given event, rather than all of them.
    
    Also, by delaying metric invalidation, the evaluator is less likely to encounter
    the race condition where a new event is collected between the evaluator reading
    the events and saving the computed metric. Still, this solution is not perfect.
    mbostock committed Apr 20, 2012
  5. Fix a bug in emitter closing.

    If you close the emitter before it opens, it now closes correctly.
    mbostock committed Apr 20, 2012
Commits on Apr 18, 2012
Commits on Apr 17, 2012
  1. Shared polling for event streams.

    If multiple clients are listening to the same event stream, share a polling
    loop. This is much more efficient than every client polling for itself!
    mbostock committed Apr 17, 2012
  2. Fix a bug with ZOMBIE QUERIES! 💀

    The streaming event get endpoint wasn't correctly terminating the query callback
    when the connection is closed, so it would continue polling forever.
    mbostock committed Apr 17, 2012
  3. Clarify default configuration.

    mbostock committed Apr 17, 2012
Commits on Apr 16, 2012
  1. Enforce event limit on query side.

    This is much faster than enforcing the limit in the callback. Derp!
    mbostock committed Apr 16, 2012
  2. Remove d3 dependency.

    mbostock committed Apr 16, 2012
  3. Fix a bug in expression.source.

    And add more tests for the source on compound expressions.
    mbostock committed Apr 16, 2012
  4. Add /types endpoint.

    mbostock committed Apr 16, 2012
  5. Upgrade node-mongodb-native to 0.9.9-8.

    Fixes Object.CALL_NON_FUNCTION error on retry.
    mbostock committed Apr 16, 2012
  6. Better storage for collectd events.

    Rather than coalesce events when there are multiple plugin or type instances,
    Cube now stores the events separately, as they are received. This simplifies
    collection and also allows greater flexibility in combining metrics from
    multiple instances (say, summing usage across network interfaces). It also deals
    well with instance names that are not valid Cube properties (such as "14-0").
    
    A side-effect of this change is that all collectd events are stored in a single
    collection, rather than storing multiple collections for each collectd plugin.
    mbostock committed Apr 16, 2012
  7. Don't allow leading $ in field names.

    Not allowed by MongoDB.
    mbostock committed Apr 16, 2012
  8. Replace Cube front-end with node-static.

    The Cube front-end is now just a static file server (in addition to the /event
    and /metric endpoints that power the collector and evaluator). This removes the
    visualization component from Cube, so that it can focus on data collection and
    metric computation. To make visualizations, you now simply write a bit of HTML
    and JavaScript to fetch and display metrics. This commit will followup with some
    examples that demonstrate the technique.
    
    Also, add a 1-minute tier, and remove the week and year tiers. The highest tier
    is now the 1-day tier. We could still use the old tiers, but there's a little
    bit of overhead to invalidate every tier for every event; perhaps in the future,
    we'll want to configure tiers on a per-event basis.
    mbostock committed Apr 16, 2012
Commits on Apr 15, 2012
  1. Allow event stream delay to be overridden.

    By default there is a five-second delay when event streaming, to give events
    time to arrive before they are skipped by listeners. You can now change the
    stream delay as part of the /event/get request. This is useful if there is a lag
    for incoming events (say because of polling a primary data source), or if you
    want a time-shifted stream of old events (say, those from yesterday).
    mbostock committed Apr 15, 2012
  2. Provide default start & stop; custom limits.

    Now you can request the most recent event as a simple GET request:
    
      /1.0/event?expression=random&limit=1
    
    Or, get the value and apply a filter:
    
      /1.0/event?expression=random(random).gt(random,0)&limit=1
    
    Likewise you can get the most recent metric for a given expression:
    
      /1.0/metric?expression=sum(random)&step=1e4&limit=1
    
    This is convenient if you want to generate alerts based on recent events.
    mbostock committed Apr 15, 2012
  3. Use Cube for logging server requests.

    Rather than use util.log, we now record server requests as cube_request events,
    similar to the cube_compute events added in @8177510. This records the time,
    method, path and remote IP address of each request, and allows you to query Cube
    to see usage. (For example, you can use the /event endpoint to watch Cube
    requests in realtime, or use the /metric endpoint to build a dashboard that
    monitors Cube.) I elected not to record every message sent to the WebSocket
    endpoints, as this would duplicate every event PUT to /event.
    mbostock committed Apr 15, 2012
  4. Enforce limit on the number of values to get.

    Previously, you could crash the server quite easily by requesting all events via
    a GET /event request, or requesting millions of metrics by GET /metric. Now the
    evaluator has a hard limit of 10,000 results; if you request more than this
    amount, only the most recent values will be returned.
    mbostock committed Apr 15, 2012
  5. Meta events to record metric computation!

    Cube now automatically populates cube_compute events whenever unary metrics are
    computed. You can use these events to see how many requests Cube is receiving,
    and how quickly Cube is able to compute metrics. This replaces the previously-
    added /info endpoint with much more detailed information.
    mbostock committed Apr 15, 2012
  6. Allow HTTP GET for events.

    You can now issue a simple HTTP GET to retrieve events from Cube synchronously,
    rather than fetching events asynchronously via WebSockets. The parameters are
    identical to the WebSockets API. So,
    
        {
          "expression": "random(random)",
          "start": "2012-01-09T01:23:00Z",
          "stop": "2012-01-10T04:56:00Z"
        }
    
    Is equivalent to:
    
       http://localhost:1081/1.0/event
         ?expression=random(random)
         &start=2012-01-09T01:23:00Z
         &stop=2012-01-10T04:56:00Z
    
    The results are returned as a JSON array in chronological order. If an error
    occurs, Cube now responds with a single JSON object containing the error
    message. I've also fixed the event and metric expression grammars so that they
    validate event types (which are more restrictive than properties).
    
    Fixes #24. See also @6796e23.
    mbostock committed Apr 15, 2012
  7. Remove dead code.

    mbostock committed Apr 15, 2012
  8. Minor tweak.

    mbostock committed Apr 15, 2012