为普罗米修斯在中层dcos集群上建立云观测导出器

snz8szmq  于 2021-06-21  发布在  Mesos
关注(0)|答案(2)|浏览(451)

我已经为我的aws中间层dcos集群上的普罗米修斯设置了云监视导出程序。我已启用“cloudwatchfullaccess”策略。但是“米” cloudwatch_exporter_scrape_error '显示非零值。我想知道为什么刮擦会出错。
在哪里可以检查日志或如何调试此问题?
我使用的配置文件也是

{
   "region": "ap-southeast-1",
   "metrics": [
        {"aws_namespace": "AWS/ELB", "aws_metric_name": "HealthyHostCount",
         "aws_dimensions": ["AvailabilityZone", "LoadBalancerName"],
         "aws_dimension_select": {"LoadBalancerName": ["name of my LB"]},
         "aws_statistics": ["Sum"]
        }
      ]
}

但我不知道除了米以外还有什么米- cloudwatch_requests_total , cloudwatch_exporter_scrape_duration_seconds , cloudwatch_exporter_scrape_error 暴露在普罗米修斯面前。
如何从cloudwatch\u出口商处获得额外的电表?

w6lpcovy

w6lpcovy1#

看起来您正在尝试使用iam示例配置文件,但无法访问http://169.254.169.254. 这是您的网络设置的某种形式的问题,因为在ec2上这应该是现成的。
你有两个选择。
您可以修复网络设置,以便再次访问169.254.169.254。
或者您可以使用 cloudwatch:ListMetrics 以及 cloudwatch:GetMetricStatistics iam权限,并生成AccessKey并将其放入 AWS_ACCESS_KEY_ID 以及 AWS_SECRET_ACCESS_KEY 或者 ~/.aws/credentials .
看到了吗https://github.com/prometheus/cloudwatch_exporter#credentials-和权限

oyjwcjzk

oyjwcjzk2#

下面是我的配置文件

{
    "region": "us-west-2",
    "metrics": [
    {"aws_namespace": "AWS/ELB", "aws_metric_name": "HealthyHostCount",
     "aws_dimensions": ["us-west-2a", "test"], "aws_statistics": ["Average"]},
    {"aws_namespace": "AWS/ELB", "aws_metric_name": "UnHealthyHostCount",
     "aws_dimensions": ["us-west-2a", "test"], "aws_statistics": ["Average"]},
    {"aws_namespace": "AWS/ELB", "aws_metric_name": "RequestCount",
     "aws_dimensions": ["us-west-2a", "test"], "aws_statistics": ["Sum"]},
    {"aws_namespace": "AWS/ELB", "aws_metric_name": "Latency",
     "aws_dimensions": ["us-west-2a", "test"], "aws_statistics": ["Average"]},
    {"aws_namespace": "AWS/ELB", "aws_metric_name": "SurgeQueueLength",
     "aws_dimensions": ["us-west-2a", "test"], "aws_statistics": ["Maximum",    "Sum"]},
    ]
}

我可以看到下面的输出

cloudwatch_requests_total 10.0

cloudwatch_exporter_scrape_duration_seconds 2.571412647

cloudwatch_exporter_scrape_error 0.0

但为什么其他指标不行呢?

相关问题