nerdswords / yet-another-cloudwatch-exporter

Prometheus exporter for AWS CloudWatch - Discovers services through AWS tags, gets CloudWatch metrics data and provides them as Prometheus metrics with AWS tags as labels
Apache License 2.0
975 stars 332 forks source link

New Discovery Type for yace #28

Closed wutianchen closed 5 years ago

wutianchen commented 5 years ago

We forked yace in our internal project. Since more discovery type is required in our use case, we have implemented type sqs. So the following questions in our mind

1) would that be proper to contribute our work to this project ? 2) is that correct only "AWS Resource Group Tagging" supported services (https://docs.aws.amazon.com/resourcegroupstagging/latest/APIReference/Welcome.html) can be added to supported services list ?

thanks a lot

thomaspeitz commented 5 years ago

Hey @wutianchen - We are always happy about contributions. So yeah just make a PR and lets discuss it.

Till now only service discovery is supported for resources which can be find by tagging api. But i would be interested in a PR which would support a a service which is not included in this api. About which service are you talking, as SQS is supported (https://docs.aws.amazon.com/resourcegroupstagging/latest/APIReference/Welcome.html).

Greetings, Thomas

wutianchen commented 5 years ago

Hi @tsupertramp thanks for the feedback. interesting idea. The services we are using and not supported yet by resource group api is for example, ecs, iot etc.

I do not know if it is possible to search for resources using tags filter (without resouce group api). Basically we have to list all resouces with their taggings in that namespace and filter resources accordingly. or ?

will share my idea or implementation if I have further findings.

thomaspeitz commented 5 years ago

Yeah bascially you list all resources and then filter them based on resources.

Initially yace was written without usage of tagging api. So every resource got there own service discovery. I migrated away from this after finding out about tagging api. So from my point of view it should be possible pretty easily.

There are generally two categories of aws services.

AWS Api is pretty inconsistent. So sometimes you get tags with resources and sometimes not and you need a second api call.

If you want I'll check out ecs metrics support tomorrow. Would be cool to have a first example of a non-tag-api example in the code.

wutianchen commented 5 years ago

@tsupertramp thanks for the advice for the implementation. For me currently the difficulty is the software architecture how to include both resource-group-api resources and non-resource-group-api resources together. API calls will be easy.

I have started the implementation of non-resource-group-api example, aka aws iot

thomaspeitz commented 5 years ago

Sounds good. Thanks :) Just try something out and we discuss your approach afterwards?

thomaspeitz commented 5 years ago

Closing this. Feel free to PR if you want to add something :)