-
Notifications
You must be signed in to change notification settings - Fork 8
/
athena-processor.yaml
62 lines (61 loc) · 2.59 KB
/
athena-processor.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
processor:
batch-comments-every: 1m
base-tmpdir: "/tmp/athena"
keep-processing-output: true
subscribers:
sosreports:
sf-comment-enabled: true
sf-comment-public: false
sf-comment: |
Athena processor: {{ processor }} subscriber: {{ subscriber }} has run the following reports.
{% for report in reports -%}
{% for script in report.Scripts -%}
{% if script.Name == "hotsos-short" %}
{% if script.Output != "" -%}
Summary for report: {{ report.Name }} - filepath: {{ report.FilePath }}
-------------------------------------------------------------------------
{{ script.Output }}
{% endif %}
{% endif %}
{%- endfor -%}
{%- endfor -%}
{%- for report in reports -%}
{%- for script in report.Scripts -%}
{% if script.Name == "hotsos-full" -%}
Full {{ report.Name }} output can be found at: https://files.support.canonical.com/files/{{ script.UploadLocation }}
{% endif %}
{%- endfor -%}
{%- endfor -%}
reports:
hotsos:
scripts:
hotsos-full:
exit-codes: 0 2 127 126
run: |
#!/bin/bash
set -e -u
pipx install hotsos &>/dev/null
pipx upgrade hotsos &>/dev/null
tar -xf {{filepath}} -C {{basedir}} &>/dev/null || true
~/.local/bin/hotsos --save --output-path hotsos-out --all-logs {{basedir}}/$(basename {{filepath}} .tar.xz)/ &>/dev/null || true
if [ -s hotsos-out/*/summary/full/yaml/hotsos-summary.all.yaml ]; then
cat hotsos-out/*/summary/full/yaml/hotsos-summary.all.yaml
else
echo "No full sosreport generated."
fi
exit 0
hotsos-short:
exit-codes: 0 2 127 126
run: |
#!/bin/bash
set -e -u
pipx install hotsos &>/dev/null
pipx upgrade hotsos &>/dev/null
tar -xf {{filepath}} -C {{basedir}} &>/dev/null || true
~/.local/bin/hotsos --short --save --output-path hotsos-out --all-logs {{basedir}}/$(basename {{filepath}} .tar.xz)/ &>/dev/null || true
if [ -s hotsos-out/*/summary/short/yaml/hotsos-summary.all.yaml ]; then
cat hotsos-out/*/summary/short/yaml/hotsos-summary.all.yaml
else
echo "No known bugs or issues found on sosreport."
fi
exit 0