forked from elastic/beats
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Filebeat Kibana module log fileset (elastic#7052)
* Filebeat Kibana module with log fileset This adds the Kibana module to Filebeat reading the Kibana log. The Kibana log is in JSON format which simplifies reading it but at the same time it provides many fields which are not necessarily know in advance. To solve this issue The data is put under `kibana.log.meta` and the most common known fields are picked into `kibana.log.*` or directly put into the global field like `message`. The fields under `meta` are stored as keyword. This make sure all the meta information around the event is still in the index but prevents potential type conflicts like long vs double. Additional change: * Module tests always overwrite the pipeline. This should make development easier. * add beta label * Fix review comment for pipeline
- Loading branch information
Showing
23 changed files
with
617 additions
and
1 deletion.
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
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,42 @@ | ||
//// | ||
This file is generated! See scripts/docs_collector.py | ||
//// | ||
|
||
[[filebeat-module-kibana]] | ||
:modulename: kibana | ||
|
||
== Kibana module | ||
|
||
beta[] | ||
|
||
This is the Kibana module. | ||
|
||
include::../include/what-happens.asciidoc[] | ||
|
||
[float] | ||
=== Compatibility | ||
|
||
The Kibana modules is compatible with Kibana 6.3 and newer. | ||
|
||
include::../include/running-modules.asciidoc[] | ||
|
||
|
||
include::../include/configuring-intro.asciidoc[] | ||
|
||
//set the fileset name used in the included example | ||
:fileset_ex: log | ||
|
||
include::../include/config-option-intro.asciidoc[] | ||
|
||
[float] | ||
==== `{fileset}` log fileset settings | ||
|
||
include::../include/var-paths.asciidoc[] | ||
|
||
|
||
[float] | ||
=== Fields | ||
|
||
For a description of each field in the module, see the | ||
<<exported-fields-kibana,exported fields>> section. | ||
|
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
Large diffs are not rendered by default.
Oops, something went wrong.
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,8 @@ | ||
- module: kibana | ||
# All logs | ||
log: | ||
enabled: true | ||
|
||
# Set custom paths for the log files. If left empty, | ||
# Filebeat will choose the paths depending on your OS. | ||
#var.paths: |
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,29 @@ | ||
:modulename: kibana | ||
|
||
== Kibana module | ||
|
||
beta[] | ||
|
||
This is the Kibana module. | ||
|
||
include::../include/what-happens.asciidoc[] | ||
|
||
[float] | ||
=== Compatibility | ||
|
||
The Kibana modules is compatible with Kibana 6.3 and newer. | ||
|
||
include::../include/running-modules.asciidoc[] | ||
|
||
|
||
include::../include/configuring-intro.asciidoc[] | ||
|
||
//set the fileset name used in the included example | ||
:fileset_ex: log | ||
|
||
include::../include/config-option-intro.asciidoc[] | ||
|
||
[float] | ||
==== `{fileset}` log fileset settings | ||
|
||
include::../include/var-paths.asciidoc[] |
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,9 @@ | ||
- key: kibana | ||
title: "kibana" | ||
description: > | ||
kibana Module | ||
fields: | ||
- name: kibana | ||
type: group | ||
description: > | ||
fields: |
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,7 @@ | ||
- module: kibana | ||
log: | ||
enabled: true | ||
|
||
# Set custom paths for the log files. If left empty, | ||
# Filebeat will choose the paths depending on your OS. | ||
#var.paths: |
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,7 @@ | ||
- module: kibana | ||
log: | ||
enabled: true | ||
|
||
# Set custom paths for the log files. If left empty, | ||
# Filebeat will choose the paths depending on your OS. | ||
#var.paths: |
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,16 @@ | ||
- name: log | ||
type: group | ||
description: > | ||
Kafka log lines. | ||
fields: | ||
- name: tags | ||
type: keyword | ||
description: > | ||
Kibana logging tags. | ||
- name: state | ||
type: keyword | ||
description: > | ||
Current state of Kibana. | ||
- name: meta | ||
type: object | ||
object_type: keyword |
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,9 @@ | ||
type: log | ||
paths: | ||
{{ range $i, $path := .paths }} | ||
- {{$path}} | ||
{{ end }} | ||
exclude_files: [".gz$"] | ||
|
||
json.keys_under_root: false | ||
json.add_error_key: true |
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,63 @@ | ||
{ | ||
"description": "Pipeline for parsing Kibana logs", | ||
"on_failure": [ | ||
{ | ||
"set": { | ||
"field": "error.message", | ||
"value": "{{ _ingest.on_failure_message }}" | ||
} | ||
} | ||
], | ||
"processors": [ | ||
{ | ||
"rename": { | ||
"field": "json", | ||
"target_field": "kibana.log.meta" | ||
} | ||
}, | ||
{ | ||
"rename": { | ||
"field": "kibana.log.meta.@timestamp", | ||
"target_field": "read_timestamp" | ||
} | ||
}, | ||
{ | ||
"rename": { | ||
"field": "kibana.log.meta.message", | ||
"target_field": "message" | ||
} | ||
}, | ||
{ | ||
"rename": { | ||
"field": "kibana.log.meta.state", | ||
"target_field": "kibana.log.state", | ||
"ignore_missing": true | ||
} | ||
}, | ||
{ | ||
"rename": { | ||
"field": "kibana.log.meta.pid", | ||
"target_field": "process.pid" | ||
} | ||
}, | ||
{ | ||
"rename": { | ||
"field": "kibana.log.meta.tags", | ||
"target_field": "kibana.log.tags" | ||
} | ||
}, | ||
{ | ||
"date": { | ||
"field": "read_timestamp", | ||
"formats" : ["ISO8601"], | ||
"target_field": "@timestamp" | ||
} | ||
}, | ||
{ | ||
"append": { | ||
"field": "service.name", | ||
"value": "kibana" | ||
} | ||
} | ||
] | ||
} |
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,9 @@ | ||
module_version: 1.0 | ||
|
||
var: | ||
- name: paths | ||
default: | ||
- /var/log/kibana/kibana.stdout | ||
|
||
ingest_pipeline: ingest/pipeline.json | ||
prospector: config/log.yml |
Oops, something went wrong.