{"id":25359,"date":"2020-11-18T16:46:20","date_gmt":"2020-11-18T16:46:20","guid":{"rendered":"https:\/\/merikebi.warrenmyers.com\/?p=25359"},"modified":"2020-11-18T16:46:20","modified_gmt":"2020-11-18T16:46:20","slug":"a-poor-users-guide-to-accelerating-data-models-in-splunk","status":"publish","type":"post","link":"https:\/\/merikebi.warrenmyers.com\/?p=25359","title":{"rendered":"a poor user\u2019s guide to accelerating data models in splunk"},"content":{"rendered":"<p><a href=\"https:\/\/docs.splunk.com\/Documentation\/Splunk\/latest\/Knowledge\/Aboutdatamodels\">Data Models<\/a> are one of the <a href=\"https:\/\/docs.splunk.com\/Documentation\/Splunk\/latest\/Knowledge\/Designdatamodelobjects\">major<\/a> underpinnings of <a href=\"https:\/\/smile.amazon.com\/s\/?tag=antipaucity-20&#038;creative=392009&#038;campaign=212361&#038;field-keywords=Splunk\">Splunk<\/a>&#8217;s power and flexibility.<\/p>\n<p>They&#8217;re the <em>only<\/em> way to benefit from the powerful <a href=\"https:\/\/docs.splunk.com\/Documentation\/Splunk\/latest\/SearchReference\/pivot\"><code>pivot<\/code><\/a> command, for example.<\/p>\n<p>They underlie <a href=\"https:\/\/smile.amazon.com\/s\/?tag=antipaucity-20&#038;creative=392009&#038;campaign=212361&#038;field-keywords=Splunk Enterprise Security\">Splunk Enterprise Security<\/a> (probably the biggest &#8220;non-core&#8221; use of Splunk amongst all their customers).<\/p>\n<p>Key to achieving peak performance from Splunk Data Models, though, is that they be &#8220;<a href=\"https:\/\/docs.splunk.com\/Documentation\/Splunk\/8.1.0\/Knowledge\/Managedatamodels#Manage_data_model_acceleration\">accelerated<\/a>&#8220;.<\/p>\n<p>Unfortunately (or, fortunately, if you&#8217;re administering the environment, and your users are <em>mostly<\/em> casually-experienced with Splunk), the ability to accelerate a Data Model is controlled by the extensive <a href=\"https:\/\/docs.splunk.com\/Documentation\/Splunk\/latest\/Security\/WhatyoucansecurewithSplunk\">RBACs<\/a> available in Splunk.<\/p>\n<p>So what is a poor user to do if they want their Data Model to be faster (or even &#8220;complete&#8221;) when using it to power pivot tables, visualizations, etc?<\/p>\n<p>This is something I&#8217;ve run into with customers who don&#8217;t want to give me higher-level permissions in their environment.<\/p>\n<p>And it&#8217;s something <em>you&#8217;re<\/em> likely to run into &#8211; if you&#8217;re not a &#8220;privileged user&#8221;.<\/p>\n<p>Let&#8217;s say you have a Data Model that&#8217;s looking at firewall logs (cisco ios syslog). Say you want to look at these logs going back over days or weeks, and display results in a pivot table.<\/p>\n<p>If you&#8217;re in an environment like I was working in recently, where looking at even 100 hours (slightly over 4 days) worth of these events can take 6 or 8 or even 10 minutes to plow through before your pivot can start working (and, therefore, before the dashboard you&#8217;re trying to review is fully-loaded).<\/p>\n<p>Oh! <\/p>\n<h3>One more thing.<\/h3>\n<p>That search that&#8217;s powering your Data Model? Sometimes (for unknown reasons (that I don&#8217;t have the time to fully ferret-out)), it will fail to return &#8220;complete&#8221; results (vs running it in Search).<\/p>\n<h3>So what is a poor user to do?<\/h3>\n<h3>Here&#8217;s what I&#8217;ve done a few times.<\/h3>\n<p>I schedule the search to run every X often (maybe every 4 or 12 hours) via a <a href=\"https:\/\/docs.splunk.com\/Documentation\/Splunk\/latest\/Report\/Schedulereports\">scheduled Report<\/a>.<\/p>\n<p>And I have the search do an <a href=\"https:\/\/docs.splunk.com\/Documentation\/Splunk\/latest\/SearchReference\/outputlookup\"><code>outputlookup<\/code><\/a> to a CSV file.<\/p>\n<p>Then in my Data Model, instead of running the &#8220;raw search&#8221;, I&#8217;ll do the following:<\/p>\n<blockquote class=\"wp-block-quote\">\n<p><code>| inputlookup &lt;name-of-generated-csv><\/code><\/p>\n<\/blockquote>\n<h3>That&#8217;s it.<\/h3>\n<p>That&#8217;s my secret.<\/p>\n<p>When your permissions won&#8217;t let you do &#8220;what you want&#8221; &#8230; pretend you&#8217;re <em>Life<\/em> in <a href=\"https:\/\/jurassicpark.fandom.com\/wiki\/Ian_Malcolm\">Ian Malcom<\/a>&#8216;s mind &#8211; <strong><a href=\"https:\/\/www.imdb.com\/title\/tt0107290\/quotes\/qt0463040\">find a way<\/a><\/strong>!<\/p>\n<p>from antipaucity https:\/\/antipaucity.com\/2020\/11\/18\/a-poor-users-guide-to-accelerating-data-models-in-splunk\/<br \/>\nvia <a href=\"https:\/\/ifttt.com\/?ref=da&#038;site=wordpress\">IFTTT<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Data Models are one of the major underpinnings of Splunk&#8217;s power and flexibility. They&#8217;re the only way to benefit from the powerful pivot command, for example. They underlie Splunk Enterprise Security (probably the biggest &#8220;non-core&#8221; use of Splunk amongst all their customers). Key to achieving peak performance from Splunk Data Models, though, is that they &hellip;<br \/><a href=\"https:\/\/merikebi.warrenmyers.com\/?p=25359\" class=\"more-link pen_button pen_element_default pen_icon_arrow_double\">Continue reading <span class=\"screen-reader-text\">a poor user\u2019s guide to accelerating data models 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_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[4],"tags":[95],"keyring_services":[],"class_list":["post-25359","post","type-post","status-publish","format-standard","hentry","category-blih","tag-antipaucity"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=\/wp\/v2\/posts\/25359","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=25359"}],"version-history":[{"count":1,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=\/wp\/v2\/posts\/25359\/revisions"}],"predecessor-version":[{"id":25360,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=\/wp\/v2\/posts\/25359\/revisions\/25360"}],"wp:attachment":[{"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=25359"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=25359"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=25359"},{"taxonomy":"keyring_services","embeddable":true,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=%2Fwp%2Fv2%2Fkeyring_services&post=25359"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}