[rsyslog-notify] Forum Thread: MMexternal Primer Newbie wants to modify syslogs via perl - (Mode 'post')
noreply at adiscon.com
noreply at adiscon.com
Tue May 31 04:26:55 CEST 2016
User: symgryph
Forumlink: http://kb.monitorware.com/viewtopic.php?p=26551#p26551
Message:
----------
I would like to be able to 'plug in' my own perl programs to filter syslog
streams as they pass in (and out) of rsyslog. I am a relatively seasoned
UNIX adminstrator, but I have never used RSYSLOG before. Here is what I
want to do conceptually:
syslog stream from remote ----- my rsyslog transform ----- modified stream
sent to remote syslog
I know how to setup the 'tcp' and 'udp' listeners on Rsyslog, I also have a
working 'transform' that happily converts things coming into 'standard in,
and spits results to 'standard out'. I used the skeleton provided so kindly
in the source code.
I tried to follow an online guide, which gave me the following for my
rsyslog.conf:
[code:pbugvjux]#Allow us to Transform input coming in to RSYSLOG
module(load="mmexternal")
action(type="mmexternal"
binary="/usr/local/bin/myprogram.pl"
interface.input="msg" )[/code:pbugvjux]
When I do this, ALL logging stops. I suspect there is more I need to do,
since I see NO output, but I really don't know how to proceed. Some kind of
a template or forwarding instructions? I promise I will write a very nice
guide on how to do once I figure out. I do see rsyslog with my perl program
in the process tree, just that ALL my logs go nowhere, and my program
(which I had write out what it is supposed to recieve) writes 'nothing'
when I use the 'logger' command to inject input. I have a a file which
contains my 'test' which changes hello to goodbye:
[code:pbugvjux]hello hello hello
hello hello hello[/code:pbugvjux]
expected output is:
[code:pbugvjux]
goodbye goodbye goodbye
goodbye goodbye goodbye[/code:pbugvjux]
Which I do get both on standard out and on my 'filehandle' when run from
cli.
Any ideas on what I need to do next? Configure the processing flow how?
Thomas
More information about the rsyslog-notify
mailing list