runlet v1.0.0 Runlet.Cmd.Query

Query a riemann server

Link to this section Summary

Functions

Filters events from a riemann server using the Riemann query language. The query must be quoted as a string

Link to this section Types

Link to this type

t()

t() :: %Runlet.Cmd.Query{
  conn: pid() | nil,
  host: charlist(),
  m: reference() | nil,
  port: non_neg_integer(),
  query: charlist(),
  ref: reference() | nil,
  retry: non_neg_integer(),
  url: charlist()
}

Link to this section Functions

Filters events from a riemann server using the Riemann query language. The query must be quoted as a string:

'state = "ok"'

Examples of Queries:

# Simple equality state = "ok"

# Wildcards (service =~ "disk%") or (state != "critical" and host =~ "%.trioptimum.com")

# Standard operator precedence applies metric_f > 2.0 and not host = nil

# Anything with a tag "product" tagged "product"

# All states true

Examples from the test suite:

https://github.com/riemann/riemann/blob/master/test/riemann/query_test.clj

Query Grammar:

https://github.com/riemann/riemann/blob/master/resources/query.g4