{"id":38460,"date":"2021-06-24T20:47:29","date_gmt":"2021-06-24T20:47:29","guid":{"rendered":"https:\/\/merikebi.warrenmyers.com\/?p=38460"},"modified":"2021-06-24T20:47:29","modified_gmt":"2021-06-24T20:47:29","slug":"answer-by-warren-for-how-can-i-send-the-content-of-the-file-to-http-event-collector-in-splunk","status":"publish","type":"post","link":"https:\/\/merikebi.warrenmyers.com\/?p=38460","title":{"rendered":"Answer by warren for How can I send the content of the file to HTTP Event Collector in Splunk?"},"content":{"rendered":"<p>(Note &#8211; I haven&#8217;t tried this specifically, but it should get you close)<\/p>\n<hr \/>\n<p>According to <a href=\"https:\/\/docs.splunk.com\/Documentation\/Splunk\/latest\/Data\/HECExamples#Example_3:_Send_raw_text_to_HEC\" rel=\"nofollow noreferrer\">Docs.Splunk on HTTP Event Collector Examples #3<\/a>, it would seem you can do something very similar to this:<\/p>\n<pre><code>curl -k &quot;https:\/\/mysplunkserver.example.com:8088\/services\/collector\/raw?channel=00872DC6-AC83-4EDE-8AFE-8413C3825C4C&amp;sourcetype=splunkd_access&amp;index=main&quot; \\\n    -H &quot;Authorization: Splunk CF179AE4-3C99-45F5-A7CC-3284AA91CF67&quot; \\\n    -d &lt; $FILE\n<\/code><\/pre>\n<p>Presuming the content of the file is formatted correctly, it <em>should<\/em> go straight in.<\/p>\n<p>How is the file being created? Is it in a Deployment App on a managed endpoint? If so, it will <em>likely<\/em> be simpler to setup a <a href=\"https:\/\/docs.splunk.com\/Documentation\/SplunkCloud\/latest\/AdvancedDev\/ScriptSetup\" rel=\"nofollow noreferrer\">scripted input<\/a> for the UF to run on whatever schedule you choose.<\/p>\n<p>from User warren &#8211; Stack Overflow https:\/\/stackoverflow.com\/questions\/68120826\/how-can-i-send-the-content-of-the-file-to-http-event-collector-in-splunk\/68122561#68122561<br \/>\nvia <a href=\"https:\/\/ifttt.com\/?ref=da&#038;site=wordpress\">IFTTT<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>(Note &#8211; I haven&#8217;t tried this specifically, but it should get you close) According to Docs.Splunk on HTTP Event Collector Examples #3, it would seem you can do something very similar to this: curl -k &quot;https:\/\/mysplunkserver.example.com:8088\/services\/collector\/raw?channel=00872DC6-AC83-4EDE-8AFE-8413C3825C4C&amp;sourcetype=splunkd_access&amp;index=main&quot; \\ -H &quot;Authorization: Splunk CF179AE4-3C99-45F5-A7CC-3284AA91CF67&quot; \\ -d &lt; $FILE Presuming the content of the file is formatted correctly, it &hellip;<br \/><a href=\"https:\/\/merikebi.warrenmyers.com\/?p=38460\" class=\"more-link pen_button pen_element_default pen_icon_arrow_double\">Continue reading <span class=\"screen-reader-text\">Answer by warren for How can I send the content of the file to HTTP Event Collector in Splunk?<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[4],"tags":[991],"keyring_services":[],"class_list":["post-38460","post","type-post","status-publish","format-standard","hentry","category-blih","tag-stackexchange"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=\/wp\/v2\/posts\/38460","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=38460"}],"version-history":[{"count":1,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=\/wp\/v2\/posts\/38460\/revisions"}],"predecessor-version":[{"id":38461,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=\/wp\/v2\/posts\/38460\/revisions\/38461"}],"wp:attachment":[{"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=38460"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=38460"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=38460"},{"taxonomy":"keyring_services","embeddable":true,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=%2Fwp%2Fv2%2Fkeyring_services&post=38460"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}