From cc212ffeb09b5cd493ec09cf538a6487ee58fd95 Mon Sep 17 00:00:00 2001 From: Andy Cobaugh Date: Wed, 13 Jan 2016 15:59:03 -0500 Subject: [PATCH] process_log: output hostname and servicedesc if we have problems parsing a label to aid in troubleshooting --- graphios.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/graphios.py b/graphios.py index 9dd0949..062ab1b 100755 --- a/graphios.py +++ b/graphios.py @@ -372,8 +372,9 @@ def process_log(file_name): nobj.UOM = re.sub("[^a-zA-Z]+", "", u) processed_objects.append(nobj) except: - log.critical("failed to parse label: '%s' part of perf" - "string '%s'" % (metric, nobj.PERFDATA)) + log.critical("failed to parse label '%s' for " + "host '%s' service '%s' perfdata '%s'" + % (metric, nobj.HOSTNAME, nobj.SERVICEDESC, nobj.PERFDATA)) continue return processed_objects