Skip to content

Commit

Permalink
artif: get findmnt and lsblk results in JSON format
Browse files Browse the repository at this point in the history
JSON format is easier to parse in scripts than plain text output.
  • Loading branch information
mnrkbys committed Dec 9, 2024
1 parent 3e4d246 commit af3f88b
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 4 deletions.
9 changes: 7 additions & 2 deletions artifacts/live_response/storage/findmnt.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: 2.0
version: 2.1
condition: command_exists "findmnt"
output_directory: /live_response/storage
artifacts:
Expand All @@ -8,4 +8,9 @@ artifacts:
collector: command
command: findmnt --ascii
output_file: findmnt.txt

-
description: Displays all mounted file systems in the tree-like format as JSON.
supported_os: [linux]
collector: command
command: findmnt -J
output_file: findmnt_-J.txt
21 changes: 19 additions & 2 deletions artifacts/live_response/storage/lsblk.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: 3.0
version: 3.1
condition: command_exists "lsblk"
output_directory: /live_response/storage
artifacts:
Expand All @@ -8,16 +8,33 @@ artifacts:
collector: command
command: lsblk
output_file: lsblk.txt
-
description: List block devices as JSON.
supported_os: [linux]
collector: command
command: lsblk -J
output_file: lsblk_-J.txt
-
description: List block devices.
supported_os: [linux]
collector: command
command: lsblk -l
output_file: lsblk_-l.txt
-
description: List block devices as JSON.
supported_os: [linux]
collector: command
command: lsblk -l -J
output_file: lsblk_-l_-J.txt
-
description: List block devices including information about filesystems.
supported_os: [linux]
collector: command
command: lsblk -f
output_file: lsblk_-f.txt

-
description: List block devices including information about filesystems as JSON.
supported_os: [linux]
collector: command
command: lsblk -f -J
output_file: lsblk_-f_-J.txt

0 comments on commit af3f88b

Please sign in to comment.