Rsyslog configuration

loggingrsyslog

I need some help :< Does anyone know how i can change the log severity ?

What i want to do is somethink like this.

node3 -> intermediate -> logserver

I want in the intermediate node to filter logs based on some keywords and afterwards send them with different severity on logserver.

Is that possible ?

Best Answer

You should be able to do a "shell execute" which calls a script that modifies the severity and uses logger to send it back.

From man rsyslog.conf

Shell execute
This executes a program in a subshell. The program is passed the template-generated message as the only command line parameter. Rsyslog waits until the program terminates and only then continā€ ues to run.

   Example:
          ^program-to-execute;template

The program-to-execute can be any valid executable. It receives the template string as a single parameter (argv1).

Related Topic