{"id":33674,"date":"2021-04-01T18:42:19","date_gmt":"2021-04-01T18:42:19","guid":{"rendered":"https:\/\/merikebi.warrenmyers.com\/?p=33674"},"modified":"2021-04-01T18:42:19","modified_gmt":"2021-04-01T18:42:19","slug":"answer-by-warren-for-api-monitoring-using-splunk","status":"publish","type":"post","link":"https:\/\/merikebi.warrenmyers.com\/?p=33674","title":{"rendered":"Answer by warren for API monitoring using splunk"},"content":{"rendered":"<p>Based on your expanded question, you&#8217;re going to need to actually <em>get<\/em> that REST endpoint&#8217;s data into Splunk<\/p>\n<p>There are at least two ways to do this<\/p>\n<p>First &#8211; use the <a href=\"https:\/\/splunkbase.splunk.com\/app\/1546\" rel=\"nofollow noreferrer\">REST API Modular Input<\/a> and ingest data from the endpoint. If you don&#8217;t get data within some timeframe&#8230;send an Email.<\/p>\n<p>Second &#8211; create your own <a href=\"https:\/\/docs.splunk.com\/Splexicon:Scriptedinput\" rel=\"nofollow noreferrer\">scripted input<\/a> that periodically hits your endpoint (maybe with <a href=\"\/questions\/tagged\/wget\" class=\"post-tag\" title=\"show questions tagged &#39;wget&#39;\" rel=\"tag\">wget<\/a> or <a href=\"\/questions\/tagged\/curl\" class=\"post-tag\" title=\"show questions tagged &#39;curl&#39;\" rel=\"tag\">curl<\/a>), and reports an HTTP status code into Splunk. Your Alert can then check to see if the code isn&#8217;t 200 (or whatever else you want to consider &quot;valid&quot;). If it&#8217;s &quot;invalid&quot;, send an email.<\/p>\n<p>from User warren &#8211; Stack Overflow https:\/\/stackoverflow.com\/questions\/66868644\/api-monitoring-using-splunk\/66909926#66909926<br \/>\nvia <a href=\"https:\/\/ifttt.com\/?ref=da&#038;site=wordpress\">IFTTT<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Based on your expanded question, you&#8217;re going to need to actually get that REST endpoint&#8217;s data into Splunk There are at least two ways to do this First &#8211; use the REST API Modular Input and ingest data from the endpoint. If you don&#8217;t get data within some timeframe&#8230;send an Email. Second &#8211; create your &hellip;<br \/><a href=\"https:\/\/merikebi.warrenmyers.com\/?p=33674\" class=\"more-link pen_button pen_element_default pen_icon_arrow_double\">Continue reading <span class=\"screen-reader-text\">Answer by warren for API monitoring using 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-33674","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\/33674","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=33674"}],"version-history":[{"count":1,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=\/wp\/v2\/posts\/33674\/revisions"}],"predecessor-version":[{"id":33675,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=\/wp\/v2\/posts\/33674\/revisions\/33675"}],"wp:attachment":[{"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=33674"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=33674"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=33674"},{"taxonomy":"keyring_services","embeddable":true,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=%2Fwp%2Fv2%2Fkeyring_services&post=33674"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}