riemannx v2.4.1 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
Riemannx can inject a host name in your events if you don’t supply one before
sending it - if you don’t set this in your config and don’t put one in your
event we will use :inet.gethostname()
to add one for you
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
Riemannx can start workers with a certain priority allowing you to decide what precedence your events take in comparison to the rest of your application
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 Types
Link to this section Functions
Riemannx can inject a host name in your events if you don’t supply one before
sending it - if you don’t set this in your config and don’t put one in your
event we will use :inet.gethostname()
to add one for you.
Riemannx is smart and will only call :inet.gethostname()
once and save the
result so don’t worry about it being called for every event!
The hostname of the server hosting your riemann server.
Default: “localhost”
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.
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
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.
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.
Riemannx can start workers with a certain priority allowing you to decide what precedence your events take in comparison to the rest of your application.
For example you have an application where a fast response is incredibly important and sending events shouldn’t eat up time under periods of high load then you can set the priority here to :low.
IMPORTANT: Setting an incorrect value or :max will cause riemannx to die.
Defaut: :normal
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.
The retry interval is the amount of time (in seconds) to sleep before attempting a reconnect (TCP Only).
Default: 5
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.
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
The TCP port your riemann server is listening on.
Default: 5555
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
The UDP port your riemann server is listening on.
Default: 5555