diff options
author | Denys Vlasenko <dvlasenk@redhat.com> | 2011-05-10 17:36:08 +0200 |
---|---|---|
committer | Denys Vlasenko <dvlasenk@redhat.com> | 2011-05-10 17:36:08 +0200 |
commit | 09b5c4b42e9c75c523f4dc3a2036c33dfb5f234b (patch) | |
tree | 80f36abda47b990f8198a211fa3ff19c6e3ee304 /src/plugins | |
parent | 1d8b3a8e8f1307fa661a002111328821f37adf7a (diff) | |
download | abrt-09b5c4b42e9c75c523f4dc3a2036c33dfb5f234b.tar.gz abrt-09b5c4b42e9c75c523f4dc3a2036c33dfb5f234b.tar.xz abrt-09b5c4b42e9c75c523f4dc3a2036c33dfb5f234b.zip |
Add analyzer which collects /var/log/messages. Closes bz#565725
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/Makefile.am | 6 | ||||
-rw-r--r-- | src/plugins/analyze_var_log_messages.xml.in | 10 | ||||
-rw-r--r-- | src/plugins/ccpp_events.conf | 26 |
3 files changed, 31 insertions, 11 deletions
diff --git a/src/plugins/Makefile.am b/src/plugins/Makefile.am index 699f13bd..7221079a 100644 --- a/src/plugins/Makefile.am +++ b/src/plugins/Makefile.am @@ -40,6 +40,7 @@ dist_events_DATA = \ report_Logger.conf \ analyze_LocalGDB.xml \ analyze_RetraceServer.xml \ + analyze_var_log_messages.xml \ report_Mailx.xml \ report_RHTSupport.xml \ report_Kerneloops.xml @@ -90,11 +91,12 @@ EXTRA_DIST = \ $(MAN_TXT) \ $(PYTHON_FILES) \ $(man1_MANS) \ + analyze_var_log_messages.xml.in \ + analyze_LocalGDB.xml.in \ + analyze_RetraceServer.xml.in \ report_Bugzilla.xml.in \ report_Bugzilla.conf \ report_Logger.conf \ - analyze_LocalGDB.xml.in \ - analyze_RetraceServer.xml.in \ report_Mailx.xml.in \ report_RHTSupport.xml.in \ report_Kerneloops.xml.in diff --git a/src/plugins/analyze_var_log_messages.xml.in b/src/plugins/analyze_var_log_messages.xml.in new file mode 100644 index 00000000..fa5edbff --- /dev/null +++ b/src/plugins/analyze_var_log_messages.xml.in @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<event> + <name>Collect /var/log/messages</name> + <_description>Save relevant lines in /var/log/messages</_description> + <_long-description> + Scans through /var/log/messages file and saves those lines which contain executable's name. + The result is saved as 'var_log_messages' element. + </_long-description> + <creates-elements>var_log_messages</creates-elements> +</event> diff --git a/src/plugins/ccpp_events.conf b/src/plugins/ccpp_events.conf index dc582486..ca9ac558 100644 --- a/src/plugins/ccpp_events.conf +++ b/src/plugins/ccpp_events.conf @@ -1,18 +1,26 @@ EVENT=post-create analyzer=CCpp - abrt-action-analyze-c && - abrt-action-list-dsos.py -m maps -o dsos + abrt-action-analyze-c && + abrt-action-list-dsos.py -m maps -o dsos + +EVENT=analyze_var_log_messages analyzer=CCpp + test -f /var/log/messages || { echo "No /var/log/messages"; exit 1; } + test -r /var/log/messages || { echo "Can't read /var/log/messages"; exit 1; } + executable=`cat executable` && + base_executable=${executable##*/} && + grep -e "$base_executable" /var/log/messages | tail -999 >var_log_messages && + echo "var_log_messages element saved" # TODO: can we still specify additional directories to search for debuginfos, # or was this ability lost with move to python installer? EVENT=analyze_LocalGDB analyzer=CCpp - abrt-action-analyze-core.py --core=coredump -o build_ids && - abrt-action-install-debuginfo --size_mb=4096 && - abrt-action-generate-backtrace && - abrt-action-analyze-backtrace + abrt-action-analyze-core.py --core=coredump -o build_ids && + abrt-action-install-debuginfo --size_mb=4096 && + abrt-action-generate-backtrace && + abrt-action-analyze-backtrace EVENT=analyze_RetraceServer analyzer=CCpp - abrt-retrace-client batch --dir "$DUMP_DIR" && - abrt-action-analyze-backtrace + abrt-retrace-client batch --dir "$DUMP_DIR" && + abrt-action-analyze-backtrace EVENT=report_Bugzilla analyzer=CCpp - abrt-action-bugzilla -c /etc/abrt/plugins/Bugzilla.conf + abrt-action-bugzilla -c /etc/abrt/plugins/Bugzilla.conf |