Skip to content

Commit cfde177

Browse files
authored
Skip Timestamp For Agent Log (#885)
1 parent a67ac45 commit cfde177

15 files changed

+570
-40
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
[agent]
2+
collection_jitter = "0s"
3+
debug = false
4+
flush_interval = "1s"
5+
flush_jitter = "0s"
6+
hostname = ""
7+
interval = "60s"
8+
logfile = "/opt/aws/amazon-cloudwatch-agent/logs/amazon-cloudwatch-agent.log"
9+
logtarget = "lumberjack"
10+
metric_batch_size = 1000
11+
metric_buffer_limit = 10000
12+
omit_hostname = false
13+
precision = ""
14+
quiet = false
15+
round_interval = false
16+
17+
[inputs]
18+
19+
[[inputs.logfile]]
20+
destination = "cloudwatchlogs"
21+
file_state_folder = "/opt/aws/amazon-cloudwatch-agent/logs/state"
22+
23+
[[inputs.logfile.file_config]]
24+
file_path = "/tmp/not-amazon-cloudwatch-agent.log"
25+
from_beginning = true
26+
log_group_name = "amazon-cloudwatch-agent.log"
27+
pipe = false
28+
retention_in_days = -1
29+
timestamp_layout = "15:04:05 06 Jan 02"
30+
timestamp_regex = "(d{2}:d{2}:d{2} d{2} w{3} d{2})"
31+
32+
[outputs]
33+
34+
[[outputs.cloudwatchlogs]]
35+
force_flush_interval = "5s"
36+
log_stream_name = "i-UNKNOWN"
37+
region = "us-west-2"
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"logs": {
3+
"logs_collected": {
4+
"files": {
5+
"collect_list": [
6+
{
7+
"file_path": "/tmp/not-amazon-cloudwatch-agent.log",
8+
"log_group_name": "amazon-cloudwatch-agent.log",
9+
"timestamp_format": "%H:%M:%S %y %b %d"
10+
}
11+
]
12+
}
13+
}
14+
}
15+
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
[agent]
2+
collection_jitter = "0s"
3+
debug = false
4+
flush_interval = "1s"
5+
flush_jitter = "0s"
6+
hostname = ""
7+
interval = "60s"
8+
logfile = "c:\\ProgramData\\Amazon\\AmazonCloudWatchAgent\\Logs\\amazon-cloudwatch-agent.log"
9+
logtarget = "lumberjack"
10+
metric_batch_size = 1000
11+
metric_buffer_limit = 10000
12+
omit_hostname = false
13+
precision = ""
14+
quiet = false
15+
round_interval = false
16+
17+
[inputs]
18+
19+
[[inputs.logfile]]
20+
destination = "cloudwatchlogs"
21+
file_state_folder = "c:\\ProgramData\\Amazon\\AmazonCloudWatchAgent\\Logs\\state"
22+
23+
[[inputs.logfile.file_config]]
24+
file_path = "c:\\tmp\\not-amazon-cloudwatch-agent.log"
25+
from_beginning = true
26+
log_group_name = "amazon-cloudwatch-agent.log"
27+
pipe = false
28+
retention_in_days = -1
29+
timestamp_layout = "15:04:05 06 Jan 02"
30+
timestamp_regex = "(d{2}:d{2}:d{2} d{2} w{3} d{2})"
31+
32+
[outputs]
33+
34+
[[outputs.cloudwatchlogs]]
35+
force_flush_interval = "5s"
36+
log_stream_name = "i-UNKNOWN"
37+
region = "us-west-2"
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
3+
"logs": {
4+
"logs_collected": {
5+
"files": {
6+
"collect_list": [
7+
{
8+
"file_path": "c:\\tmp\\not-amazon-cloudwatch-agent.log",
9+
"log_group_name": "amazon-cloudwatch-agent.log",
10+
"timestamp_format": "%H:%M:%S %y %b %d"
11+
}
12+
]
13+
}
14+
}
15+
}
16+
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
[agent]
2+
collection_jitter = "0s"
3+
debug = false
4+
flush_interval = "1s"
5+
flush_jitter = "0s"
6+
hostname = ""
7+
interval = "60s"
8+
logfile = "/opt/tmp/a.log"
9+
logtarget = "lumberjack"
10+
metric_batch_size = 1000
11+
metric_buffer_limit = 10000
12+
omit_hostname = false
13+
precision = ""
14+
quiet = false
15+
round_interval = false
16+
17+
[inputs]
18+
19+
[[inputs.logfile]]
20+
destination = "cloudwatchlogs"
21+
file_state_folder = "/opt/aws/amazon-cloudwatch-agent/logs/state"
22+
23+
[[inputs.logfile.file_config]]
24+
file_path = "/opt/tmp/a.log"
25+
from_beginning = true
26+
log_group_name = "amazon-cloudwatch-agent.log"
27+
pipe = false
28+
retention_in_days = -1
29+
30+
[outputs]
31+
32+
[[outputs.cloudwatchlogs]]
33+
force_flush_interval = "5s"
34+
log_stream_name = "i-UNKNOWN"
35+
region = "us-west-2"
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"agent": {
3+
"logfile": "/opt/tmp/a.log"
4+
},
5+
"logs": {
6+
"logs_collected": {
7+
"files": {
8+
"collect_list": [
9+
{
10+
"file_path": "/opt/tmp/a.log",
11+
"log_group_name": "amazon-cloudwatch-agent.log",
12+
"timestamp_format": "%H:%M:%S %y %b %d"
13+
}
14+
]
15+
}
16+
}
17+
}
18+
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
[agent]
2+
collection_jitter = "0s"
3+
debug = false
4+
flush_interval = "1s"
5+
flush_jitter = "0s"
6+
hostname = ""
7+
interval = "60s"
8+
logfile = "/opt/aws/amazon-cloudwatch-agent/logs/amazon-cloudwatch-agent.log"
9+
logtarget = "lumberjack"
10+
metric_batch_size = 1000
11+
metric_buffer_limit = 10000
12+
omit_hostname = false
13+
precision = ""
14+
quiet = false
15+
round_interval = false
16+
17+
[inputs]
18+
19+
[[inputs.logfile]]
20+
destination = "cloudwatchlogs"
21+
file_state_folder = "/opt/aws/amazon-cloudwatch-agent/logs/state"
22+
23+
[[inputs.logfile.file_config]]
24+
file_path = "/opt/aws/amazon-cloudwatch-agent/logs/amazon-cloudwatch-agent.log"
25+
from_beginning = true
26+
log_group_name = "amazon-cloudwatch-agent.log"
27+
pipe = false
28+
retention_in_days = -1
29+
30+
[outputs]
31+
32+
[[outputs.cloudwatchlogs]]
33+
force_flush_interval = "5s"
34+
log_stream_name = "i-UNKNOWN"
35+
region = "us-west-2"
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"logs": {
3+
"logs_collected": {
4+
"files": {
5+
"collect_list": [
6+
{
7+
"file_path": "/opt/aws/amazon-cloudwatch-agent/logs/amazon-cloudwatch-agent.log",
8+
"log_group_name": "amazon-cloudwatch-agent.log",
9+
"timestamp_format": "%H:%M:%S %y %b %d"
10+
}
11+
]
12+
}
13+
}
14+
}
15+
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
[agent]
2+
collection_jitter = "0s"
3+
debug = false
4+
flush_interval = "1s"
5+
flush_jitter = "0s"
6+
hostname = ""
7+
interval = "60s"
8+
logfile = "c:\\ProgramData\\Amazon\\AmazonCloudWatchAgent\\Logs\\amazon-cloudwatch-agent.log"
9+
logtarget = "lumberjack"
10+
metric_batch_size = 1000
11+
metric_buffer_limit = 10000
12+
omit_hostname = false
13+
precision = ""
14+
quiet = false
15+
round_interval = false
16+
17+
[inputs]
18+
19+
[[inputs.logfile]]
20+
destination = "cloudwatchlogs"
21+
file_state_folder = "c:\\ProgramData\\Amazon\\AmazonCloudWatchAgent\\Logs\\state"
22+
23+
[[inputs.logfile.file_config]]
24+
file_path = "c:\\ProgramData\\Amazon\\AmazonCloudWatchAgent\\Logs\\amazon-cloudwatch-agent.log"
25+
from_beginning = true
26+
log_group_name = "amazon-cloudwatch-agent.log"
27+
pipe = false
28+
retention_in_days = -1
29+
30+
[outputs]
31+
32+
[[outputs.cloudwatchlogs]]
33+
force_flush_interval = "5s"
34+
log_stream_name = "i-UNKNOWN"
35+
region = "us-west-2"
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"logs": {
3+
"logs_collected": {
4+
"files": {
5+
"collect_list": [
6+
{
7+
"file_path": "c:\\ProgramData\\Amazon\\AmazonCloudWatchAgent\\Logs\\amazon-cloudwatch-agent.log",
8+
"log_group_name": "amazon-cloudwatch-agent.log",
9+
"timestamp_format": "%H:%M:%S %y %b %d"
10+
}
11+
]
12+
}
13+
}
14+
}
15+
}

0 commit comments

Comments
 (0)