riemannx v2.2.0 Riemannx.Settings View Source

This is a utility module used to get settings as and when they are needed.

View the documentation for the individual functions for more information about what they are.

Link to this section Summary

Functions

The hostname of the server hosting your riemann server

Max overflow is an interesting setting that allows you set an upper limit on dynamically created workers that are created when all other workers are busy

Your riemann server will have an upper limit on the allowable size of a UDP transmission, it’s important you set this correctly as not doing so could cause your app to drop stats unnecessarily, especially when using the combined connection

This is more of an internal setting using the type to determine the relative module

The name of the poolboy pool, for ease of use this is hard-coded to :riemannx_pool

The size of your worker pool, adjust to your requirements it’s important not to have too many and maybe even more so to not have too little - a little trial and error tests should help you come to a reasonable figure

The retry count is how many times riemann will attempt a connection before killing the worker (TCP Only). There are 2 choices

The retry interval is the amount of time (in seconds) to sleep before attempting a reconnect (TCP Only)

Retrives SSL options set for a TLS connection. For more information on the available options see here: http://erlang.org/doc/man/ssl.html

The strategy determines how workers are placed back in the queue once they have finished processing. For more information view the poolboy docs

The TCP port your riemann server is listening on

The type of connection to use with riemannx - the available options are

The UDP port your riemann server is listening on

Link to this section Functions

The hostname of the server hosting your riemann server.

Default: “localhost”

Link to this function max_overflow() View Source
max_overflow() :: non_neg_integer()

Max overflow is an interesting setting that allows you set an upper limit on dynamically created workers that are created when all other workers are busy.

It can be a good idea to set a high :max_overflow if you are not sure what kind of traffic you are going to have at the expense of having to start up new processes and connect when required.

Default: 20

Special Note

In a combined connection your overflow will be doubled to house TCP and UDP for example if you are using an overflow of 20, your tcp pool will have an overflow of 20 and so will the udp pool.

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

Your riemann server will have an upper limit on the allowable size of a UDP transmission, it’s important you set this correctly as not doing so could cause your app to drop stats unnecessarily, especially when using the combined connection.

The default here is set to Riemann’s default. This could change at any time so it’s recommended you double check for the version you are using.

Default: 16384

Link to this function module() View Source
module() :: module()

This is more of an internal setting using the type to determine the relative module.

Link to this function pool_name() View Source
pool_name() :: :riemannx_pool

The name of the poolboy pool, for ease of use this is hard-coded to :riemannx_pool

Link to this function pool_size() View Source
pool_size() :: non_neg_integer()

The size of your worker pool, adjust to your requirements it’s important not to have too many and maybe even more so to not have too little - a little trial and error tests should help you come to a reasonable figure.

It can also be a good idea to set a high :max_overflow if you are not sure what kind of traffic you are going to have at the expense of having to start up new processes and connect when required.

Default: 10

Special Note

In a combined connection your pool size will be doubled to house both TCP and UDP - for example if you are using 10 workers, 10 will be TCP and the other 10 will be UDP.

Link to this function retry_count() View Source
retry_count() :: non_neg_integer() | :infinity

The retry count is how many times riemann will attempt a connection before killing the worker (TCP Only). There are 2 choices:

  • A non_neg_integer() in seconds
  • :infinity to retry until it works

The default is 5.

Link to this function retry_interval() View Source
retry_interval() :: non_neg_integer()

The retry interval is the amount of time (in seconds) to sleep before attempting a reconnect (TCP Only).

Default: 5

Link to this function ssl_options() View Source
ssl_options() :: [:ssl.ssl_option()]

Retrives SSL options set for a TLS connection. For more information on the available options see here: http://erlang.org/doc/man/ssl.html

In order to use TLS correctly with riemann you need to specify both a keyfile and a certfile.

Link to this function strategy() View Source
strategy() :: :fifo | :lifo

The strategy determines how workers are placed back in the queue once they have finished processing. For more information view the poolboy docs.

Default: :fifo

Link to this function tcp_port() View Source
tcp_port() :: :inet.port_number()

The TCP port your riemann server is listening on.

Default: 5555

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

The type of connection to use with riemannx - the available options are:

  • :tcp
  • :udp
  • :tls
  • :combined (default)

Combined is the recommended default giving you the best of both worlds, if for any reason you can’t use both the others are there to fall back on. If secure communication is a concern TLS is an option which is a secure TCP-only setup.

REMEMBER: In combined connections your pool sizes/overflow are doubled!

Default: :combined

Link to this function udp_port() View Source
udp_port() :: :inet.port_number()

The UDP port your riemann server is listening on.

Default: 5555