prom/cloudwatch-exporter metric granularity

314 views
Skip to first unread message

j.de...@gmail.com

unread,
Oct 16, 2018, 1:19:35 PM10/16/18
to Prometheus Users
I've read through the configuration and what I want to do seems possible, but I'm not having luck.
My goal is to 
  • Scrape rds metrics at a regular interval 
  • Get the last 10m of metrics and correctly set the timestamp before shoving it into prometheus.
  • Get 1m resolution similar to cloudwatch
My problem is I"m currently getting 5 resolution. I've attached a config snippet. Any guidance would be appreciated!


  region: us-east-1
  set_timestamp: true
  delay_seconds: 60
  period_seconds: 60
  metrics:
  - aws_namespace: AWS/RDS
    aws_metric_name: CPUUtilization
    aws_dimensions: [DBInstanceIdentifier]
    aws_statistics: [Average]

Screen Shot 2018-10-16 at 1.17.58 PM.png


Brian Brazil

unread,
Oct 16, 2018, 1:25:56 PM10/16/18
to j.de...@gmail.com, promethe...@googlegroups.com
On Tue, 16 Oct 2018 at 18:19, <j.de...@gmail.com> wrote:
I've read through the configuration and what I want to do seems possible, but I'm not having luck.
My goal is to 
  • Scrape rds metrics at a regular interval 
  • Get the last 10m of metrics and correctly set the timestamp before shoving it into prometheus.
  • Get 1m resolution similar to cloudwatch
My problem is I"m currently getting 5 resolution. I've attached a config snippet. Any guidance would be appreciated!

Hmm, I'd expect that to work (though changing delay_seconds is not recommended - CloudWatch takes a while to converge). What exact data and timestamps is the exporter reporting?
Do you get the same if you access the API directly?

Brian
 


  region: us-east-1
  set_timestamp: true
  delay_seconds: 60
  period_seconds: 60
  metrics:
  - aws_namespace: AWS/RDS
    aws_metric_name: CPUUtilization
    aws_dimensions: [DBInstanceIdentifier]
    aws_statistics: [Average]

Screen Shot 2018-10-16 at 1.17.58 PM.png


--
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-use...@googlegroups.com.
To post to this group, send email to promethe...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/b1241e02-9c02-4a14-8fab-eb29f85d1e7c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--

John Delivuk

unread,
Oct 16, 2018, 2:18:19 PM10/16/18
to Prometheus Users
aws cloudwatch get-metric-statistics --namespace AWS/RDS --dimensions Name=DBClusterIdentifier,Value=[omitted] --start-time 2018-10-16T17:50:32Z --metric-name CPUUtilization --period 60 --statistics Average
{
    "Datapoints": [
        {
            "Timestamp": "2018-10-16T17:56:00Z", 
            "Average": 6.08333333337214, 
            "Unit": "Percent"
        }, 
        {
            "Timestamp": "2018-10-16T17:51:00Z", 
            "Average": 6.25, 
            "Unit": "Percent"
        }, 
        {
            "Timestamp": "2018-10-16T17:55:00Z", 
            "Average": 6.25, 
            "Unit": "Percent"
        }, 
        {
            "Timestamp": "2018-10-16T17:50:00Z", 
            "Average": 5.99999999996119, 
            "Unit": "Percent"
        }, 
        {
            "Timestamp": "2018-10-16T17:59:00Z", 
            "Average": 6.25, 
            "Unit": "Percent"
        }, 
        {
            "Timestamp": "2018-10-16T17:54:00Z", 
            "Average": 6.16666666658906, 
            "Unit": "Percent"
        }, 
        {
            "Timestamp": "2018-10-16T17:58:00Z", 
            "Average": 5.67796610165545, 
            "Unit": "Percent"
        }, 
        {
            "Timestamp": "2018-10-16T17:53:00Z", 
            "Average": 6.35593220338983, 
            "Unit": "Percent"
        }, 
        {
            "Timestamp": "2018-10-16T17:57:00Z", 
            "Average": 6.14754098360656, 
            "Unit": "Percent"
        }, 
        {
            "Timestamp": "2018-10-16T17:52:00Z", 
            "Average": 6.14754098360656, 
            "Unit": "Percent"
        }
    ], 
    "Label": "CPUUtilization"
}

This looks to be correct. I noticed I was using DBInstanceIdentifier, which seems to be depricated. I switched my config to use DBClusterIdentifier, but still seeing the same behavior. Thanks for the quick reply Brian.

Cheers,
John

John Delivuk

unread,
Oct 16, 2018, 2:29:10 PM10/16/18
to Prometheus Users
Disregard my remark about DBInstanceIdentifier, that was user error. 

Brian Brazil

unread,
Oct 16, 2018, 3:56:01 PM10/16/18
to j.de...@gmail.com, promethe...@googlegroups.com
On Tue, 16 Oct 2018 at 19:18, John Delivuk <j.de...@gmail.com> wrote:
aws cloudwatch get-metric-statistics --namespace AWS/RDS --dimensions Name=DBClusterIdentifier,Value=[omitted] --start-time 2018-10-16T17:50:32Z --metric-name CPUUtilization --period 60 --statistics Average

Does this match what the cloudwatch exporter is returning? What does the raw data in Prometheus look like (https://www.robustperception.io/extracting-raw-samples-from-prometheus)? What is your scrape interval?

Brian
 

For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages