Comments (19)
what's the config.yaml? how to reproduce this problem?
BTW, next time, please paste the log as text instead of a picture.
from easeprobe.
By the way, the EaseProbe is edge-trigger, which means only the status change (up -> down, or down -> up) would send the notification.
if the "Flink Monitor" script had been run failed already, which means the status just from down
to down
, this won't trigger the notification.
you can enable the debug information to check
settings:
log:
level: debug
from easeprobe.
刚那个问题是脚本内容出错,状态是 down=>down no state change 所以没有通知,已解决,感谢。不过想知道,对于钉钉消息的内容展示,是否用户可以自定义内容。可以有提供个消息模版参数,可由用户自己进行定制
from easeprobe.
from easeprobe.
可否 每个任务下脚本下可自定义自己的message,然后钉钉消息,从message中获取, 还有个问题,请问下yaml 只有响应检查只有 not_contain 和 contain 吗? 可否有个 或者 。比如我请求一个接口,解析接口中返回值获取某个字段值,比如这个字段有
[a,b,c,d,e] 多种状态,那么我此时想判断 文本中 存在 b或者 c 就算失败,单单包含貌似满足不了需求
from easeprobe.
You can do any check in your script, and output any message you like. EaseProbe would send that message to notification.
from easeprobe.
@studyhuang1996 do you have any further questions?
from easeprobe.
日志展示:10点43分的时候 推送钉钉消息
ERRO[2022-07-12T10:43:26+08:00] [shell / 93-Flink Job监控] - the output does not contain [成功]
INFO[2022-07-12T10:43:26+08:00] [channel / __EaseProbe_Channel__]: 93-Flink Job监控 (/home/soft/easeprobe/script/flink-monitor.sh http://127.0.0.1:8081/jobs/overview) - Status changed [up] ==> [down]
INFO[2022-07-12T10:43:26+08:00] [dingtalk / dingtalk alert service] - **93-Flink Job监控 Failure** ❌
/home/soft/easeprobe/script/flink-monitor.sh http://127.0.0.1:8081/jobs/overview - ⏱ 12ms
Error (shell): Error: the output does not contain [成功]
但是实际没有发送钉钉消息,钉钉消息只有 10点41分的时候,运行发送一次
消息提醒日期,可以自定义展示 UTC+8 东八区吗?
from easeprobe.
- any error message for DingTalk notification? if not, can you enable the debug logging to see what's happening? you can set the following configuration to enable it.
settings:
log:
level: debug
- the time zone you can configure that, but you need to use the latest source code to build because I just supported that yesterday in PR #166
BTW, please paste the code, log, and configuration with markdown format instead of a picture!!!!
from easeprobe.
- 日志没有钉钉相关错误消息
job执行失败!
ERRO[2022-07-12T11:21:38+08:00] [shell / 93-Flink Job监控] - the output does not contain [成功]
DEBU[2022-07-12T11:21:38+08:00] [shell / 93-Flink Job监控] - Error: the output does not contain [成功]
DEBU[2022-07-12T11:21:38+08:00] shell: {"name":"93-Flink Job监控","endpoint":"/home/soft/easeprobe/script/flink-monitor.sh http://127.0.0.1:8081/jobs/overview","time":"2022-07-12T03:21:38.643645189Z","timestamp":1657596098643,"rtt":10581020,"status":"down","prestatus":"up","message":"Error (shell): Error: the output does not contain [成功]","latestdowntime":"2022-07-12T03:21:38.654243334Z","recoverytime":1500051839778,"stat":{"since":"2022-07-11T08:32:02.254268601Z","total":208,"status":{"1":183,"2":25},"uptime":54900000000000,"downtime":7500000000000},"timeformat":"2006-01-02 15:04:05 UTC"}
INFO[2022-07-12T11:21:38+08:00] [channel / __EaseProbe_Channel__]: 93-Flink Job监控 (/home/soft/easeprobe/script/flink-monitor.sh http://127.0.0.1:8081/jobs/overview) - Status changed [up] ==> [down]
INFO[2022-07-12T11:21:38+08:00] [dingtalk / dingtalk alert service] - **93-Flink Job监控 Failure** ❌
/home/soft/easeprobe/script/flink-monitor.sh http://127.0.0.1:8081/jobs/overview - ⏱ 11ms
Error (shell): Error: the output does not contain [成功]
> EaseProbe v1.6.0 @ localhost.localdomain at 2022-07-12 03:21:38 UTC
2022/07/12 11:22:38 "GET http://127.0.0.1:8181/ HTTP/1.1" from 127.0.0.1:56490 - 200 2092B in 78.417µs
2022/07/12 11:22:39 "GET http://127.0.0.1:8181/favicon.ico HTTP/1.1" from 127.0.0.1:56490 - 200 2092B in 63.413µs
from easeprobe.
it should have a log state successfully sent!
or failed to send!
,
and if there have some connection problem with the DingTalk server, it should have a Warning log for retry...
can you find those logs?
from easeprobe.
By the way, it looks you enable the dry run mode for DingTalk, could you please show your config.yaml
?
from easeprobe.
By the way, it looks you enable the dry run mode for DingTalk, could you please show your
config.yaml
?
配置如下:
#Shell Probe Configuration
shell:
# A proxy curl shell script
- name: 93-Flink Job监控
cmd: "/home/soft/easeprobe/script/flink-monitor.sh"
args:
- "http://127.0.0.1:8081/jobs/overview"
contain: "成功"
# Native Client Probe
client:
- name: 125-MySQL从库监控
driver: "mysql"
host: "127.0.0.1:3306"
username: "root"
password: "***"
settings:
log:
level: debug
sla:
schedule : "daily"
time: "23:00"
probe:
interval: 5m
http:
ip: 127.0.0.1
port: 8181
notify:
dingtalk:
- name: "dingtalk alert service"
webhook: "https://oapi.dingtalk.com/robot/send?access_token=****"
from easeprobe.
the configuration looks fine, and did you add -d
options in command line?
from easeprobe.
启动的时候有加
./bin/easeprobe -f config/flink-monitor.yaml -d
from easeprobe.
-d
means dry run, EaseProbe just only logs the message that needs to send, but it actually not sent. Please remove the -d
option.
from easeprobe.
-d
means dry run, EaseProbe just only logs the message that needs to send, but it actually not sent. Please remove the-d
option.
好的,理解错了,我以为 -d 是保持后台运行。那如果想让其后台运行,有参数可配吗,还是直接运行脚本即可?
from easeprobe.
-
EaseProbe is in edge trigger mode, which means it sends the notification only when the status changes - [up => down] or [down => up], if the service is keeping a down status, EaseProbe won't send the notification.
-
if you want to EaseProbe running in the background, just simply add an ampersand (
&
) after the command. and if you need the EaseProbe to output the log to a file rather than StdOut/StdErr, just configure the log file insettings
.
from easeprobe.
- EaseProbe is in edge trigger mode, which means it sends the notification only when the status changes - [up => down] or [down => up], if the service is keeping a down status, EaseProbe won't send the notification.
- if you want to EaseProbe running in the background, just simply add an ampersand (
&
) after the command. and if you need the EaseProbe to output the log to a file rather than StdOut/StdErr, just configure the log file insettings
.
OK ,Thank you very much
from easeprobe.
Related Issues (20)
- Native Postgresql connection without ssl enabled HOT 3
- 用户手册 tls 示例的错误 HOT 1
- 该项目的一个xss漏洞
- How to support multiple configuration files HOT 2
- Adding a helm repository returns 404 HOT 8
- Specify the name for container port 8181 HOT 4
- Introduce repeatable alert HOT 2
- Questions about the Channel example in the user manual title 4 HOT 3
- Questions about using the unified disable symbol HOT 10
- how to custom dingtalk message template? HOT 4
- 听闻噩耗... HOT 4
- Telegram SLA Notification "message is too long" HOT 3
- update the email address HOT 4
- tls cert expiration not working as expect when visit url redirected HOT 4
- How can I add labels to the metrics? HOT 16
- Is it possible not to send the report? HOT 8
- Add constant labels for Prometheus metrics
- Send notification to generic or custom url HOT 4
- Does host probe support user and password authentication? HOT 4
- Using the increase() function on the Prometheus metric EaseProbe_client_kafka_total returns 0 HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from easeprobe.