Closed hendryanw closed 5 years ago
I have updated the issue's description with more detailed information.
After reading the source, I figure out that it was because I did not specified the combined
property to true
.
The following configuration works:
input {
# ElasticSearch AZ1
cloudwatch {
type => "custom-metrics"
namespace => "CWAgent"
metrics => [ "disk_used_percent", "disk_free", "disk_used", "disk_total" ]
filters => {
path => "/"
InstanceId => "i-0348f41427efbe150"
device => "nvme0n1p1"
fstype => "ext4"
}
combined => true
region => "ap-southeast-1"
aws_credentials_file => "/etc/logstash/conf.d/aws_credentials_file"
}
}
output {
stdout { codec => rubydebug }
}
I still don't understand the reason why combined
property is set to false
, but I hope this will helped others in the future.
V1:
This will output an errors:
V2:
This will instead query the metric using each filter, the plugin will initiate 4 API request for one metric, but we will need them to be queried in a single request, otherwise it wouldn't work.
V3:
This will output an error on configuration:
Can you please let me know if I am doing something wrong, or is it really an issue? The documentation also does not specify how would you use multiple filters for this. It just specify the type as
Array
which in my case didn't work.Thanks! Hendry