[rsyslog] REST output plugin

Joe Williams joe at joetify.com
Thu Sep 9 20:26:32 CEST 2010


Rainier,

Here is some basic code using libcurl for doing what I want:

http://gist.github.com/572182

The data variable is json key/value pairs where I would like to put the syslog fields as in my aforementioned example.

Let me know if you have any questions.

Thanks for the help.

-Joe



On Sep 9, 2010, at 1:24 AM, Rainer Gerhards wrote:

> If you know how to do the REST part, integrating this into a plugin is rather
> simple. If you provide me working code for that part, I can setup a skeleton
> and you just need to tweak the result.
> 
> Rainer
> 
>> -----Original Message-----
>> From: rsyslog-bounces at lists.adiscon.com [mailto:rsyslog-
>> bounces at lists.adiscon.com] On Behalf Of Joe Williams
>> Sent: Thursday, September 09, 2010 2:43 AM
>> To: rsyslog-users
>> Subject: [rsyslog] REST output plugin
>> 
>> 
>> Anyone have an idea of how difficult it would be to create an output
>> plugin that uses REST to PUT log lines as JSON to a specific URL?
>> Probably something equivalent to the following curl command.
>> 
>> curl -X PUT http://host/ -d '{"app-name": "foo", "msg": "bar", "proc-
>> id":"baz", "timestamp":"timestamp:::date-rfc3339",
>> "hostname":"hostname", "severity":"syslogseverity-text"}'
>> 
>> Thanks.
>> 
>> -Joe
>> 
>> 
>> Name: Joseph A. Williams
>> Email: joe at joetify.com
>> Blog: http://www.joeandmotorboat.com/
>> Twitter: http://twitter.com/williamsjoe
>> 
>> _______________________________________________
>> rsyslog mailing list
>> http://lists.adiscon.net/mailman/listinfo/rsyslog
>> http://www.rsyslog.com
> _______________________________________________
> rsyslog mailing list
> http://lists.adiscon.net/mailman/listinfo/rsyslog
> http://www.rsyslog.com

Name: Joseph A. Williams
Email: joe at joetify.com
Blog: http://www.joeandmotorboat.com/
Twitter: http://twitter.com/williamsjoe




More information about the rsyslog mailing list