diff --git a/docker-compose/tango-prometheus-exporter/code/collector.py b/docker-compose/tango-prometheus-exporter/code/collector.py index 970d730a23efeff2e64cb5d494006b0db5deb881..9e579788afc69f84194baf21077154a9b4fa18bc 100644 --- a/docker-compose/tango-prometheus-exporter/code/collector.py +++ b/docker-compose/tango-prometheus-exporter/code/collector.py @@ -65,6 +65,10 @@ class CustomCollector(object): def add_to_metric_image(self, dev, attr_info, metric): attr_value = dev.read_attribute(attr_info.name) + if attr_value.dim_x * attr_value.dim_y > 256: + # too big, don't monitor + return 0 + for y in range(int(attr_value.dim_y)): for x in range(int(attr_value.dim_x)): """ NOTE: We switch x and y in the annotation, to allow queries to combine 1D and 2D arrays in their first dimension using the same label (x). We effectively expose @@ -176,7 +180,7 @@ class CustomCollector(object): res = self.add_to_metric_spectrum(dev, attr_info, attribute_metrics) if(res <= 0): not_managed_attribute_count += 1 - #print("*******NOT MANAGED: "+attr_info.name) + print("*******NOT MANAGED: "+attr_info.name) else: spectrum_count += 1 read_count += 1 @@ -185,14 +189,14 @@ class CustomCollector(object): res = self.add_to_metric_image(dev, attr_info, attribute_metrics) if(res <= 0): not_managed_attribute_count += 1 - #print("*******NOT MANAGED: "+attr_info.name) + print("*******NOT MANAGED: "+attr_info.name) else: image_count += 1 read_count += 1 else: # AttrDataFormat.FMT_UNKNOWN not_managed_attribute_count += 1 - #print("*******NOT MANAGED: "+attr_info.name) + print("*******NOT MANAGED: "+attr_info.name) except Exception as e1: #print ("Could not connect to the '"+ class_list[j] + "." + attr_info.name+"' Attribute.\r\n") #print(e1)