{"action":"created","comment":{"url":"https://api.github.com/repos/influxdata/telegraf/pulls/comments/216146929","pull_request_review_id":153571022,"id":216146929,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNjE0NjkyOQ==","diff_hunk":"@@ -0,0 +1,139 @@\n+# Splunk Metrics serialzier\n+\n+This serializer formats and outputs the metric data in a format that can be consumed by a Splunk metrics index.\n+It can be used to write to a file using the file output, or for sending metrics to a HEC using the standard telegraf HTTP output.\n+\n+If you're using the HTTP output, this serializer knows how to batch the metrics so you don't end up with an HTTP POST per metric.\n+\n+Th data is output in a format that conforms to the specified Splunk HEC JSON format as found here:\n+[Send metrics in JSON format](http://dev.splunk.com/view/event-collector/SP-CAAAFDN).\n+\n+An example event looks like:\n+```javascript\n+{\n+  \"time\": 1529708430,\n+  \"event\": \"metric\",\n+  \"host\": \"patas-mbp\",\n+  \"fields\": {\n+    \"_value\": 0.6,\n+    \"cpu\": \"cpu0\",\n+    \"dc\": \"mobile\",\n+    \"metric_name\": \"cpu.usage_user\",\n+    \"user\": \"ronnocol\"\n+  }\n+}\n+```\n+In the above snippet, the following keys are dimensions:\n+* cpu\n+* dc\n+* user\n+\n+## Using with the HTTP output\n+\n+To send this data to a Splunk HEC, you can use the HTTP output, there are some custom headers that you need to add\n+to manage the HEC authorization, here's a sample config for an HTTP output:\n+\n+```toml\n+[[outputs.http]]\n+   ## URL is the address to send metrics to\n+   url = \"https://localhost:8088/services/collector\"\n+\n+   ## Timeout for HTTP message\n+   # timeout = \"5s\"\n+\n+   ## HTTP method, one of: \"POST\" or \"PUT\"\n+   # method = \"POST\"\n+\n+   ## HTTP Basic Auth credentials\n+   # username = \"username\"\n+   # password = \"pa$$word\"\n+\n+   ## Optional TLS Config\n+   # tls_ca = \"/etc/telegraf/ca.pem\"\n+   # tls_cert = \"/etc/telegraf/cert.pem\"\n+   # tls_key = \"/etc/telegraf/key.pem\"\n+   ## Use TLS but skip chain & host verification\n+   # insecure_skip_verify = false\n+\n+   ## Data format to output.\n+   ## Each data format has it's own unique set of configuration options, read\n+   ## more about them here:\n+   ## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_OUTPUT.md\n+   data_format = \"splunkmetric\"\n+    ## Provides time, index, source overrides for the HEC\n+   hec_routing = true","path":"plugins/serializers/splunkmetric/README.md","position":64,"original_position":64,"commit_id":"9c01483e62fc5d54aefacea5b848a802f7aee62c","original_commit_id":"9c01483e62fc5d54aefacea5b848a802f7aee62c","user":{"login":"ronnocol","id":5877013,"node_id":"MDQ6VXNlcjU4NzcwMTM=","avatar_url":"https://avatars0.githubusercontent.com/u/5877013?v=4","gravatar_id":"","url":"https://api.github.com/users/ronnocol","html_url":"https://github.com/ronnocol","followers_url":"https://api.github.com/users/ronnocol/followers","following_url":"https://api.github.com/users/ronnocol/following{/other_user}","gists_url":"https://api.github.com/users/ronnocol/gists{/gist_id}","starred_url":"https://api.github.com/users/ronnocol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ronnocol/subscriptions","organizations_url":"https://api.github.com/users/ronnocol/orgs","repos_url":"https://api.github.com/users/ronnocol/repos","events_url":"https://api.github.com/users/ronnocol/events{/privacy}","received_events_url":"https://api.github.com/users/ronnocol/received_events","type":"User","site_admin":false},"body":"ok, will do.","created_at":"2018-09-09T04:32:36Z","updated_at":"2018-09-09T04:32:36Z","html_url":"https://github.com/influxdata/telegraf/pull/4339#discussion_r216146929","pull_request_url":"https://api.github.com/repos/influxdata/telegraf/pulls/4339","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/influxdata/telegraf/pulls/comments/216146929"},"html":{"href":"https://github.com/influxdata/telegraf/pull/4339#discussion_r216146929"},"pull_request":{"href":"https://api.github.com/repos/influxdata/telegraf/pulls/4339"}},"in_reply_to_id":215768059},"pull_request":{"url":"https://api.github.com/repos/influxdata/telegraf/pulls/4339","id":196867701,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk2ODY3NzAx","html_url":"https://github.com/influxdata/telegraf/pull/4339","diff_url":"https://github.com/influxdata/telegraf/pull/4339.diff","patch_url":"https://github.com/influxdata/telegraf/pull/4339.patch","issue_url":"https://api.github.com/repos/influxdata/telegraf/issues/4339","number":4339,"state":"open","locked":false,"title":"Splunk Metrics serializer","user":{"login":"ronnocol","id":5877013,"node_id":"MDQ6VXNlcjU4NzcwMTM=","avatar_url":"https://avatars0.githubusercontent.com/u/5877013?v=4","gravatar_id":"","url":"https://api.github.com/users/ronnocol","html_url":"https://github.com/ronnocol","followers_url":"https://api.github.com/users/ronnocol/followers","following_url":"https://api.github.com/users/ronnocol/following{/other_user}","gists_url":"https://api.github.com/users/ronnocol/gists{/gist_id}","starred_url":"https://api.github.com/users/ronnocol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ronnocol/subscriptions","organizations_url":"https://api.github.com/users/ronnocol/orgs","repos_url":"https://api.github.com/users/ronnocol/repos","events_url":"https://api.github.com/users/ronnocol/events{/privacy}","received_events_url":"https://api.github.com/users/ronnocol/received_events","type":"User","site_admin":false},"body":"This serializer properly formats the metrics data according to the Splunk metrics JSON specification, it can be used with any output that supports serializers, including file or HTTP. I decided that just formatting the data according to the Splunk spec was a better investment than managing the whole output pipeline. Now you can use telegraf without requiring a HEC (by using a file output), or you can use the well tested and maintained HTTP output and just set the extra headers required by the HEC.\r\n\r\nPlease see the docs in README.md\r\n\r\n### Required for all PRs:\r\n\r\n- [ x ] Signed [CLA](https://influxdata.com/community/cla/).\r\n- [ x ] Associated README.md updated.\r\n- [ x ] Has appropriate unit tests.","created_at":"2018-06-22T23:52:47Z","updated_at":"2018-09-09T04:32:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a597416ebd651e4743a9e9976193332c16a3337b","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":696213361,"node_id":"MDU6TGFiZWw2OTYyMTMzNjE=","url":"https://api.github.com/repos/influxdata/telegraf/labels/new%20plugin","name":"new plugin","color":"513cc6","default":false}],"milestone":{"url":"https://api.github.com/repos/influxdata/telegraf/milestones/31","html_url":"https://github.com/influxdata/telegraf/milestone/31","labels_url":"https://api.github.com/repos/influxdata/telegraf/milestones/31/labels","id":3350319,"node_id":"MDk6TWlsZXN0b25lMzM1MDMxOQ==","number":31,"title":"1.8.0","description":"","creator":{"login":"danielnelson","id":1048079,"node_id":"MDQ6VXNlcjEwNDgwNzk=","avatar_url":"https://avatars3.githubusercontent.com/u/1048079?v=4","gravatar_id":"","url":"https://api.github.com/users/danielnelson","html_url":"https://github.com/danielnelson","followers_url":"https://api.github.com/users/danielnelson/followers","following_url":"https://api.github.com/users/danielnelson/following{/other_user}","gists_url":"https://api.github.com/users/danielnelson/gists{/gist_id}","starred_url":"https://api.github.com/users/danielnelson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielnelson/subscriptions","organizations_url":"https://api.github.com/users/danielnelson/orgs","repos_url":"https://api.github.com/users/danielnelson/repos","events_url":"https://api.github.com/users/danielnelson/events{/privacy}","received_events_url":"https://api.github.com/users/danielnelson/received_events","type":"User","site_admin":false},"open_issues":17,"closed_issues":125,"state":"open","created_at":"2018-05-15T23:51:20Z","updated_at":"2018-09-08T01:55:52Z","due_on":"2018-10-01T07:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/influxdata/telegraf/pulls/4339/commits","review_comments_url":"https://api.github.com/repos/influxdata/telegraf/pulls/4339/comments","review_comment_url":"https://api.github.com/repos/influxdata/telegraf/pulls/comments{/number}","comments_url":"https://api.github.com/repos/influxdata/telegraf/issues/4339/comments","statuses_url":"https://api.github.com/repos/influxdata/telegraf/statuses/9c01483e62fc5d54aefacea5b848a802f7aee62c","head":{"label":"ronnocol:splunk-metric-serializer","ref":"splunk-metric-serializer","sha":"9c01483e62fc5d54aefacea5b848a802f7aee62c","user":{"login":"ronnocol","id":5877013,"node_id":"MDQ6VXNlcjU4NzcwMTM=","avatar_url":"https://avatars0.githubusercontent.com/u/5877013?v=4","gravatar_id":"","url":"https://api.github.com/users/ronnocol","html_url":"https://github.com/ronnocol","followers_url":"https://api.github.com/users/ronnocol/followers","following_url":"https://api.github.com/users/ronnocol/following{/other_user}","gists_url":"https://api.github.com/users/ronnocol/gists{/gist_id}","starred_url":"https://api.github.com/users/ronnocol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ronnocol/subscriptions","organizations_url":"https://api.github.com/users/ronnocol/orgs","repos_url":"https://api.github.com/users/ronnocol/repos","events_url":"https://api.github.com/users/ronnocol/events{/privacy}","received_events_url":"https://api.github.com/users/ronnocol/received_events","type":"User","site_admin":false},"repo":{"id":138321316,"node_id":"MDEwOlJlcG9zaXRvcnkxMzgzMjEzMTY=","name":"telegraf","full_name":"ronnocol/telegraf","owner":{"login":"ronnocol","id":5877013,"node_id":"MDQ6VXNlcjU4NzcwMTM=","avatar_url":"https://avatars0.githubusercontent.com/u/5877013?v=4","gravatar_id":"","url":"https://api.github.com/users/ronnocol","html_url":"https://github.com/ronnocol","followers_url":"https://api.github.com/users/ronnocol/followers","following_url":"https://api.github.com/users/ronnocol/following{/other_user}","gists_url":"https://api.github.com/users/ronnocol/gists{/gist_id}","starred_url":"https://api.github.com/users/ronnocol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ronnocol/subscriptions","organizations_url":"https://api.github.com/users/ronnocol/orgs","repos_url":"https://api.github.com/users/ronnocol/repos","events_url":"https://api.github.com/users/ronnocol/events{/privacy}","received_events_url":"https://api.github.com/users/ronnocol/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ronnocol/telegraf","description":"The plugin-driven server agent for collecting & reporting metrics.","fork":true,"url":"https://api.github.com/repos/ronnocol/telegraf","forks_url":"https://api.github.com/repos/ronnocol/telegraf/forks","keys_url":"https://api.github.com/repos/ronnocol/telegraf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ronnocol/telegraf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ronnocol/telegraf/teams","hooks_url":"https://api.github.com/repos/ronnocol/telegraf/hooks","issue_events_url":"https://api.github.com/repos/ronnocol/telegraf/issues/events{/number}","events_url":"https://api.github.com/repos/ronnocol/telegraf/events","assignees_url":"https://api.github.com/repos/ronnocol/telegraf/assignees{/user}","branches_url":"https://api.github.com/repos/ronnocol/telegraf/branches{/branch}","tags_url":"https://api.github.com/repos/ronnocol/telegraf/tags","blobs_url":"https://api.github.com/repos/ronnocol/telegraf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ronnocol/telegraf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ronnocol/telegraf/git/refs{/sha}","trees_url":"https://api.github.com/repos/ronnocol/telegraf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ronnocol/telegraf/statuses/{sha}","languages_url":"https://api.github.com/repos/ronnocol/telegraf/languages","stargazers_url":"https://api.github.com/repos/ronnocol/telegraf/stargazers","contributors_url":"https://api.github.com/repos/ronnocol/telegraf/contributors","subscribers_url":"https://api.github.com/repos/ronnocol/telegraf/subscribers","subscription_url":"https://api.github.com/repos/ronnocol/telegraf/subscription","commits_url":"https://api.github.com/repos/ronnocol/telegraf/commits{/sha}","git_commits_url":"https://api.github.com/repos/ronnocol/telegraf/git/commits{/sha}","comments_url":"https://api.github.com/repos/ronnocol/telegraf/comments{/number}","issue_comment_url":"https://api.github.com/repos/ronnocol/telegraf/issues/comments{/number}","contents_url":"https://api.github.com/repos/ronnocol/telegraf/contents/{+path}","compare_url":"https://api.github.com/repos/ronnocol/telegraf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ronnocol/telegraf/merges","archive_url":"https://api.github.com/repos/ronnocol/telegraf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ronnocol/telegraf/downloads","issues_url":"https://api.github.com/repos/ronnocol/telegraf/issues{/number}","pulls_url":"https://api.github.com/repos/ronnocol/telegraf/pulls{/number}","milestones_url":"https://api.github.com/repos/ronnocol/telegraf/milestones{/number}","notifications_url":"https://api.github.com/repos/ronnocol/telegraf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ronnocol/telegraf/labels{/name}","releases_url":"https://api.github.com/repos/ronnocol/telegraf/releases{/id}","deployments_url":"https://api.github.com/repos/ronnocol/telegraf/deployments","created_at":"2018-06-22T15:52:30Z","updated_at":"2018-06-22T15:52:34Z","pushed_at":"2018-09-06T05:54:53Z","git_url":"git://github.com/ronnocol/telegraf.git","ssh_url":"git@github.com:ronnocol/telegraf.git","clone_url":"https://github.com/ronnocol/telegraf.git","svn_url":"https://github.com/ronnocol/telegraf","homepage":"","size":18544,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"influxdata:master","ref":"master","sha":"23523ffd10bac33b0e40bad98bee4213049109ff","user":{"login":"influxdata","id":5713248,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU3MTMyNDg=","avatar_url":"https://avatars2.githubusercontent.com/u/5713248?v=4","gravatar_id":"","url":"https://api.github.com/users/influxdata","html_url":"https://github.com/influxdata","followers_url":"https://api.github.com/users/influxdata/followers","following_url":"https://api.github.com/users/influxdata/following{/other_user}","gists_url":"https://api.github.com/users/influxdata/gists{/gist_id}","starred_url":"https://api.github.com/users/influxdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/influxdata/subscriptions","organizations_url":"https://api.github.com/users/influxdata/orgs","repos_url":"https://api.github.com/users/influxdata/repos","events_url":"https://api.github.com/users/influxdata/events{/privacy}","received_events_url":"https://api.github.com/users/influxdata/received_events","type":"Organization","site_admin":false},"repo":{"id":33258973,"node_id":"MDEwOlJlcG9zaXRvcnkzMzI1ODk3Mw==","name":"telegraf","full_name":"influxdata/telegraf","owner":{"login":"influxdata","id":5713248,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU3MTMyNDg=","avatar_url":"https://avatars2.githubusercontent.com/u/5713248?v=4","gravatar_id":"","url":"https://api.github.com/users/influxdata","html_url":"https://github.com/influxdata","followers_url":"https://api.github.com/users/influxdata/followers","following_url":"https://api.github.com/users/influxdata/following{/other_user}","gists_url":"https://api.github.com/users/influxdata/gists{/gist_id}","starred_url":"https://api.github.com/users/influxdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/influxdata/subscriptions","organizations_url":"https://api.github.com/users/influxdata/orgs","repos_url":"https://api.github.com/users/influxdata/repos","events_url":"https://api.github.com/users/influxdata/events{/privacy}","received_events_url":"https://api.github.com/users/influxdata/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/influxdata/telegraf","description":"The plugin-driven server agent for collecting & reporting metrics.","fork":false,"url":"https://api.github.com/repos/influxdata/telegraf","forks_url":"https://api.github.com/repos/influxdata/telegraf/forks","keys_url":"https://api.github.com/repos/influxdata/telegraf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/influxdata/telegraf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/influxdata/telegraf/teams","hooks_url":"https://api.github.com/repos/influxdata/telegraf/hooks","issue_events_url":"https://api.github.com/repos/influxdata/telegraf/issues/events{/number}","events_url":"https://api.github.com/repos/influxdata/telegraf/events","assignees_url":"https://api.github.com/repos/influxdata/telegraf/assignees{/user}","branches_url":"https://api.github.com/repos/influxdata/telegraf/branches{/branch}","tags_url":"https://api.github.com/repos/influxdata/telegraf/tags","blobs_url":"https://api.github.com/repos/influxdata/telegraf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/influxdata/telegraf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/influxdata/telegraf/git/refs{/sha}","trees_url":"https://api.github.com/repos/influxdata/telegraf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/influxdata/telegraf/statuses/{sha}","languages_url":"https://api.github.com/repos/influxdata/telegraf/languages","stargazers_url":"https://api.github.com/repos/influxdata/telegraf/stargazers","contributors_url":"https://api.github.com/repos/influxdata/telegraf/contributors","subscribers_url":"https://api.github.com/repos/influxdata/telegraf/subscribers","subscription_url":"https://api.github.com/repos/influxdata/telegraf/subscription","commits_url":"https://api.github.com/repos/influxdata/telegraf/commits{/sha}","git_commits_url":"https://api.github.com/repos/influxdata/telegraf/git/commits{/sha}","comments_url":"https://api.github.com/repos/influxdata/telegraf/comments{/number}","issue_comment_url":"https://api.github.com/repos/influxdata/telegraf/issues/comments{/number}","contents_url":"https://api.github.com/repos/influxdata/telegraf/contents/{+path}","compare_url":"https://api.github.com/repos/influxdata/telegraf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/influxdata/telegraf/merges","archive_url":"https://api.github.com/repos/influxdata/telegraf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/influxdata/telegraf/downloads","issues_url":"https://api.github.com/repos/influxdata/telegraf/issues{/number}","pulls_url":"https://api.github.com/repos/influxdata/telegraf/pulls{/number}","milestones_url":"https://api.github.com/repos/influxdata/telegraf/milestones{/number}","notifications_url":"https://api.github.com/repos/influxdata/telegraf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/influxdata/telegraf/labels{/name}","releases_url":"https://api.github.com/repos/influxdata/telegraf/releases{/id}","deployments_url":"https://api.github.com/repos/influxdata/telegraf/deployments","created_at":"2015-04-01T16:28:44Z","updated_at":"2018-09-08T04:22:06Z","pushed_at":"2018-09-08T01:29:28Z","git_url":"git://github.com/influxdata/telegraf.git","ssh_url":"git@github.com:influxdata/telegraf.git","clone_url":"https://github.com/influxdata/telegraf.git","svn_url":"https://github.com/influxdata/telegraf","homepage":"","size":19315,"stargazers_count":5456,"watchers_count":5456,"language":"Go","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2067,"mirror_url":null,"archived":false,"open_issues_count":634,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":2067,"open_issues":634,"watchers":5456,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/influxdata/telegraf/pulls/4339"},"html":{"href":"https://github.com/influxdata/telegraf/pull/4339"},"issue":{"href":"https://api.github.com/repos/influxdata/telegraf/issues/4339"},"comments":{"href":"https://api.github.com/repos/influxdata/telegraf/issues/4339/comments"},"review_comments":{"href":"https://api.github.com/repos/influxdata/telegraf/pulls/4339/comments"},"review_comment":{"href":"https://api.github.com/repos/influxdata/telegraf/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/influxdata/telegraf/pulls/4339/commits"},"statuses":{"href":"https://api.github.com/repos/influxdata/telegraf/statuses/9c01483e62fc5d54aefacea5b848a802f7aee62c"}},"author_association":"NONE"}}
{"actor":{"display_login":"ronnocol"}}