Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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 ?

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

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).

share|improve this answer
    
I don't want to use logger. It should be changed inside .conf {because it's an intermediate node}. There is nothing like that {Just talked with the developer}. The only way to do it is by using the template as you said, but it's not trivial how can i do it ! For the moment i 'm using a sniffer and try to match the messages of logger with my forwarded logs, in order to be parsed correctly from the server, but no luck :< –  Nikolaidis Fotis Aug 3 '10 at 17:57
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.