Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Dynalyst流Datadog活用法 (公開用)

Dynalyst流Datadog活用法 (公開用)

CyberAgent x Datadog勉強会で発表した資料です。(公開用に一部編集しています)

Kurochan

July 10, 2017
Tweet

More Decks by Kurochan

Other Decks in Technology

Transcript

  1. 誰 • ࠇ࡚ ༏ଠ (@kuro_m88) • ৽ଔ3೥໨ • Dynalyst ΤϯδχΞ

    • ࣾྺ = Datadogྺ • झຯͰαʔόӡ༻(෺ཧ)͸͡Ί·ͨ͠
  2. • AWS (ap-northeast-1, us-east-1) • EC2, ECS, Lambda • DynamoDB,

    Aurora, S3, ElastiCache, CloudFront • EMR, Redshift, DataPipeline, CloudWatch • xxxx K req/s (Tokyo), xxxx K req/s (US) • xxxx VMs • xxTB / day logs System
  3. ⛏Terraform Datadog Provider⛏ • monitor, downtime, timeboard, user resource "datadog_monitor"

    "dynamodb_user_error_count" { name = "DynamoDB UserError count is above the Threshold !!" type = "metric alert" message = <<EOF @slack-metric-alert DynamoDB UserError count is above the Threshold !! EOF query = "sum(last_5m):sum:aws.dynamodb.user_errors{*} > 10" thresholds { warning = 5.0 critical = 10.0 } notify_no_data = false no_data_timeframe = 2 renotify_interval = 0 timeout_h = 0 require_full_window = true notify_audit = false tags = [terraform, dynamodb] }
  4. クエリを手で書くのは難しい… • Datadog→TerraformͷimportεΫϦϓτ࡞Γ·ͨ͠ • Datadogͷ؂ࢹઃఆ͔ΒTerraformͷresourceΛੜ੒͢Δ • http://kurochan-note.hatenablog.jp/entry/2017/07/09/161444 $ ruby ./monitor-import.rb

    dynamodb_user_error_count 112233 resource "datadog_monitor" "dynamodb_user_error_count" { name = "DynamoDB UserError count is above the Threshold !!" type = "metric alert" message = <<EOF @slack-metric-alert DynamoDB UserError count is above the Threshold !! EOF query = "sum(last_5m):sum:aws.dynamodb.user_errors{*} > 10" thresholds { warning = 5.0 critical = 10.0 } notify_no_data = false no_data_timeframe = 2 renotify_interval = 0