<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: alter index=_internal query to ignore a specific index in Alerting</title>
    <link>https://community.splunk.com/t5/Alerting/alter-index-internal-query-to-ignore-a-specific-index/m-p/25503#M204</link>
    <description>&lt;P&gt;thank you but that still does not allow me to ignore certain indexes or hosts. but i do think i have found a solution.&lt;/P&gt;</description>
    <pubDate>Mon, 06 May 2013 15:24:48 GMT</pubDate>
    <dc:creator>rnolette</dc:creator>
    <dc:date>2013-05-06T15:24:48Z</dc:date>
    <item>
      <title>alter index=_internal query to ignore a specific index</title>
      <link>https://community.splunk.com/t5/Alerting/alter-index-internal-query-to-ignore-a-specific-index/m-p/25497#M198</link>
      <description>&lt;P&gt;Below is teh query I am using to alert me of excessive hourly usage by a host. Is there a way to modify the first portion of the query "index=_internal source=*license_usage.log" to ignore a specific index? &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal source=*license_usage.log | eval lastReceived = _time | rename s as source st as mysourcetype h as host b as bytes o as originator | eval my_splunk_server = splunk_server | fields lastReceived source mysourcetype host bytes pool originator my_splunk_server | stats sum(bytes) as bytes max(lastReceived) as lastReceived by host | eval mbytes=((bytes/1024)/1024) | fields host mbytes lastReceived | stats max(lastReceived) as lastReceived sum(mbytes) as mbytes by host | stats max(lastReceived) as lastReceived first(mbytes) as MBytes by host | search MBytes &amp;gt; 25| sort by MBytes Desc
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I have tried:&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;(index=_internal source=*license_usage.log) NOT index=other&lt;/LI&gt;
&lt;LI&gt;(index=_internal NOT index=other) source=*license_usage.log&lt;/LI&gt;
&lt;LI&gt;(index=* NOT index=other) source=*license_usage.log&lt;/LI&gt;
&lt;LI&gt;(index=* source=*license_usage.log) NOT index=other&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;All of the above modifications have failed. None of them give any results. I am currently assuming this is because the index=_internal statement is covering all indexes and I am unable to create exceptions for that statement. Can anyone speak to this? thoughts? comments? questions? concerns? Any ideas are greatly appreciated.&lt;/P&gt;

&lt;P&gt;thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 13:50:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/alter-index-internal-query-to-ignore-a-specific-index/m-p/25497#M198</guid>
      <dc:creator>rnolette</dc:creator>
      <dc:date>2020-09-28T13:50:18Z</dc:date>
    </item>
    <item>
      <title>Re: alter index=_internal query to ignore a specific index</title>
      <link>https://community.splunk.com/t5/Alerting/alter-index-internal-query-to-ignore-a-specific-index/m-p/25498#M199</link>
      <description>&lt;P&gt;If your search only looks in index _internal it will not look into any other index, any other index already is excluded.&lt;/P&gt;</description>
      <pubDate>Mon, 06 May 2013 14:51:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/alter-index-internal-query-to-ignore-a-specific-index/m-p/25498#M199</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2013-05-06T14:51:48Z</dc:date>
    </item>
    <item>
      <title>Re: alter index=_internal query to ignore a specific index</title>
      <link>https://community.splunk.com/t5/Alerting/alter-index-internal-query-to-ignore-a-specific-index/m-p/25499#M200</link>
      <description>&lt;P&gt;does index=_internal envelope all internal indexes like main, dhcp, win_dns, etc?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 13:50:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/alter-index-internal-query-to-ignore-a-specific-index/m-p/25499#M200</guid>
      <dc:creator>rnolette</dc:creator>
      <dc:date>2020-09-28T13:50:21Z</dc:date>
    </item>
    <item>
      <title>Re: alter index=_internal query to ignore a specific index</title>
      <link>https://community.splunk.com/t5/Alerting/alter-index-internal-query-to-ignore-a-specific-index/m-p/25500#M201</link>
      <description>&lt;P&gt;Internal indexes in general start with an underscore. There are several of these, e.g. &lt;CODE&gt;_audit&lt;/CODE&gt;, &lt;CODE&gt;_blocksignature&lt;/CODE&gt; and &lt;CODE&gt;_internal&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;If you specify an index as part of the search, only that index will be searched.&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;main&lt;/CODE&gt; is not an internal index, and there is no such thing as 'index enveloping'.&lt;/P&gt;

&lt;P&gt;/k&lt;/P&gt;</description>
      <pubDate>Mon, 06 May 2013 15:01:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/alter-index-internal-query-to-ignore-a-specific-index/m-p/25500#M201</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2013-05-06T15:01:55Z</dc:date>
    </item>
    <item>
      <title>Re: alter index=_internal query to ignore a specific index</title>
      <link>https://community.splunk.com/t5/Alerting/alter-index-internal-query-to-ignore-a-specific-index/m-p/25501#M202</link>
      <description>&lt;P&gt;to be honest I am confused then to what _internal uses. Is my whole query wrong then based off of that first statement? i was think that "(index=_internal source=*license_usage.log) NOT [search index=dogs]" might do what i needed but after you last comment i am not sure anymore. Can you elaborate a bit on what indexes contain what data? I am going to start googling to find more information. Thanks k!&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 13:50:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/alter-index-internal-query-to-ignore-a-specific-index/m-p/25501#M202</guid>
      <dc:creator>rnolette</dc:creator>
      <dc:date>2020-09-28T13:50:23Z</dc:date>
    </item>
    <item>
      <title>Re: alter index=_internal query to ignore a specific index</title>
      <link>https://community.splunk.com/t5/Alerting/alter-index-internal-query-to-ignore-a-specific-index/m-p/25502#M203</link>
      <description>&lt;P&gt;I believe there are simpler ways of achieving what you're trying to do.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal source=*license_usage.log  
| bucket _time span=1h
| eval when=strftime(_time, "%F %H:00") 
| stats sum(b) as mbytes by h, when 
| eval mbytes = round(mbytes/1024/1024,2) 
| where mbytes&amp;gt;25 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 06 May 2013 15:23:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/alter-index-internal-query-to-ignore-a-specific-index/m-p/25502#M203</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2013-05-06T15:23:06Z</dc:date>
    </item>
    <item>
      <title>Re: alter index=_internal query to ignore a specific index</title>
      <link>https://community.splunk.com/t5/Alerting/alter-index-internal-query-to-ignore-a-specific-index/m-p/25503#M204</link>
      <description>&lt;P&gt;thank you but that still does not allow me to ignore certain indexes or hosts. but i do think i have found a solution.&lt;/P&gt;</description>
      <pubDate>Mon, 06 May 2013 15:24:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/alter-index-internal-query-to-ignore-a-specific-index/m-p/25503#M204</guid>
      <dc:creator>rnolette</dc:creator>
      <dc:date>2013-05-06T15:24:48Z</dc:date>
    </item>
    <item>
      <title>Re: alter index=_internal query to ignore a specific index</title>
      <link>https://community.splunk.com/t5/Alerting/alter-index-internal-query-to-ignore-a-specific-index/m-p/25504#M205</link>
      <description>&lt;P&gt;I believe i have found my answer. After looking at the output for &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal  source=*license_usage.log 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;i saw that there is a variable called "h" that contains the hostname. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;5/6/13
    11:22:24.171 AM 
    05-06-2013 11:22:24.171 -0400 INFO  LicenseUsage - type=Usage s="udp:514" st=syslog h="otherhost" o="" i="&amp;lt;removed&amp;gt;" pool="auto_generated_pool_enterprise" b=21067 poolsz=5368709120
    host=&amp;lt;removed&amp;gt;   Options|  sourcetype=splunkd   Options|  source=&amp;lt;removed&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I then edited my original query to ignore the hostnames i wanted to ignore  &lt;CODE&gt;(index=_internal source=*license_usage.log) NOT(h="ignoreME")&lt;/CODE&gt; and below is the full results. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(index=_internal source=*license_usage.log) NOT(h="ignoreME") | eval lastReceived = _time | rename s as source st as mysourcetype h as host b as bytes o as originator | eval my_splunk_server = splunk_server | fields lastReceived source mysourcetype host bytes pool originator my_splunk_server | stats sum(bytes) as bytes max(lastReceived) as lastReceived by host | eval mbytes=((bytes/1024)/1024) | fields host mbytes lastReceived | stats max(lastReceived) as lastReceived sum(mbytes) as mbytes by host | stats max(lastReceived) as lastReceived first(mbytes) as MBytes by host | search MBytes &amp;gt; 25| sort by MBytes Desc
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 06 May 2013 15:28:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/alter-index-internal-query-to-ignore-a-specific-index/m-p/25504#M205</guid>
      <dc:creator>rnolette</dc:creator>
      <dc:date>2013-05-06T15:28:15Z</dc:date>
    </item>
    <item>
      <title>Re: alter index=_internal query to ignore a specific index</title>
      <link>https://community.splunk.com/t5/Alerting/alter-index-internal-query-to-ignore-a-specific-index/m-p/25505#M206</link>
      <description>&lt;P&gt;What goes in the internal index &lt;CODE&gt;_internal&lt;/CODE&gt;?&lt;/P&gt;

&lt;P&gt;general splunkd messages (splunkd.log)&lt;BR /&gt;
searches that have been performed (searches.log)&lt;BR /&gt;
metrics data from forwarders (metrics.log)&lt;BR /&gt;
...&lt;/P&gt;

&lt;P&gt;try this;&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;index=_internal | dedup 3 source sourcetype&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;This will give you a small sample of the types of events/sources that will end up in &lt;CODE&gt;_internal&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 06 May 2013 15:28:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/alter-index-internal-query-to-ignore-a-specific-index/m-p/25505#M206</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2013-05-06T15:28:43Z</dc:date>
    </item>
    <item>
      <title>Re: alter index=_internal query to ignore a specific index</title>
      <link>https://community.splunk.com/t5/Alerting/alter-index-internal-query-to-ignore-a-specific-index/m-p/25506#M207</link>
      <description>&lt;P&gt;thanks! I will try that now and see if i can improve my query.&lt;/P&gt;</description>
      <pubDate>Mon, 06 May 2013 15:36:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/alter-index-internal-query-to-ignore-a-specific-index/m-p/25506#M207</guid>
      <dc:creator>rnolette</dc:creator>
      <dc:date>2013-05-06T15:36:53Z</dc:date>
    </item>
    <item>
      <title>Re: alter index=_internal query to ignore a specific index</title>
      <link>https://community.splunk.com/t5/Alerting/alter-index-internal-query-to-ignore-a-specific-index/m-p/25507#M208</link>
      <description>&lt;P&gt;as per a suggestion from /k i have modified my overall query to:&lt;/P&gt;

&lt;P&gt;index=_internal source=&lt;EM&gt;license_usage.log NOT h="hosts&lt;/EM&gt;"  | bucket _time span=1h | eval when=strftime(_time, "%F %H:00") | stats sum(b) as mbytes by h, when | eval mbytes = round(mbytes/1024/1024,2) | where mbytes&amp;gt;15 | sort by mbytes desc&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 13:50:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/alter-index-internal-query-to-ignore-a-specific-index/m-p/25507#M208</guid>
      <dc:creator>rnolette</dc:creator>
      <dc:date>2020-09-28T13:50:27Z</dc:date>
    </item>
    <item>
      <title>Re: alter index=_internal query to ignore a specific index</title>
      <link>https://community.splunk.com/t5/Alerting/alter-index-internal-query-to-ignore-a-specific-index/m-p/25508#M209</link>
      <description>&lt;P&gt;thank you for the suggestion. This is much cleaner and simpler than my current query. I have modified mine and posted the new query in the answer. Thank you very much for showing me a better way.&lt;/P&gt;</description>
      <pubDate>Mon, 06 May 2013 16:01:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/alter-index-internal-query-to-ignore-a-specific-index/m-p/25508#M209</guid>
      <dc:creator>rnolette</dc:creator>
      <dc:date>2013-05-06T16:01:59Z</dc:date>
    </item>
    <item>
      <title>Re: alter index=_internal query to ignore a specific index</title>
      <link>https://community.splunk.com/t5/Alerting/alter-index-internal-query-to-ignore-a-specific-index/m-p/25509#M210</link>
      <description>&lt;P&gt;It sounds like you've got where you want to be now though it's worth also checking out this link for some useful ways of troubleshooting license usage - &lt;A href="http://wiki.splunk.com/Community:TroubleshootingIndexedDataVolume"&gt;some more searches&lt;/A&gt;.&lt;/P&gt;

&lt;P&gt;In addition to this, Splunk Deployment Monitor app and Splunk on Splunk apps provide some useful dashboards for tracking usage and splitting it by host, sourcetype etc. These apps are free and available on Splunkbase.&lt;/P&gt;

&lt;P&gt;Another place to look is in the search app under the Status &amp;gt; Index Activity menu option. There are some useful dashboards there also, notably Index Volume.&lt;/P&gt;</description>
      <pubDate>Tue, 07 May 2013 06:54:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/alter-index-internal-query-to-ignore-a-specific-index/m-p/25509#M210</guid>
      <dc:creator>dkuk</dc:creator>
      <dc:date>2013-05-07T06:54:03Z</dc:date>
    </item>
    <item>
      <title>Re: alter index=_internal query to ignore a specific index</title>
      <link>https://community.splunk.com/t5/Alerting/alter-index-internal-query-to-ignore-a-specific-index/m-p/25510#M211</link>
      <description>&lt;P&gt;thank you for the information dkuk. I have been using those apps for information gathering in the past but they are not able to generate alerts which is what i really needed, so i had to create this manual queries.&lt;/P&gt;</description>
      <pubDate>Tue, 07 May 2013 12:37:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/alter-index-internal-query-to-ignore-a-specific-index/m-p/25510#M211</guid>
      <dc:creator>rnolette</dc:creator>
      <dc:date>2013-05-07T12:37:26Z</dc:date>
    </item>
  </channel>
</rss>

