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

Support different timestamp format in postgresql module #9650

Merged
merged 2 commits into from
Dec 26, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,7 @@ https://github.com/elastic/beats/compare/v6.4.0...v6.5.0[View commits]
- Fix RFC3339 timezone and nanoseconds parsing with the syslog input. {pull}8346[8346]
- Mark the TCP and UDP input as GA. {pull}8125[8125]
- Support multiline logs in logstash/log fileset of Filebeat. {pull}8562[8562]
- Support different timestamp format in postgresql module. {issue}9494[9494] {pull}9650[9650]

*Heartbeat*

Expand Down
2 changes: 1 addition & 1 deletion filebeat/module/postgresql/log/ingest/pipeline.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"field": "postgresql.log.timestamp",
"target_field": "@timestamp",
"formats": [
"yyyy-MM-dd HH:mm:ss.SSS"
"yyyy-MM-dd HH:mm:ss.SSS", "yyyy-MM-dd HH:mm:ss"
jsoriano marked this conversation as resolved.
Show resolved Hide resolved
],
"ignore_failure": true
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
2017-07-31 13:36:43 EST [835-1] LOG: autovacuum launcher started
2017-07-31 13:36:44 EST [832-1] LOG: checkpoints are occurring too frequently (25 seconds apart)
2017-07-31 13:46:02 EST [832-2] HINT: Consider increasing the configuration parameter "max_wal_size".
2017-07-31 13:46:23 EST [768-1] postgres@postgres FATAL: the database system is starting up
2017-07-31 13:46:55 EST [771-1] postgres@postgres FATAL: the database system is starting up
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
[
{
"@timestamp": "2017-07-31T13:36:43.000Z",
"event.dataset": "log",
"event.module": "postgresql",
"input.type": "log",
"log.offset": 0,
"message": "2017-07-31 13:36:43 EST [835-1] LOG: autovacuum launcher started",
"postgresql.log.core_id": "1",
"postgresql.log.level": "LOG",
"postgresql.log.message": "autovacuum launcher started",
"postgresql.log.thread_id": "835",
"postgresql.log.timestamp": "2017-07-31 13:36:43",
"postgresql.log.timezone": "EST"
},
{
"@timestamp": "2017-07-31T13:36:44.000Z",
"event.dataset": "log",
"event.module": "postgresql",
"input.type": "log",
"log.offset": 66,
"message": "2017-07-31 13:36:44 EST [832-1] LOG: checkpoints are occurring too frequently (25 seconds apart)",
"postgresql.log.core_id": "1",
"postgresql.log.level": "LOG",
"postgresql.log.message": "checkpoints are occurring too frequently (25 seconds apart)",
"postgresql.log.thread_id": "832",
"postgresql.log.timestamp": "2017-07-31 13:36:44",
"postgresql.log.timezone": "EST"
},
{
"@timestamp": "2017-07-31T13:46:02.000Z",
"event.dataset": "log",
"event.module": "postgresql",
"input.type": "log",
"log.offset": 164,
"message": "2017-07-31 13:46:02 EST [832-2] HINT: Consider increasing the configuration parameter \"max_wal_size\".",
"postgresql.log.core_id": "2",
"postgresql.log.level": "HINT",
"postgresql.log.message": "Consider increasing the configuration parameter \"max_wal_size\".",
"postgresql.log.thread_id": "832",
"postgresql.log.timestamp": "2017-07-31 13:46:02",
"postgresql.log.timezone": "EST"
},
{
"@timestamp": "2017-07-31T13:46:23.000Z",
"event.dataset": "log",
"event.module": "postgresql",
"input.type": "log",
"log.offset": 267,
"message": "2017-07-31 13:46:23 EST [768-1] postgres@postgres FATAL: the database system is starting up",
"postgresql.log.core_id": "1",
"postgresql.log.database": "postgres",
"postgresql.log.level": "FATAL",
"postgresql.log.message": "the database system is starting up",
"postgresql.log.thread_id": "768",
"postgresql.log.timestamp": "2017-07-31 13:46:23",
"postgresql.log.timezone": "EST",
"postgresql.log.user": "postgres"
},
{
"@timestamp": "2017-07-31T13:46:55.000Z",
"event.dataset": "log",
"event.module": "postgresql",
"input.type": "log",
"log.offset": 360,
"message": "2017-07-31 13:46:55 EST [771-1] postgres@postgres FATAL: the database system is starting up",
"postgresql.log.core_id": "1",
"postgresql.log.database": "postgres",
"postgresql.log.level": "FATAL",
"postgresql.log.message": "the database system is starting up",
"postgresql.log.thread_id": "771",
"postgresql.log.timestamp": "2017-07-31 13:46:55",
"postgresql.log.timezone": "EST",
"postgresql.log.user": "postgres"
}
]