A plugin interface

General discussions here

Moderator: rgerhards

A plugin interface

Postby rgerhards on Wed Jun 13, 2007 4:37 pm

Hi all,

this is a more technical thread - opened with the hope that some rsyslog users may participate in the discussion.

As part of the Red Hat package creation, the question whether or not a plug-in interface should be designed for rsyslog. I think that would be a nice addition.

Do you users have any ideas what to do with it? Do we have some folks who would like to write plugins? If so, do you have an opinion on what the interface should look like?

Any feedback to these and other questions is highly appreciated.

Rainer
User avatar
rgerhards
Site Admin
 
Posts: 1780
Joined: Thu Feb 13, 2003 11:57 am

Professional Services Information

  • Custom written rsyslog.conf?
  • Maintenance Contract?
  • Installation support?

RE: A plugin interface

Postby omniplex on Sat Dec 29, 2007 6:59 pm

I think a plugin interface would be nice.

Possibly look rather abstractly like having a message structure and a configuration structure that's populated from the config file ( to keep config files central ).

But, I'm not 100% sure what I'd use the plug interface for except maybe some non-native databases or SNMP alerts.
omniplex
Avarage
 
Posts: 14
Joined: Tue Nov 15, 2005 1:44 am

RE: A plugin interface

Postby rgerhards on Sat Dec 29, 2007 9:35 pm

Hi,

in the meantime, the plug-in interface has materialized - and all that along what you have outlined ;)

Every output is now using the interface, even those that get loaded by default. For rsyslog v3, I have also just created a first input plugin interface.

The big point is to have this interface so that folks can add whatever exotic feature they may need. I am sure there will be a lot in the long term...

Rainer
User avatar
rgerhards
Site Admin
 
Posts: 1780
Joined: Thu Feb 13, 2003 11:57 am

Re: RE: A plugin interface

Postby delphi329 on Sat Jan 05, 2008 1:16 am

rgerhards wrote:Hi,

in the meantime, the plug-in interface has materialized - and all that along what you have outlined ;)

Every output is now using the interface, even those that get loaded by default. For rsyslog v3, I have also just created a first input plugin interface.

The big point is to have this interface so that folks can add whatever exotic feature they may need. I am sure there will be a lot in the long term...

Rainer


it will be nice that the plug in itself is extensible, e.g. I can build a python plug in interface to hand the data for python to deal with. A higher level scripting language like python is more suited for messaging text strings.
delphi329
New
 
Posts: 6
Joined: Fri Jan 04, 2008 2:24 am

RE: Re: RE: A plugin interface

Postby rgerhards on Sat Jan 05, 2008 6:55 pm

Yep, you can do that if you like. If you know how to interact with the python interpreter (I don't) that should be fairly easy (at least from the rsyslog point of view).

Rainer
User avatar
rgerhards
Site Admin
 
Posts: 1780
Joined: Thu Feb 13, 2003 11:57 am

RE: Re: RE: A plugin interface

Postby omniplex on Mon Jan 07, 2008 6:41 pm

Would that be a separate call to the interpreter or having the interpreter built in?
omniplex
Avarage
 
Posts: 14
Joined: Tue Nov 15, 2005 1:44 am

RE: Re: RE: A plugin interface

Postby rgerhards on Tue Jan 08, 2008 9:06 am

I unfortunately have no idea how it works from the python point of view. But from the rsyslog point it is quite easy. You need to code in the plugin in C. You can use one of the existing plugins as a sample. Sorry I do not have any better advise.

Rainer
User avatar
rgerhards
Site Admin
 
Posts: 1780
Joined: Thu Feb 13, 2003 11:57 am

RE: Re: RE: A plugin interface

Postby omniplex on Mon Jan 14, 2008 11:09 pm

Well, with python it's fairly trivial to embed the interpreter in C code and load and make calls to a python script ( .py or .pyc ) and receive results back.

I was wondering if he was wanting to embed the interpreter or call the script as sort of an exec() call.
omniplex
Avarage
 
Posts: 14
Joined: Tue Nov 15, 2005 1:44 am

RE: Re: RE: A plugin interface

Postby rgerhards on Tue Jan 15, 2008 8:48 am

Do you have any doc? Maybe something for the "some time to be done" list ;)

On that list is already an action which spawns an executable of any type and pass it incoming messages via stdin - I guess that would be useful in most cases...

Rainer
User avatar
rgerhards
Site Admin
 
Posts: 1780
Joined: Thu Feb 13, 2003 11:57 am

RE: Re: RE: A plugin interface

Postby omniplex on Sat Jan 19, 2008 7:24 am

You looking for an example of how to embed the interpreter into a program or plugin?
omniplex
Avarage
 
Posts: 14
Joined: Tue Nov 15, 2005 1:44 am

Google Ads



Return to General

Who is online

Users browsing this forum: No registered users and 0 guests

cron