atlasbot: bind hotspot namespaces to node
This commit is contained in:
parent
e752a86ecc
commit
61d9ebd707
@ -584,6 +584,21 @@ class AnswerEngine:
|
|||||||
if hotspot_request and hotspot_line:
|
if hotspot_request and hotspot_line:
|
||||||
namespace_line = None
|
namespace_line = None
|
||||||
if "namespace" in lowered_q:
|
if "namespace" in lowered_q:
|
||||||
|
hotspot_node = None
|
||||||
|
match = re.search(r"(titan-[a-z0-9]+)", hotspot_line)
|
||||||
|
if match:
|
||||||
|
hotspot_node = match.group(1)
|
||||||
|
if hotspot_node:
|
||||||
|
for line in summary_lines:
|
||||||
|
if line.startswith("node_namespaces_top:") and f"{hotspot_node} " in line:
|
||||||
|
namespace_line = line
|
||||||
|
break
|
||||||
|
if not namespace_line:
|
||||||
|
for line in summary_lines:
|
||||||
|
if line.startswith("node_pods_top:") and hotspot_node in line:
|
||||||
|
namespace_line = line
|
||||||
|
break
|
||||||
|
if not namespace_line:
|
||||||
for fact in metric_facts:
|
for fact in metric_facts:
|
||||||
if fact.startswith("node_namespaces_top:"):
|
if fact.startswith("node_namespaces_top:"):
|
||||||
namespace_line = fact
|
namespace_line = fact
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user