Skip to content

Commit 34dd550

Browse files
authored
GatherLogs 1.1
Adds a call to `falconctl stats` if CrowdStrike Falcon is installed.
1 parent efe7969 commit 34dd550

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

GatherLogs.sh

+10-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22

33
## Gather Logs
4-
## Version 1.0, June 3, 2023
4+
## Version 1.1, June 16, 2023
55
## By Kevin M. Cox
66

77
## This script gathers macOS and application logs then creates a tarball so users can attach the results to IT tickets for evaluation.
@@ -36,10 +36,17 @@ currentUser="$(/usr/sbin/scutil <<< "show State:/Users/ConsoleUser" | /usr/bin/a
3636
/bin/mkdir "$outputFolder"/User-Library-Logs/
3737
/bin/cp -pr /Users/"$currentUser"/Library/Logs/ "$outputFolder"/User-Library-Logs/
3838

39+
# CrowdStrike Falcon stats
40+
falconctl="/Applications/Falcon.app/Contents/Resources/falconctl"
41+
if [ -x $falconctl ]; then
42+
/bin/mkdir "$outputFolder"/CrowdStrike-Falcon/
43+
$falconctl stats > "$outputFolder"/CrowdStrike-Falcon/stats.log
44+
fi
45+
3946
# AWS VPN logs
4047
if [ -d /Users/"$currentUser"/.config/AWSVPNClient/logs/ ]; then
41-
/bin/mkdir "$outputFolder"/AWS-VPN-logs/
42-
/bin/cp -pr /Users/"$currentUser"/.config/AWSVPNClient/logs/ "$outputFolder"/AWS-VPN-logs/
48+
/bin/mkdir "$outputFolder"/AWS-VPN/
49+
/bin/cp -pr /Users/"$currentUser"/.config/AWSVPNClient/logs/ "$outputFolder"/AWS-VPN/
4350
fi
4451

4552
# Create a compressed tar archive of the files

0 commit comments

Comments
 (0)