Skip to content

Commit 525bce7

Browse files
committed
New reports:
- `SearchHeadLevel - Datamodel access summary` Updated alerts: - `AllSplunkEnterpriseLevel - File integrity check failure` - removed wildcard, feedback from Gregg Woodcock - `AllSplunkEnterpriseLevel - Splunkd Log Messages Admins Only` - removed extra "AND", feedback from Gregg Woodcock Updated reports: - `SearchHeadLevel - Accelerated DataModels Access Info - updated description` - `SearchHeadLevel - Datamodel REST endpoint indexes in use` - correct indexin multivalued extraction - `SearchHeadLevel - indexes per savedsearch` - correct indexin multivalued extraction - `SearchHeadLevel - Indexes for savedsearch without subsearches` - correct indexin multivalued extraction - `SearchHeadLevel - Lookups within savedsearches` - included the action.lookup.filename - `SearchHeadLevel - Search Queries summary exact match` - correct indexin multivalued extraction - `SearchHeadLevel - Search Queries summary non-exact match` - correct indexin multivalued extraction - `SearchHeadLevel - SmartStore cache misses - dashboards` - correct indexin multivalued extraction - `SearchHeadLevel - SmartStore cache misses - savedsearches` - correct indexin multivalued extraction - `SearchHeadLevel - SmartStore cache misses - combined` - correct indexin multivalued extraction
1 parent 1682d15 commit 525bce7

File tree

4 files changed

+64
-16
lines changed

4 files changed

+64
-16
lines changed

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,26 @@ These are appear to be from premium apps but it does imply that there is a mecha
359359
Feel free to open an issue on github or use the contact author on the SplunkBase link and I will try to get back to you when possible, thanks!
360360

361361
## Release Notes
362+
### 4.0.3
363+
New reports:
364+
- `SearchHeadLevel - Datamodel access summary`
365+
366+
Updated alerts:
367+
- `AllSplunkEnterpriseLevel - File integrity check failure` - removed wildcard, feedback from Gregg Woodcock
368+
- `AllSplunkEnterpriseLevel - Splunkd Log Messages Admins Only` - removed extra "AND", feedback from Gregg Woodcock
369+
370+
Updated reports:
371+
- `SearchHeadLevel - Accelerated DataModels Access Info - updated description`
372+
- `SearchHeadLevel - Datamodel REST endpoint indexes in use` - correct indexin multivalued extraction
373+
- `SearchHeadLevel - indexes per savedsearch` - correct indexin multivalued extraction
374+
- `SearchHeadLevel - Indexes for savedsearch without subsearches` - correct indexin multivalued extraction
375+
- `SearchHeadLevel - Lookups within savedsearches` - included the action.lookup.filename
376+
- `SearchHeadLevel - Search Queries summary exact match` - correct indexin multivalued extraction
377+
- `SearchHeadLevel - Search Queries summary non-exact match` - correct indexin multivalued extraction
378+
- `SearchHeadLevel - SmartStore cache misses - dashboards` - correct indexin multivalued extraction
379+
- `SearchHeadLevel - SmartStore cache misses - savedsearches` - correct indexin multivalued extraction
380+
- `SearchHeadLevel - SmartStore cache misses - combined` - correct indexin multivalued extraction
381+
362382
### 4.0.2
363383
Updated alerts:
364384
- `MonitoringConsole - one or more servers require configuration automated` - added missing \, issue #25 (thanks to barrettnet)

default/app.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ supported_themes = light,dark
1414
[launcher]
1515
author = Gareth Anderson
1616
description = Alerts and dashboards as described in the Splunk 2017 conf presentation How did you get so big?
17-
version = 4.0.2
17+
version = 4.0.3
1818

1919
[package]
2020
id = SplunkAdmins

default/data/ui/nav/default.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
<a href="/app/SplunkAdmins/alert?s=%2FservicesNS%2Fnobody%2FSplunkAdmins%2Fsaved%2Fsearches%2FAllSplunkEnterpriseLevel%20-%20TCP%20or%20SSL%20Config%20Issue">TCP or SSL Config Issue</a>
3232
<a href="/app/SplunkAdmins/alert?s=%2FservicesNS%2Fnobody%2FSplunkAdmins%2Fsaved%2Fsearches%2FAllSplunkEnterpriseLevel%20-%20WARN%20iniFile%20Configuration%20Issues">WARN iniFile Configuration Issues</a>
3333
<a href="/app/SplunkAdmins/alert?s=%2FservicesNS%2Fnobody%2FSplunkAdmins%2Fsaved%2Fsearches%2FAllSplunkEnterpriseLevel%20-%20error%20in%20stdout">error in stdout.log</a>
34+
<a href="/app/SplunkAdmins/alert?s=%2FservicesNS%2Fnobody%2FSplunkAdmins%2Fsaved%2Fsearches%2FAllSplunkEnterpriseLevel%20-%20Splunkd%20Log%20Messages%20Admins%20Only">Splunkd Log Messages Admins Only</a>
3435
</collection>
3536
<collection label="Splunk Level Failures">
3637
<collection label="Deployment Server Related">
@@ -295,6 +296,7 @@
295296
<saved name="SearchHeadLevel - audit.log - lookup usage" />
296297
<saved name="SearchHeadLevel - Detect lookups that have not being accessed for a period of time" />
297298
<saved name="SearchHeadLevel - Lookup Editor lookup updates" />
299+
<saved name="SearchHeadLevel - Datamodel access summary" />
298300
<saved name="SearchHeadLevel - indexes per savedsearch" />
299301
<saved name="SearchHeadLevel - macros in use" />
300302
<saved name="SearchHeadLevel - Search Queries Per Day Audit Logs" />
@@ -329,6 +331,7 @@
329331
<saved name="SearchHeadLevel - Data Model Acceleration Completion Status" />
330332
<saved name="SearchHeadLevel - DataModel Fields" />
331333
<saved name="SearchHeadLevel - Accelerated DataModels Access Info" />
334+
<saved name="SearchHeadLevel - Datamodel access summary" />
332335
<saved name="SearchHeadLevel - Datamodel REST endpoint indexes in use" />
333336
<saved name="IndexerLevel - DataModel Acceleration - Indexes in use" />
334337
<a href="/app/SplunkAdmins/alert?s=%2FservicesNS%2Fnobody%2FSplunkAdmins%2Fsaved%2Fsearches%2FSearchHeadLevel%20-%20datamodel%20errors%20in%20splunkd">datamodel errors in splunkd</a>

default/savedsearches.conf

Lines changed: 40 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2443,7 +2443,7 @@ relation = greater than
24432443
request.ui_dispatch_app = SplunkAdmins
24442444
request.ui_dispatch_view = search
24452445
search = ```One or more files did not pass the startup hash-check against the Splunk provided manifest, you can tune the limits.conf to control how the warning is logged or not logged```\
2446-
index=_internal `splunkenterprisehosts` "An installed * did not pass hash-checking due to" (`splunkadmins_splunkd_source`) sourcetype=splunkd `splunkadmins_fileintegritycheck`\
2446+
index=_internal `splunkenterprisehosts` "An installed" "did not pass hash-checking due to" (`splunkadmins_splunkd_source`) sourcetype=splunkd `splunkadmins_fileintegritycheck`\
24472447
| eval message=coalesce(message,event_message)\
24482448
| stats count, latest(_time) AS lastSeen by message, host\
24492449
| eval lastSeen=strftime(lastSeen, "%+")
@@ -4714,8 +4714,7 @@ search = | multisearch \
47144714
```Extract out index= or index IN (a,b,c) but avoid NOT index in (...) and NOT index=... and also NOT (...anything) statements``` \
47154715
| rex field=search "(?s)(NOT\s+index(\s*=\s*|::)[^ ]+)|(NOT\s+\([^\)]+\))|(index(\s*=\s*|::)\"?(?P<indexregex>[\*A-Za-z0-9-_]+))" max_match=50 \
47164716
| rex field=search "(?s)(NOT\s+index\s+[iI][nN]\s*\([^\)]+)|(index\s+[iI][nN]\s*\((?P<indexin>([^\)\"]+)|\"[^\)\"]+\"))" max_match=50 \
4717-
| makemv delim="," indexin \
4718-
| makemv delim=" " indexin \
4717+
| makemv tokenizer="([^, ]+)" indexin \
47194718
| eval indexes=mvappend(indexregex,indexin) \
47204719
| eval indexes=if(isnotnull(esstylewildcard),mvfilter(NOT match(indexes,"^_?\*$")),indexes) \
47214720
| eval wildcard=mvfilter(match(indexes,"\*")) \
@@ -4818,8 +4817,7 @@ search = | multisearch \
48184817
```Extract out index= or index IN (a,b,c) but avoid NOT index in (...) and NOT index=... and also NOT (...anything) statements``` \
48194818
| rex field=search "(?s)(NOT\s+index(\s*=\s*|::)[^ ]+)|(NOT\s+\([^\)]+\))|(index(\s*=\s*|::)\"?(?P<indexregex>[\*A-Za-z0-9-_]+))" max_match=50 \
48204819
| rex field=search "(?s)(NOT\s+index\s+[iI][nN]\s*\([^\)]+)|(index\s+[iI][nN]\s*\((?P<indexin>([^\)\"]+)|\"[^\)\"]+\"))" max_match=50 \
4821-
| makemv delim="," indexin \
4822-
| makemv delim=" " indexin \
4820+
| makemv tokenizer="([^, ]+)" indexin \
48234821
| eval indexes=mvappend(indexregex,indexin) \
48244822
| eval indexes=if(isnotnull(esstylewildcard),mvfilter(NOT match(indexes,"^_?\*$")),indexes) \
48254823
| eval wildcard=mvfilter(match(indexes,"\*")) \
@@ -6507,7 +6505,7 @@ OR component=Saml OR component=FileClassifierManager OR component=HttpPubSubConn
65076505
```these may require more investigation. Ignoring for now Aug 2022``` NOT ("ERROR CacheManager" "No such file or directory") NOT ("ERROR BucketReplicator" "The bucket may have frozen") NOT ("BucketReplicator" "Failed to check the hotness of bucketId") \
65086506
OR (sourcetype=scheduler source=*scheduler.log AlertNotifier WARN) \
65096507
OR (sourcetype=splunkd (`splunkadmins_splunkd_source`) INFO (IndexWriter paused ```May relate to maxConcurrentOptimizes in indexes.conf or perhaps maxRunningProcessGroups or spikes in data-per indexer```) OR (component=HotDBManager "unflushed buckets") OR (TERM(event=reclaimMemory) IndexProcessor OR StreamingBucketBuilder ```May relate to memPoolMB / maxMemMB setting in indexes.conf or the IndexWriter getting paused. However data balance (too much MB/s of ingestion on a single indexer/uneven balance appears to cause this too)```)) \
6510-
| search ```ignore shutdown times to remove errors that relate to shutdowns, note this may remove some legitimate alerts as well``` AND NOT [ `splunkadmins_shutdown_time_by_period(splunkenterprisehosts,60,60,10)` ] \
6508+
| search ```ignore shutdown times to remove errors that relate to shutdowns, note this may remove some legitimate alerts as well``` NOT [ `splunkadmins_shutdown_time_by_period(splunkenterprisehosts,60,60,10)` ] \
65116509
| eval search_head=host \
65126510
| eval search_head_cluster=`search_head_cluster` \
65136511
| search ```Exclude time periods where shutdowns were occurring. While this makes the alert less nosiy it removes some legitimate errors too``` NOT \
@@ -7023,7 +7021,7 @@ invocations_command_search_index_bucketcache_miss>0 OR invocations_command_searc
70237021
| eval total_hours_searched=round(total_hours_searched,1) \
70247022
| rex field=search "(?s)(NOT\s+index(\s*=\s*|::)[^ ]+)|(NOT\s+\([^\)]+\))|(index(\s*=\s*|::)\"?(?P<indexregex>[\*A-Za-z0-9-_]+))" max_match=50 \
70257023
| rex field=search "(?s)(NOT\s+index\s+[iI][nN]\s*\([^\)]+)|(index\s+[iI][nN]\s*\((?P<indexin>([^\)\"]+)|\"[^\)\"]+\"))" max_match=50 \
7026-
| makemv delim="," indexin \
7024+
| makemv tokenizer="([^, ]+)" indexin \
70277025
| eval indexes=mvappend(indexregex,indexin) \
70287026
| eval indexes=mvmap(indexes, replace(lower(indexes), "\"", "")) \
70297027
| eval indexes=mvmap(indexes, trim(replace(indexes, "'", ""))) \
@@ -7078,7 +7076,7 @@ invocations_command_search_index_bucketcache_miss>0 OR invocations_command_searc
70787076
| stats latest(mostRecent) AS mostRecent, count as number_of_runs values(host) as host values(total_hours_searched) AS total_hours_searched values(total_days_searched) AS total_days_searched max(run_time) AS max_run_time avg(run_time) AS avg_run_time sum(run_time) AS sum_run_time sum(total_cache_miss) as total_cache_miss max(result_count) AS result_count max(event_count) AS event_count max(searched_buckets) AS searched_buckets values(info) AS info values(numofsearchesinquery) AS numofsearchesinquery, values(app) AS app by users search \
70797077
| rex field=search "(?s)(NOT\s+index(\s*=\s*|::[^ ]+)|(NOT\s+\([^\)]+\))|(index(\s*=\s*|::)\"?(?P<indexregex>[\*A-Za-z0-9-_]+))" max_match=50 \
70807078
| rex field=search "(?s)(NOT\s+index\s+[iI][nN]\s*\([^\)]+)|(index\s+[iI][nN]\s*\((?P<indexin>([^\)\"]+)|\"[^\)\"]+\"))" max_match=50 \
7081-
| makemv delim="," indexin \
7079+
| makemv tokenizer="([^, ]+)" indexin \
70827080
| eval indexes=mvappend(indexregex,indexin) \
70837081
| eval indexes=mvmap(indexes, replace(lower(indexes), "\"", "")) \
70847082
| eval indexes=mvmap(indexes, trim(replace(indexes, "'", ""))) \
@@ -7133,7 +7131,7 @@ invocations_command_search_index_bucketcache_miss>0 OR invocations_command_searc
71337131
| stats latest(mostRecent) AS mostRecent, count as number_of_runs, values(host) as host values(total_hours_searched) AS total_hours_searched values(total_days_searched) AS total_days_searched max(run_time) AS max_run_time avg(run_time) AS avg_run_time sum(run_time) AS sum_run_time sum(total_cache_miss) as total_cache_miss max(result_count) AS result_count max(event_count) AS event_count max(searched_buckets) AS searched_buckets values(info) AS info values(numofsearchesinquery) AS numofsearchesinquery, values(provenance) AS provenance, values(app) AS app by users search \
71347132
| rex field=search "(?s)(NOT\s+index(\s*=\s*|::)[^ ]+)|(NOT\s+\([^\)]+\))|(index(\s*=\s*|::)\"?(?P<indexregex>[\*A-Za-z0-9-_]+))" max_match=50 \
71357133
| rex field=search "(?s)(NOT\s+index\s+[iI][nN]\s*\([^\)]+)|(index\s+[iI][nN]\s*\((?P<indexin>([^\)\"]+)|\"[^\)\"]+\"))" max_match=50 \
7136-
| makemv delim="," indexin \
7134+
| makemv tokenizer="([^, ]+)" indexin \
71377135
| eval indexes=mvappend(indexregex,indexin) \
71387136
| eval indexes=mvmap(indexes, replace(lower(indexes), "\"", "")) \
71397137
| eval indexes=mvmap(indexes, trim(replace(indexes, "'", ""))) \
@@ -7595,7 +7593,7 @@ disabled = 1
75957593
action.email.useNSSubject = 1
75967594
alert.track = 0
75977595
cron_schedule = 38 * * * *
7598-
description = Report only? Yes. As found on Clara-Fication: Finding and Improving Expensive Searches, https://conf.splunk.com/files/2022/slides/PLA1162B.pdf / https://conf.splunk.com/files/2022/recordings/PLA1162B_1080.mp4. Run on the search head with the DMA
7596+
description = Report only? Yes. As found on Clara-Fication: Finding and Improving Expensive Searches, https://conf.splunk.com/files/2022/slides/PLA1162B.pdf / https://conf.splunk.com/files/2022/recordings/PLA1162B_1080.mp4. Run on the search head with the DMA. Also refer to SearchHeadLevel - Datamodel access summary for a more detailed view.
75997597
dispatch.earliest_time = -65m@m
76007598
dispatch.latest_time = -5m@m
76017599
display.events.fields = ["index","sourcetype","host"]
@@ -8112,7 +8110,8 @@ display.general.type = statistics
81128110
enableSched = 0
81138111
request.ui_dispatch_app = SplunkAdmins
81148112
request.ui_dispatch_view = search
8115-
search = | rest `splunkadmins_restmacro` timeout=900 /servicesNS/-/-/saved/searches f=search f=eai:acl* \
8113+
search = | rest `splunkadmins_restmacro` timeout=900 /servicesNS/-/-/saved/searches f=search f=eai:acl* f=action.lookup.filename \
8114+
| eval search=if(isnotnull('action.lookup.filename'),search . "| outputlookup " . 'action.lookup.filename',search) \
81168115
| regex search="((input|output)?lookup)|(\|\s+apply\s+)" \
81178116
| fields title, search eai:acl.app eai:acl.sharing \
81188117
| rename eai:acl.app AS app, eai:acl.sharing AS sharing \
@@ -8228,7 +8227,7 @@ search = | rest `splunkadmins_restmacro` timeout=900 /servicesNS/-/-/data/models
82288227
| rex field=eai:data "(?P<esstylewildcard>\(\s*index=\*\s+OR\s+index=_\*\s*\))" \
82298228
| rex field=eai:data "(?sm)(NOT\s+index\s*(=|::)\s*[^ ]+)|(NOT\s+\([^\)]+\))|(index\s*(=|::)\s*(\\\)?\"?(?P<indexregex>[\*A-Za-z0-9-_]+))" max_match=50 \
82308229
| rex field=eai:data "(?sm)(NOT\s+index\s+[iI][nN]\s*\([^\)]+)|(index\s+[iI][nN]\s*\((?P<indexin>([^\)\"]+)|\"[^\)\"]+\"))" max_match=50 \
8231-
| makemv delim="," indexin \
8230+
| makemv tokenizer="([^, ]+)" indexin \
82328231
| eval indexes=mvappend(indexregex,indexin) \
82338232
| eval indexes=if(isnotnull(esstylewildcard),mvfilter(NOT match(indexes,"^_?\*$")),indexes) \
82348233
| eval indexes=mvmap(indexes, replace(lower(indexes), "\"", "")) \
@@ -8475,8 +8474,7 @@ search = | rest /servicesNS/-/-/saved/searches f=next_scheduled_time f=search f=
84758474
| eval prepipe = prepipe . " " . prepipe_subsearch \
84768475
| rex field=prepipe "(?s)(NOT\s+index(\s*=\s*|::)[^ ]+)|(NOT\s+\([^\)]+\))|(index(\s*=\s*|::)\"?(?P<indexregex>[\*A-Za-z0-9-_]+))" max_match=50 \
84778476
| rex field=prepipe "(?s)(NOT\s+index\s+[iI][nN]\s*\([^\)]+)|(index\s+[iI][nN]\s*\((?P<indexin>([^\)\"]+)|\"[^\)\"]+\"))" max_match=50 \
8478-
| makemv delim="," indexin \
8479-
| makemv delim=" " indexin \
8477+
| makemv tokenizer="([^, ]+)" indexin \
84808478
| eval indexes=mvappend(indexregex,indexin) \
84818479
| eval indexes=mvmap(indexes, replace(lower(indexes), "\"", "")) \
84828480
| eval indexes=mvmap(indexes, trim(replace(indexes, "'", ""))) \
@@ -8575,7 +8573,7 @@ search = index=_audit savedsearch_name="$savedsearch_name$" host IN ($host$) \
85758573
| rex field=search "(?s)^(?P<prepipe>\s*\|?([^\|]+))" \
85768574
| rex field=prepipe "(?s)(NOT\s+index(\s*=\s*|::)[^ ]+)|(NOT\s+\([^\)]+\))|(index(\s*=\s*|::)\"?(?P<indexregex>[\*A-Za-z0-9-_]+))" max_match=50 \
85778575
| rex field=prepipe "(?s)(NOT\s+index\s+[iI][nN]\s*\([^\)]+)|(index\s+[iI][nN]\s*\((?P<indexin>([^\)\"]+)|\"[^\)\"]+\"))" max_match=50 \
8578-
| makemv delim="," indexin \
8576+
| makemv tokenizer="([^, ]+)" indexin \
85798577
| eval indexes=mvappend(indexregex,indexin) \
85808578
| eval indexes=if(isnotnull(esstylewildcard),mvfilter(NOT match(indexes,"^_?\*$")),indexes) \
85818579
| eval wildcard=mvfilter(match(indexes,"\*")) \
@@ -8785,3 +8783,30 @@ request.ui_dispatch_view = search
87858783
search = | rest /servicesNS/-/-/saved/searches count=0 search="disabled=0" search="is_scheduled=1" f=next_scheduled_time `splunkadmins_restmacro` f=title f=eai:* \
87868784
| search next_scheduled_time="" \
87878785
| table author, eai:acl.app, , title, next_scheduled_time
8786+
8787+
[SearchHeadLevel - Datamodel access summary]
8788+
action.email.useNSSubject = 1
8789+
alert.track = 0
8790+
cron_schedule = 38 * * * *
8791+
description = Report only? Yes. This report is based on the query in Splunk community slack provided by Ismo Soutamo. This query returns a summary of datamodels, acceleration status and if accelerated, access count and time. Similar to SearchHeadLevel - Accelerated DataModels Access Info. Run on the search head with DMA enabled.
8792+
dispatch.earliest_time = -65m@m
8793+
dispatch.latest_time = -5m@m
8794+
display.events.fields = ["index","sourcetype","host"]
8795+
display.general.type = statistics
8796+
enableSched = 0
8797+
request.ui_dispatch_app = SplunkAdmins
8798+
request.ui_dispatch_view = search
8799+
search = | rest splunk_server=local timeout=60 /servicesNS/-/-/datamodel/model f=eai:* f=acceleration f=displayName \
8800+
| fields title displayName author eai:acl.app eai:appName eai:acl.perms.read eai:acl.sharing splunk_server acceleration updated \
8801+
| search acceleration = "*true*" \
8802+
| eval DM="tstats:DM_" . 'eai:acl.app' . "_" . title \
8803+
| join DM type=outer \
8804+
[| rest splunk_server=local timeout=60 /servicesNS/-/-/admin/summarization by_tstats=1 f=summary.access_count f=summary.access_time f=summary.size \
8805+
| search summary.access_count > 0 \
8806+
| table title summary.access_count summary.access_time summary.size \
8807+
| rename title as DM] \
8808+
| spath input=acceleration \
8809+
| rename eai:acl.* -> *\
8810+
| rename enabled AS acceleration_enabled\
8811+
| table title author app summary.access_count summary.access_time summary.size perms.read sharing updated acceleration_enabled earliest_time, cron_schedule, max_time, backfill_time, max_concurrent, allow_skew, allow_old_summaries\
8812+
| eval summary.access_time=strftime('summary.access_time', "%+")

0 commit comments

Comments
 (0)