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 section Functions
Returns the batch interval.
Default: {1, :minutes}
Returns the batch module, relevant if using the batching connection.
Default: Riemannx.Connections.Combined
Returns the batch size.
Default: 100
Returns the batch type, similar to type()
but is used to provide a
connection module to the batching wrapper.
Default: :combined
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
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
Returns the maximum size allowed for a UDP packet.
Default: 16_384
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
retry_count(t)
View Sourceretry_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
retry_interval(t)
View Sourceretry_interval(conn_type()) :: non_neg_integer()
Returns the time in milliseconds to wait between each connection re-attempt.
Default: 5000
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
Returns the settings backend module you are using.
Default: Riemannx.Settings.Default
The poolboy worker strategy, see the poolboy docs for more info on strategy.
Default: :fifo
Returns the connection type set (tls, tcp, udp, combined, batch).
Default: :combined
Link to this section Callbacks
max_overflow(t)
View Sourcemax_overflow(t :: conn_type()) :: non_neg_integer()
retry_count(t)
View Sourceretry_count(t :: conn_type()) :: non_neg_integer() | :infinity
retry_interval(t)
View Sourceretry_interval(t :: conn_type()) :: non_neg_integer()