Code Monkey home page Code Monkey logo

Comments (2)

bschonec avatar bschonec commented on September 3, 2024

Does #98 address your question?

rsyslog::config::actions:
  all_logs_to_siem:
    type: omfwd
    facility: "*.*"
    target: siem.conf       # Create this configuration in its own file.
    config:    
      target: "siem.example.com"
      protocol: udp

[root@rhel8 rsyslog.d]# ls -l /etc/rsyslog.d/siem.conf 
-rw-r--r--. 1 root root 127 Jun 22 08:21 /etc/rsyslog.d/siem.conf

from puppet-rsyslog.

traldi avatar traldi commented on September 3, 2024

Hi,
I have a similar question:
I would like to put a general config in 50_rsyslog.conf with standard module and some prifilts and actions. (I did this)
I have another puppet module for example ngnix.pp which I would like to use a different file like /etc/rsyslog.d/60_ngnix.conf with for example a local logger like:

class { 'rsyslog::config':

'expression_filters' => {

'complex_filer' => {
   'conditionals' => {
      'conntrack' => {
        'expression' => 'prifilt("local1.*")'
        'tasks' => [
          'action' => {
           'type' => 'omfile',
          'config' => {'file' => '/var/log/ngnix.log'}
           }
         ]
      }
   }
 }

}
}

So I would have in all hosts the 50_rsyslog.conf and only in few host also the file /etc/rsyslog.d/60_ngnix.conf
with this content:
if prifilt("local1.*") then { action(type="omfile" file="/var/log/ngnix.log") }

from puppet-rsyslog.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.