opensourcevn / pylogagent Goto Github PK
View Code? Open in Web Editor NEWThis project forked from whatvn/pylogagent
A logging agent for syslog/syslog-ng
Home Page: http://blog.tinytechie.net
This project forked from whatvn/pylogagent
A logging agent for syslog/syslog-ng
Home Page: http://blog.tinytechie.net
---- Some log files generated by application cannot be logged to syslog/syslog-ng pylogagent will watch list of log files in "configuration" file, then push new lines to /dev/log socket with prefix. USAGE: 1. Set up syslog-ng server to listen for log ----snip----- source net { udp(ip(ip_of_log_server) port(514)); }; destination nginx_error { file("/data/log/$HOST_FROM/$YEAR/$MONTH/$DAY/nginx_error"); }; filter nginx_error { match("^nginx_error"); }; log {source(net);filter(nginx_error);destination(nginx_error;}; -----snip----- These line above will make syslog-ng server listen for log on udp port 514, whenever a log stream deliver to its port, syslog-ng will parse, look for regex ^nginx_error, if it is found, log to file nginx_error. 1. Configure which log files pylogagent will watch #configuration /data/log/nginx_error.log 2. Start logagent python agent 3. Configure syslog-ng client ------snip-------- source s_local { internal(); unix-stream("/dev/log"); }; destination d_loghost { udp("ip_of_log_server" port(514)); }; filter nginx_error { match("^nginx_error"); }; log { source(s_local); filter(nginx_error); destination(d_loghost); }; ------snip-------- Restart syslog-ng and you are done. Tail log file on central log to see how it works ;) -- More will be added later
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.