Skip to content

Instantly share code, notes, and snippets.

@juttle
juttle / hello
Created October 15, 2014 23:58
Hello, world.
@juttle
juttle / Requests_ResponseTime_Data.graphite
Created October 17, 2014 18:23
Requests_ResponseTime
stats.timers.webcaching.hit.200.MyHost.upper_95 0 1409697820
stats.timers.webcaching.hit.200.MyHost.upper_99 0 1409697820
stats.timers.webcaching.hit.200.MyHost.count_ps 7 1409697820
stats.timers.webcaching.miss.200.MyHost.upper_95 1000 1409697820
stats.timers.webcaching.miss.200.MyHost.upper_99 1220 1409697820
stats.timers.webcaching.miss.200.MyHost.count_ps 5 1409697820
stats.timers.webcaching.miss.200.MyHost.count_ps 1 1409697820
stats.timers.webcaching.hit.200.MyHost.upper_95 0 1409697830
stats.timers.webcaching.hit.200.MyHost.upper_99 0 1409697830
stats.timers.webcaching.hit.200.MyHost.count_ps 9 1409697830
@juttle
juttle / README.md
Last active May 20, 2016 18:44
Live and Historical Data

Live Data, Meet Historical

Jut lets you analyze live data, historical data or both. This showcase plots the last 5 minutes of response time data and combines it with a live stream of response time metrics from the ops firehose.

Your Turn:

  • Change the batch interval from 1 second to 5 seconds
  • Change "service" to "host" on lines 7 and 8
@juttle
juttle / README.md
Last active May 20, 2016 18:44
Events and Metrics

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 on the host "sea.0" as vertical bars.

Your Turn:

  • Try changing the host from "sea.0" to "sjc.1" on line 16.
@juttle
juttle / README.md
Last active August 29, 2015 14:08
Custom reducers

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 function and import a derivative function.

Your Turn:

  • Try changing the weight used in the ewma function by changing .9 to .1 on line 16.
  • On line 7, we've imported a derivative reducer. Let's see what it does by uncommenting line 17, then adding "der" to the list of columns in the timechart.
@juttle
juttle / README.md
Last active August 29, 2015 14:08
Split and Join Flowgraphs

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
@juttle
juttle / README.md
Last active August 29, 2015 14:09
Log Search

##Search Logs##

You can use juttle to easily search logs for any string.

You can also turn these logs or events into metrics.

Your Turn:

  • Try changing "update failed" to "error" on line 7
  • Try uncommenting lines 11-13 and removing the ")" from line 10
@juttle
juttle / README.md
Last active August 29, 2015 14:09
Live Joins

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
@juttle
juttle / README.md
Created November 15, 2014 01:40
Live and Historical Dev

Live Data, Meet Historical Dev

Jut lets you analyze live data, historical data or both. This showcase takes a single metric, plots the last 3 minutes of data and combines it with a stream of data from the ops firehose.

Your Turn:

  • Change the batch interval from 1 second to 5 seconds
  • Change "service" to "host" on lines 7 and 8
@juttle
juttle / README.md
Last active August 29, 2015 14:09
Events and Metrics Dev

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 on the host "sea.0" as vertical bars.

Your Turn:

  • Try changing the host from "sea.0" to "sjc.1" on line 16.