Skip to content

Instantly share code, notes, and snippets.

@jut-test
jut-test / README.md
Last active August 29, 2015 14:09 — forked from demmer/README.md

Events, Meet Metrics

You shouldn't have to go to separate applications for different data types. Juttle allows you to seamlessly combine events like log data, code deploys, and change windows with metrics like CPU, memory, disk or statsd and JMX metrics.

This example plots a typical metric (response time) and overlays server errors combed from logs on the host "sea.0" as vertical bars.

@jut-test
jut-test / README.md
Last active August 29, 2015 14:09 — forked from demmer/README.md

There's a reducer for that...

What query language hasn't left you wanting of just a few more functions? The Juttle dataflow language comes with powerful built-in functions like percentile() but you can define your own functions or reducers that operate on every point in a stream or on batches of points. You can also import functions that other people have written.

In this example, we implement an exponentially weighted moving average calculation and import a rate of change calculation.

Your Turn:

  • Try changing the weight used in the ewma function by changing .1 to .9 on line 16.
  • On line 7, we've imported a derivative reducer. Let's plot what it does by uncommenting line 20.
@jut-test
jut-test / README.md
Last active August 29, 2015 14:09 — forked from demmer/README.md

Live Joins

Juttle's powerful join functionality allows you to join your local data with data stored anywhere else. What's more, you can do streaming joins where points are joined as they come in.

Here we're counting the number of server errors triggered by each user_id and joining that data to an external customer data file.

Your Turn:

  • Try changing "first_name" to "last_name" on lines 11 and 12
  • Check out the raw data from the two data sources by commenting out line 18 and adding "@table" on line 19
@jut-test
jut-test / README.md
Last active August 29, 2015 14:09 — forked from demmer/README.md

Split and Join Flowgraphs

Juttle programs enable you to answer questions in dynamic, changing environments by letting you split a stream of data, run different computations on each stream, and then join the two streams together again. These dynamic programs continually update their results, allowing you to follow hotspots around your environment or use one program output as a key for others.

This example finds the slowest host in the "search" service based on response time, every 10 seconds, and then gets a count of user requests running on that particular host.

Your Turn:

  • Try changing the service from "search" to "index".
  • Let's make sure we are in fact getting showing the slowest host:
  • Uncomment line 21
@jut-test
jut-test / README.md
Last active August 29, 2015 14:09 — forked from demmer/README.md

Live Data, Meet Historical

Jut lets you analyze live data, historical data or both. This showcase taps into response time data from our synthetic demo generator to combine the last two minutes of history with the live firehose.

Your Turn:

  • Change "service" to "host" on lines 7 and 8
  • Change the -from time to :5 minutes ago:
  • Change the batch interval to :5 seconds: