Please checkout the latest release rather than the master branch. The master branch is under active development, which may not be working properly all the time.
LogSpout is a easy-to-use tool to generate machine logs in specified format. It needs only a sample log and the configuration file in json format. With the value replacement rules defined in the configuration file, logspout can produce log events in various speed (EPS: Events Per Second).
The features of logspout include:
- Configurable
think time
in milliseconds, or keeps producing log events withhightide
mode set totrue
. - The logs can be sent to
stdout
or a regular file, with rotation support, or syslog. - Multi-line log support.
- Straight-forward replacement rules defined with regular patterns and json KV pairs.
- Various data format support: IPv4/IPv6 addresses, Email addresses, Names, Countries, User Agents, Timestamp, Fixed-lists, etc.
- Transaction mode (A transaction may contain two or more events, each has its own think time).
- Multi-threaded log events support.
- Easy hands-on experience with docker support
And many others.
There are a couple of new features on the roadmap now.
A simple way to use it is through Docker, in just a few steps:
- Clone the repository to your local server/laptop:
git clone git@github.com:jiwen624/logspout.git
- Build the docker image and run the service (You need to have docker and docker-compose installed):
docker-compose up
Note that you can also use docker-compose up -d
to make it run in background, and use docker-compose logs -f
to check out the debug logs (the debug logs of logspout itself, not the simulated machine logs)
Stop it with Ctrl-C if you run it foreground, or docker-compose down
for background services.
You may change the configuration file logspout-docker.json
in directory examples
or use your own one by modifying the docker-compose.yml file.
Enjoy it.
The tutorial is still working in progress. Leave me a message if there is someone really using it.
Please open an issue and post the logspout.json
and log sample you are using if you find a bug.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. Please make sure to update tests as appropriate.