diff --git a/reports/pretty.py b/reports/pretty.py index 73060f8..0857f2a 100644 --- a/reports/pretty.py +++ b/reports/pretty.py @@ -81,10 +81,18 @@ def make_report(yesterday=None, start_hour=0, hours=24, percentile=90, for raw in raws: if not start: start = raw.when + if 'error' in raw.routing_key: err = raw failure_type = 'http' + if raw.old_state != 'error' and raw.state == 'error': + failure_type = 'state' + + if raw.old_state == 'error' and \ + (not raw.state in ['deleted', 'error']): + failure_type = None + for cmd in cmds: if cmd in raw.event: operation = cmd @@ -140,7 +148,7 @@ def make_report(yesterday=None, start_hour=0, hours=24, percentile=90, 'cells': cells} report.append(details) - failure_types = ["4xx", "5xx", "> 60"] + failure_types = ["4xx", "5xx", "> 60", "state"] cols = ["Operation", "Image", "Min*", "Max*", "Avg*", "Requests"] for failure_type in failure_types: diff --git a/stacktach/views.py b/stacktach/views.py index bc76d14..44acfa9 100644 --- a/stacktach/views.py +++ b/stacktach/views.py @@ -343,7 +343,6 @@ def str_time_to_unix(when): when = datetime.datetime.strptime(when, "%Y-%m-%d %H:%M:%S") except Exception, e: print "BAD DATE: ", e - return dt.dt_to_decimal(when)