mx.interware.caudal.streams.stateless

->DEBUG

(->DEBUG [fields] & children)

Streamer function that sends a DEBUG event to caudal log

Arguments: fields : can be - :all: then sends event to log with DEBUG level - vector of keywords: send event with keys contained in vector to log with DEBUG level - formatter-fn: a fn of arity 1 that the result will be the output to de log in DEBUG level children: Children streamer functions to be propagated

->ERROR

(->ERROR [fields] & children)

Streamer function that sends a DEBUG event to caudal log

Arguments: fields : can be - :all: then sends event to log with ERROR level - vector of keywords: send event with keys contained in vector to log with ERROR level - formatter-fn: a fn of arity 1 that the result will be the output to de log in DEBUG level children: Children streamer functions to be propagated

->INFO

(->INFO [fields] & children)

Streamer function that sends a INFO event to caudal log

Arguments: fields : can be - :all: then sends event to log with INFO level - vector of keywords: send event with keys contained in vector to log with DEBUG level - formatter-fn: a fn of arity 1 that the result will be the output to de log in DEBUG level children: Children streamer functions to be propagated

->WARN

(->WARN [fields] & children)

Streamer function that sends a WARN event to caudal log

Arguments: fields : can be - :all: then sends event to log with WARN level - vector of keywords: send event with keys contained in vector to log with DEBUG level - formatter-fn: a fn of arity 1 that the result will be the output to de log in DEBUG level children: Children streamer functions to be propagated

anomaly-by-percentile

(anomaly-by-percentile [metric-key percentiles-key percentil] & children)

Streamer function that propagates to children if metric-key > (avg + (stdev-factor * stdev))

Arguments: stdev-factor: a number representing who many sigmas to allow over avg metric-key: the key where the value to lookfor is inside the event avg-key: the key where the value of the average is inside the event stdev-key: the key where the value of the sigma is inside the event

anomaly-by-stdev

(anomaly-by-stdev [stdev-factor metric-key avg-key stdev-key] & children)

Streamer function that propagates to children if metric-key > (avg + (stdev-factor * stdev))

Arguments: stdev-factor: a number representing who many sigmas to allow over avg metric-key: the key where the value to lookfor is inside the event avg-key: the key where the value of the average is inside the event stdev-key: the key where the value of the sigma is inside the event

by

(by fields & children)

Streamer function that groups events by values of sent keys

Arguments: fields: Data keys to group by children: Children streamer functions to be propagated

decorate

(decorate [state-key-or-fn] & children)

Streamer function that substracts information from state, merges it with the current event and then propagates the merged data

Arguments: state-key-of-fn: Can be: - a function that when is applied to current event, returns the state key - a keyword, a vector is created with this key name that stores values from by streamers in execution path

default

(default [key value] & children)

Streamer function that sets a default value for a key of an event only if it does not exist or it does not have a value

Arguments: key: Key where the value will be set if it does not exist or it does not have a value value: Default value to be assigned children: Children streamer functions to be propagated

forward

(forward [caudal-host caudal-port] & children)

Streamer function that sends events to other Caudal using TCP

Arguments: caudal-host: host name or ip of Caudal receiver port: Port number on the Caudal host enabled to listen for events children: Streamers to propagate the unchanged event

join

(join & children)

Streamer function that groups eliminates the efect of one ‘by’

Arguments: fields: Data keys to group by children: Children streamer functions to be propagated

percentiles

(percentiles [metric-key percentiles-key percents] & children)

printe

(printe [prefix] & children)

Streamer function that prints an event to standard output

Arguments: prefix: Prefix for the printed string children: Children streamer functions to be propagated

reinject

(reinject & children)

Streamer function that reinjects events to initial function in order to execute the whole proccess over it again.

remove!

(remove! [id-fn] & children)

Streamer function that removes an event from state using a function for key names

Arguments: id-fn: Function to calculate key names children: Children streamer functions to be propagated

smap

(smap [transform-fn] & children)

Streamer function that applies a transformation function to events and propagate them similarly to clojure’s map function

Arguments: transform-fn: Tranformation function children: Children streamer functions to be propagated

split

(split & exprs)

Streamer function that filters events by multiple conditionals

Arguments: exprs: Conditionals to filter

store!

(store! [id-fn] & children)

Streamer function that stores an event in state using a function for key names

Arguments: id-fn: Function to calculate key names children: Children streamer functions to be propagated

time-stampit

(time-stampit [key] & children)

Streamer function that stores the current timestamp in milliseconds in an event

Arguments: key: key to store the current timestamp in milliseconds children: Children streamer functions to be propagated

to-file

(to-file [file-path keys] & children)

Streamer function that stores events to a specified file

Arguments: file-path: The path to the target file keys: The keywords representing attributtes to be written in the file children: Children streamer functions to be propagated. Events are propagated untouched.

unfold

(unfold & children)

where

(where [predicate] & children)

Streamer function that filters events using a conditional predicate

Arguments: predicate: Conditional predicate to filter children: Children streamer functions to be propagated

with

(with [key value] & children)

Streamer function that sets a value for a key in an event

Arguments: key: Key where the value will be set value: Value to be assigned to the key children: Children streamer functions to be propagated