Skip to content

Commit

Permalink
Fix translator unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
zhihonl committed Jan 27, 2025
1 parent 6ef2a2a commit 4538ab1
Show file tree
Hide file tree
Showing 19 changed files with 45 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ processors:
awsentity/resource:
entity_type: Resource
platform: ec2
scrape_datapoint_attribute: true
cumulativetodelta/hostDeltaMetrics:
exclude:
match_type: strict
Expand Down Expand Up @@ -86,8 +87,8 @@ service:
exporters:
- awscloudwatch
processors:
- awsentity/resource
- ec2tagger
- awsentity/resource
receivers:
- telegraf_netstat
- telegraf_swap
Expand All @@ -98,9 +99,9 @@ service:
exporters:
- awscloudwatch
processors:
- awsentity/resource
- cumulativetodelta/hostDeltaMetrics
- ec2tagger
- awsentity/resource
receivers:
- telegraf_diskio
telemetry:
Expand Down
5 changes: 3 additions & 2 deletions translator/tocwconfig/sampleConfig/advanced_config_linux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ processors:
awsentity/resource:
entity_type: Resource
platform: ec2
scrape_datapoint_attribute: true
cumulativetodelta/hostDeltaMetrics:
exclude:
match_type: strict
Expand Down Expand Up @@ -94,8 +95,8 @@ service:
exporters:
- awscloudwatch
processors:
- awsentity/resource
- ec2tagger
- awsentity/resource
receivers:
- telegraf_ethtool
- telegraf_nvidia_smi
Expand All @@ -108,9 +109,9 @@ service:
exporters:
- awscloudwatch
processors:
- awsentity/resource
- cumulativetodelta/hostDeltaMetrics
- ec2tagger
- awsentity/resource
receivers:
- telegraf_diskio
telemetry:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ processors:
awsentity/resource:
entity_type: Resource
platform: ec2
scrape_datapoint_attribute: true
ec2tagger:
ec2_instance_tag_keys:
- AutoScalingGroupName
Expand Down Expand Up @@ -87,8 +88,8 @@ service:
exporters:
- awscloudwatch
processors:
- awsentity/resource
- ec2tagger
- awsentity/resource
receivers:
- telegraf_win_perf_counters/2073218482
- telegraf_win_perf_counters/2039663244
Expand Down
3 changes: 2 additions & 1 deletion translator/tocwconfig/sampleConfig/amp_config_linux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ processors:
awsentity/resource:
entity_type: Resource
platform: ec2
scrape_datapoint_attribute: true
batch/host/amp:
metadata_cardinality_limit: 1000
send_batch_max_size: 0
Expand Down Expand Up @@ -152,9 +153,9 @@ service:
exporters:
- awscloudwatch
processors:
- awsentity/resource
- ec2tagger
- transform
- awsentity/resource
receivers:
- telegraf_cpu
telemetry:
Expand Down
3 changes: 2 additions & 1 deletion translator/tocwconfig/sampleConfig/basic_config_linux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ processors:
awsentity/resource:
entity_type: Resource
platform: ec2
scrape_datapoint_attribute: true
ec2tagger:
ec2_instance_tag_keys:
- AutoScalingGroupName
Expand Down Expand Up @@ -60,8 +61,8 @@ service:
exporters:
- awscloudwatch
processors:
- awsentity/resource
- ec2tagger
- awsentity/resource
receivers:
- telegraf_mem
- telegraf_disk
Expand Down
3 changes: 2 additions & 1 deletion translator/tocwconfig/sampleConfig/basic_config_windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ processors:
awsentity/resource:
entity_type: Resource
platform: ec2
scrape_datapoint_attribute: true
ec2tagger:
ec2_instance_tag_keys:
- AutoScalingGroupName
Expand Down Expand Up @@ -62,8 +63,8 @@ service:
exporters:
- awscloudwatch
processors:
- awsentity/resource
- ec2tagger
- awsentity/resource
receivers:
- telegraf_win_perf_counters/1492679118
- telegraf_win_perf_counters/4283769065
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ processors:
awsentity/resource:
entity_type: Resource
platform: ec2
scrape_datapoint_attribute: true
awsentity/service/telegraf:
entity_type: Service
platform: ec2
Expand Down Expand Up @@ -280,9 +281,9 @@ service:
exporters:
- awscloudwatch
processors:
- awsentity/resource
- ec2tagger
- transform
- awsentity/resource
receivers:
- telegraf_disk
- telegraf_swap
Expand All @@ -305,10 +306,10 @@ service:
exporters:
- awscloudwatch
processors:
- awsentity/resource
- cumulativetodelta/hostDeltaMetrics
- ec2tagger
- transform
- awsentity/resource
receivers:
- telegraf_diskio
- telegraf_net
Expand Down
5 changes: 3 additions & 2 deletions translator/tocwconfig/sampleConfig/complete_linux_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ processors:
awsentity/resource:
entity_type: Resource
platform: ec2
scrape_datapoint_attribute: true
awsentity/service/telegraf:
entity_type: Service
platform: ec2
Expand Down Expand Up @@ -387,9 +388,9 @@ service:
exporters:
- awscloudwatch
processors:
- awsentity/resource
- ec2tagger
- transform
- awsentity/resource
receivers:
- telegraf_swap
- telegraf_cpu
Expand All @@ -412,10 +413,10 @@ service:
exporters:
- awscloudwatch
processors:
- awsentity/resource
- cumulativetodelta/hostDeltaMetrics/cloudwatch
- ec2tagger
- transform
- awsentity/resource
receivers:
- telegraf_net
- telegraf_diskio
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ processors:
awsentity/resource:
entity_type: Resource
platform: ec2
scrape_datapoint_attribute: true
awsentity/service/telegraf:
entity_type: Service
platform: ec2
Expand Down Expand Up @@ -267,9 +268,9 @@ service:
exporters:
- awscloudwatch
processors:
- awsentity/resource
- ec2tagger
- transform
- awsentity/resource
receivers:
- telegraf_win_perf_counters/1063858558
- telegraf_nvidia_smi
Expand Down
3 changes: 2 additions & 1 deletion translator/tocwconfig/sampleConfig/delta_config_linux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ processors:
awsentity/resource:
entity_type: Resource
platform: ec2
scrape_datapoint_attribute: true
cumulativetodelta/hostDeltaMetrics:
exclude:
match_type: strict
Expand Down Expand Up @@ -80,10 +81,10 @@ service:
exporters:
- awscloudwatch
processors:
- awsentity/resource
- cumulativetodelta/hostDeltaMetrics
- ec2tagger
- transform
- awsentity/resource
receivers:
- telegraf_diskio
telemetry:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ processors:
awsentity/resource:
entity_type: Resource
platform: ec2
scrape_datapoint_attribute: true
cumulativetodelta/hostDeltaMetrics:
exclude:
match_type: ""
Expand Down Expand Up @@ -63,9 +64,9 @@ service:
exporters:
- awscloudwatch
processors:
- awsentity/resource
- cumulativetodelta/hostDeltaMetrics
- ec2tagger
- awsentity/resource
receivers:
- telegraf_net
telemetry:
Expand Down
3 changes: 2 additions & 1 deletion translator/tocwconfig/sampleConfig/drop_origin_linux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ processors:
awsentity/resource:
entity_type: Resource
platform: ec2
scrape_datapoint_attribute: true
ec2tagger:
ec2_instance_tag_keys:
- AutoScalingGroupName
Expand Down Expand Up @@ -80,9 +81,9 @@ service:
exporters:
- awscloudwatch
processors:
- awsentity/resource
- ec2tagger
- transform
- awsentity/resource
receivers:
- telegraf_cpu
- telegraf_disk
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ processors:
awsentity/resource:
entity_type: Resource
platform: ec2
scrape_datapoint_attribute: true
ec2tagger:
imds_retries: 1
middleware: agenthealth/statuscode
Expand All @@ -54,8 +55,8 @@ service:
exporters:
- awscloudwatch
processors:
- awsentity/resource
- ec2tagger
- awsentity/resource
receivers:
- telegraf_mem
- telegraf_disk
Expand Down
3 changes: 2 additions & 1 deletion translator/tocwconfig/sampleConfig/invalid_input_linux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ processors:
awsentity/resource:
entity_type: Resource
platform: ec2
scrape_datapoint_attribute: true
ec2tagger:
ec2_instance_tag_keys:
- AutoScalingGroupName
Expand Down Expand Up @@ -60,8 +61,8 @@ service:
exporters:
- awscloudwatch
processors:
- awsentity/resource
- ec2tagger
- awsentity/resource
receivers:
- telegraf_mem
- telegraf_disk
Expand Down
5 changes: 3 additions & 2 deletions translator/tocwconfig/sampleConfig/standard_config_linux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ processors:
awsentity/resource:
entity_type: Resource
platform: ec2
scrape_datapoint_attribute: true
cumulativetodelta/hostDeltaMetrics:
exclude:
match_type: strict
Expand Down Expand Up @@ -81,8 +82,8 @@ service:
exporters:
- awscloudwatch
processors:
- awsentity/resource
- ec2tagger
- awsentity/resource
receivers:
- telegraf_mem
- telegraf_swap
Expand All @@ -92,9 +93,9 @@ service:
exporters:
- awscloudwatch
processors:
- awsentity/resource
- cumulativetodelta/hostDeltaMetrics
- ec2tagger
- awsentity/resource
receivers:
- telegraf_diskio
telemetry:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ processors:
awsentity/resource:
entity_type: Resource
platform: ec2
scrape_datapoint_attribute: true
cumulativetodelta/hostDeltaMetrics:
exclude:
match_type: strict
Expand Down Expand Up @@ -88,8 +89,8 @@ service:
exporters:
- awscloudwatch
processors:
- awsentity/resource
- ec2tagger
- awsentity/resource
receivers:
- telegraf_cpu
- telegraf_disk
Expand All @@ -99,9 +100,9 @@ service:
exporters:
- awscloudwatch
processors:
- awsentity/resource
- cumulativetodelta/hostDeltaMetrics
- ec2tagger
- awsentity/resource
receivers:
- telegraf_diskio
telemetry:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ processors:
awsentity/resource:
entity_type: Resource
platform: ec2
scrape_datapoint_attribute: true
ec2tagger:
ec2_instance_tag_keys:
- AutoScalingGroupName
Expand Down Expand Up @@ -76,8 +77,8 @@ service:
exporters:
- awscloudwatch
processors:
- awsentity/resource
- ec2tagger
- awsentity/resource
receivers:
- telegraf_win_perf_counters/3762679655
- telegraf_win_perf_counters/4283769065
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ processors:
awsentity/resource:
entity_type: Resource
platform: ec2
scrape_datapoint_attribute: true
ec2tagger:
ec2_instance_tag_keys:
- AutoScalingGroupName
Expand Down Expand Up @@ -83,8 +84,8 @@ service:
exporters:
- awscloudwatch
processors:
- awsentity/resource
- ec2tagger
- awsentity/resource
receivers:
- telegraf_win_perf_counters/3762679655
- telegraf_win_perf_counters/4283769065
Expand Down
Loading

0 comments on commit 4538ab1

Please sign in to comment.