On Wed, 10 Sep 2014, Liwei Peng wrote:

Hi,

I am new to rsyslog. I need to create an out internal module. I read the
doc at here http://www.rsyslog.com/doc/master/development/dev_oplugins.html,
and would like to start with some sample. My first plan is to learn how
rsyslog works before I start any real production code.

My output module will mostly parse the input message, get some string
patterns, and get some values from the string (like timestamp, process id
if any).

Questions:
 1) Which sample should I start with?
  2) Because I am totally new to rsyslog, I'd like to learn how to run
very basic rsyslog module.  If I want to try omstdout,  is there a
step-to-step doc on how I can test it?
      specifically:
          a) What do I need to do to make rsyslog to use omstdout?

it's probably compiled in by default so you just need to do a module load like any other module.

          b) what do I need to do to send message to rsyslogd to test it?

you just use action(type='omstdout' ... ) to send data to it
or if it doesn't support the new config style
*.* :omstdout:


          c) what should I expect from it?

http://www.rsyslog.com/doc/omstdout.html

to add a custom module, just duplicate a module in src/plugins/ (or something like that path anyway), and then you need to find the one other place in the code that the module name is used. pick a module with an odd name and grep for it.

Everything is really self-contained in the module. You only need to code outside to do tests, documentation, and define config variables

what are you looking to implement?

David Lang
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of 
sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE 
THAT.

Reply via email to