-
Notifications
You must be signed in to change notification settings - Fork 207
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch the toToml unit test from using string to Toml struct comparis…
…on (#357) * Switch the toToml unit test from using string comparison to Toml struct comparison for more tolerance to toml format changes * Resolving comments for toml comparison
- Loading branch information
1 parent
a646856
commit 69fd1f8
Showing
8 changed files
with
836 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
196 changes: 196 additions & 0 deletions
196
translator/totomlconfig/tomlConfigTemplate/agentToml.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,196 @@ | ||
[agent] | ||
collection_jitter = "0s" | ||
debug = true | ||
flush_interval = "1s" | ||
flush_jitter = "0s" | ||
hostname = "" | ||
interval = "10s" | ||
logfile = "/opt/aws/amazon-cloudwatch-agent/logs/amazon-cloudwatch-agent.log" | ||
logtarget = "lumberjack" | ||
metric_batch_size = 1000 | ||
metric_buffer_limit = 10000 | ||
omit_hostname = false | ||
precision = "" | ||
quiet = false | ||
round_interval = false | ||
|
||
[inputs] | ||
|
||
[[inputs.cpu]] | ||
collect_cpu_time = true | ||
fieldpass = ["usage_idle", "usage_nice", "usage_guest", "time_active", "usage_active"] | ||
interval = "10s" | ||
percpu = true | ||
report_active = true | ||
totalcpu = false | ||
[inputs.cpu.tags] | ||
"aws:StorageResolution" = "true" | ||
d1 = "foo" | ||
d2 = "bar" | ||
metricPath = "metrics" | ||
|
||
[[inputs.disk]] | ||
fieldpass = ["free", "total", "used"] | ||
ignore_fs = ["sysfs", "devtmpfs"] | ||
interval = "60s" | ||
mount_points = ["/", "/dev", "/sys"] | ||
tagexclude = ["mode"] | ||
[inputs.disk.tags] | ||
d3 = "foo3" | ||
d4 = "bar4" | ||
metricPath = "metrics" | ||
|
||
[[inputs.diskio]] | ||
fieldpass = ["reads", "writes", "read_time", "write_time", "io_time"] | ||
interval = "60s" | ||
[inputs.diskio.tags] | ||
metricPath = "metrics" | ||
report_deltas = "true" | ||
|
||
[[inputs.logfile]] | ||
destination = "cloudwatchlogs" | ||
file_state_folder = "/opt/aws/amazon-cloudwatch-agent/logs/state" | ||
|
||
[[inputs.logfile.file_config]] | ||
file_path = "/opt/aws/amazon-cloudwatch-agent/logs/amazon-cloudwatch-agent.log" | ||
from_beginning = true | ||
log_group_name = "amazon-cloudwatch-agent.log" | ||
log_stream_name = "amazon-cloudwatch-agent.log" | ||
pipe = false | ||
retention_in_days = 5 | ||
timezone = "UTC" | ||
|
||
[[inputs.logfile.file_config]] | ||
auto_removal = true | ||
file_path = "/opt/aws/amazon-cloudwatch-agent/logs/test.log" | ||
from_beginning = true | ||
log_group_name = "test.log" | ||
log_stream_name = "test.log" | ||
pipe = false | ||
retention_in_days = -1 | ||
timezone = "UTC" | ||
[inputs.logfile.tags] | ||
metricPath = "logs" | ||
|
||
[[inputs.mem]] | ||
fieldpass = ["used", "cached", "total"] | ||
interval = "1s" | ||
[inputs.mem.tags] | ||
"aws:StorageResolution" = "true" | ||
metricPath = "metrics" | ||
|
||
[[inputs.net]] | ||
fieldpass = ["bytes_sent", "bytes_recv", "drop_in", "drop_out"] | ||
interfaces = ["eth0"] | ||
[inputs.net.tags] | ||
"aws:StorageResolution" = "true" | ||
metricPath = "metrics" | ||
report_deltas = "true" | ||
|
||
[[inputs.netstat]] | ||
fieldpass = ["tcp_established", "tcp_syn_sent", "tcp_close"] | ||
interval = "60s" | ||
[inputs.netstat.tags] | ||
metricPath = "metrics" | ||
|
||
[[inputs.processes]] | ||
fieldpass = ["running", "sleeping", "dead"] | ||
[inputs.processes.tags] | ||
"aws:StorageResolution" = "true" | ||
metricPath = "metrics" | ||
|
||
[[inputs.procstat]] | ||
fieldpass = ["cpu_usage", "memory_rss"] | ||
pid_file = "/var/run/example1.pid" | ||
pid_finder = "native" | ||
tagexclude = ["user", "result"] | ||
[inputs.procstat.tags] | ||
"aws:StorageResolution" = "true" | ||
metricPath = "metrics" | ||
|
||
[[inputs.socket_listener]] | ||
data_format = "emf" | ||
name_override = "emf" | ||
service_address = "udp://127.0.0.1:25888" | ||
[inputs.socket_listener.tags] | ||
metricPath = "logs_socket_listener" | ||
|
||
[[inputs.socket_listener]] | ||
collectd_auth_file = "/etc/collectd/auth_file" | ||
collectd_security_level = "encrypt" | ||
collectd_typesdb = ["/usr/share/collectd/types.db"] | ||
data_format = "collectd" | ||
name_prefix = "collectd_" | ||
service_address = "udp://127.0.0.1:25826" | ||
[inputs.socket_listener.tags] | ||
"aws:AggregationInterval" = "60s" | ||
metricPath = "metrics" | ||
|
||
[[inputs.statsd]] | ||
interval = "10s" | ||
metric_separator = "_" | ||
parse_data_dog_tags = true | ||
service_address = ":8125" | ||
[inputs.statsd.tags] | ||
"aws:AggregationInterval" = "60s" | ||
metricPath = "metrics" | ||
|
||
[[inputs.swap]] | ||
fieldpass = ["used", "free", "used_percent"] | ||
[inputs.swap.tags] | ||
"aws:StorageResolution" = "true" | ||
metricPath = "metrics" | ||
[outputs] | ||
|
||
[[outputs.cloudwatch]] | ||
endpoint_override = "https://monitoring-fips.us-west-2.amazonaws.com" | ||
force_flush_interval = "60s" | ||
max_datums_per_call = 1000 | ||
max_values_per_datum = 5000 | ||
namespace = "CWAgent" | ||
region = "us-west-2" | ||
role_arn = "metrics_role_arn_value_test" | ||
rollup_dimensions = [["ImageId"], ["InstanceId", "InstanceType"], ["d1"], []] | ||
tagexclude = ["host", "metricPath"] | ||
[outputs.cloudwatch.drop_original_metrics] | ||
cpu = ["cpu_usage_idle", "time_active"] | ||
|
||
[[outputs.cloudwatch.metric_decoration]] | ||
category = "cpu" | ||
name = "usage_idle" | ||
rename = "CPU_USAGE_IDLE" | ||
unit = "unit" | ||
|
||
[[outputs.cloudwatch.metric_decoration]] | ||
category = "cpu" | ||
name = "usage_nice" | ||
unit = "unit" | ||
|
||
[[outputs.cloudwatch.metric_decoration]] | ||
category = "disk" | ||
name = "free" | ||
rename = "DISK_FREE" | ||
unit = "unit" | ||
[outputs.cloudwatch.tagpass] | ||
metricPath = ["metrics"] | ||
|
||
[[outputs.cloudwatchlogs]] | ||
endpoint_override = "https://logs-fips.us-west-2.amazonaws.com" | ||
force_flush_interval = "60s" | ||
log_stream_name = "LOG_STREAM_NAME" | ||
region = "us-west-2" | ||
role_arn = "log_role_arn_value_test" | ||
tagexclude = ["metricPath"] | ||
[outputs.cloudwatchlogs.tagpass] | ||
metricPath = ["logs", "logs_socket_listener"] | ||
|
||
[processors] | ||
|
||
[[processors.delta]] | ||
|
||
[[processors.ec2tagger]] | ||
ec2_instance_tag_keys = ["aws:autoscaling:groupName"] | ||
ec2_metadata_tags = ["ImageId", "InstanceId", "InstanceType"] | ||
refresh_interval_seconds = "0s" | ||
[processors.ec2tagger.tagpass] | ||
metricPath = ["metrics"] |
Oops, something went wrong.