|NO.Z.00311|——————————|CloudNative|——|KuberNetes&運維.V31|-----------------------------------------------------------|監控.v08|PromQL查詢_預測告警|
阿新 • • 發佈:2022-03-31
[CloudNative:KuberNetes&運維.V31] [Applications.KuberNetes] [|PromQL常用函式|查詢|增長率|預測性告警|判斷監控指標是否正確|去除小數點|差值|排序|處理label|]
一、predict_linear:預測性告警:查詢預測性告警:
### --- 表示式: ~~~ node_filesystem_files_free:宿主機上一些分割槽的剩餘空間
二、查詢根節點的分割槽空間
### --- 表示式:
~~~ node_filesystem_files_free{mountpoint="/"}
~~~ 注:根上分割槽所剩餘的位元組數
三、預測:根據歷史時間資料預測某一節點在幾個小時之內使用完
四、預測1天之後根分割槽會空間不足的情況### --- 函式:predict_linear(指標+{mountpoint="/"}[1h],4*3600) : ~~~ 根據一天資料預測1天的資料是多少 ~~~ 表示式:predict_linear(node_filesystem_files_free{mountpoint="/"}[1h],4*3600) ~~~ 結果:測試環境,資料增長看不出來
### --- 函式:predict_linear(指標+{mountpoint="/"}[1h],4*3600) <0
~~~ 表示式:predict_linear(node_filesystem_files_free{mountpoint="/"}[1h],4*3600)<0
~~~ 結果:無
===============================END===============================
Walter Savage Landor:strove with none,for none was worth my strife.Nature I loved and, next to Nature, Art:I warm'd both hands before the fire of life.It sinks, and I am ready to depart ——W.S.Landor
來自為知筆記(Wiz)