Cloudwatch exporter time shift

1,058 views
Skip to first unread message

kubu...@gmail.com

unread,
Mar 28, 2018, 10:17:38 AM3/28/18
to Prometheus Users
Hello!

We are setting up cloudwatch exporter (https://github.com/prometheus/cloudwatch_exporter) for prometheus.

Prometheus has the following job config:

  - job_name: cloudwatch
    static_configs:
      - targets: ['localhost:9106']


And cloudwatch exporter config:

    region: us-east-1
    range_seconds: 60
    delay_seconds: 300
    metrics:
    - aws_namespace: AWS/ApplicationELB
        aws_metric_name: TargetResponseTime
        aws_dimensions: [LoadBalancer]
        aws_statistics: [Average]
        aws_extended_statistics: [p95, p99]
        period_seconds: 1

Problem that cloudwatch metrics are collecting with 300 seconds delay (because of cloudwatch delay), but prometheus thinks that this is current time, so metrics on grafana dashboards are shifted by 5 minutes.
Is there a common way to solve this problem? I saw this issue https://github.com/prometheus/cloudwatch_exporter/issues/22, but are there any workarounds?

Example screenshot from grafana with cloudwatch metric source (directly from aws api) and prometheus metric source below.



Brian Brazil

unread,
Mar 28, 2018, 10:22:10 AM3/28/18
to kubu...@gmail.com, Prometheus Users
On 28 March 2018 at 15:17, <kubu...@gmail.com> wrote:
Hello!

We are setting up cloudwatch exporter (https://github.com/prometheus/cloudwatch_exporter) for prometheus.

Prometheus has the following job config:

  - job_name: cloudwatch
    static_configs:
      - targets: ['localhost:9106']


And cloudwatch exporter config:

    region: us-east-1
    range_seconds: 60
    delay_seconds: 300
    metrics:
    - aws_namespace: AWS/ApplicationELB
        aws_metric_name: TargetResponseTime
        aws_dimensions: [LoadBalancer]
        aws_statistics: [Average]
        aws_extended_statistics: [p95, p99]
        period_seconds: 1

Problem that cloudwatch metrics are collecting with 300 seconds delay (because of cloudwatch delay), but prometheus thinks that this is current time, so metrics on grafana dashboards are shifted by 5 minutes.
Is there a common way to solve this problem? I saw this issue https://github.com/prometheus/cloudwatch_exporter/issues/22, but are there any workarounds?

Implementing that issue would be the best approach. The Java client has the required support now.

Brian
 

Example screenshot from grafana with cloudwatch metric source (directly from aws api) and prometheus metric source below.



--
You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-users+unsubscribe@googlegroups.com.
To post to this group, send email to prometheus-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/4a444b9b-21c3-430a-90f4-a7f9c3cde204%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Reply all
Reply to author
Forward
0 new messages