Skip to content

Commit 1682d15

Browse files
committed
Updated alerts:
- `MonitoringConsole - one or more servers require configuration automated` - added missing \, issue #25 (thanks to barrettnet) - `SearchHeadLevel - Detect MongoDB errors` - included warning level entries Updated dashboards: - `indexer_max_data_queue_sizes_by_name` - improved replication panel - `indexer_max_data_queue_sizes_by_name_v8` - improved replication panel Updated reports: - `SearchHeadLevel - indexes per savedsearch` - updated regex for union/set/multisearch - `SearchHeadLevel - Search Queries summary exact match` - updated regex for union/set/multisearch - `SearchHeadLevel - Search Queries summary non-exact match` - updated regex for union/set/multisearch - `SearchHeadLevel - Search Queries summary loadjob and savedsearch usage in audit logs` - updated rexgex, rewrote search to find map, join, appendcols and other commands
1 parent db8de8c commit 1682d15

File tree

5 files changed

+48
-19
lines changed

5 files changed

+48
-19
lines changed

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,21 @@ 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.2
363+
Updated alerts:
364+
- `MonitoringConsole - one or more servers require configuration automated` - added missing \, issue #25 (thanks to barrettnet)
365+
- `SearchHeadLevel - Detect MongoDB errors` - included warning level entries
366+
367+
Updated dashboards:
368+
- `indexer_max_data_queue_sizes_by_name` - improved replication panel
369+
- `indexer_max_data_queue_sizes_by_name_v8` - improved replication panel
370+
371+
Updated reports:
372+
- `SearchHeadLevel - indexes per savedsearch` - updated regex for union/set/multisearch
373+
- `SearchHeadLevel - Search Queries summary exact match` - updated regex for union/set/multisearch
374+
- `SearchHeadLevel - Search Queries summary non-exact match` - updated regex for union/set/multisearch
375+
- `SearchHeadLevel - Search Queries summary loadjob and savedsearch usage in audit logs` - updated rexgex, rewrote search to find map, join, appendcols and other commands
376+
362377
### 4.0.1
363378
New dashboard:
364379
-`heavy_forwarder_analysis` - as found in the conf24 presentation PLA1509B

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.1
17+
version = 4.0.2
1818

1919
[package]
2020
id = SplunkAdmins

default/data/ui/views/indexer_max_data_queue_sizes_by_name.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,8 @@
132132
| join guid
133133
[| rest /services/search/distributed/peers
134134
| table guid peerName]
135-
| transaction bid guid endswith="has room now" keeporphans=true
136-
| timechart span=1m count, max(duration) AS duration by peerName</query>
135+
| transaction bid guid endswith="has room now" keeporphans=true keepevicted=true
136+
| timechart span=$span$ count, max(duration) AS duration by peerName</query>
137137
<earliest>-60m@m</earliest>
138138
<latest>now</latest>
139139
<sampleRatio>1</sampleRatio>

default/data/ui/views/indexer_max_data_queue_sizes_by_name_v8.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,8 @@
132132
| join guid
133133
[| rest /services/search/distributed/peers
134134
| table guid peerName]
135-
| transaction bid guid endswith="has room now" keeporphans=true
136-
| timechart span=1m count, max(duration) AS duration by peerName</query>
135+
| transaction bid guid endswith="has room now" keeporphans=true keepevicted=true
136+
| timechart span=$span$ count, max(duration) AS duration by peerName</query>
137137
<earliest>-60m@m</earliest>
138138
<latest>now</latest>
139139
<sampleRatio>1</sampleRatio>

default/savedsearches.conf

Lines changed: 28 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2814,8 +2814,8 @@ request.ui_dispatch_app = SplunkAdmins
28142814
request.ui_dispatch_view = search
28152815
search = ```The main goal of this alert errors which might not appear in splunkd.log but are critical to keeping the kvstore running on the search heads. Please check the mongod.log file for further information, the additional count field is simply determining that mongo is still logging...\
28162816
Attempt to find errors in the mongod log and make sure the errors do not relate to shutdown events in the search head cluster. Since this does will ignore any events when either cluster shutsdown it might not be sensitive enough for some use cases...```\
2817-
index=_internal `searchheadhosts` `splunkadmins_mongo_source` (" E " OR " F " OR " W ") ```https://jira.mongodb.org/browse/SERVER-42078 advises this is harmless``` NOT "update of non-mod failed" `splunkadmins_mongodb_errors`\
2818-
| regex _raw="^\s+?\S+\s+[EF]" \
2817+
index=_internal `searchheadhosts` `splunkadmins_mongo_source` (" E " OR " F " OR " W ") ```https://jira.mongodb.org/browse/SERVER-42078 advises this is harmless``` NOT "update of non-mod failed" NOT "is deprecated" NOT "No TransportLayer configured during NetworkInterface startup" NOT "interrupted at shutdown" `splunkadmins_mongodb_errors`\
2818+
| regex _raw="^\s+?\S+\s+[EFW]" \
28192819
| search ```Exclude time periods where shutdowns were occurring``` NOT [`splunkadmins_shutdown_time(searchheadhosts,60,60)`]\
28202820
| eventstats max(_time) AS mostRecent, min(_time) AS firstSeen by host\
28212821
| bin _time span=10m \
@@ -4693,7 +4693,7 @@ search = | multisearch \
46934693
| rex field=search mode=sed "s/```.*?```/ /g" \
46944694
| rex field=search max_match=50 "(?s)\|?\s*(append|appendcols|appendpipe|map|union)\s+\[(?P<subsearch>.*?)\]\s*(\||$)" \
46954695
| rex field=search max_match=50 "(?s)\|?\s*(join)\s+.*?\[(?P<subsearch>.*?)\]\s*(\||$)" \
4696-
| rex field=search max_match=50 "(?s)\|?\s*(union|set|multisearch)\s+(?P<part1>\[.*?\](\s*\[.*?\])+\s*(`[^`]+`\s*)*(\||$|',\s+))" \
4696+
| rex field=search max_match=50 "(?s)\|?\s*(union|set|multisearch)[^\[]+(?P<part1>\[.*?\](\s*\[.*?\])+\s*(`[^`]+`\s*)*(\||$|',\s+))" \
46974697
| rex field=part1 max_match=50 "(?s).*?\[(?P<subsearch>.*?)\]\s*(\||$|)" \
46984698
| rex field=search max_match=50 "(?s)\|?\s*(map)\s+(maxsearches\s*=\s*\d+)?\s*search\s*=\s*\"(?P<subsearch>.*?)\"\s*(\||$)" \
46994699
| rex field=search "^(?P<prepipe>\s*\|?([^\|]+))" \
@@ -4804,7 +4804,7 @@ search = | multisearch \
48044804
| rex field=search mode=sed "s/```.*?```/ /g" \
48054805
| rex field=search max_match=50 "(?s)\|?\s*(append|appendcols|appendpipe|map|union)\s+\[(?P<subsearch>.*?)\]\s*(\||$)" \
48064806
| rex field=search max_match=50 "(?s)\|?\s*(join)\s+.*?\[(?P<subsearch>.*?)\]\s*(\||$)" \
4807-
| rex field=search max_match=50 "(?s)\|?\s*(union|set|multisearch)\s+(?P<part1>\[.*?\](\s*\[.*?\])+\s*(`[^`]+`\s*)*(\||$|',\s+))" \
4807+
| rex field=search max_match=50 "(?s)\|?\s*(union|set|multisearch)[^\[]+(?P<part1>\[.*?\](\s*\[.*?\])+\s*(`[^`]+`\s*)*(\||$|',\s+))" \
48084808
| rex field=part1 max_match=50 "(?s).*?\[(?P<subsearch>.*?)\]\s*(\||$|)" \
48094809
| rex field=search max_match=50 "(?s)\|?\s*(map)\s+(maxsearches\s*=\s*\d+)?\s*search\s*=\s*\"(?P<subsearch>.*?)\"\s*(\||$)" \
48104810
| rex field=search "^(?P<prepipe>\s*\|?([^\|]+))" \
@@ -8408,7 +8408,7 @@ search = | rest splunk_server=local "/services/search/distributed/peers?output_m
84088408
] \
84098409
| eval data="trigger_actions=1" \
84108410
``` 2023-12-12 , I've submitted docs feedback that this endpoint is undocumented but used by the MC, it appears to trigger the actions related to the savedsearch to populate a lookup ``` \
8411-
``` remove the comments once you have Webtools Add-on, https://splunkbase.splunk.com/app/4146 installed to use the curl command
8411+
``` remove the comments once you have Webtools Add-on, https://splunkbase.splunk.com/app/4146 installed to use the curl command \
84128412
| curl splunkauth=true method=post uri="https://localhost:8089/servicesNS/nobody/splunk_monitoring_console/saved/searches/DMC+Asset+-+Build+Full/dispatch" datafield=data \
84138413
```
84148414
disabled = 1
@@ -8465,7 +8465,7 @@ request.ui_dispatch_view = search
84658465
search = | rest /servicesNS/-/-/saved/searches f=next_scheduled_time f=search f=qualifiedSearch count=0 search="disabled=0" search="is_scheduled=1" f=eai:acl* `splunkadmins_restmacro` timeout=900 \
84668466
| rex field=qualifiedSearch mode=sed "s/```.*?```/ /g" \
84678467
| regex qualifiedSearch="^\s*(\|?)\s*(search|tstats|mstats|mcatalog|multisearch|union|set|summarize|datamodel|from\s*:?\s*datamodel|datamodelsimple)\s+" \
8468-
| rex field=search max_match=50 "(?s)\|?\s*(union|set|multisearch)\s+(?P<part1>\[.*?\](\s*\[.*?\])+\s*(`[^`]+`\s*)*(\||$|',\s+))" \
8468+
| rex field=search max_match=50 "(?s)\|?\s*(union|set|multisearch)[^\[]+(?P<part1>\[.*?\](\s*\[.*?\])+\s*(`[^`]+`\s*)*(\||$|',\s+))" \
84698469
| rex field=part1 max_match=50 "(?s).*?\[(?P<subsearch>.*?)\]\s*(\||$|)" \
84708470
| rex field=search max_match=50 "(?s)\|?\s*(map)\s+(maxsearches\s*=\s*\d+)?\s*search\s*=\s*\"(?P<subsearch>.*?)\"\s*(\||$)" \
84718471
| rex field=search "(?s)^(?P<prepipe>\s*\|?([^\|]+))" \
@@ -8652,7 +8652,7 @@ search = | rest "/servicesNS/-/-/storage/collections/config" count=0 timeout=900
86528652
action.email.useNSSubject = 1
86538653
alert.track = 0
86548654
cron_schedule = 38 5 * * *
8655-
description = Report only? Yes. This search attempts to search the audit logs to find any use of | loadjob of | savedsearch within the audit logs. macro substitution is not used but could be included (although I'm unsure how often someone calls a | savedsearch or | loadjob via a macro)
8655+
description = Report only? Yes. This search attempts to search the audit logs to find any use of | loadjob of | savedsearch within the audit logs, additionally map, join, append, appendpipe, appendcols, set, union can make calls to savedsearches that are not easily findable in the audit.log file. macro substitution is not used but could be included (although I'm unsure how often someone calls a | savedsearch, | loadjob or | map via a macro)
86568656
dispatch.earliest_time = -24h-5m@
86578657
dispatch.latest_time = -5m@m
86588658
display.events.fields = ["index","sourcetype","host"]
@@ -8667,15 +8667,29 @@ search = index=_audit "info=completed" search_id!="'SummaryDirector_*" search_id
86678667
| rex field=search mode=sed "s/```.*?```/ /g" \
86688668
| eval search=if(substr(search,len(search),len(search)-1)=="'",substr(search,0,len(search)-1),search) \
86698669
| eval search_id=replace(search_id,"'","") \
8670-
| regex search="\|\s*loadjob\s*savedsearch=|\|\s*savedsearch" \
8671-
| rex field=search "\|\s*savedsearch\s+(\"(?P<identified_savedsearch_name>[^\"']+)\"|(?P<identified_savedsearch_name2>[^ ']+))" \
8670+
| regex search="\|\s*loadjob\s*savedsearch=|\|\s*savedsearch|\|\s*map\s*(maxsearches\s*=\s*\S+\s*)?|\|\s*join\s+|\|\s*append(pipe|cols)?\s+|\|\s*set\s+|\|\s*union\s+" \
8671+
| rex field=search "\|\s*savedsearch\s+(\"(?P<identified_savedsearch_name>[^\"']+)\"|(?P<identified_savedsearch_name2>[^ '\)]+))" \
86728672
| rex field=search "\|\s*loadjob savedsearch=\"[^:]+:[^:]+:(?P<identified_savedsearch_name3>[^\"]+)" \
8673-
| eval identified_savedsearch_name=coalesce(identified_savedsearch_name,identified_savedsearch_name2,identified_savedsearch_name3) \
8674-
| where isnotnull(identified_savedsearch_name)\
8675-
| search NOT identified_savedsearch_name IN ("instrumentation.topology*", "instrumentation.usage*", "instrumentation.upgrade*", "instrumentation.deployment*", "instrumentation.performance*", "instrumentation.app*", "instrumentation.licensing*", "instrumentation.authentication*")\
8676-
| eval method=if(isnull(identified_savedsearch_name3),"savedsearch","loadjob")\
8673+
| rex field=search "\|\s*map\s*(maxsearches\s*=\s*\S+\s*)?(?P<identified_savedsearch_name4>(\"[^\"]+)|\S+)" \
8674+
| rex field=search "\|\s*join\s+[^\|]*?savedsearch:(?P<identified_savedsearch_name5>(\"[^\"]+)|\S+)" \
8675+
| rex field=search "\|\s*(append|appendpipe|appendcols)\s+\[.*?(?P<identified_savedsearch_name6>savedsearch\s+(\"[^\"]+|\S+))" \
8676+
| rex field=search max_match=50 "(?s)\|?\s*(union|set)[^\[]+(?P<part1>\[.*?\](\s*\[.*?\])+\s*(`[^`]+`\s*)*(\||$|',\s+))" \
8677+
| rex field=part1 max_match=50 "(?s).*?\[(?P<subsearch>.*?)\]\s*(\||$|)" \
8678+
| rex field=subsearch "(?s)^\s*\|?(?P<prepipe_subsearch>([^\|]+))" \
8679+
| nomv prepipe_subsearch \
8680+
| rex field=prepipe_subsearch max_match=50 "savedsearch\s+(?P<identified_savedsearch_name7>(\"[^\"]+|\S+))" \
8681+
| rex mode=sed field=identified_savedsearch_name4 "s/([\",']|savedsearch:)//g" \
8682+
| rex mode=sed field=identified_savedsearch_name5 "s/[\",']//g" \
8683+
| rex mode=sed field=identified_savedsearch_name6 "s/(\"|savedsearch )//g" \
8684+
| rex mode=sed field=identified_savedsearch_name7 "s/[\",']//g" \
8685+
| eval identified_savedsearch_name4=if(match(identified_savedsearch_name4,"(search=|\)|\[|\[\|)"),null(),identified_savedsearch_name4) \
8686+
| eval identified_savedsearch_name=coalesce(identified_savedsearch_name,identified_savedsearch_name2,identified_savedsearch_name3,identified_savedsearch_name4,identified_savedsearch_name5,identified_savedsearch_name6,identified_savedsearch_name7) \
8687+
```| table identified_savedsearch_name*, search, subsearch, prepipe_subsearch ``` \
8688+
| where isnotnull(identified_savedsearch_name4) \
8689+
| search NOT identified_savedsearch_name IN ("instrumentation.topology*", "instrumentation.usage*", "instrumentation.upgrade*", "instrumentation.deployment*", "instrumentation.performance*", "instrumentation.app*", "instrumentation.licensing*", "instrumentation.authentication*") \
8690+
| eval method=if(isnull(identified_savedsearch_name3),"savedsearch","loadjob") \
86778691
| eval search_head=host \
8678-
| eval env=`search_head_cluster`\
8692+
| eval env=`search_head_cluster` \
86798693
| stats values(savedsearch_name) AS calling_savedsearch_name by _time, user, provenance, mode, app, identified_savedsearch_name, env, method
86808694

86818695
[SearchHeadLevel - configtracker index example2]

0 commit comments

Comments
 (0)