Giter Site home page Giter Site logo

Comments (19)

haoel avatar haoel commented on May 17, 2024

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.

haoel avatar haoel commented on May 17, 2024

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.

studyhuang1996 avatar studyhuang1996 commented on May 17, 2024

刚那个问题是脚本内容出错,状态是 down=>down no state change 所以没有通知,已解决,感谢。不过想知道,对于钉钉消息的内容展示,是否用户可以自定义内容。可以有提供个消息模版参数,可由用户自己进行定制

from easeprobe.

haoel avatar haoel commented on May 17, 2024

from easeprobe.

studyhuang1996 avatar studyhuang1996 commented on May 17, 2024

image
可否 每个任务下脚本下可自定义自己的message,然后钉钉消息,从message中获取, 还有个问题,请问下yaml 只有响应检查只有 not_contain 和 contain 吗? 可否有个 或者 。比如我请求一个接口,解析接口中返回值获取某个字段值,比如这个字段有
[a,b,c,d,e] 多种状态,那么我此时想判断 文本中 存在 b或者 c 就算失败,单单包含貌似满足不了需求

from easeprobe.

haoel avatar haoel commented on May 17, 2024

You can do any check in your script, and output any message you like. EaseProbe would send that message to notification.

from easeprobe.

haoel avatar haoel commented on May 17, 2024

@studyhuang1996 do you have any further questions?

from easeprobe.

studyhuang1996 avatar studyhuang1996 commented on May 17, 2024

日志展示: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分的时候,运行发送一次
image

11点也没发,但是日志有打印
image

消息提醒日期,可以自定义展示 UTC+8 东八区吗?

from easeprobe.

haoel avatar haoel commented on May 17, 2024
  1. 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
  1. 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.

studyhuang1996 avatar studyhuang1996 commented on May 17, 2024
  1. 日志没有钉钉相关错误消息
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.

haoel avatar haoel commented on May 17, 2024

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.

haoel avatar haoel commented on May 17, 2024

By the way, it looks you enable the dry run mode for DingTalk, could you please show your config.yaml?

from easeprobe.

studyhuang1996 avatar studyhuang1996 commented on May 17, 2024

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.

haoel avatar haoel commented on May 17, 2024

the configuration looks fine, and did you add -d options in command line?

from easeprobe.

studyhuang1996 avatar studyhuang1996 commented on May 17, 2024

启动的时候有加

./bin/easeprobe  -f  config/flink-monitor.yaml -d

from easeprobe.

haoel avatar haoel commented on May 17, 2024

-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.

studyhuang1996 avatar studyhuang1996 commented on May 17, 2024

-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.

haoel avatar haoel commented on May 17, 2024
  1. 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.

  2. 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 in settings.

from easeprobe.

studyhuang1996 avatar studyhuang1996 commented on May 17, 2024
  1. 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.
  2. 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 in settings.

OK ,Thank you very much

from easeprobe.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.