{"action":"created","issue":{"url":"https://api.github.com/repos/jjneely/statsrelay/issues/13","repository_url":"https://api.github.com/repos/jjneely/statsrelay","labels_url":"https://api.github.com/repos/jjneely/statsrelay/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/jjneely/statsrelay/issues/13/comments","events_url":"https://api.github.com/repos/jjneely/statsrelay/issues/13/events","html_url":"https://github.com/jjneely/statsrelay/pull/13","id":195090068,"number":13,"title":"Add metrics prefix feature - k8s usage example","user":{"login":"szibis","id":329831,"avatar_url":"https://avatars.githubusercontent.com/u/329831?v=3","gravatar_id":"","url":"https://api.github.com/users/szibis","html_url":"https://github.com/szibis","followers_url":"https://api.github.com/users/szibis/followers","following_url":"https://api.github.com/users/szibis/following{/other_user}","gists_url":"https://api.github.com/users/szibis/gists{/gist_id}","starred_url":"https://api.github.com/users/szibis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/szibis/subscriptions","organizations_url":"https://api.github.com/users/szibis/orgs","repos_url":"https://api.github.com/users/szibis/repos","events_url":"https://api.github.com/users/szibis/events{/privacy}","received_events_url":"https://api.github.com/users/szibis/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-12-12T21:25:51Z","updated_at":"2016-12-20T15:21:55Z","closed_at":"2016-12-20T15:18:21Z","pull_request":{"url":"https://api.github.com/repos/jjneely/statsrelay/pulls/13","html_url":"https://github.com/jjneely/statsrelay/pull/13","diff_url":"https://github.com/jjneely/statsrelay/pull/13.diff","patch_url":"https://github.com/jjneely/statsrelay/pull/13.patch"},"body":"We need to add static prefix to all metrics in k8s POD context.\r\n\r\nEach application deploy have own statsrelay inside local POD and send data over 127.0.0.1:8125 UDP to statsrelay which sending data over TCP to centralised statsite cluster.\r\n\r\nMetrics prefix works like statsrelay internal stats prefix but it is added to each metric passed through statsrelay to statsite. \r\n\r\nEach private ELB behind Route53 internal domain with DNS failover to other domain and all with health-checks. Each statsite + internal ELB inside ASG with one statsite instance replaced to new if failed. This setup is HA and guarantee that metrics from statsrelay's will always go to same statsite instance.\r\n\r\n<img width=\"1200\" alt=\"screen shot 2016-12-12 at 22 17 13\" src=\"https://cloud.githubusercontent.com/assets/329831/21117176/ea1286d4-c0b8-11e6-8e38-cb6a1bddae44.png\">\r\n\r\nWith this feature we can add environment, k8s cluster id, region, and app name from k8s context with deployed application to metric key name.\r\nEvery app reports metrics without any prefix configured inside app code and always land with proper name inside graphite.\r\nThis is need when we like to deploy lot of app's and systems inside PaaS like k8s and using docker (configured through ENV variables)."},"comment":{"url":"https://api.github.com/repos/jjneely/statsrelay/issues/comments/268270140","html_url":"https://github.com/jjneely/statsrelay/pull/13#issuecomment-268270140","issue_url":"https://api.github.com/repos/jjneely/statsrelay/issues/13","id":268270140,"user":{"login":"szibis","id":329831,"avatar_url":"https://avatars.githubusercontent.com/u/329831?v=3","gravatar_id":"","url":"https://api.github.com/users/szibis","html_url":"https://github.com/szibis","followers_url":"https://api.github.com/users/szibis/followers","following_url":"https://api.github.com/users/szibis/following{/other_user}","gists_url":"https://api.github.com/users/szibis/gists{/gist_id}","starred_url":"https://api.github.com/users/szibis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/szibis/subscriptions","organizations_url":"https://api.github.com/users/szibis/orgs","repos_url":"https://api.github.com/users/szibis/repos","events_url":"https://api.github.com/users/szibis/events{/privacy}","received_events_url":"https://api.github.com/users/szibis/received_events","type":"User","site_admin":false},"created_at":"2016-12-20T15:21:55Z","updated_at":"2016-12-20T15:21:55Z","body":"Thx!"}}
{"actor":{"display_login":"szibis"}}