Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Set syslog event time
Browse files Browse the repository at this point in the history
  • Loading branch information
varunkumta committed Jul 12, 2016
1 parent b52215e commit 1672100
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions source/code/plugins/filter_syslog.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ def filter(tag, time, record)
# Use Time.now, because it is the only way to get subsecond precision in version 0.12.
# The time may be slightly in the future from the ingestion time.
record["Timestamp"] = OMS::Common.format_time(Time.now.to_f)
record["EventTime"] = OMS::Common.format_time(time)
hostname = record["host"]
record["Host"] = hostname
record.delete "host"
Expand Down
1 change: 1 addition & 0 deletions source/code/plugins/filter_syslog_security.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ def filter(tag, time, record)
# Use Time.now, because it is the only way to get subsecond precision in version 0.12.
# The time may be slightly in the future from the ingestion time.
record['Timestamp'] = OMS::Common.format_time(Time.now.to_f)
record['EventTime'] = OMS::Common.format_time(time)

record['Message'] = record['message']
record.delete 'message'
Expand Down

0 comments on commit 1672100

Please sign in to comment.