summaryrefslogtreecommitdiffstats
path: root/source/configuration/modules/mmexternal.rst
blob: afc85cc83490cdd3c0e7571202b5af89d3f9c5b8 (plain)
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
********************************************************
Support module for external message modification modules
********************************************************

===========================  ===========================================================================
**Module Name:**             **mmexternal**
**Author:**                  `Rainer Gerhards <https://rainer.gerhards.net/>`_ <rgerhards@adiscon.com>
**Available since:**         8.3.0
===========================  ===========================================================================


Purpose
=======

This module permits to integrate external message modification plugins
into rsyslog.

For details on the interface specification, see rsyslog's source in the
./plugins/external/INTERFACE.md.
 

Configuration Parameters
========================

.. note::

   Parameter names are case-insensitive.


Action Parameters
-----------------

binary
^^^^^^

.. csv-table::
   :header: "type", "default", "mandatory", "|FmtObsoleteName| directive"
   :widths: auto
   :class: parameter-table

   "string", "none", "yes", "none"

The name of the external message modification plugin to be called. This
can be a full path name.


interface.input
^^^^^^^^^^^^^^^

.. csv-table::
   :header: "type", "default", "mandatory", "|FmtObsoleteName| directive"
   :widths: auto
   :class: parameter-table

   "string", "msg", "no", "none"

This can either be "msg", "rawmsg" or "fulljson". In case of "fulljson", the
message object is provided as a json object. Otherwise, the respective
property is provided. This setting **must** match the external plugin's
expectations. Check the external plugin documentation for what needs to be used.


output
^^^^^^

.. csv-table::
   :header: "type", "default", "mandatory", "|FmtObsoleteName| directive"
   :widths: auto
   :class: parameter-table

   "string", "none", "no", "none"

This is a debug aid. If set, this is a filename where the plugins output
is logged. Note that the output is also being processed as usual by rsyslog.
Setting this parameter thus gives insight into the internal processing
that happens between plugin and rsyslog core.


forceSingleInstance
^^^^^^^^^^^^^^^^^^^

.. csv-table::
   :header: "type", "default", "mandatory", "|FmtObsoleteName| directive"
   :widths: auto
   :class: parameter-table

   "binary", "off", "no", "none"

This is an expert parameter, just like the equivalent *omprog* parameter.
See the message modification plugin's documentation if it is needed.


Examples
========

Execute external module
-----------------------

The following config file snippet is used to write execute an external
message modification module "mmexternal.py". Note that the path to the
module is specified here. This is necessary if the module is not in the
default search path.

.. code-block:: none

   module (load="mmexternal") # needs to be done only once inside the config

   action(type="mmexternal" binary="/path/to/mmexternal.py")