Skip to content

Commit

Permalink
artif: collect coredump files
Browse files Browse the repository at this point in the history
Add new artifacts to collect coredump files.
The coredump files themselves may not directly help in analyzing incidents, but they are useful for building a timeline of the command execution history.
  • Loading branch information
mnrkbys committed Sep 2, 2024
1 parent 92ce06c commit 308397c
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 0 deletions.
29 changes: 29 additions & 0 deletions artifacts/files/system/coredump.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
version: 1.0
artifacts:
-
description: Collect core dump files.
supported_os: [aix, esxi, freebsd, linux, netbsd, openbsd, solaris]
collector: file
path: /
name_pattern: ["core", "core.*", "*.core"]
file_type: [f]
-
description: Collect ABRT files.
supported_os: [linux]
collector: file
path: /var/spool/abrt
-
description: Collect ABRT files.
supported_os: [linux]
collector: file
path: /var/spool/abrt-upload
-
description: Collect ABRT files.
supported_os: [linux]
collector: file
path: /var/tmp/abrt
-
description: Collect Apport or kdump files.
supported_os: [linux]
collector: file
path: /var/crash
31 changes: 31 additions & 0 deletions artifacts/live_response/system/coredump.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
version: 1.0
output_directory: /live_response/system
artifacts:
-
description: Display the coredump file name pattern.
supported_os: [linux]
collector: command
command: cat /proc/sys/kernel/core_pattern
output_file: core_pattern.txt
-
description: List all coredump files.
supported_os: [linux]
collector: command
condition: command_exists "coredumpctl"
command: coredumpctl list
output_file: coredumpctl_list.txt
-
description: Display info of all coredump files.
supported_os: [linux]
collector: command
condition: command_exists "coredumpctl"
foreach: coredumpctl list --no-legend | awk '{print $5}'
command: coredumpctl info %line%
output_file: coredumpctl_info_%line%.txt
-
description: Get extended attributes of all coredump files.
supported_os: [linux]
collector: command
condition: command_exists "getfattr"
command: getfattr -R -d --absolute-names /var/lib/systemd/coredump
output_file: getfattr_coredump.txt
10 changes: 10 additions & 0 deletions artifacts/live_response/system/ulimit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 1.0
output_directory: /live_response/system
artifacts:
-
description: Display all resource limits.
supported_os: [aix, esxi, freebsd, linux, netbsd, openbsd, solaris]
collector: command
condition: command_exists "ulimit"
command: ulimit -a
output_file: ulimit.txt

0 comments on commit 308397c

Please sign in to comment.