Why can't the alert expression value for disk space usage be found in Prometheus?

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: 磁盘空间使用率的告警表达式值为什么在prometheus中查不到?

| username: 逍遥_猫

Why can’t the alert expression value for disk space usage be found in Prometheus?

This is present in the alert rules

| username: 啦啦啦啦啦 | Original post link

What version is it? The one I see is different from yours.


Try this:
node_filesystem_avail_bytes{fstype=~"(ext.|xfs)",mountpoint!~"/boot"}/ node_filesystem_size_bytes{fstype=~"(ext.|xfs)",mountpoint!~"/boot"} * 100

| username: 逍遥_猫 | Original post link

The expert is right, the official documentation is incorrect.

| username: 逍遥_猫 | Original post link

How do you pass these combined parameters to another Prometheus?

| username: 啦啦啦啦啦 | Original post link

I don’t quite understand what it means to pass it to another Prometheus. Prometheus itself supports a functional expression language that can be used for data selection or aggregation. This alert is from the Alertmanager component, which can perform operations on multiple monitoring items.

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.