Esempio n. 1
0
 def get_node_data(self, node):
     host = "prometheus.apps." + self.cluster.name + "." + self.cluster.cluster_doamin_suffix
     config = {'host': host, 'cluster': self.cluster}
     prometheus_client = PrometheusClient(config)
     try:
         res = prometheus_client.get_node_resource(node)
         return res
     except Exception as e:
         logger.error(msg='get node data error ', exc_info=True)
         return node
 def get_node_data(self, node):
     host = "prometheus.apps." + self.cluster.name + "." + self.cluster.cluster_doamin_suffix
     config = {'host': host}
     prometheus_client = PrometheusClient(config)
     return prometheus_client.get_node_resource(node)