Skip to content

Commit ba22c8a

Browse files
committed
rework test logic at end of setup to improve messages and add crash.log detection and print log if detected
1 parent 6dd1b57 commit ba22c8a

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

src/installes.sh

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,9 @@
5757
# 20241015 relax syntax check for installation confirmation
5858
# 20241020 change output order on essinstaller error check to make it easier to spot
5959
# 20241020 more bracketed paste mode disabling
60+
# 20241203 rework test logic at end of setup to improve messages and add crash.log detection and print log if detected
6061

61-
VERSION="20241020b"
62+
VERSION="20241203a"
6263

6364
SCRIPTNAME="installes"
6465

@@ -554,20 +555,20 @@ echo_log "ES installed and setup run. Please check for errors in $SPLUNK_HOME/va
554555
# INFO STAGE COMPLETE: "finalize"
555556
# 2020-06-08 20:12:46,423+0000 INFO pid=29627 tid=MainThread file=essinstaller2.py:wrapper:82 | STAGE COMPLETE: "finalize"
556557
# 2020-06-08 20:12:46,424+0000 INFO pid=29627 tid=MainThread file=essinstall.py:do_install:265 | Initialization complete, please restart Splunk
557-
tail -5 $SPLUNK_HOME/var/log/splunk/essinstaller2.log | grep -q " STAGE COMPLETE: \"finalize\"" && echo_log "OK: STAGE complete finalize FOUND in $SPLUNK_HOME/var/log/splunk/essinstaller2.log. That is a good sign the install/upgrade went fine" || (tail -25 $SPLUNK_HOME/var/log/splunk/essinstaller2.log; fail_log "FAIL FAIL FAIL ********************: missing STAGE COMPLETE in $SPLUNK_HOME/var/log/splunk/essinstaller2.log : investigate please ************\nsee above last 25 lines of $SPLUNK_HOME/var/log/splunk/essinstaller2.log ")
558-
559-
560-
# v4.x(or custom setting) : wait if need for threat list download
558+
if [ `tail -5 $SPLUNK_HOME/var/log/splunk/essinstaller2.log | grep -q " STAGE COMPLETE: \"finalize\""` ]; then
559+
echo_log "OK: STAGE complete finalize FOUND in $SPLUNK_HOME/var/log/splunk/essinstaller2.log. That is a good sign the install/upgrade went fine"
560+
echo_log "Finished"
561+
echo_log "Please login to web interface and verify that no errors are present"
562+
echo_log "This script has just done the initial ES setup, please continue with the rest of the ES installation guide steps as needed"
563+
echo_log "in particular, don't forget to : install/upgrade TA (forSH/, configure indexes for ES in org_all_indexes or org_es_indexes via CM for the version of ES used, tune the SH with appropriate scheduling and tuning for ES, tune indexers , ...."
564+
else
565+
tail -25 $SPLUNK_HOME/var/log/splunk/essinstaller2.log; fail_log "FAIL FAIL FAIL ********************: missing STAGE COMPLETE in $SPLUNK_HOME/var/log/splunk/essinstaller2.log : investigate please ************\nsee above last 25 lines of $SPLUNK_HOME/var/log/splunk/essinstaller2.log ")
566+
echo_log "looking for recent crash log files that could have happened during setup"
567+
find $SPLUNK_HOME/var/log/splunk -name "crash*" -mmin -5 -print
568+
fi
561569

562570
#echo "INFO: Restarting "
563571
#${SPLUNK_HOME}/bin/splunk restart
564572

565573

566-
# for v4.x
567-
#echo "Finished. Please wait for threatlist to download if you need them and the instance is connected"
568-
# v5.x
569-
echo_log "Finished"
570-
echo_log "Please login to web interface and verify that no errors are present"
571-
echo_log "This script has just done the initial ES setup, please continue with the rest of the ES installation guide steps as needed"
572-
echo_log "in particular, don't forget to : install/upgrade TA (forSH/, configure indexes for ES in org_all_indexes, deploy SA-For-indexer-minimal (exclude all the TA stuff) on indexers for the version of ES used, tune the SH with appropriate scheduling and tuning for ES, tune indexers , ...."
573574

0 commit comments

Comments
 (0)