File: rs-previous_action_suspended.rst

package info (click to toggle)
rsyslog-doc 8.2302.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 4,464 kB
  • sloc: python: 178; makefile: 8
file content (30 lines) | stat: -rw-r--r-- 765 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
***************************
previous_action_suspended()
***************************

Purpose
=======

previous_action_suspended()

This boolean function returns 1 (true) if the previous action is suspended,
0 (false) otherwise. It can be used to initiate action that shall happen if
a function failed. Please note that an action failure may not be immediately
detected, so the function return value is a bit fuzzy. It is guaranteed, however
that a suspension will be detected with the next batch of messages that is
being processed.


Example
=======

In the following example the if-clause is executed if the previous action
is suspended.

.. code-block:: none

   action(type="omfwd" protocol="tcp" target="10.1.1.1")

   if previous_action_suspended() then {}