blob: 4f3697351f64a8766b773f878856ae7f39758e3f (
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
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><title>omprog output module - sending messages to a program</title>
<a href="features.html">back</a>
</head>
<body>
<h1>Program integration Output module</h1>
<p><b>Module Name: omprog</b></p>
<p><b>Available since: </b> 4.3.0</p>
<p><b>Author: </b>Rainer Gerhards
<rgerhards@adiscon.com></p>
<p><b>Description</b>:</p>
<p>This module permits to integrate arbitrary external programs into rsyslog's
logging. It is similar to the "execute program (^)" action, but offers better security
and much higher performance. While "execute program (^)" can be a useful tool for
executing programs if rare events occur, omprog can be used to provide massive
amounts of log data to a program.
<p>Executes the configured program and feeds log messages to that binary via
stdin. The binary is free to do whatever it wants with the supplied data.
If the program terminates, it is re-started. If rsyslog terminates, the
program's stdin will see EOF. The program must than terminate. The message format
passed to the program can, as usual, be modified by defining rsyslog templates.
<p>Note that each time an omprog action is defined, the corresponding programm
is invoked. A single instance is <b>not</b> being re-used. There are arguments pro and
con re-using existing binaries. For the time being, it simply is not done. In the future,
we may add an option for such pooling, provided that some demand for that is voiced.
You can also mimic the same effect by defining multiple rulesets and including them (at
the price of some slight performance loss).
<p> </p>
<p><b>Module Parameters</b>:</p>
<ul>
<li><strong>Template </strong>[templateName]<br>
sets a new default template for file actions.<br></li>
</ul>
<p> </p>
<p><b>Action Parameters</b>:</p>
<ul>
<li><strong>binary </strong><br>
Mostly equivalent to the "binary" action parameter, but must contain the binary name
only. In legacy config, it is <b>not possible</b> to specify command line parameters.
</ul>
<p><b>Caveats/Known Bugs:</b></p><ul><li>None.</li></ul>
<p><b>Sample:</b></p>
<p>The following command writes all syslog messages into a file.</p>
<textarea rows="5" cols="85">Module (load="omprog")
*.* action(type="omprog"
binary="/pathto/omprog.py --parm1=\"value 1\" --parm2=value2"
template="RSYSLOG_TraditionalFileFormat")
</textarea>
<br><br>
<p><b>Legacy Configuration Directives</b>:</p>
<ul>
<li><b>$ActionOMProgBinary</b> <binary><br>
The binary program to be executed.
</ul>
<b>Caveats/Known Bugs:</b>
<p>Currently none known.
<p>[<a href="rsyslog_conf.html">rsyslog.conf overview</a>]
[<a href="manual.html">manual index</a>] [<a href="http://www.rsyslog.com/">rsyslog site</a>]</p>
<p><font size="2">This documentation is part of the <a href="http://www.rsyslog.com/">rsyslog</a>
project.<br>
Copyright © 2008-2013 by <a href="http://www.gerhards.net/rainer">Rainer
Gerhards</a> and
<a href="http://www.adiscon.com/">Adiscon</a>.
Released under the GNU GPL version 3 or higher.</font></p>
</body></html>
|