riemannx v3.1.0 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 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

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

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

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 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 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

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

Default: :combined

Link to this section Callbacks

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(arg0) View Source
module(conn_type() | :combined) :: 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 strategy(t) View Source
strategy(t :: conn_type()) :: :fifo | :lifo
Link to this callback type() View Source
type() :: conn_type() | :combined