diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 16:27:18 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 16:27:18 +0000 |
commit | f7f20c3f5e0be02585741f5f54d198689ccd7866 (patch) | |
tree | 190d5e080f6cbcc40560b0ceaccfd883cb3faa01 /source/tutorials/random_sampling.rst | |
parent | Initial commit. (diff) | |
download | rsyslog-doc-f7f20c3f5e0be02585741f5f54d198689ccd7866.tar.xz rsyslog-doc-f7f20c3f5e0be02585741f5f54d198689ccd7866.zip |
Adding upstream version 8.2402.0+dfsg.upstream/8.2402.0+dfsg
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | source/tutorials/random_sampling.rst | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/source/tutorials/random_sampling.rst b/source/tutorials/random_sampling.rst new file mode 100644 index 0000000..3c7d5d3 --- /dev/null +++ b/source/tutorials/random_sampling.rst @@ -0,0 +1,16 @@ +Random sampling +=============== + +Rsyslog supports various sampling mechanisms. These can be used on client systems to save servers from getting overwhelmed. Here we introduce a new sampling mechanism "Random sampling". + +Let's consider a system that is generating logs at rate of 100 logs/sec. +If we want to get 20% of these logs uniformly sampled we use random sampling. + +.. code-block:: none + + set $.rand = random(100); + if ($.rand <= 20) then { + //send out + } + +Above config will collect 20% of logs generated. |