Prometheus on AWS

  • View
    3.988

  • Download
    3

Embed Size (px)

Transcript

PowerPoint

Prometheus on AWS

AWSPrometheus (1)Grafana committer@mtanda

Prometheusmulti-dimensional data modelflexible query languagepull model over HTTPservice discoveryPrometheus values reliability

AWSAuto ScalingAZ

AWSmulti-dimensional data model & flexible query languageRoleAZpull model over HTTP & service discoveryRole

multi-dimensional data modellabelkeyvalueinstance_idi-1234abcdinstance_typeec2, rds, elasticache, elb, instance_modelt2.large, m4.large, c4.large, r3.large, regionap-northeast-1, us-east-1, availability_zoneap-northeast-1a, ap-northeast-1c, role (instance tag)web, db, environment (instance tag)production, staging,

avg(cpu) by (availability_zone)

cpu{role="web"}

avg(cpu) by (role)

Service DiscoverySDec2_sd, consul_sd, kubernetes_sd, file_sd(Pull)

ec2_sdec2:DescribeInstances APIAZweb Role- job_name: 'job_name' ec2_sd_configs: - region: ap-northeast-1 port: 9100 relabel_configs: - source_labels: [__meta_ec2_tag_Role] regex: web.* action: keep

Prometheus

Prometheus(for web)Prometheus(for db)

Role=webRole=dbpackuploaddeployedit

Jenkins project (https://jenkins.io/)

12

CloudWatchCloudWatchPrometheuscloudwatch_exporterJavaaws-sdk-goexportertimestampCloudWatchtimestampPrometheustimestamp

t2.micro t2.mediumEBSgp250-100GB50-100t2.mediumt2.smallt2.microstorage.local.memory-chunksT2EBS(gp2)

11150 300scrape151200MB

rrdtool15Remote Storage (Graphite)Prometheus

11.0exporterexporter

URLhttp://www.robustperception.io/automatically-monitoring-ec2-instances/http://www.robustperception.io/how-to-have-labels-for-machine-roles/http://www.robustperception.io/life-of-a-label/http://www.slideshare.net/FabianReinartz/prometheus-storage-57557499