File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change 9292 "timeout": "90s",
9393 "max_output_length": 80,
9494 "concurrency": 3,
95- "enable_message_change_based_condition_update": false
95+ "enable_message_change_based_condition_update": true
9696 },
9797 "source": "fd-custom-plugin-monitor",
9898 "conditions": [
@@ -104,10 +104,11 @@ data:
104104 ],
105105 "rules": [
106106 {
107- "type": "temporary",
108- "reason": "TooManyOpenFiles",
107+ "type": "permanent",
108+ "condition": "FDPressure",
109+ "reason": "NodeHasFDPressure",
109110 "path": "/config/plugin/check_fd.sh",
110- "message": "more than 80% fd has been used"
111+ "message": "too many fds have been used"
111112 }
112113 ]
113114 }
@@ -125,12 +126,11 @@ data:
125126 count=$(find -maxdepth 1 -type d -name '[0-9]*' | xargs -I {} ls {}/fd | wc -l)
126127 max=$(cat /host/proc/sys/fs/file-max)
127128
128- echo "current fd is $count and max is $max"
129- if [[ $count -gt $((max*8/10)) ]]; then
130- echo "more than 80% fd has been used($count:$max)"
129+ if [[ $count -gt $((max*80/100)) ]]; then
130+ echo "current fd usage is $count and max is $max"
131131 exit $NONOK
132132 fi
133- echo "fd is ok"
133+ echo "fd usage is ok"
134134 exit $OK
135135kind : ConfigMap
136136metadata :
You can’t perform that action at this time.
0 commit comments