Riemann 0.3.11
Released under the Eclipse Public License
A network event stream processor. Intended for analytics, metrics, and alerting; and to glue various monitoring systems together.
Installation
To install, add the following dependency to your project or build file:
[riemann "0.3.11"]
Namespaces
riemann.common
Utility functions. Time/date, some flow control constructs, protocol buffer definitions and codecs, some vector set ops, etc.
Public variables and functions:
- approx-equal
- body
- count-character-bytes
- count-string-bytes
- custom-attributes
- decode-inputstream
- decode-msg
- deprecated
- deprecations-emitted
- disjoint?
- encode
- ensure-event-time
- event
- event-to-json
- exception->event
- expire
- get-hostname
- hostname-refresh-interval
- human-uniq
- iso8601->unix
- localhost
- map-matches?
- Match
- member?
- middle
- overlap?
- pkey
- post-load-event
- re-matches?
- subject
- subset?
- time-at
- truncate
- truncate-bytes
- unix-to-iso8601
riemann.config
Riemann config files are eval’d in the context of this namespace. Includes streams, client, email, logging, and graphite; the common functions used in config. Provides a default core and functions ((tcp|udp)-server, streams, index, reinject) which operate on that core.
Public variables and functions:
- *config-file*
- apply!
- async-queue!
- clear!
- config-file-path
- core
- delete-from-index
- depend
- graphite-server
- include
- index
- instrumentation
- kafka-consumer
- kwargs-or-map
- local-repo
- next-core
- opentsdb-server
- periodically-expire
- publish
- rabbitmq-transport
- read-strings
- reinject
- repl-server
- service!
- sse-server
- start!
- stop!
- streams
- subscribe
- tcp-server
- udp-server
- update-index
- validate-config
- ws-server
riemann.deps
Riemann’s dependency resolution system expresses stateful relationships between events. Dependencies are expressed as Rules; a Rule is a statement about the relationship between a particular event and the current state of the index.
riemann.email
Send email about events. Create a mailer with (mailer opts), then create streams which send email with (your-mailer “shodan@tau.ceti.five”). Or simply call email-event directly.
Public variables and functions:
riemann.expiration
Many places in Riemann need to understand whether the events they’re working with are currently valid, and whether a given host/service combo has expired. The expiration tracker provides a stateful data structure for tracking new events, figuring out when expirations should be emitted, and calling back when they need to occur.
Public variables and functions:
riemann.index
Maintains a stateful index of events by host, service key. Can be queried to return the most recent indexed events matching some expression. Can expire events which have exceeded their TTL. Presently the only implementation of the index protocol is backed by a nonblockinghashmap, but I plan to add an HSQLDB backend as well.
Public variables and functions:
riemann.influxdb
Forwards events to InfluxDB. Supports InfluxDB 0.9 or higher.
Public variables and functions:
- convert-time
- converts-double
- default-opts
- event->point
- event->point-9
- event-fields
- event-tags
- get-batchpoint
- get-batchpoints
- get-builder
- get-client
- get-hostname-verifier
- get-ssl-factory
- get-time-unit
- get-trust-manager
- influxdb
- influxdb-deprecated
- influxdb-new-stream
- nil-or-empty-str
- partition-events
- special-fields
- write-batch-point
riemann.prometheus
Forwards riemann events to Prometheus Pushgateway.
Public variables and functions:
riemann.pubsub
Provides publish-subscribe handling of events. Publishers push events onto a channel, which has n subscribers. Each subscriber subscribes to a channel with an optional predicate function. Events which match the predicate are sent to the subscriber.
Public variables and functions:
riemann.query
The query parser. Parses strings into ASTs, and converts ASTs to functions which match events.
Public variables and functions:
riemann.repl
The riemann REPL server is a bit of a special case. Since it controls almost every aspect of Riemann–and can shut those aspects down–it needs to live above them. While you usually start a repl server from the config file, it is not bound to the usual config lifecycle and won’t be shut down or interrupted during config reload.
Public variables and functions:
riemann.service
Lifecycle protocol for stateful services bound to a core.
Public variables and functions:
riemann.sns
Publish to AWS SNS topic(s) about events. Create a publisher with (sns-publisher opts), then create streams which publish to topic(s) with (your-publisher “your::arn”). Or simply call sns-publish or sns-publish-async directly.
Public variables and functions:
riemann.streams
The streams namespace aims to provide a comprehensive set of widely applicable, combinable tools for building more complex streams.
Public variables and functions:
- *exception-stream*
- -infinity
- adjust
- apdex
- apdex*
- append
- batch
- bit-bucket
- by
- by-builder
- by-fn
- call-rescue
- changed
- changed-state
- clock-skew
- coalesce
- coalesce-with-event
- counter
- ddt
- ddt-events
- ddt-real
- default
- dual
- ewma
- ewma-timeless
- exception-stream
- execute-on
- expired
- expired?
- fill-in
- fill-in-last
- fill-in-last*
- fixed-event-window
- fixed-offset-time-window
- fixed-time-window
- fold-interval
- fold-interval-metric
- forward
- infinity
- interpolate-constant
- match
- mean-over-time
- moving-event-window
- moving-time-window
- not-expired
- over
- part-time-fast
- part-time-simple
- percentiles
- periodically-until-expired
- pipe
- predict-linear
- project
- project*
- rate
- register
- rollup
- runs
- scale
- sdo
- sflatten
- smap
- smap*
- smapcat
- split
- split*
- split*-match
- splitp
- sreduce
- stable
- stream
- sum-over-time
- tag
- tagged
- tagged-all
- tagged-all?
- tagged-any
- tagged-any?
- throttle
- top
- under
- untag
- where
- where*
- where-partition-clauses
- where-rewrite
- window
- with
riemann.streams.pure
Riemann streams have performed exceptionally well, but their design scope was intentionally limited. Users consistently request:
Public variables and functions:
riemann.test
Fast, end-to-end, repeatable testing for entire Riemann configs. Provides a tap
macro which taps the event stream and (in testing mode) records all events that flow through that stream. Provides a variant of deftest that initiates controlled time and sets up a fresh result set for taps, and a function inject!
to apply events to streams and see what each tap received.
Public variables and functions:
riemann.time
Clocks and scheduled tasks. Provides functions for getting the current time and running functions (Tasks) at specific times and periods. Includes a threadpool for task execution, controlled by (start!) and (stop!).
riemann.time.controlled
Provides controllable periodic and deferred execution. Calling (advance! delta-in-seconds) moves the clock forward, triggering events that would have occurred, in sequence.
Public variables and functions:
riemann.transport
Functions used in several transports. Some netty parts transpire here since netty is the preferred method of providing transports
riemann.transport.debug
It is very dark. You are likely to be eaten a grue.
riemann.transport.rabbitmq
Consumes messages from RabbitMQ. Associated with a core. Sends events to the core’s streams, queries the core’s index for states.
Public variables and functions:
riemann.transport.sse
Exposes subscriptions to the index as server sent event channels
Public variables and functions:
riemann.transport.tcp
Accepts messages from external sources. Associated with a core. Sends incoming events to the core’s streams, queries the core’s index for states.
riemann.transport.udp
Accepts messages from external sources. Associated with a core. Sends incoming events to the core’s streams, queries the core’s index for states.
Public variables and functions:
riemann.transport.websockets
Accepts messages from external sources. Associated with a core. Sends incoming events to the core’s streams, queries the core’s index for states.
Public variables and functions: