Browse Source

bug fix with labels, making them more readible

Steve L. Nyemba 8 years ago
parent
commit
1629100116
1 changed files with 3 additions and 0 deletions
  1. 3 0
      src/utils/agents/data-collector.py

+ 3 - 0
src/utils/agents/data-collector.py

@@ -27,6 +27,8 @@ class ICollector(Thread) :
 		self.factory	= DataSourceFactory()
 		self.init()
 		self.name = 'data-collector@'+self.id
+	def format(self,text):
+		return re.sub('([0-9]+[a-zA-Z]*)|[^a-zA-Z\s:]',' ',text).strip()
 	def init(self):
 		
 		
@@ -88,6 +90,7 @@ class ICollector(Thread) :
 				self.lock.acquire()
 				store = self.factory.instance(type=write_class,args=read_args)
 				store.flush(size=200)
+				label = self.format(label)
 				store.write(label=label,row=row)
 				self.lock.release()
 			if 'MONITOR_CONFIG_PATH' in os.environ :