/Plexdata.Graylog.Simulator

A simple console program simulating a Graylog server.

Primary LanguageC#MIT LicenseMIT

Plexdata Graylog Simulator

Weeks ago I asked the Graylog support for a Sandbox where I can test my own logger implementation. The answer was Download and install your own version. This answer was really unsatisfying. So I came up with the idea of implementing my own Graylog simulator.

Fortunately I found the official GELF documentation at https://docs.graylog.org/docs/gelf and I decided to implement my own server. And now I proudly present the first true Graylog simulator written in C#.

Table of Contents

  1. Licensing
  2. Features
  3. Examples
  4. Limitations
  5. Downloads
  6. Known Issues

Licensing

The software has been published under the terms of MIT License.

Features

This Graylog simulator accepts messages over UDP, TCP as well as over HTTP requests. Listening on UDP and TCP is possible for IPv4 and also for IPv6. Each of these listeners can be started independently. Additionally, message chunking and payload zipping (GZip only) for UDP is also possible.

Examples

Showing integrated help can be done by executing the simulator with option --help like this.

Plexdata.Graylog.Simulator.exe --help

Running all listeners at once with all default ports is possible bei calling the simulator with option --all.

Plexdata.Graylog.Simulator.exe --all

Enabling method tracing as well as payload dumping can be accomplished by starting the simulator with options --trace and --debug.

Plexdata.Graylog.Simulator.exe --all --trace --debug

Printing additional program version and copyright statement is possible by appending option --version like this.

Plexdata.Graylog.Simulator.exe --all --version

Starting one single listener on a user-defined port (e.g. the UDP listener for IPv4) is possible by using listener-specific options like this.

Plexdata.Graylog.Simulator.exe --udp-ipv4 --udp-ipv4-port 54321

The same as above but using short options instead.

Plexdata.Graylog.Simulator.exe -u4 -u4p 54321

Starting all listeners by using different ports can be done like shown here.

Plexdata.Graylog.Simulator.exe -a -u4p 11111 -u6p 22222 -t4p 33333 -t6p 44444 -whp 55555

Limitations

This Graylog simulator supports only HTTP protocol. The other way round, protocol HTTPS is not yet supported. In addition, HTTP is only possible for localhost. But this could be a firewall setting.

Downloads

The latest release can be obtained from https://github.com/akesseler/Plexdata.Graylog.Simulator/releases/latest.

The main branch can be downloaded as ZIP from https://github.com/akesseler/Plexdata.Graylog.Simulator/archive/master.zip.

Known Issues

Issues, except the HTTP and localhost limitations, are not known at the moment.