-
Notifications
You must be signed in to change notification settings - Fork 428
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2952 from esl/mu-only-humio
Add humio - reworked PR
- Loading branch information
Showing
9 changed files
with
90 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# Humio and MongooseIM | ||
|
||
## Getting Humio's ingest token | ||
|
||
Visit this [url](https://cloud.humio.com/sandbox/settings/ingest-tokens) to create a new sandbox's ingest token. | ||
|
||
The URL is: | ||
|
||
``` | ||
https://cloud.humio.com/YOUR_REPOSITORY_NAME_HERE/settings/ingest-tokens | ||
``` | ||
|
||
## Configure Filebeat | ||
|
||
Configure Filebeat, using this config file [priv/filebeat.mongooseim.humio.yml](https://github.com/esl/MongooseIM/blob/master/priv/filebeat.humio.yml). | ||
|
||
We recommend to use the Filebeat docker container. You have to use an open-source version | ||
of Filebeat, which has the `oss` suffix. | ||
|
||
This example mounts a log directory `$(pwd)/_build/mim1/rel/mongooseim/log` as a volume for Filebeat. | ||
It also mounts a configuration file `$(pwd)/priv/filebeat.mongooseim.humio.yml`. | ||
Most likely these paths would be different on your machine. | ||
|
||
Pass your Humio ingest token as a password argument. | ||
Or uncomment and change it inside the `filebeat.mongooseim.humio.yml` file. | ||
|
||
```bash | ||
docker run -d \ | ||
--name mongooseim-filebeat \ | ||
-v "$(pwd)/_build/mim1/rel/mongooseim/log:/usr/lib/mongooseim/log" \ | ||
-v "$(pwd)/priv/filebeat.mongooseim.humio.yml:/usr/share/filebeat/filebeat.yml:ro" \ | ||
docker.elastic.co/beats/filebeat-oss:7.9.2 \ | ||
filebeat -e -E output.elasticsearch.password="abc12345-xxxx-yyyy-zzzz-123456789abc" | ||
``` | ||
|
||
Argument `-e` enables debugging information for Filebeat that can be visible using the `docker logs mongooseim-filebeat` command. | ||
|
||
## Viewing logs | ||
|
||
Navigate to [https://cloud.humio.com/sandbox/search](https://cloud.humio.com/sandbox/search) to see the Sandbox's dashboard. | ||
|
||
|
||
A list of log messages: | ||
|
||
![A list of log messages](humio_list.png) | ||
|
||
|
||
Structured log message: | ||
|
||
![Structured log message](humio_message.png) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# https://docs.humio.com/integrations/ingest-logs-with-a-data-shipper/beats/filebeat/ | ||
filebeat.inputs: | ||
- paths: | ||
- /usr/lib/mongooseim/log/mongooseim.json.1 | ||
encoding: utf-8 | ||
|
||
queue.mem: | ||
events: 8000 | ||
flush.min_events: 1000 | ||
flush.timeout: 1s | ||
|
||
output: | ||
elasticsearch: | ||
hosts: ["https://cloud.humio.com:443/api/v1/ingest/elastic-bulk"] | ||
username: anything | ||
compression_level: 5 | ||
bulk_max_size: 200 | ||
worker: 5 | ||
# password: "abc12345-xxxx-yyyy-zzzz-123456789abc" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/usr/bin/env bash | ||
|
||
mkdir -p _build/mim1/rel/mongooseim/log | ||
|
||
docker run -d \ | ||
--name mongooseim-filebeat \ | ||
-v "$(pwd)/_build/mim1/rel/mongooseim/log:/usr/lib/mongooseim/log" \ | ||
-v="$(pwd)/priv/filebeat.mongooseim.humio.yml:/usr/share/filebeat/filebeat.yml:ro" \ | ||
docker.elastic.co/beats/filebeat-oss:7.9.2 \ | ||
filebeat -e -strict.perms=false -E output.elasticsearch.password="$HUMIO_PASSWORD" |