summaryrefslogtreecommitdiffstats
path: root/src/daemon/abrt_event.conf
blob: 73bfd63ad6fded30700bf523f1b25e2e8467db1c (plain)
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# This configuration file specifies which programs should be run
# when the specified event occurs in dump directory lifetime.
#
# It consists of directives and rules.
#
# Directives start with a reserved word. Currently, there is only one
# directive, "include". Its format is "include FILE".
# It causes files which match FILE to be read and
# parsed as if they are inserted textually where this directive
# occurs. FILE can use shell pattern metacharacters (*,?,etc) to
# specify multiple files. Relative paths are interpreted relative
# to current file.
#
# Rule starts with a line with non-space leading character.
# All subsequent lines which start with space or tab form one rule.
# Note that separating newline is *retained*. Example:
# EVENT=post-create   date >/tmp/dt  # semicolon is not needed here!
#                     echo $HOSTNAME `uname -r`
#
# Rules may be commented out with #. One # is sufficient to comment out
# even a multi-line rule (no need to comment out every line).
#
# Rules specify which programs to run on the dump directory.
# Each rule may have conditions to be checked before the program is run.
#
# Conditions have form VAR=VAL, where VAR is either word "EVENT"
# or a name of dump directory element to be checked (for example,
# "executable", "package", hostname" etc).
#
# If all conditions match, the remaining part of the rule
# (the "program" part) is run in the shell.
# All shell language constructs are valid.
# All stdout and stderr output is captured and passed to abrt
# and possibly to abrt's frontends and shown to the user.
#
# If the program terminates with nonzero exit code,
# the event processing is considered unsuccessful and is stopped.
# Last captured output line, if any, is considered to be
# the error message indicating the reason of the failure,
# and may be used by abrt as such.
#
# If the program terminates successfully, next rule is read
# and processed. This process is repeated until the end of this file.

# abrt-action-analyze-c needs package name, save package data
# before include directive
EVENT=post-create                       abrt-action-save-package-data

include events.d/*.conf

# Example: if you want all users (not just root) to be able to see some problems:
#EVENT=post-create                      rm uid; chmod a+rX .

# uid file is missing for problems visible to all users
# (oops scanner is often set up to not create it).
# In this case, do not record username too:
EVENT=post-create                       if [ -f uid ]; then getent passwd "`cat uid`" | cut -d: -f1 >username; fi
EVENT=post-create analyzer=Python       abrt-action-analyze-python

# Example: if you want to save sosreport immediately at the moment of a crash:
# (alternatively, you can add similar command to EVENT=analyze_foo's,
# if you would rather perform this collection later):
#EVENT=post-create
        nice sosreport --tmp-dir "$DUMP_DIR" --batch \
                --only=anaconda --only=bootloader --only=devicemapper \
                --only=filesys --only=hardware --only=kernel --only=libraries \
                --only=memory --only=networking --only=nfsserver --only=pam \
                --only=process --only=rpm -k rpm.rpmva=off --only=ssh \
                --only=startup --only=yum --only=general --only=x11 \
        && {
                rm sosreport*.md5
                mv sosreport*.tar.bz2 sosreport.tar.bz2
                mv sosreport*.tar.xz sosreport.tar.xz
                true
        } 2>/dev/null


EVENT=report_Bugzilla analyzer=Python           abrt-action-bugzilla -c /etc/abrt/plugins/Bugzilla.conf
EVENT=report_Logger                             abrt-action-print -o "${Log_File:-/tmp/abrt.log}" -a "${Append:-no}" -r