You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@hertzbeat.apache.org by "hsg8888 (via GitHub)" <gi...@apache.org> on 2025/09/02 06:41:37 UTC
[I] [Question] windows监控中如何设置阈值规则, 监控某一个进程存不存在或者状态正不正常 [hertzbeat]
hsg8888 opened a new issue, #3736:
URL: https://github.com/apache/hertzbeat/issues/3736
### Question
这样设置不会触发;如果用包含或者匹配会误报,其他进程名不符合这个要求导致很多告警。
我想要的效果是监控里的几十个进程中有没有我指定的进程,但是怎么配置都达不到效果。

--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@hertzbeat.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@hertzbeat.apache.org
For additional commands, e-mail: notifications-help@hertzbeat.apache.org
Re: [I] [Question] windows监控中如何设置阈值规则, 监控某一个进程存不存在或者状态正不正常 [hertzbeat]
Posted by "zqr10159 (via GitHub)" <gi...@apache.org>.
zqr10159 commented on issue #3736:
URL: https://github.com/apache/hertzbeat/issues/3736#issuecomment-3249823781
> 设置之后报警不准确,有没有这个进程都会报警,是我设置有问题吗
> 
> 
> 
https://geekdaxue.co/read/prometheus-handbook/3-prometheus-basics.md
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@hertzbeat.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@hertzbeat.apache.org
For additional commands, e-mail: notifications-help@hertzbeat.apache.org
Re: [I] [Question] windows监控中如何设置阈值规则, 监控某一个进程存不存在或者状态正不正常 [hertzbeat]
Posted by "zqr10159 (via GitHub)" <gi...@apache.org>.
zqr10159 commented on issue #3736:
URL: https://github.com/apache/hertzbeat/issues/3736#issuecomment-3244033571
You can use only a Scheduled Threshold to cover both “process missing” and “process unhealthy” if a small detection delay is acceptable.
How to do it (step by step):
- Navigate: Alerting -> Threshold -> New -> Scheduled Threshold Rule.
- Metric Object: Select your Windows process metrics (pick the process-related metric object shown in the UI).
- Rule Type: Use expression/PromQL mode.
- Add one or both expressions below (adjust metric and label names to match what you see, e.g., name/status/cmdline/path, process_up, etc.). Bind the rule to the specific monitor(s), set an Alert Level, and set Trigger Count > 1 to avoid flapping. Save.
PromQL examples to copy and adapt:
- Detect the process is missing
- Immediate:
- count(process_info{name="yourproc.exe"}) == 0
- OR absent(process_info{name="yourproc.exe"})
- Over a short window (reduces noise):
- max_over_time((count(process_info{name="yourproc.exe"}) == 0)[3m]) > 0
- Detect the process is unhealthy (exists but not “running”)
- If you have a boolean up/running metric:
- max_over_time((process_up{name="yourproc.exe"} == 0)[3m]) > 0
- If health is exposed via a status label (e.g., status!="running"):
- max_over_time((count(process_status{name="yourproc.exe", status!="running"}) > 0)[3m]) > 0
Tips:
- Prefer exact or regex matches on a unique identifier to avoid false positives:
- name="yourproc.exe"
- or cmdline=~".*\\\\your-app\\\\bin\\\\yourproc\\.exe.*"
- Use a short window like [2m]–[5m] and Trigger Count 2–3 to balance sensitivity vs. noise.
- Scheduled-only adds a small delay but simplifies configuration; if you need instant alerts when the process turns unhealthy while present, you can still add a real-time rule later.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@hertzbeat.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@hertzbeat.apache.org
For additional commands, e-mail: notifications-help@hertzbeat.apache.org
Re: [I] [Question] windows监控中如何设置阈值规则, 监控某一个进程存不存在或者状态正不正常 [hertzbeat]
Posted by "hsg8888 (via GitHub)" <gi...@apache.org>.
hsg8888 commented on issue #3736:
URL: https://github.com/apache/hertzbeat/issues/3736#issuecomment-3247418960
设置之后报警不准确,有没有这个进程都会报警



--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@hertzbeat.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@hertzbeat.apache.org
For additional commands, e-mail: notifications-help@hertzbeat.apache.org
Re: [I] [Question] windows监控中如何设置阈值规则, 监控某一个进程存不存在或者状态正不正常 [hertzbeat]
Posted by "zqr10159 (via GitHub)" <gi...@apache.org>.
zqr10159 closed issue #3736: [Question] windows监控中如何设置阈值规则, 监控某一个进程存不存在或者状态正不正常
URL: https://github.com/apache/hertzbeat/issues/3736
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@hertzbeat.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@hertzbeat.apache.org
For additional commands, e-mail: notifications-help@hertzbeat.apache.org