|NO.Z.00313|——————————|CloudNative|——|KuberNetes&运维.V33|——|监控.v10|PromQL去除_小数点|
一、去除小数点
### --- 函数:
~~~ Ceil():四舍五入,向上取最接近的整数;比如2.79,向上取就是3
~~~ floor():四舍五入:向下取最接近的整数,比如2.79,向下取就是2
二、去除小数点,向上取四舍五入
### --- 函数:Ceil()
~~~ 表达式:ceil(predict_linear(node_filesystem_files_free{mountpoint="/"}[1h],4*3600))
~~~ 输出结果:49551911

三、去除小数点:向下取四舍五入
### --- 函数:floor:
~~~ 表达式:floor(predict_linear(node_filesystem_files_free{mountpoint="/"}[1h],4*3600))
~~~ 输出结果:49551909

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
浙公网安备 33010602011771号