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

Cannot export AWS/CertificateManager metric #478

Open
lidora-everc opened this issue Jan 27, 2023 · 8 comments
Open

Cannot export AWS/CertificateManager metric #478

lidora-everc opened this issue Jan 27, 2023 · 8 comments
Labels
metrics-configuration How to configure specific metrics for collection

Comments

@lidora-everc
Copy link

What did you do

image

What did you expect to see?

Metric with related to DaysToExpire aws_metric_name when i access to cloud watch exporter endpoint

What did you see instead? Under which circumstances?

Not see the metrics that related to AWS/CertificateManager aws_namespace

Are you currently working around this issue?

No
How are you currently solving this problem?
No

Additional context

Anything else we should know?
No

Attachments

If you think you might have additional information that you'd like to include via an attachment, please do - we'll take a look. (Remember to remove any personally-identifiable information.)

Environment

  • Exporter version: v0.12.2
  • Operating system & architecture: Linux prometheus-cloudwatch-exporter-8569cb9bdf-mt8md 5.4.226-129.415.amzn2.x86_64 Don't request the freshest data, wait a bit. #1 SMP Fri Dec 9 12:54:21 UTC 2022 x86_64 GNU/Linux
  • Running in containers? y
  • Using the official image? y

Exporter configuration file

expand
nodeSelector:
  node-group: monitoring-metrics

tolerations:
  - key: "node-group"
    operator: "Equal"
    value: "monitoring-metrics"
    effect: "NoSchedule"

serviceMonitor:
  enabled: true
  namespace: monitoring
  interval: 300s
  labels:
    release: prometheus-operator
  timeout: 160s

resources: 
  limits:
    cpu: 500m
    memory: 1Gi
  requests:
    cpu: 500m
    memory: 1Gi

config: |-
  # This is the default configuration for prometheus-cloudwatch-exporter
  region: us-east-1
  period_seconds: 300
  metrics:
  - aws_dimensions: [ImageId, InstanceId, InstanceType, device, fstype, path, team]
    aws_metric_name: disk_used_percent
    aws_namespace: CWAgent
    aws_statistics: [Minimum]
  - aws_dimensions: [ImageId, InstanceId, InstanceType, cpu, team]
    aws_metric_name: cpu_usage_system
    aws_namespace: CWAgent
    aws_statistics: [Minimum]
  - aws_dimensions: [ImageId, InstanceId, InstanceType, team]
    aws_metric_name: mem_used_percent
    aws_namespace: CWAgent
    aws_statistics: [Minimum]
  - aws_dimensions: [ImageId, InstanceId, InstanceType, team]
    aws_metric_name: swap_used_percent
    aws_namespace: CWAgent
    aws_statistics: [Minimum] 

  - aws_namespace: AWS/SQS
    aws_metric_name: ApproximateAgeOfOldestMessage
    aws_dimensions: [QueueName]
    aws_statistics: [Average,Maximum]
  - aws_namespace: AWS/SQS
    aws_metric_name: ApproximateAgeOfOldestMessage
    aws_dimensions: [QueueName]
    aws_statistics: [Average,Maximum]

  - aws_namespace: AWS/SQS
    aws_metric_name: ApproximateNumberOfMessagesDelayed
    aws_dimensions: [QueueName]
    aws_statistics: [Maximum,Sum]

  - aws_namespace: AWS/SQS
    aws_metric_name: ApproximateNumberOfMessagesNotVisible
    aws_dimensions: [QueueName]
    aws_statistics: [Maximum,Sum]

  - aws_namespace: AWS/SQS
    aws_metric_name: NumberOfMessagesDeleted
    aws_dimensions: [QueueName]
    aws_statistics: [Maximum,Sum]

  - aws_namespace: AWS/SQS
    aws_metric_name: NumberOfMessagesSent
    aws_dimensions: [QueueName]
    aws_statistics: [Maximum,Sum]

  - aws_namespace: AWS/SQS
    aws_metric_name: SentMessageSize
    aws_dimensions: [QueueName]
    aws_statistics: [Maximum,Average]  

  - aws_namespace: AWS/SQS
    aws_metric_name: NumberOfMessagesReceived
    aws_dimensions: [QueueName]
    aws_statistics: [Sum]

  - aws_namespace: AWS/SQS
    aws_metric_name: ApproximateNumberOfMessagesVisible
    aws_dimensions: [QueueName]
    aws_statistics: [Maximum,Sum]

  - aws_namespace: AWS/SQS
    aws_metric_name: NumberOfEmptyReceives
    aws_dimensions: [QueueName]
    aws_statistics: [Maximum,Sum]

  - aws_namespace: AWS/ES
    aws_metric_name: ClusterStatus.green
    aws_dimensions: [ClientId, DomainName]
    aws_statistics: [Maximum]
  
  - aws_namespace: AWS/CertificateManager
    aws_metric_name: DaysToExpire
    aws_dimensions: [CertificateArn]

Logs

expand
(paste log lines here)
@matthiasr
Copy link
Contributor

What do you get from aws cloudwatch list-metrics --namespace AWS/CertificateManager?

@matthiasr matthiasr added metrics-configuration How to configure specific metrics for collection and removed bug labels Feb 2, 2023
@matthiasr matthiasr changed the title [bug]: Cannot export AWS/CertificateManager metric Cannot export AWS/CertificateManager metric Feb 2, 2023
@matthiasr
Copy link
Contributor

One thing I find suspicious, but do not know the answer to, is what the correct statistic is for this metric. The documentation does not say. list-metrics would be enlightening her.

@tdyshka
Copy link

tdyshka commented Feb 20, 2023

The aws_metric_name should be "DaysToExpiry".
It does work for me, but it doesn't work with AWS tags filtering for some reason.
My certs are tagged but cloudwatch exporter is not showing them.

My configuration:

    - aws_namespace: AWS/CertificateManager
      aws_metric_name: DaysToExpiry
      aws_dimensions:
      - CertificateArn
      aws_tag_select:
        tag_selections:
          Env: ["Prod"]
        resource_type_selection: "acm"
        resource_id_dimension: CertificateArn

$ aws acm list-tags-for-certificate --certificate-arn arn:aws:acm:eu-central-1:XXXXXXXXXXXX:certificate/xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
{
    "Tags": [
        {
            "Key": "Env",
            "Value": "Prod"
        }
    ]
}

Any advice?

@lpastva
Copy link

lpastva commented Jul 7, 2023

Same for me. Anyone fixed this?

@srajuveena
Copy link

Any update on this please?

@KristopherBorja
Copy link

Same for me. Is anyone able to find a workaround?

@gpriya-adh
Copy link

same for me

@matthiasr
Copy link
Contributor

Could this be the same issue with tag values in metrics like #571 and #648?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
metrics-configuration How to configure specific metrics for collection
Projects
None yet
Development

No branches or pull requests

7 participants