https://github.com/netlify/elastinats
https://github.com/netlify/elastinats
Last synced: 6 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/netlify/elastinats
- Owner: netlify
- Archived: true
- Created: 2016-05-19T18:50:11.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2016-10-19T00:58:43.000Z (over 9 years ago)
- Last Synced: 2025-09-30T07:02:52.461Z (9 months ago)
- Language: Go
- Size: 48.8 KB
- Stars: 36
- Watchers: 4
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# elastinats
Intended to take from nats subjects/groups and pump data at elastic search. It will create 3 special fields:
- @timestamp - the unix timestamp
- @raw_msg - the raw string coming in
- @source - the subject from the message
If the data coming in is JSON it will parse that and send that parsed version to elasticsearch.
# subject/group
If a group is specified it will subscibe that way, otherwise it will just subscribe to the subject. This is useful for scaling out the cluster.
For instance if you have 3 subjects: `logs.file1`, `logs.file2`, `logs.file3`. To distribute the load across multiple boxes the configuration on each would be:
```
{
...
"subjects": [
{
"subject": "logs.*",
"group": "shared"
}
]
...
}
```
# endpoint configuration
It is possible to specify the elasticsearch configuration per subject. If one isn't specified, the default endpoint is used.