Skip to content
This repository was archived by the owner on Mar 8, 2023. It is now read-only.

Support for multiple roles(role_arn) to achieve cross-account metrics is not working. #20

@JogiInnov

Description

@JogiInnov

When using variable for role_arn no metrics are coming.

Below are the details:

1.) prometheus config:

  • job_name: 'sample_redshift'
    metrics_path: '/scrape'
    ec2_sd_configs:
    • region: us-east-2
      static_configs:
    • targets: ['arn:aws:iam::xxxxxxxxxxxx:role/cloudwatch-role']
      relabel_configs:
    • source_labels: [address]
      target_label: __param_targetrole
    • target_label: address
      replacement: 'localhost:9042'

2.) Target Url:
curl 'http://localhost:9042/metrics?targetrole=arn%3Aaws%3Aiam%3A%3Axxxxxxxxxxxxxx%3Arole%2Fcloudwatch-role&region=us-east-2'

3.) Ouptut from exporter:
HELP cloudwatch_requests_total API requests made to CloudWatch
TYPE cloudwatch_requests_total counter
cloudwatch_requests_total 0

4.) sample.yml config:

tasks:

  • name: redshift_cloudwatch
    default_region: us-east-2
    role_arn: [$_targetrole]
    metrics:
    • aws_namespace: AWS/Redshift
      aws_metric_name: DatabaseConnections
      aws_dimensions: [ClusterIdentifier]
      aws_statistics: [Average]

5.) from aws-cli everything is working fine when switching between the roles.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions