Skip to content

Commit

Permalink
Add monitor and processor configurations
Browse files Browse the repository at this point in the history
For sos collect output.

Signed-off-by: Nicolas Bock <[email protected]>
  • Loading branch information
nicolasbock committed Sep 27, 2023
1 parent cd74c87 commit f2dd5e9
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
3 changes: 3 additions & 0 deletions athena-monitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@ monitor:
- type: filename
regex: ".*sosreport.*.tar.[xz|gz]+$"
processor: sosreports
- type: filename
regex: ".*sos-collector.*tar.[xz|gz]+$"
processor: soscollector
23 changes: 23 additions & 0 deletions athena-processor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,26 @@ processor:
fi
rm -rf hotsos-out
exit 0
soscollector:
reports:
collector:
scripts:
hotsos:
run: |
#!/bin/bash
pip3 install hotsos --upgrade &> /dev/null
collection_path=$(tar --exclude '*/**' -tf {{filepath}})
tar -xf {{filepath}} -C {{basedir}} &> /dev/null
for report in ${collection_path}/sosreport*; do
report_path=$(tar --exclude '*/**' -tf ${report})
tar -xf ${report} -C ${collection_path} &> /dev/null
hotsos --save --output-path hotsos-out --all-logs ${collection_path}/${report_path} &> /dev/null
if [[ -s hotsos-out/${report_path}/summary/full/yaml/hotsos-summary.all.yaml ]]; then
echo "-------------------------------------"
echo "Analysis for ${report_path%/}"
echo "-------------------------------------"
cat hotsos-out/${report_path}/summary/full/yaml/hotsos-summary.all.yaml
else
echo "No known bugs or issues found on sosreport for ${report_path%/}"
fi
done

0 comments on commit f2dd5e9

Please sign in to comment.