https://github.com/buildit/websphere_elk_test
https://github.com/buildit/websphere_elk_test
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/buildit/websphere_elk_test
- Owner: buildit
- Created: 2017-03-22T14:00:35.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-03-23T12:46:30.000Z (about 8 years ago)
- Last Synced: 2025-02-04T23:31:07.347Z (3 months ago)
- Language: Java
- Size: 4.88 KB
- Stars: 0
- Watchers: 11
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Websphere Docker w/ Elk Stack Logging
Test application that logs to a dockerised ELK stack. Uses:
- log4j output in JSON format
- Docker log-driver mechanism (via syslog) to update logstash## ELK Stack
1. `git clone https://github.com/deviantony/docker-elk`
2. `cd docker-elk`
3. `docker-compose up -d`## Test App
1. Build war: `mvn install`
2. Build docker image: `docker build --tag web .`
3. Run web app: `docker-compose up -d`If you'd like to see what's being logged out of the app container you can run this command instead:
`docker run -p 80:9080 -p 443:9443 --name web --log-driver=syslog --log-opt syslog-address=tcp://127.0.0.1:5000 --log-opt tag=logger-test web`
## Verify
1. Open `http://localhost:5601`
2. Create default index patterns
3. View start up logs via Dev Tools: `GET _search`
4. Go to `http://localhost/websphere_elk_test`
5. View logged test message via Dev Tools:```
GET _search
{
"query": {
"match_all": {}
},
"sort": [
{"@timestamp" : {"order" : "desc"}}
]
}
```