Skip to content

Filtering ECS services/tasks based tag is not working as expectedΒ #3

@teajsshekokar

Description

@teajsshekokar

Command

docker run --rm \
    -e DiscoveryOptions__EcsClusters="my_cluster" \
    -e AWS_REGION="us-west-1" \
    -e AWS_ACCESS_KEY_ID="$AWS_ACCESS_KEY_ID" \
    -e AWS_SECRET_ACCESS_KEY="$AWS_SECRET_ACCESS_KEY" \
    -e AWS_SESSION_TOKEN="$AWS_SESSION_TOKEN" \
   -e  DiscoveryOptions__EcsServiceSelectorTags="PROMETHEUS_TARGET=true" \
    # or  -e DiscoveryOptions__EcsTaskTags="PROMETHEUS_TARGET=true;"
    -e AWS_REGION="$AWS_REGION" \
    -p 9001:9001 \
    apptality/aws-ecs-cloudmap-prometheus-discovery:latest

Current Behavior:
I am attempting to filter services or task definitions based on the tag PROMETHEUS_TARGET=true, but it is not functioning as expected. Instead of fetching only the services with this specific tag, it retrieves all services, including those with the METRICS_PORT tag.

Expected behavior:
The filtering should work based on the DiscoveryOptions__EcsServiceSelectorTags option and only include the targets that match PROMETHEUS_TARGET=true.

And thanks a lot for this project it is really helpful. πŸŽ‰

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentationquestionFurther information is requested

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions