HEX
Server: nginx/1.16.1
System: Linux ecs-04358622 4.19.90-2107.6.0.0100.oe1.bclinux.x86_64 #1 SMP Wed Dec 1 19:59:44 CST 2021 x86_64
User: nginx (994)
PHP: 8.0.0
Disabled: NONE
Upload Files
File: //usr/share/doc/rsyslog/html/rainerscript/rainerscript_call.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>The rsyslog “call” statement &#8212; rsyslog 8.2006.0 documentation</title>
    <link rel="stylesheet" href="../_static/classic.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    <link rel="stylesheet" href="../_static/rsyslog.css" type="text/css" />
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../',
        VERSION:     '8.2006.0',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true,
        SOURCELINK_SUFFIX: '.txt'
      };
    </script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/underscore.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="The rsyslog “call_indirect” statement" href="rainerscript_call_indirect.html" />
    <link rel="prev" title="General Queue Parameters" href="queue_parameters.html" /> 
  </head>
  <body>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="rainerscript_call_indirect.html" title="The rsyslog “call_indirect” statement"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="queue_parameters.html" title="General Queue Parameters"
             accesskey="P">previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="../index.html">rsyslog 8.2006.0 documentation</a> &#187;</li>
          <li class="nav-item nav-item-1"><a href="../configuration/index.html" >Configuration</a> &#187;</li>
          <li class="nav-item nav-item-2"><a href="index.html" accesskey="U">RainerScript</a> &#187;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <div class="section" id="the-rsyslog-call-statement">
<h1>The rsyslog “call” statement<a class="headerlink" href="#the-rsyslog-call-statement" title="Permalink to this headline">¶</a></h1>
<p>The rsyslog “call” statement is used to tie rulesets together. It is
modelled after the usual programming language “call” statement. Think of
a ruleset as a subroutine (what it really is!) and you get the picture.</p>
<p>The “call” statement can be used to call into any type of rulesets. If a
rule set has a queue assigned, the message will be posted to that queue
and processed asynchronously. Otherwise, the ruleset will be executed
synchronously and control returns to right after the call when the rule
set has finished execution.</p>
<p>Note that there is an important difference between asynchronous and
synchronous execution in regard to the “stop” statement. It will not
affect processing of the original message when run asynchronously.</p>
<p>The “call” statement replaces the deprecated omruleset module. It offers
all capabilities omruleset has, but works in a much more efficient way.
Note that omruleset was a hack that made calling rulesets possible
within the constraints of the pre-v7 engine. “call” is the clean
solution for the new engine. Especially for rulesets without associated
queues (synchronous operation), it has zero overhead (really!).
omruleset always needs to duplicate messages, which usually means at
least ~250 bytes of memory writes, some allocs and frees - and even more
performance-intense operations.</p>
<div class="section" id="syntax">
<h2>syntax<a class="headerlink" href="#syntax" title="Permalink to this headline">¶</a></h2>
<p><code class="docutils literal"><span class="pre">call</span> <span class="pre">rulesetname</span></code></p>
<p>Where “rulesetname” is the name of a ruleset that is defined elsewhere
inside the configuration. If the call is synchronous or asynchronous
depends on the ruleset parameters. This cannot be overridden by the
“call” statement.</p>
</div>
<div class="section" id="related-links">
<h2>related links<a class="headerlink" href="#related-links" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li><a class="reference external" href="https://rainer.gerhards.net/2012/10/how-to-use-rsyslogs-ruleset-and-call.html">Blog posting announcing “call” statement (with
sample)</a></li>
</ul>
<div class="admonition seealso">
<p class="first admonition-title">See also</p>
<p>Help with configuring/using <code class="docutils literal"><span class="pre">Rsyslog</span></code>:</p>
<ul class="last simple">
<li><a class="reference external" href="http://lists.adiscon.net/mailman/listinfo/rsyslog">Mailing list</a> - best route for general questions</li>
<li>GitHub: <a class="reference external" href="https://github.com/rsyslog/rsyslog/">rsyslog source project</a> - detailed questions, reporting issues
that are believed to be bugs with <code class="docutils literal"><span class="pre">Rsyslog</span></code></li>
<li>Stack Exchange (<a class="reference external" href="https://stackexchange.com/filters/327462/rsyslog">View</a>, <a class="reference external" href="https://serverfault.com/questions/ask?tags=rsyslog">Ask</a>)
- experimental support from rsyslog community</li>
</ul>
</div>
<div class="admonition seealso">
<p class="first admonition-title">See also</p>
<p>Contributing to <code class="docutils literal"><span class="pre">Rsyslog</span></code>:</p>
<ul class="last simple">
<li>Source project: <a class="reference external" href="https://github.com/rsyslog/rsyslog/blob/master/README.md">rsyslog project README</a>.</li>
<li>Documentation: <a class="reference external" href="https://github.com/rsyslog/rsyslog-doc/blob/master/README.md">rsyslog-doc project README</a></li>
</ul>
</div>
<p>Copyright 2008-2020 <a class="reference external" href="https://rainer.gerhards.net/">Rainer Gerhards</a>
(<a class="reference external" href="https://www.rainer-gerhards.de/grossrinderfeld/">Großrinderfeld</a>),
and Others.</p>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
  <h3><a href="../index.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">The rsyslog “call” statement</a><ul>
<li><a class="reference internal" href="#syntax">syntax</a></li>
<li><a class="reference internal" href="#related-links">related links</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="queue_parameters.html"
                        title="previous chapter">General Queue Parameters</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="rainerscript_call_indirect.html"
                        title="next chapter">The rsyslog “call_indirect” statement</a></p>
  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="../_sources/rainerscript/rainerscript_call.rst.txt"
           rel="nofollow">Show Source</a></li>
    <li><a href="https://github.com/rsyslog/rsyslog-doc/edit/master/source/rainerscript/rainerscript_call.rst"
           rel="nofollow">Edit on GitHub</a></li>
  </ul>

<div id="searchbox" style="display: none" role="search">
  <h3>Quick search</h3>
    <form class="search" action="../search.html" method="get">
      <div><input type="text" name="q" /></div>
      <div><input type="submit" value="Go" /></div>
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="rainerscript_call_indirect.html" title="The rsyslog “call_indirect” statement"
             >next</a> |</li>
        <li class="right" >
          <a href="queue_parameters.html" title="General Queue Parameters"
             >previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="../index.html">rsyslog 8.2006.0 documentation</a> &#187;</li>
          <li class="nav-item nav-item-1"><a href="../configuration/index.html" >Configuration</a> &#187;</li>
          <li class="nav-item nav-item-2"><a href="index.html" >RainerScript</a> &#187;</li> 
      </ul>
    </div>
    <div class="footer" role="contentinfo">
    </div>
  </body>
</html>