3.5 KiB
syslog-bulk-uploader
Syslog-bulk-uploader is non-interactive utility designed to read syslog records from one or more files and send them to remote syslog server. The format of syslog records in input files is:
<timestamp> <facility.severity> <source> <message>
Field separator is one or more space (ASCII 32) or tab (ASCII 9) characters. All whitespace characters in the message field will be interpreted as part of the message, not as separators.
Fields of the syslog record are:
- timestamp
- in format YYYY-MM-DD HH:MM:SS
- facility
- one of syslog facility strings: kern, user, mail, daemon, auth, syslog, lpr, news, uucp, clock, authpriv, ftp, ntp, logaudit, logalert, cron, local0, local1, local2, local3, local4, local5, local6, local7
- severity
- one of syslog severity strings: emergency, alert, critical, error, warning, notice, informational, debug
- source
- IP address or host name of message source
- message
- the text of the message itself
Command line
General invocation is:
syslog-bulk-uploader [option]... [file]...
Option is one of the following:
- -h --help
- display help message, then exit
- -v --version
- display version information, then exit
- -m --mps num
- send messages at specified rate per second; default, if not specified, is 1000
- -d --dest dest
- destination host name
- -p --port arg
- destination port; default, if not specified, is 514
- [-f --files] filename
- one or more input files; option name (-f or --file) is optional, i.e. all non-named arguments will be interpreted as filenames
If more than one input file is specified on the command line, syslog-bulk-uploader will send contents of each one in the order specified.
Building from source
Dependencies
In order to build syslog-bulk-uploader from source, you will need to have a couple of dependencies pre-installed on your system:
- CMake as the build system
- Any C++11 compiler supported by CMake on your platform (GCC, Clang, Visual C++, etc)
- boost-date-time library
- boost-filesystem library
- boost-system library
- boost-thread library
- boost-program-options library
a2xexecutable (part of AsciiDoc, required to build man page)
Building on Unix-like systems
git clone git@github.com:zmarko/syslog-bulk-uploader.git
cd syslog-bulk-uploader/build
cmake ..
make && make install
Building on Windows systems
After installing and setting up Visual Studio, git, cmake and boost, building is simple:
git clone git@github.com:zmarko/syslog-bulk-uploader.git
cd syslog-bulk-uploader\build
cmake ..
and you will find Visual Studio solution (.sln) file in syslog-bulk-uploader\build directory.
You can use cmake .. -G "NMake Makefiles" in order to generate nmake makefile, so you can run build from command line.
Installers
During the build it is also possible to build installer packages. Supported installers at this time are:
rpm, deb and plain .tar.gz archive. Installers are built by simply running make package in build
sub-directory.