{"action":"created","issue":{"url":"https://api.github.com/repos/alphagov/paas-cf/issues/1640","repository_url":"https://api.github.com/repos/alphagov/paas-cf","labels_url":"https://api.github.com/repos/alphagov/paas-cf/issues/1640/labels{/name}","comments_url":"https://api.github.com/repos/alphagov/paas-cf/issues/1640/comments","events_url":"https://api.github.com/repos/alphagov/paas-cf/issues/1640/events","html_url":"https://github.com/alphagov/paas-cf/pull/1640","id":384355172,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMzNTc2NTY2","number":1640,"title":"[#161387488] Send metrics to Prometheus from paas-metrics","user":{"login":"bandesz","id":868104,"node_id":"MDQ6VXNlcjg2ODEwNA==","avatar_url":"https://avatars0.githubusercontent.com/u/868104?v=4","gravatar_id":"","url":"https://api.github.com/users/bandesz","html_url":"https://github.com/bandesz","followers_url":"https://api.github.com/users/bandesz/followers","following_url":"https://api.github.com/users/bandesz/following{/other_user}","gists_url":"https://api.github.com/users/bandesz/gists{/gist_id}","starred_url":"https://api.github.com/users/bandesz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bandesz/subscriptions","organizations_url":"https://api.github.com/users/bandesz/orgs","repos_url":"https://api.github.com/users/bandesz/repos","events_url":"https://api.github.com/users/bandesz/events{/privacy}","received_events_url":"https://api.github.com/users/bandesz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-11-26T14:28:17Z","updated_at":"2018-11-29T10:55:59Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/alphagov/paas-cf/pulls/1640","html_url":"https://github.com/alphagov/paas-cf/pull/1640","diff_url":"https://github.com/alphagov/paas-cf/pull/1640.diff","patch_url":"https://github.com/alphagov/paas-cf/pull/1640.patch"},"body":"# What\r\n\r\nWe extended the paas-metrics app to send metrics to Prometheus while still sending the metrics to Datadog.\r\n\r\nChanges:\r\n * Added a /metrics endpoint which exposes the Prometheus metrics for scraping\r\n * We added a Unit field to the collected metrics, so we can use it as a suffix for the Prom. metrics (e.g. if the Unit is \"seconds\" and the metric is \"foo.bar\", then the Prom. metric name will be \"paas_foo_bar_seconds\")\r\n * The CF_SKIP_SSL_VALIDATION env var was removed from the app as it's not needed anymore\r\n * Use Go 1.11\r\n\r\n# How to review\r\n\r\n1. Deploy your CF pipeline from this branch with DataDog enabled.\r\n  ```\r\n  ENABLE_DATADOG=true BRANCH=paas_metrics_prometheus_161387488 make dev pipelines\r\n  ```\r\n\r\n2. Check if the metrics app is serving the metrics:\r\n\r\n```\r\nhttps://paas-metrics.${DEPLOY_ENV}.dev.cloudpipelineapps.digital/metrics\r\n```\r\n\r\n3. Check if Prometheus has the new metrics (prefixed with `paas_`)\r\n\r\n```\r\nhttps://prometheus.${DEPLOY_ENV}.dev.cloudpipeline.digital/graph?g0.range_input=1h&g0.expr=paas_aiven_estimated_cost_pounds&g0.tab=0\r\n```\r\n\r\n4. Check if these metrics are also available in DataDog for your env.\r\n\r\n# Who can review\r\n\r\nNot me."},"comment":{"url":"https://api.github.com/repos/alphagov/paas-cf/issues/comments/442791860","html_url":"https://github.com/alphagov/paas-cf/pull/1640#issuecomment-442791860","issue_url":"https://api.github.com/repos/alphagov/paas-cf/issues/1640","id":442791860,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0Mjc5MTg2MA==","user":{"login":"bandesz","id":868104,"node_id":"MDQ6VXNlcjg2ODEwNA==","avatar_url":"https://avatars0.githubusercontent.com/u/868104?v=4","gravatar_id":"","url":"https://api.github.com/users/bandesz","html_url":"https://github.com/bandesz","followers_url":"https://api.github.com/users/bandesz/followers","following_url":"https://api.github.com/users/bandesz/following{/other_user}","gists_url":"https://api.github.com/users/bandesz/gists{/gist_id}","starred_url":"https://api.github.com/users/bandesz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bandesz/subscriptions","organizations_url":"https://api.github.com/users/bandesz/orgs","repos_url":"https://api.github.com/users/bandesz/repos","events_url":"https://api.github.com/users/bandesz/events{/privacy}","received_events_url":"https://api.github.com/users/bandesz/received_events","type":"User","site_admin":false},"created_at":"2018-11-29T10:55:59Z","updated_at":"2018-11-29T10:55:59Z","author_association":"CONTRIBUTOR","body":"@jpluscplusm All comments were resolved."}}
{"actor":{"display_login":"bandesz"}}