chenbekor / rest2syslog Goto Github PK
View Code? Open in Web Editor NEWRest2Syslog collects data via REST APIs and sends it to any Syslog Destination
License: Apache License 2.0
Rest2Syslog collects data via REST APIs and sends it to any Syslog Destination
License: Apache License 2.0
Hi, I seem to be unable to get this working. I followed the instructions, but syslog-ng won't start.
Jul 05 14:29:53 log-scrapper-dev syslog-ng[1738]: [2020-07-05T14:29:53.777859] WARNING: With use-dns(no), dns-cache() will be forced to 'no' too!;
Jul 05 14:29:53 log-scrapper-dev syslog-ng[1738]: REST2Syslog Source init
Jul 05 14:29:53 log-scrapper-dev syslog-ng[1738]: running python version:3.6
Jul 05 14:29:53 log-scrapper-dev syslog-ng[1738]: found extension: pcasb_alerts
Jul 05 14:29:53 log-scrapper-dev syslog-ng[1738]: init Extension pcasb_alerts
Jul 05 14:29:53 log-scrapper-dev syslog-ng[1738]: about to load paginator for extension pcasb_alerts
Jul 05 14:29:53 log-scrapper-dev syslog-ng[1738]: about to load api_paginator class...
Jul 05 14:29:53 log-scrapper-dev syslog-ng[1738]: configuration of REST2Syslog Source (R2S) is incomplete or malformed. Please reffer to the R2S Wiki for more details.
Jul 05 14:29:53 log-scrapper-dev syslog-ng[1738]: [2020-07-05T14:29:53.784234] Error initializing Python driver object, init() returned FALSE; driver='s_r2s#0', class='r2s.source.REST2SyslogSource'
Jul 05 14:29:53 log-scrapper-dev syslog-ng[1738]: [2020-07-05T14:29:53.784248] Error initializing message pipeline; plugin_name='python', location='/etc/syslog-ng/conf.d/r2s.conf:2:5'
Jul 05 14:29:53 log-scrapper-dev systemd[1]: syslog-ng.service: main process exited, code=exited, status=2/INVALIDARGUMENT
Jul 05 14:29:53 log-scrapper-dev systemd[1]: Failed to start System Logger Daemon.
config is pretty simple:
source s_r2s {
python(
class("r2s.source.REST2SyslogSource")
options("interval",60)
options("auth_url","https://api.opsgenie.com/v2/logs/")
options("alerts_url","https://api.opsgenie.com/v2/logs/")
options("api_key","XXXXXXXXX")
);
};
destination d_tcp { syslog("127.0.0.1" transport("tcp") port(514) ); };
log {source(s_r2s); destination(d_tcp); };
Hi @chenbekor
I'm trying to use the script to send PCASB alerts and events to Syslog server without success.
The syslog-ng failed to start with the following error message:
Error looking Python driver class; driver='s_r2s#0', class='r2s.source.REST2SyslogSource', exception='None
Error initializing message pipeline; plugin_name='python', location='/etc/syslog-ng/syslog-ng.conf
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.