From 9ae33e7340f57b35a1f451511d55dd707285ecd1 Mon Sep 17 00:00:00 2001 From: Sagi Shnaidman Date: Mon, 30 Oct 2017 19:22:09 +0200 Subject: [PATCH] Extract all errors from tripleo deployment Extract all lines marked with "ERROR" from logs in tripleo deploy for easier investigation Change-Id: I4bbff500996210797c474082229a8211a3d0457c --- roles/collect-logs/tasks/collect.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/roles/collect-logs/tasks/collect.yml b/roles/collect-logs/tasks/collect.yml index 8eda46ccc..61b7a946a 100644 --- a/roles/collect-logs/tasks/collect.yml +++ b/roles/collect-logs/tasks/collect.yml @@ -187,6 +187,11 @@ - name: Collect text version of the journal from last four hours shell: journalctl --since=-4h --lines=100000 > /var/log/journal.txt + - name: Collect errors + shell: > + grep -rE '^[-0-9]+ [0-9:\.]+ [0-9 ]*ERROR ' /var/log/ > /tmp/errors.txt; + mv /tmp/errors.txt /var/log/extra/errors.txt + - name: Create a index file for logstash shell: > for i in {{ artcl_logstash_files|default([])|join(" ") }}; do