Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add convert_timezone to nginx module #10148

Merged
merged 39 commits into from
Jan 21, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
aed6cc6
Never default to a qualifier when none of them are set. (#9148)
ph Nov 19, 2018
07c4fa5
Merge branch 'master' of github.com:kaiyan-sheng/beats
kaiyan-sheng Nov 27, 2018
ff52365
Merge branch 'master' of github.com:kaiyan-sheng/beats
kaiyan-sheng Dec 10, 2018
5f9f575
Merge remote-tracking branch 'upstream/master'
kaiyan-sheng Dec 10, 2018
09d8b97
Merge remote-tracking branch 'upstream/master'
kaiyan-sheng Dec 10, 2018
141277e
Merge remote-tracking branch 'upstream/master'
kaiyan-sheng Dec 13, 2018
276a1de
Merge remote-tracking branch 'upstream/master'
kaiyan-sheng Dec 14, 2018
19a705a
Merge remote-tracking branch 'upstream/master'
kaiyan-sheng Dec 17, 2018
e54a566
Merge remote-tracking branch 'upstream/master'
kaiyan-sheng Dec 18, 2018
edd4488
Merge remote-tracking branch 'upstream/master'
kaiyan-sheng Dec 26, 2018
b0d2e22
Merge remote-tracking branch 'upstream/master'
kaiyan-sheng Dec 27, 2018
378b4f9
Merge remote-tracking branch 'upstream/master'
kaiyan-sheng Dec 28, 2018
1996739
Merge remote-tracking branch 'upstream/master'
kaiyan-sheng Dec 28, 2018
1e05766
Merge remote-tracking branch 'upstream/master'
kaiyan-sheng Jan 2, 2019
33c130c
Merge remote-tracking branch 'upstream/master'
kaiyan-sheng Jan 2, 2019
513bbd0
Merge branch 'master' of github.com:elastic/beats
kaiyan-sheng Jan 3, 2019
c618fd0
Merge branch 'master' of github.com:elastic/beats
kaiyan-sheng Jan 3, 2019
40c8368
Merge remote-tracking branch 'upstream/master'
kaiyan-sheng Jan 3, 2019
042c89b
Merge remote-tracking branch 'upstream/master'
kaiyan-sheng Jan 3, 2019
97393f4
Merge remote-tracking branch 'upstream/master'
kaiyan-sheng Jan 4, 2019
5b300c8
Merge branch 'master' of github.com:elastic/beats
kaiyan-sheng Jan 4, 2019
be995ca
Merge remote-tracking branch 'upstream/master'
kaiyan-sheng Jan 7, 2019
b9461c2
Merge remote-tracking branch 'upstream/master'
kaiyan-sheng Jan 9, 2019
89f5158
Merge remote-tracking branch 'upstream/master'
kaiyan-sheng Jan 10, 2019
2db435e
Merge remote-tracking branch 'upstream/master'
kaiyan-sheng Jan 11, 2019
1f3911b
Merge remote-tracking branch 'upstream/master'
kaiyan-sheng Jan 14, 2019
3244062
Merge remote-tracking branch 'upstream/master'
kaiyan-sheng Jan 14, 2019
89fcbbf
Merge remote-tracking branch 'upstream/master'
kaiyan-sheng Jan 14, 2019
71b5c64
Merge remote-tracking branch 'upstream/master'
kaiyan-sheng Jan 14, 2019
19cda55
Merge remote-tracking branch 'upstream/master'
kaiyan-sheng Jan 14, 2019
c08f7fc
Merge remote-tracking branch 'upstream/master'
kaiyan-sheng Jan 15, 2019
dcd95f8
Merge remote-tracking branch 'upstream/master'
kaiyan-sheng Jan 16, 2019
f6fa0c2
Merge remote-tracking branch 'upstream/master'
kaiyan-sheng Jan 16, 2019
af20179
Merge remote-tracking branch 'upstream/master'
kaiyan-sheng Jan 18, 2019
bf32666
Merge remote-tracking branch 'upstream/master'
kaiyan-sheng Jan 18, 2019
e40036a
Add convert_timezone to nginx module
kaiyan-sheng Jan 17, 2019
f320ae0
Remove changes that are caused by rebasing
kaiyan-sheng Jan 18, 2019
30d5f5b
Fix rebase problem in changelog
kaiyan-sheng Jan 19, 2019
e6e00e7
Run mage fmt update on x-pack filebeat
kaiyan-sheng Jan 21, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d
- Elasticsearch module's slowlog now populates `event.duration` (ECS). {pull}9293[9293]
- HAProxy module now populates `event.duration` and `http.response.bytes` (ECS). {pull}10143[10143]
- Teach elasticsearch/audit fileset to parse out some more fields. {issue}10134[10134] {pull}10137[10137]
- Add convert_timezone to nginx module. {issue}9839[9839] {pull}10148[10148]

*Heartbeat*

Expand Down
6 changes: 6 additions & 0 deletions filebeat/filebeat.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,9 @@ filebeat.modules:
# can be added under this section.
#input:

# Convert the timestamp to UTC. Requires Elasticsearch >= 6.1.
#var.convert_timezone: false

# Error logs
#error:
#enabled: true
Expand All @@ -316,6 +319,9 @@ filebeat.modules:
# can be added under this section.
#input:

# Convert the timestamp to UTC. Requires Elasticsearch >= 6.1.
#var.convert_timezone: false

#------------------------------- Osquery Module -------------------------------
- module: osquery
result:
Expand Down
6 changes: 6 additions & 0 deletions filebeat/module/nginx/_meta/config.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
# can be added under this section.
#input:

# Convert the timestamp to UTC. Requires Elasticsearch >= 6.1.
#var.convert_timezone: false

# Error logs
#error:
#enabled: true
Expand All @@ -22,3 +25,6 @@
# Input configuration (advanced). Any input configuration option
# can be added under this section.
#input:

# Convert the timestamp to UTC. Requires Elasticsearch >= 6.1.
#var.convert_timezone: false
6 changes: 6 additions & 0 deletions filebeat/module/nginx/_meta/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,16 @@
# Filebeat will choose the paths depending on your OS.
#var.paths:

# Convert the timestamp to UTC. Requires Elasticsearch >= 6.1.
#var.convert_timezone: true

# Error logs
error:
enabled: true

# Set custom paths for the log files. If left empty,
# Filebeat will choose the paths depending on your OS.
#var.paths:

# Convert the timestamp to UTC. Requires Elasticsearch >= 6.1.
#var.convert_timezone: true
5 changes: 5 additions & 0 deletions filebeat/module/nginx/access/config/nginx-access.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,8 @@ paths:
- {{$path}}
{{ end }}
exclude_files: [".gz$"]

{{ if .convert_timezone }}
processors:
- add_locale: ~
{{ end }}
4 changes: 3 additions & 1 deletion filebeat/module/nginx/access/ingest/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@
"target_field": "@timestamp",
"formats": [
"dd/MMM/YYYY:H:m:s Z"
]
],
{< if .convert_timezone >}"timezone": "{{ event.timezone }}",{< end >}
"ignore_failure": true
}
},
{
Expand Down
7 changes: 7 additions & 0 deletions filebeat/module/nginx/access/manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ var:
- /usr/local/var/log/nginx/access.log*
os.windows:
- c:/programdata/nginx/logs/*access.log*
- name: convert_timezone
default: false
# if ES < 6.1.0, this flag switches to false automatically when evaluating the
# pipeline
min_elasticsearch_version:
version: 6.1.0
value: false

ingest_pipeline: ingest/default.json
input: config/nginx-access.yml
Expand Down
5 changes: 5 additions & 0 deletions filebeat/module/nginx/error/config/nginx-error.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,8 @@ paths:
- {{$path}}
{{ end }}
exclude_files: [".gz$"]

{{ if .convert_timezone }}
processors:
- add_locale: ~
{{ end }}
4 changes: 3 additions & 1 deletion filebeat/module/nginx/error/ingest/pipeline.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
"date": {
"field": "nginx.error.time",
"target_field": "@timestamp",
"formats": ["YYYY/MM/dd H:m:s"]
"formats": ["YYYY/MM/dd H:m:s"],
{< if .convert_timezone >}"timezone": "{{ event.timezone }}",{< end >}
"ignore_failure": true
}
}, {
"remove": {
Expand Down
7 changes: 7 additions & 0 deletions filebeat/module/nginx/error/manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ var:
- /usr/local/var/log/nginx/error.log*
os.windows:
- c:/programdata/nginx/logs/error.log*
- name: convert_timezone
default: false
# if ES < 6.1.0, this flag switches to false automatically when evaluating the
# pipeline
min_elasticsearch_version:
version: 6.1.0
value: false

ingest_pipeline: ingest/pipeline.json
input: config/nginx-error.yml
6 changes: 6 additions & 0 deletions filebeat/modules.d/nginx.yml.disabled
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,16 @@
# Filebeat will choose the paths depending on your OS.
#var.paths:

# Convert the timestamp to UTC. Requires Elasticsearch >= 6.1.
#var.convert_timezone: true

# Error logs
error:
enabled: true

# Set custom paths for the log files. If left empty,
# Filebeat will choose the paths depending on your OS.
#var.paths:

# Convert the timestamp to UTC. Requires Elasticsearch >= 6.1.
#var.convert_timezone: true
6 changes: 6 additions & 0 deletions x-pack/filebeat/filebeat.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,9 @@ filebeat.modules:
# can be added under this section.
#input:

# Convert the timestamp to UTC. Requires Elasticsearch >= 6.1.
#var.convert_timezone: false

# Error logs
#error:
#enabled: true
Expand All @@ -316,6 +319,9 @@ filebeat.modules:
# can be added under this section.
#input:

# Convert the timestamp to UTC. Requires Elasticsearch >= 6.1.
#var.convert_timezone: false

#------------------------------- Osquery Module -------------------------------
- module: osquery
result:
Expand Down