Nimrod metrics analysis with Incanter.
Clojure Shell
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Nimrod-Incanter 0.1

Analyse and process Nimrod metrics with Incanter.


Be sure to have a running Nimrod server.

Download latest Nimrod-Incater and unzip it, or check it out from this repository.

Install and start a Leiningen REPL already configured to work with Nimrod-Incanter:

$> sh ./
$> sh ./

Now you can read Nimrod metrics as Incanter datasets, i.e.:

(def data (with-data (from-nimrod "http://localhost:8000" (from-log "1" (read-gauge :name "requests" :metric "gauge" :from 1 :to 10)))))

Each dataset will always have a "timestamp" column, a column for the metric name (i.e. "gauge") and one or more columns for tags; the dataset above doesn't have any, but you read them by providing a vector of tag names:

(def data (with-data (from-nimrod "http://localhost:8000" (from-log "1" (read-gauge :name "requests" :metric "gauge" :from 1 :to 10 :tags ["url"])))))

In order to be correctly read, you have to output tags in your application in the form "name:value", i.e. "url:"

Now you can start processing them with Incanter, i.e. you can view them:

(view (line-chart "timestamp" "gauge" :data data))

As an alternative, you can put your Nimrod-Incanter code into an external file, let's say "test.clj":

  (from-nimrod "http://localhost:8000" (from-log "1" (read-gauge :name "requests" :metric "gauge" :from 1 :to 10))) 
    (view (line-chart "timestamp" "gauge")))

And load it:

$> sh ./ test.clj


Copyright (C) 2011-2012 Sergio Bossa

Distributed under the Apache Software License.