{"action":"created","issue":{"url":"https://api.github.com/repos/influxdata/telegraf/issues/465","labels_url":"https://api.github.com/repos/influxdata/telegraf/issues/465/labels{/name}","comments_url":"https://api.github.com/repos/influxdata/telegraf/issues/465/comments","events_url":"https://api.github.com/repos/influxdata/telegraf/issues/465/events","html_url":"https://github.com/influxdata/telegraf/pull/465","id":124006634,"number":465,"title":"[WIP] Etcd integration for configuration","user":{"login":"titilambert","id":47721,"avatar_url":"https://avatars.githubusercontent.com/u/47721?v=3","gravatar_id":"","url":"https://api.github.com/users/titilambert","html_url":"https://github.com/titilambert","followers_url":"https://api.github.com/users/titilambert/followers","following_url":"https://api.github.com/users/titilambert/following{/other_user}","gists_url":"https://api.github.com/users/titilambert/gists{/gist_id}","starred_url":"https://api.github.com/users/titilambert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/titilambert/subscriptions","organizations_url":"https://api.github.com/users/titilambert/orgs","repos_url":"https://api.github.com/users/titilambert/repos","events_url":"https://api.github.com/users/titilambert/events{/privacy}","received_events_url":"https://api.github.com/users/titilambert/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-28T01:59:47Z","updated_at":"2016-01-05T21:05:34Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/influxdata/telegraf/pulls/465","html_url":"https://github.com/influxdata/telegraf/pull/465","diff_url":"https://github.com/influxdata/telegraf/pull/465.diff","patch_url":"https://github.com/influxdata/telegraf/pull/465.patch"},"body":"Hello !\r\nI just started an example of what could be the etcd integration with telegraf\r\n\r\nHere an example:\r\n1 . Make a myconf.conf file, which will be stored in etcd, with the following content :\r\n```\r\n[tags]\r\n  dc = \"us-east-1\"\r\n\r\n[agent]\r\n  interval = \"10s\"\r\n  round_interval = true\r\n  flush_interval = \"10s\"\r\n  flush_jitter = \"0s\"\r\n  debug = false\r\n  hostname = \"\"\r\n\r\n[outputs]\r\n[[outputs.influxdb]]\r\n  urls = [\"http://localhost:8086\"]\r\n  database = \"telegraf\"\r\n  precision = \"s\"\r\n\r\n[plugins]\r\n[[plugins.cpu]]\r\n  percpu = true\r\n  totalcpu = true\r\n  drop = [\"cpu_time*\"]\r\n```\r\n\r\n2 . Send this file to etcd using the label **mylabel**\r\n```\r\n./telegraf  -etcd http://127.0.0.1:2379 -etcdwritelabel mylabel -etcdwriteconfig myconf.conf\r\n```\r\n\r\n3 . You can check if data is really written in etcd with\r\n```\r\n./etcdctl get /telegraf/labels/mylabel\r\n```\r\n\r\n3 . Now any telegraf agent can load this config use the label **mylabel**\r\n```\r\n./telegraf  -etcd http://127.0.0.1:2379 -etcdreadlabels mylabel\r\nConfig read with label mylabel\r\n2015/12/27 20:58:34 Database creation failed: Get http://localhost:8086/query?db=&q=CREATE+DATABASE+IF+NOT+EXISTS+telegraf: dial tcp 127.0.0.1:8086: getsockopt: connection refused\r\n2015/12/27 20:58:34 Starting Telegraf (version v0.2.4-16-ga0bb7db)\r\n2015/12/27 20:58:34 Loaded outputs: influxdb\r\n2015/12/27 20:58:34 Loaded plugins: cpu\r\n2015/12/27 20:58:34 Tags enabled: dc=us-east-1 host=osselait\r\n2015/12/27 20:58:34 Agent Config: Interval:{10s}, Debug:false, Hostname:\"osselait\", Flush Interval:{10s}\r\n\r\n```\r\n\r\nNotes:\r\n* DO NOT forget to change your etcd server URL\r\n* All data is, for now, stored in etcd in /telegraf/labels/... \"folder\"\r\n* Tested with etcd 2.2.2"},"comment":{"url":"https://api.github.com/repos/influxdata/telegraf/issues/comments/169133809","html_url":"https://github.com/influxdata/telegraf/pull/465#issuecomment-169133809","issue_url":"https://api.github.com/repos/influxdata/telegraf/issues/465","id":169133809,"user":{"login":"sparrc","id":7155926,"avatar_url":"https://avatars.githubusercontent.com/u/7155926?v=3","gravatar_id":"","url":"https://api.github.com/users/sparrc","html_url":"https://github.com/sparrc","followers_url":"https://api.github.com/users/sparrc/followers","following_url":"https://api.github.com/users/sparrc/following{/other_user}","gists_url":"https://api.github.com/users/sparrc/gists{/gist_id}","starred_url":"https://api.github.com/users/sparrc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sparrc/subscriptions","organizations_url":"https://api.github.com/users/sparrc/orgs","repos_url":"https://api.github.com/users/sparrc/repos","events_url":"https://api.github.com/users/sparrc/events{/privacy}","received_events_url":"https://api.github.com/users/sparrc/received_events","type":"User","site_admin":false},"created_at":"2016-01-05T21:05:34Z","updated_at":"2016-01-05T21:05:34Z","body":"Thank you @titilambert! I know that some people are going to be excited about using this.\r\n\r\nI need to finish work on 0.3.0 before I can get these merged though, so don't expect progress on this for a couple weeks, and it will need to be rebased off of those changes."}}