https://github.com/rfalke/testing-logstash-configuration
Example of how to test logstash configuration
https://github.com/rfalke/testing-logstash-configuration
Last synced: 10 months ago
JSON representation
Example of how to test logstash configuration
- Host: GitHub
- URL: https://github.com/rfalke/testing-logstash-configuration
- Owner: rfalke
- Created: 2016-06-16T13:34:08.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-06-17T09:07:17.000Z (over 9 years ago)
- Last Synced: 2025-01-17T15:27:50.140Z (11 months ago)
- Language: Python
- Size: 5.86 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Testing Logstash Configuration
An example of how to test a logstash configuration. Uses shell and vanilla Python. Executes end-to-end tests.
## Usage
Run
`./run_demo.sh`
Example output
$ ./run_tests.sh
Sending logstash logs to /var/folders/lb/w82zc8ps6jq2_1tf219ctk_80000gn/T/tmp.SIyNazgk/logstash.out.
test_cases/01-admin: OK
test_cases/02-favicon: FAIL, missing file test_cases/02-favicon.expected-output.json
test_cases/03-css: FAIL
--- expected.json
+++ actual.json
@@ -3,7 +3,7 @@
"@version": "1",
"agent": "\"Mozilla/5.0 (Windows NT 6.0; WOW64; rv:2.0.1) Gecko/20100101 Firefox/4.0.1\"",
"auth": "-",
- "bytes": 1837,
+ "bytes": "1837",
"clientip": "98.83.179.51",
"host": "localhost",
"httpversion": "1.1",
$
The example config and the test data is from [www.elastic.co](https://www.elastic.co/guide/en/logstash/current/config-examples.html).