Open vipinvkmenon opened 2 years ago
Hmm
So the error comes from the processor Start function when it does a DryRun attempt at DescribeTags
. As you said your CLI option works, but this would stem from a permissions issue. I do want to verify, that you are using the same access key and secret key? And that you also do not have any other types of credentials set up for AWS?
Hi, Thank you for your quick support :)
Yes the credentials used in the AWS CLI are the same as the ones used in telegraf..... The CLI was simply configured as:
aws configure set default.region 'us-east-1-same-as-telegraf'; aws configure set aws_access_key_id '<same-as-telegraf>'; aws configure set aws_secret_access_key '<same-as-in-telegraf>'
And thereafter running the command:
aws ec2 describe-tags --filters "Name=resource-type,Values=natgateway"
{
"Tags": [
{
"Key": "DeploymentName",
"ResourceId": "nat-006b033d708fcda58",
"ResourceType": "natgateway",
"Value": "trial"
},
As can be seen, it works. Even tried from an external machine to ensure there are no additional securities in place. As noted, with the given user, telegraf can pull metrics just not metadata. (So like you rightly said...processor issue)
maybe as a context is, currently we have another approach of pulling these metrics and metadata using a Clojure library called amazonica. This approach using amazonica
works in pulling metrics and metadata using the same above mentioned credentials. It's just that, we'd slowly like to phase it out with the more robust, easier and friendlier telegraf which is what we use for everything else.
Relevant telegraf.conf
Logs from Telegraf
System info
Telegraf 1.21.2, Ubuntu 18.04.6 LTS
Docker
No response
Steps to reproduce
Expected behavior
Metrics and respective tags
Actual behavior
Throws exceptions
Additional info
The exception says permission issues. However, The user has the following policy attached:
and from the AWS console dashboard
Also, if I try to run the command from the AWS CLI:
It works as:
Indicating that the user has the right permissions to read Tags and also pull metrics.
Note: If the processor is removed then all metrics come through as expected from the cloudwatch plugin (without meta data tags ofcourse)