tensor.outputs

tensor.outputs.riemann

class tensor.outputs.riemann.RiemannTCP(*a)[source]

Bases: tensor.objects.Output

Riemann TCP output

Configuration arguments:

Parameters:
  • server (str.) – Riemann server hostname (default: localhost)
  • port (int.) – Riemann server port (default: 5555)
  • maxrate (int.) – Maximum de-queue rate (0 is no limit)
  • interval (float.) – De-queue interval in seconds (default: 1.0)
  • pressure (int.) – Maximum backpressure (-1 is no limit)
  • tls (bool.) – Use TLS (default false)
  • cert (str.) – Host certificate path
  • key (str.) – Host private key path
createClient()[source]

Create a TCP connection to Riemann with automatic reconnection

emptyQueue()[source]

Remove all or self.queueDepth events from the queue

eventsReceived(events)[source]

Receives a list of events and transmits them to Riemann

Arguments: events – list of tensor.objects.Event

stop()[source]

Stop this client.

tick()[source]

Clock tick called every self.inter

class tensor.outputs.riemann.RiemannUDP(*a)[source]

Bases: tensor.objects.Output

Riemann UDP output (spray-and-pray mode)

Configuration arguments:

Parameters:
  • server (str.) – Riemann server IP address (default: 127.0.0.1)
  • port (int.) – Riemann server port (default: 5555)
createClient()[source]

Create a UDP connection to Riemann

eventsReceived(events)[source]

Receives a list of events and transmits them to Riemann

Arguments: events – list of tensor.objects.Event