Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature request] add container/task labels to target labels #55

Open
ZyanKLee opened this issue Oct 27, 2020 · 2 comments
Open

[feature request] add container/task labels to target labels #55

ZyanKLee opened this issue Oct 27, 2020 · 2 comments

Comments

@ZyanKLee
Copy link

first things first: I love your work, thanks.

now to the feature request:
We would like to filter the metrics based on various tags we attached to the AWS ECS TaskDefinition or the docker containers themselves. An example would be the environment name for example (we run several near-identical test environments in one test account and need to distinguish statistics between them).

I envision the target to look similar to this:

- targets:
  - 123.123.123.123:12345
  labels:
    task_arn: arn:aws:ecs:re-gion-1:1234567890:task/SomeTaskName/876535678765
    task_name: SomeTaskName
    job: OurJobName
    task_revision: "2"
    task_group: service:AwesomeServiceName-763456784
    cluster_arn: arn:aws:ecs:re-gion-1:1234567890:cluster/ClusterName
    container_name: main
    container_arn: arn:aws:ecs:re-gion-1:1234567890:container/09876543-12345678-09876543-123456789
    docker_image: image-name:v0.12.1
    docker_label_environment: test1
    docker_label_somethingelse: anothervalue
    task_tag_tagkey: tagvalue
    task_tag_environment: test1
    __metrics_path__: /metrics
@Rudd-O
Copy link
Contributor

Rudd-O commented Nov 16, 2020

While in general it's inadvisable to create metrics that have unbounded label cardinality ( https://www.robustperception.io/cardinality-is-key ) — and I truly mean cardinality will kill your Prometheus hive — it's certainly possible to expand the data that is collected to it. I bow out and leave it to the kind people at Teralytics to decide if it's appropriate to add a command-line parameter or some other configuration mechanism to fulfil this need.

@AnakinPt
Copy link

I have the exact same need. For me is not the problem of cardinality because we don't have a huge amount of metrics, but we would like to distinguish them between environments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants