riemannx v4.1.2 Riemannx.Settings behaviour View Source

This is the callback module for settings, you can extend this if you wish to store your riemannx settings elsewhere like a database.

Link to this section Summary

Functions

Returns the batch interval.

Returns the batch module, relevant if using the batching connection.

Returns the batch size.

Returns the batch type, similar to type() but is used to provide a connection module to the batching wrapper.

The maximum number of seconds to wait for a free worker before discarding data, :infinity is a valid value here and means you will wait for eternity for a free worker.

Returns the host name that will be appended to events.

Returns the riemann host.

The max overflow for the poolboy pool, this value determines how many extra workers can be created under high load.

Returns the maximum size allowed for a UDP packet.

Returns the set metrics module.

Returns the correct connection backend based on the set type.

Returns the module related to the given type.

Returns the options that will be passed to the underlying gen_tcp/udp/ssl server.

Pool name is the name of the poolboy pool, they MUST be unique for each connection type.

Pool size returns the set pool size given the connection type.

Returns the set port for the given connection type.

Returns the set priority for the workers based on type.

Returns the amount of times a worker should re-attempt a connection before giving up. You can set :infinity if you want to try until it's available.

Returns the time in milliseconds to wait between each connection re-attempt.

Returns the timeout for sending a synchronous message, once the timeout is reached the riemannx batch connection will catch the error and try sending again. Other backends will error as normal. Give in seconds.

Returns the settings backend module you are using.

The poolboy worker strategy, see the poolboy docs for more info on strategy.

Returns the connection type set (tls, tcp, udp, combined, batch).

Link to this section Types

Link to this type

conn_type()

View Source
conn_type() :: :tcp | :udp | :tls
Link to this type

priority()

View Source
priority() :: :low | :normal | :high

Link to this section Functions

Link to this function

batch_interval()

View Source
batch_interval() :: integer()

Returns the batch interval.

Default: {1, :minutes}

Link to this function

batch_module()

View Source
batch_module() :: module()

Returns the batch module, relevant if using the batching connection.

Default: Riemannx.Connections.Combined

Link to this function

batch_size()

View Source
batch_size() :: integer()

Returns the batch size.

Default: 100

Link to this function

batch_type()

View Source
batch_type() :: conn_type() | :combined

Returns the batch type, similar to type() but is used to provide a connection module to the batching wrapper.

Default: :combined

Link to this function

checkout_timeout()

View Source
checkout_timeout() :: non_neg_integer()

The maximum number of seconds to wait for a free worker before discarding data, :infinity is a valid value here and means you will wait for eternity for a free worker.

Note that :infinity can cause a build-up of messages in your process inbox if using the batcher and your riemann instance experiences an outage!

DATA MAY BE DISCARDED IF NO AVAILABLE WORKER IS PRESENT AFTER THIS TIMEOUT!

Default: 30_000

Link to this function

events_host()

View Source
events_host() :: binary()

Returns the host name that will be appended to events.

Default: derived using :inets.gethostname.

Returns the riemann host.

Default: localhost

The max overflow for the poolboy pool, this value determines how many extra workers can be created under high load.

Default: 20

Link to this function

max_udp_size()

View Source
max_udp_size() :: non_neg_integer()

Returns the maximum size allowed for a UDP packet.

Default: 16_384

Link to this function

metrics_module()

View Source
metrics_module() :: module()

Returns the set metrics module.

Default: Riemannx.Metrics.Default

Returns the correct connection backend based on the set type.

Default: Riemannx.Connections.Combined

Returns the module related to the given type.

Returns the options that will be passed to the underlying gen_tcp/udp/ssl server.

NOTE: There are some things that will be appended to whatever you put in the options field as they are deemed essential to the operation of the library:

  • tcp: [:binary, nodelay: true, packet: 4, active: true]
  • tls: [:binary, nodelay: true, packet: 4, active: true]
  • udp: [:binary, sndbuf: max_udp_size()]

Defaults:

  • tcp: []
  • tls: []
  • udp: []

Pool name is the name of the poolboy pool, they MUST be unique for each connection type.

Defaults:

  • tcp: :riemannx_tcp
  • tls: :riemannx_tls
  • udp: :riemannx_udp

Pool size returns the set pool size given the connection type.

Default: 10

Returns the set port for the given connection type.

Default: 5555

Returns the set priority for the workers based on type.

Default: :normal

Link to this function

retry_count(t)

View Source
retry_count(conn_type()) :: non_neg_integer() | :infinity

Returns the amount of times a worker should re-attempt a connection before giving up. You can set :infinity if you want to try until it's available.

Default: 5

Link to this function

retry_interval(t)

View Source
retry_interval(conn_type()) :: non_neg_integer()

Returns the time in milliseconds to wait between each connection re-attempt.

Default: 5000

Link to this function

send_timeout()

View Source
send_timeout() :: non_neg_integer()

Returns the timeout for sending a synchronous message, once the timeout is reached the riemannx batch connection will catch the error and try sending again. Other backends will error as normal. Give in seconds.

Default: 5

Link to this function

settings_module()

View Source
settings_module() :: module()

Returns the settings backend module you are using.

Default: Riemannx.Settings.Default

Link to this function

strategy(t)

View Source
strategy(conn_type()) :: :fifo | :lifo

The poolboy worker strategy, see the poolboy docs for more info on strategy.

Default: :fifo

Link to this function

type()

View Source
type() :: conn_type() | :combined | :batch

Returns the connection type set (tls, tcp, udp, combined, batch).

Default: :combined

Link to this section Callbacks

Link to this callback

batch_interval()

View Source
batch_interval() :: integer()
Link to this callback

batch_module()

View Source
batch_module() :: module()
Link to this callback

batch_size()

View Source
batch_size() :: integer()
Link to this callback

batch_type()

View Source
batch_type() :: conn_type() | :combined
Link to this callback

checkout_timeout()

View Source
checkout_timeout() :: non_neg_integer()
Link to this callback

events_host()

View Source
events_host() :: binary()
Link to this callback

max_overflow(t)

View Source
max_overflow(t :: conn_type()) :: non_neg_integer()
Link to this callback

max_udp_size()

View Source
max_udp_size() :: non_neg_integer()
Link to this callback

metrics_module()

View Source
metrics_module() :: module()
Link to this callback

module(arg1)

View Source
module(conn_type() | :combined | :batch) :: module()
Link to this callback

options(t)

View Source
options(t :: conn_type()) :: list()
Link to this callback

pool_name(t)

View Source
pool_name(t :: conn_type()) :: atom()
Link to this callback

priority!(conn_type)

View Source
priority!(conn_type()) :: priority() | no_return()
Link to this callback

retry_count(t)

View Source
retry_count(t :: conn_type()) :: non_neg_integer() | :infinity
Link to this callback

retry_interval(t)

View Source
retry_interval(t :: conn_type()) :: non_neg_integer()
Link to this callback

send_timeout()

View Source
send_timeout() :: non_neg_integer()
Link to this callback

strategy(t)

View Source
strategy(t :: conn_type()) :: :fifo | :lifo
Link to this callback

type()

View Source
type() :: conn_type() | :combined | :batch