https://github.com/roppa/bunyan-graylog-node
A research docker compose app with Graylog, Bunyan, Node.js
https://github.com/roppa/bunyan-graylog-node
Last synced: 10 months ago
JSON representation
A research docker compose app with Graylog, Bunyan, Node.js
- Host: GitHub
- URL: https://github.com/roppa/bunyan-graylog-node
- Owner: roppa
- Created: 2017-09-30T11:54:07.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-09-30T12:08:12.000Z (over 8 years ago)
- Last Synced: 2025-02-14T18:36:31.521Z (over 1 year ago)
- Language: JavaScript
- Size: 1.95 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Logging to Graylog from Node using Bunyan
Read the [Graylog docker installation docs](http://docs.graylog.org/en/2.3/pages/installation/docker.html) first.
Graylog has dependencies on Mongo and Elasticsearch which I didn't know. Elasticsearch is cool.
Build the node image with:
```
docker build -t bunyan-node .
```
Then run docker compose up build.
Testing the endpoint using http is easy:
```
curl -XPOST http://localhost:12201/gelf -p0 -d '{"short_message":"Hello there", "host":"example.org", "facility":"test", "_foo":"bar"}'
```
However, as we are using streams you have to set up Graylog to accept UCP streams.
Voila.