Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
261 views
in Technique[技术] by (71.8m points)

How to get number of nodes running in prometheus

I am trying to create an alert in which, when the number of nodes increase or decrease I'll send an alert.

currently, I can get the node's count using this:

count(kube_node_info)

but I want to get the node's count for 5 mins and 1min so that I can do the subtraction and sent the alert. I don't know how to get the count of nodes for a 5m time frame.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

You can use either the delta function or the offset modifier to get what you want.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...