Skip to content

Commit 88f75c5

Browse files
authored
Adding Container Insights Jmx Pipeline (#1382)
1 parent 5cdba47 commit 88f75c5

File tree

30 files changed

+1284
-31
lines changed

30 files changed

+1284
-31
lines changed

cmd/config-translator/translator_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,9 @@ func TestMetricsDestinationsConfig(t *testing.T) {
187187
expectedErrorMap["required"] = 1
188188
checkIfSchemaValidateAsExpected(t, "../../translator/config/sampleSchema/invalidMetricsDestinations.json", false, expectedErrorMap)
189189
}
190+
func TestContainerInsightsJmxConfig(t *testing.T) {
191+
checkIfSchemaValidateAsExpected(t, "../../translator/config/sampleSchema/validContainerInsightsJmx.json", true, map[string]int{})
192+
}
190193

191194
// Validate all sampleConfig files schema
192195
func TestSampleConfigSchema(t *testing.T) {
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"agent": {
3+
"region": "us-west-2"
4+
},
5+
"logs": {
6+
"metrics_collected": {
7+
"emf": {
8+
},
9+
"kubernetes": {
10+
"cluster_name": "TestCluster",
11+
"jmx_container_insights": true
12+
}
13+
},
14+
"force_flush_interval": 5
15+
}
16+
}

translator/config/schema.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -768,6 +768,10 @@
768768
"minLength": 1,
769769
"maxLength": 512
770770
},
771+
"jmx_container_insights": {
772+
"description": "Enable JMX Container Insights metrics",
773+
"type": "boolean"
774+
},
771775
"metrics_collection_interval": {
772776
"$ref": "#/definitions/timeIntervalDefinition"
773777
},
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
[agent]
2+
collection_jitter = "0s"
3+
debug = true
4+
flush_interval = "1s"
5+
flush_jitter = "0s"
6+
hostname = "host_name_from_env"
7+
interval = "60s"
8+
logfile = ""
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+
[outputs]
18+
19+
[[outputs.cloudwatchlogs]]
20+
force_flush_interval = "5s"
21+
log_stream_name = "host_name_from_env"
22+
mode = "EC2"
23+
region = "us-west-2"
24+
region_type = "ACJ"
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"agent": {
3+
"debug": true
4+
},
5+
"logs": {
6+
"metrics_collected": {
7+
"kubernetes": {
8+
"cluster_name": "TestCluster",
9+
"jmx_container_insights": true
10+
}
11+
}
12+
}
13+
}

0 commit comments

Comments
 (0)