A simple, standalone, and lightWeight tool that can do health/status checking, written in Go.

Overview

EaseProbe

Go Report Card

EaseProbe is a simple, standalone, and lightWeight tool that can do health/status checking, written in Go.

Table of Contents

1. Overview

EaseProbe would do three kinds of work - Probe, Notify, and Report.

1.1 Probe

Ease Probe supports the following probing methods: HTTP, TCP, Shell Command, SSH Command, Host Resource Usage, and Native Client.

Note:

Keep in mind that the prober name must be unique among probes. If multiple probes are defined with the same name, it could lead to corruption of the metrics data and the behavior of the application will be non-deterministic.

  • HTTP. Checking the HTTP status code, Support mTLS, HTTP Basic Auth, and can set the Request Header/Body. ( HTTP Probe Configuration )

    http:
      # Some of the Software support the HTTP Query
      - name: ElasticSearch
        url: http://elasticsearch.server:9200
      - name: Prometheus
        url: http://prometheus:9090/graph
  • TCP. Just simply check whether the TCP connection can be established or not. ( TCP Probe Configuration )

    tcp:
      - name: Kafka
        host: kafka.server:9093
  • Shell. Run a Shell command and check the result. ( Shell Command Probe Configuration )

    shell:
      # run redis-cli ping and check the "PONG"
      - name: Redis (Local)
        cmd: "redis-cli"
        args:
          - "-h"
          - "127.0.0.1"
          - "ping"
        env:
          # set the `REDISCLI_AUTH` environment variable for redis password
          - "REDISCLI_AUTH=abc123"
        # check the command output, if does not contain the PONG, mark the status down
        contain : "PONG"
  • SSH. Run a remote command via SSH and check the result. Support the bastion/jump server (SSH Command Probe Configuration)

    ssh:
      servers:
        - name : ServerX
          host: [email protected]:22
          password: xxxxxxx
          key: /Users/user/.ssh/id_rsa
          cmd: "ps auxwe | grep easeprobe | grep -v grep"
          contain: easeprobe
  • Host. Run an SSH command on a remote host and check the CPU, Memory, and Disk usage. ( Host Load Probe )

    host:
      servers:
        - name : server
          host: [email protected]:22
          key: /path/to/server.pem
          threshold:
            cpu: 0.80  # cpu usage  80%
            mem: 0.70  # memory usage 70%
            disk: 0.90  # disk usage 90%
  • Client. Currently, support the following native client. Support the mTLS. (refer to: Native Client Probe Configuration )

    • MySQL. Connect to the MySQL server and run the SHOW STATUS SQL.
    • Redis. Connect to the Redis server and run the PING command.
    • MongoDB. Connect to MongoDB server and just ping server.
    • Kafka. Connect to Kafka server and list all topics.
    • PostgreSQL. Connect to PostgreSQL server and run SELECT 1 SQL.
    • Zookeeper. Connect to Zookeeper server and run get / command.
    client:
      - name: Kafka Native Client (local)
        driver: "kafka"
        host: "localhost:9093"
        # mTLS
        ca: /path/to/file.ca
        cert: /path/to/file.crt
        key: /path/to/file.key

1.2 Notification

Ease Probe supports the following notifications:

  • Slack. Using Webhook for notification
  • Discord. Using Webhook for notification
  • Telegram. Using Telegram Bot for notification
  • Email. Support multiple email addresses.
  • AWS SNS. Support AWS Simple Notification Service.
  • WeChat Work. Support Enterprise WeChat Work notification.
  • DingTalk. Support the DingTalk notification.
  • Lark. Support the Lark(Feishu) notification.
  • Log File. Write the notification into a log file
  • SMS. Support SMS notification with multiple SMS service providers - Twilio, Vonage(Nexmo), YunPain

Note:

  • The notification is Edge-Triggered Mode, only notified while the status is changed.
# Notification Configuration
notify:
  slack:
    - name: "MegaEase#Alert"
      webhook: "https://hooks.slack.com/services/........../....../....../"
  discord:
    - name: "MegaEase#Alert"
      webhook: "https://discord.com/api/webhooks/...../....../"
  telegram:
    - name: "MegaEase Alert Group"
      token: 1234567890:ABCDEFGHIJKLMNOPQRSTUVWXYZ # Bot Token
      chat_id: -123456789 # Channel / Group ID
  email:
    - name: "DevOps Mailing List"
      server: smtp.email.example.com:465
      username: [email protected]
      password: ********
      to: "[email protected];[email protected]"
  aws_sns:
    - name: AWS SNS
      region: us-west-2
      arn: arn:aws:sns:us-west-2:298305261856:xxxxx
      endpoint: https://sns.us-west-2.amazonaws.com
      credential:
        id: AWSXXXXXXXID
        key: XXXXXXXX/YYYYYYY
  wecom:
    - name: "wecom alert service"
      webhook: "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=589f9674-a2aa-xxxxxxxx-16bb6c43034a" # wecom robot webhook
  dingtalk:
    - name: "dingtalk alert service"
      webhook: "https://oapi.dingtalk.com/robot/send?access_token=xxxx"
  lark:
    - name: "lark alert service"
      webhook: "https://open.feishu.cn/open-apis/bot/v2/hook/d5366199-xxxx-xxxx-bd81-a57d1dd95de4"
  sms:
    - name: "sms alert service"
      provider: "yunpian"
      key: xxxxxxxxxxxx # yunpian apikey
      mobile: 123456789,987654321 # mobile phone number, multiple phone number joint by `,`
      sign: "xxxxxxxx" # need to register; usually brand name

Check the Notification Configuration to see how to configure it.

1.3 Report

  • SLA Report Notify. EaseProbe would send the daily, weekly, or monthly SLA report.

    settings:
      # SLA Report schedule
      sla:
        #  daily, weekly (Sunday), monthly (Last Day), none
        schedule: "weekly"
        # UTC time, the format is 'hour:min:sec'
        time: "23:59"
  • SLA Live Report. You can query the SLA Live Report

    The EaseProbe would listen on the 0.0.0.0:8181 port by default. And you can access the Live SLA report by the following URL:

    • HTML: http://localhost:8181/ or http://localhost:8181/?refresh=30s
    • JSON: http://localhost:8181/api/v1/sla

    Refer to the Global Setting Configuration to see how to configure the access log.

  • SLA Data Persistence. Save the SLA statistics data on the disk.

    The SLA data would be persisted in $CWD/data/data.yaml by default. If you want to configure the path, you can do it in the settings section.

    When EaseProbe starts, it looks for the location of data.yaml and if found, load the file and remove any probes that are no longer present in the configuration file. Setting a value of "-" for data: disables SLA persistence (eg data: "-").

    settings:
      sla:
        # SLA data persistence file path.
        # The default location is `$CWD/data/data.yaml`
        data: /path/to/data/file.yaml

For more information, please check the Global Setting Configuration

1.4 Administration

There are some administration configuration options:

1) PID file

The EaseProbe would create a PID file (default $CWD/easeprobe.pid) when it starts. it can be configured by:

settings:
  pid: /var/run/easeprobe.pid
  • If the file already exists, EaseProbe would overwrite it.
  • If the file cannot be written, EaseProbe would exit with an error.

If you want to disable the PID file, you can configure the pid file to "".

settings:
  pid: "" # EaseProbe won't create a PID file

2) Log file Rotation

There are two types of log file: Application Log and HTTP Access Log.

Both Application Log and HTTP Access Log would be StdOut by default. They all can be configured by:

log:
  file: /path/to/log/file
  self_rotate: true # default: true

If self_rotate is true, EaseProbe would rotate the log automatically, and the following options are available:

  size: 10 # max size of log file. default: 10M
  age: 7 # max age days of log file. default: 7 days
  backups: 5 # max backup log files. default: 5
  compress: true # compress. default: true

If self_rotate is false, EaseProbe will not rotate the log, and the log file will have to be rotated by a 3rd-party tool (such as logrotate) or manually by the administrator.

mv /path/to/easeprobe.log /path/to/easeprobe.log.0
kill -HUP `cat /path/to/easeprobe.pid`

EaseProbe accepts the HUP signal to rotate the log.

1.5 Prometheus Metrics

EaseProbe supports Prometheus metrics. The Prometheus endpoint is http://localhost:8181/metrics by default.

The following snapshot is the Grafana panel for host CPU metrics

Refer to the Global Setting Configuration to see how to configure the HTTP server.

2. Getting Started

You can get started with EaseProbe, by any of the following methods:

2.1 Build

Compiler Go 1.18+ (Generics Programming Support)

Use make to make the binary file. the target is under the build/bin directory

$ make

2.2 Configure

Read the Configuration Guide to learn how to configure EaseProbe.

Create the configuration file - $CWD/config.yaml.

2.3 Run

Running the following command for the local test

$ build/bin/easeprobe -f config.yaml
  • -f configuration file or URL. Can also be achieved by setting the environment variable PROBE_CONFIG
  • -d dry run. Can also be achieved by setting the environment variable PROBE_DRY

3. Configuration

EaseProbe can be configured by supplying a yaml file or URL to fetch configuration settings from. By default EaseProbe will look for its config.yaml on the current folder, this can be changed by supplying the -f parameter.

easeprobe -f path/to/config.yaml
easeprobe -f https://example.com/config

The following environment variables can be used to fine-tune the request to the configuration file

  • HTTP_AUTHORIZATION
  • HTTP_TIMEOUT

And the configuration file should be versioned, the version should be aligned with the EaseProbe binary version.

version: v1.5.0

The following example configurations illustrate the EaseProbe supported features.

Notes: All probes have the following options:

  • timeout - the maximum time to wait for the probe to complete. default: 30s.
  • interval - the interval time to run the probe. default: 1m.

3.1 HTTP Probe Configuration

# HTTP Probe Configuration

http:
  # A Website
  - name: MegaEase Website (Global)
    url: https://megaease.com

  # Some of the Software support the HTTP Query
  - name: ElasticSearch
    url: http://elasticsearch.server:9200
  - name: Eureka
    url: http://eureka.server:8761
  - name: Prometheus
    url: http://prometheus:9090/graph

  # Spring Boot Application with Actuator Heath API
  - name: EaseService-Governance
    url: http://easeservice-mgmt-governance:38012/actuator/health
  - name: EaseService-Control
    url: http://easeservice-mgmt-control:38013/actuator/health
  - name: EaseService-Mesh
    url: http://easeservice-mgmt-mesh:38013/actuator/health

  # A completed HTTP Probe configuration
  - name: Special Website
    url: https://megaease.cn
    # Request Method
    method: GET
    # Request Header
    headers:
      X-head-one: xxxxxx
      X-head-two: yyyyyy
      X-head-THREE: zzzzzzX-
    content_encoding: text/json
    # Request Body
    body: '{ "FirstName": "Mega", "LastName" : "Ease", "UserName" : "megaease", "Email" : "[email protected]"}'
    # HTTP Basic Auth
    username: username
    password: password
    # mTLS
    ca: /path/to/file.ca
    cert: /path/to/file.crt
    key: /path/to/file.key
    # HTTP successful response code range, default is [0, 499].
    success_code:
      - [200,206] # the code >=200 and <= 206
      - [300,308] # the code >=300 and <= 308
    # Response Checking
    contain: "success" # response body must contain this string, if not the probe is considered failed.
    not_contain: "failure" # response body must NOT contain this string, if it does the probe is considered failed.
    # configuration
    timeout: 10s # default is 30 seconds

3.2 TCP Probe Configuration

# TCP Probe Configuration
tcp:
  - name: SSH Service
    host: example.com:22
    timeout: 10s # default is 30 seconds
    interval: 2m # default is 60 seconds

  - name: Kafka
    host: kafka.server:9093

3.3 Shell Command Probe Configuration

The shell command probe is used to execute a shell command and check the output.

The following example shows how to configure the shell command probe.

# Shell Probe Configuration
shell:
  # A proxy curl shell script
  - name: Google Service
    cmd: "./resources/probe/scripts/proxy.curl.sh"
    args:
      - "socks5://127.0.0.1:1085"
      - "www.google.com"

  # run redis-cli ping and check the "PONG"
  - name: Redis (Local)
    cmd: "redis-cli"
    args:
      - "-h"
      - "127.0.0.1"
      - "ping"
    env:
      # set the `REDISCLI_AUTH` environment variable for redis password
      - "REDISCLI_AUTH=abc123"
    # check the command output, if does not contain the PONG, mark the status down
    contain : "PONG"

  # Run Zookeeper command `stat` to check the zookeeper status
  - name: Zookeeper (Local)
    cmd: "/bin/sh"
    args:
      - "-c"
      - "echo stat | nc 127.0.0.1 2181"
    contain: "Mode:"

3.4 SSH Command Probe Configuration

SSH probe is similar to Shell probe.

  • Support Password and Private key authentication.
  • Support the Bastion host tunnel.

The host supports the following configuration

The following are examples of SSH probe configuration.

# SSH Probe Configuration
ssh:
  # SSH bastion host configuration
  bastion:
    aws: # bastion host ID      ◄──────────────────────────────┐
      host: aws.basition.com:22 #
      username: ubuntu # login user                            │
      key: /path/to/aws/basion/key.pem # private key file      │
    gcp: # bastion host ID                                     │
      host: [email protected]:22 # bastion host          │
      key: /path/to/gcp/basion/key.pem # private key file      │
  # SSH Probe configuration                                    │
  servers:   #
    # run redis-cli ping and check the "PONG"                  │
    - name: Redis (AWS) # Name                                 │
      bastion: aws  # bastion host id ------------------------─┘
      host: 172.20.2.202:22
      username: ubuntu  # SSH Login username
      password: xxxxx   # SSH Login password
      key: /path/to/private.key # SSH login private file
      cmd: "redis-cli"
      args:
        - "-h"
        - "127.0.0.1"
        - "ping"
      env:
        # set the `REDISCLI_AUTH` environment variable for redis password
        - "REDISCLI_AUTH=abc123"
      # check the command output, if does not contain the PONG, mark the status down
      contain : "PONG"

    # Check the process status of `Kafka`
    - name:  Kafka (GCP)
      bastion: gcp         #  ◄------ bastion host id
      host: 172.10.1.100:22
      username: ubuntu
      key: /path/to/private.key
      cmd: "ps -ef | grep kafka"

3.5 Host Resource Usage Probe Configuration

Support the host probe, the configuration example as below.

The feature probe the CPU, Memory, and Disk usage, if one of them exceeds the threshold, then mark the host as status down.

Note:

  • The thresholds are OR conditions, if one of them exceeds the threshold, then mark the host as status down.
  • The Host needs remote server have the following command: top, df, free, awk, grep, tr, and hostname (check the source code to see how it works).
  • The disk usage only check the root disk.
host:
  bastion: # bastion server configuration
    aws: # bastion host ID      ◄──────────────────┐
      host: [email protected] # bastion host      │
      key: /path/to/bastion.pem # private key file │
  # Servers List                                   │
  servers: #
    - name : aws server   #
      bastion: aws #  <-- bastion server id ------─┘
      host: [email protected]:22
      key: /path/to/server.pem
      threshold:
        cpu: 0.80  # cpu usage  80%
        mem: 0.70  # memory usage 70%
        disk: 0.90  # disk usage 90%

    # Using the default threshold
    # cpu 80%, mem 80% and disk 95%
    - name : My VPS
      host: [email protected]:22
      key: /Users/user/.ssh/id_rsa

3.6 Native Client Probe Configuration

# Native Client Probe
client:
  - name: Redis Native Client (local)
    driver: "redis"  # driver is redis
    host: "localhost:6379"  # server and port
    password: "abc123" # password
    # mTLS
    ca: /path/to/file.ca
    cert: /path/to/file.crt
    key: /path/to/file.key

  - name: MySQL Native Client (local)
    driver: "mysql"
    host: "localhost:3306"
    username: "root"
    password: "pass"

  - name: MongoDB Native Client (local)
    driver: "mongo"
    host: "localhost:27017"
    username: "admin"
    password: "abc123"
    timeout: 5s

  - name: Kafka Native Client (local)
    driver: "kafka"
    host: "localhost:9093"
    # mTLS
    ca: /path/to/file.ca
    cert: /path/to/file.crt
    key: /path/to/file.key

  - name: PostgreSQL Native Client (local)
    driver: "postgres"
    host: "localhost:5432"
    username: "postgres"
    password: "pass"

  - name: Zookeeper Native Client (local)
    driver: "zookeeper"
    host: "localhost:2181"
    timeout: 5s
    # mTLS
    ca: /path/to/file.ca
    cert: /path/to/file.crt
    key: /path/to/file.key

3.7 Notification Configuration

# Notification Configuration
notify:
  # Notify to Slack Channel
  slack:
    - name: "Organization #Alert"
      webhook: "https://hooks.slack.com/services/........../....../....../"
      # dry: true   # dry notification, print the Slack JSON in log(STDOUT)
  telegram:
    - name: "Group Name"
      token: 1234567890:ABCDEFGHIJKLMNOPQRSTUVWXYZ # Bot Token
      chat_id: -123456789 # Group ID
    - name: "Channel Name"
      token: 1234567890:ABCDEFGHIJKLMNOPQRSTUVWXYZ # Bot Token
      chat_id: -1001234567890 # Channel ID
  # Notify to Discord Text Channel
  discord:
    - name: "Server #Alert"
      webhook: "https://discord.com/api/webhooks/...../....../"
      # the avatar and thumbnail setting for notify block
      avatar: "https://img.icons8.com/ios/72/appointment-reminders--v1.png"
      thumbnail: "https://freeiconshop.com/wp-content/uploads/edd/notification-flat.png"
      # dry: true # dry notification, print the Discord JSON in log(STDOUT)
      retry: # something the network is not good need to retry.
        times: 3
        interval: 10s
  # Notify to email addresses
  email:
    - name: "XXX Mail List"
      server: smtp.email.example.com:465
      username: [email protected]
      password: ********
      to: "[email protected];[email protected]"
      from: "[email protected]" # Optional
      # dry: true # dry notification, print the Email HTML in log(STDOUT)
  # Notify to AWS Simple Notification Service
  aws_sns:
    - name: AWS SNS
      region: us-west-2 # AWS Region
      arn: arn:aws:sns:us-west-2:298305261856:xxxxx # SNS ARN
      endpoint: https://sns.us-west-2.amazonaws.com # SNS Endpoint
      credential: # AWS Access Credential
        id: AWSXXXXXXXID  # AWS Access Key ID
        key: XXXXXXXX/YYYYYYY # AWS Access Key Secret
  # Notify to Wecom(WeChatwork) robot.
  wecom:
    - name: "wecom alert service"
      webhook: "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=589f9674-a2aa-xxxxxxxx-16bb6c43034a" # wecom robot webhook
  # Notify to Dingtalk
  dingtalk:
    - name: "dingtalk alert service"
      webhook: "https://oapi.dingtalk.com/robot/send?access_token=xxxx"
  # Notify to Lark
  lark:
    - name: "lark alert service"
      webhook: "https://open.feishu.cn/open-apis/bot/v2/hook/d5366199-xxxx-xxxx-bd81-a57d1dd95de4"
  # Notify to a local log file
  log:
    - name: "Local Log"
      file: "/tmp/easeprobe.log"
      dry: true
  # Notify by sms using yunpian  https://www.yunpian.com/official/document/sms/zh_cn/domestic_single_send
  sms:
    - name: "sms alert service - yunpian"
      provider: "yunpian"
      key: xxxxxxxxxxxx # yunpian apikey
      mobile: 123456789,987654321 # mobile phone number, multi phone number joint by `,`
      sign: "xxxxx" # get this from yunpian

Notes: All of the notifications can have the following optional configuration.

  dry: true # dry notification, print the Discord JSON in log(STDOUT)
  timeout: 20s # the timeout send out notification, default: 30s
  retry: # somehow the network is not good and needs to retry.
    times: 3 # default: 3
    interval: 10s # default: 5s

3.8 Global Setting Configuration

# Global settings for all probes and notifiers.
settings:

  # The customized name and icon
  name: "Easeprobe" # the name of the probe: default: "EaseProbe"
  icon: "https://path/to/icon.png" # the icon of the probe. default: "https://megaease.com/favicon.png"
  # Daemon settings

  # pid file path,  default: $CWD/easeprobe.pid,
  # if set to "", will not create pid file.
  pid: /var/run/easeprobe.pid

  # A HTTP Server configuration
  http:
    ip: 127.0.0.1 # the IP address of the server. default:"0.0.0.0"
    port: 8181 # the port of the server. default: 8181
    refresh: 5s # the auto-refresh interval of the server. default: the minimum value of the probes' interval.
    log:
      file: /path/to/access.log # access log file. default: Stdout
      # Log Rotate Configuration (optional)
      self_rotate: true # true: self rotate log file. default: true
                        # false: managed by outside  (e.g logrotate)
                        #        the blow settings will be ignored.
      size: 10 # max of access log file size. default: 10m
      age: 7 #  max of access log file age. default: 7 days
      backups: 5 # max of access log file backups. default: 5
      compress: true # compress the access log file. default: true

  # SLA Report schedule
  sla:
    #  daily, weekly (Sunday), monthly (Last Day), none
    schedule : "daily"
    # UTC time, the format is 'hour:min:sec'
    time: "23:59"
    # debug mode
    # - true: send the SLA report every minute
    # - false: send the SLA report in schedule
    debug: false
    # SLA data persistence file path.
    # The default location is `$CWD/data/data.yaml`
    data: /path/to/data/file.yaml
    # Use the following to disable SLA data persistence
    # data: "-"
    backups: 5 # max of SLA data file backups. default: 5
               # if set to a negative value, keep all backup files

  notify:
    # dry: true # Global settings for dry run
    retry: # Global settings for retry
      times: 5
      interval: 10s

  probe:
    timeout: 30s # the time out for all probes
    interval: 1m # probe every minute for all probes

  # easeprobe program running log file.
  log:
    file: "/path/to/easeprobe.log" # default: stdout
    # Log Level Configuration
    # can be: panic, fatal, error, warn, info, debug.
    level: "debug"
    # Log Rotate Configuration (optional)
    self_rotate: true # true: self rotate log file. default: true
                        # false: managed by outside  (e.g logrotate)
                        #        the blow settings will be ignored.
    size: 10 # max of access log file size. default: 10m
    age: 7 #  max of access log file age. default: 7 days
    backups: 5 # max of access log file backups. default: 5
    compress: true # compress the access log file. default: true

  # Date format
  # Date
  #  - January 2, 2006
  #  - 01/02/06
  #  - Jan-02-06
  #
  # Time
  #   - 15:04:05
  #   - 3:04:05 PM
  #
  # Date Time
  #   - Jan _2 15:04:05                   (Timestamp)
  #   - Jan _2 15:04:05.000000            (with microseconds)
  #   - 2006-01-02T15:04:05-0700          (ISO 8601 (RFC 3339))
  #   - 2006-01-02 15:04:05
  #   - 02 Jan 06 15:04 MST               (RFC 822)
  #   - 02 Jan 06 15:04 -0700             (with numeric zone)
  #   - Mon, 02 Jan 2006 15:04:05 MST     (RFC 1123)
  #   - Mon, 02 Jan 2006 15:04:05 -0700   (with numeric zone)
  timeformat: "2006-01-02 15:04:05 UTC"

4. Community

5. License

EaseProbe is under the Apache 2.0 license. See the LICENSE file for details.

Issues
  • [feature request]Hot reloading support

    [feature request]Hot reloading support

    Background & X Problem Currently (2022-05-05), easeprobe does not support hot reloading, so the problem is that if I just modify the config.yaml file (which can be a frequent action), then I need to restart the application for it to take effect.

    Proposal and Expectation We can add a reload option to the configuration file to enable it:

    reload:
      enabled: true # default is false
      period: 10s # scan interval, default is 10s
    

    Solutions & Y Problems We need to not lose the SLA information that the configuration has not changed when the reload is turned on.

    enhancement 
    opened by douglarek 21
  • shell content error, no dingding message send

    shell content error, no dingding message send

    Enviornment (please complete the following information):

    • OS: linux
    • EaseProbe Version
    • latest version

    Describe the bug 配置shell脚本,脚本内容出错,钉钉消息未发送通知,日志也未打印发送钉钉通知消息 Configure shell script, script error, but messages are not sent to DingDing notifications, and there is no notifcaiton logs as well.

    image

    To Reproduce

    Expected behavior 期望脚本报错发送钉钉消息,如果是钉钉配置出错,希望把日志打印出来

    opened by studyhuang1996 19
  • Fix the concurrent map access crashing problem

    Fix the concurrent map access crashing problem

    Background

    We have a map to collect all of the probers' probe results, all of the probers would set its result into this map concurrently in a different key(this is not a problem), however, we have another go routine that persistent this map periodically, this causes the "concurrent map iteration and map write" problem and it makes EaseProbe crash.

    the stake trace of the crash as below:

    fatal error: concurrent map iteration and map write
    
    goroutine 50 [running]:
    runtime.throw({0xfd17f1?, 0x0?})
            /usr/local/go/src/runtime/panic.go:992 +0x71 fp=0xc0172745f0 sp=0xc0172745c0 pc=0x438b31
    runtime.mapiternext(0x0?)
            /usr/local/go/src/runtime/map.go:871 +0x4eb fp=0xc017274660 sp=0xc0172745f0 pc=0x41058b
    runtime.mapiterinit(0xc0172747e8?, 0xc0265008d0?, 0xc017274710?)
            /usr/local/go/src/runtime/map.go:861 +0x228 fp=0xc017274680 sp=0xc017274660 pc=0x410048
    reflect.mapiterinit(0xc0172746c8?, 0x8c24b3?, 0xc000303400?)
    ....
    ....
    ....
    ....
    gopkg.in/yaml%2ev3.(*encoder).marshalDoc(0xc000303400, {0x0, 0x0}, {0xe7b4e0?, 0xc02a155740?, 0x0?})
            /home/ubuntu/go/pkg/mod/gopkg.in/[email protected]/encode.go:105 +0x185 fp=0xc017275ab8 sp=0xc017275838 pc=0x8c2765
    gopkg.in/yaml%2ev3.Marshal({0xe7b4e0?, 0xc02a155740})
            /home/ubuntu/go/pkg/mod/gopkg.in/[email protected]/yaml.go:222 +0x370 fp=0xc017275de8 sp=0xc017275ab8 pc=0x8e2e70
    gopkg.in/yaml%2ev3.Marshal({0xe7b4e0?, 0xc02a155740})
            /home/ubuntu/go/pkg/mod/gopkg.in/[email protected]/yaml.go:222 +0x370 fp=0xc017275de8 sp=0xc017275ab8 pc=0x8e2e70
    github.com/megaease/easeprobe/probe.SaveDataToFile({0xc0015858c0, 0x18})
            /home/ubuntu/hchen/easeprobe/probe/data.go:102 +0x85 fp=0xc017275e50 sp=0xc017275de8 pc=0x8e6ba5
    main.saveData.func1()
            /home/ubuntu/hchen/easeprobe/cmd/easeprobe/report.go:34 +0x3d fp=0xc017275ee8 sp=0xc017275e50 pc=0xda975d
    main.saveData(0xc000090780)
            /home/ubuntu/hchen/easeprobe/cmd/easeprobe/report.go:59 +0x16f fp=0xc017275fc8 sp=0xc017275ee8 pc=0xda958f
    main.main.func3()
            /home/ubuntu/hchen/easeprobe/cmd/easeprobe/main.go:159 +0x26 fp=0xc017275fe0 sp=0xc017275fc8 pc=0xda7f66
    runtime.goexit()
            /usr/local/go/src/runtime/asm_amd64.s:1571 +0x1 fp=0xc017275fe8 sp=0xc017275fe0 pc=0x46b6a1
    created by main.main
            /home/ubuntu/hchen/easeprobe/cmd/easeprobe/main.go:159 +0x5fd
    
    goroutine 1 [chan receive, 328 minutes]:
    main.main()
            /home/ubuntu/hchen/easeprobe/cmd/easeprobe/main.go:205 +0x82b
    

    the crash code line as blow:

    // SaveDataToFile save the results to file
    func SaveDataToFile(filename string) error {
            metaData.file = filename
            if strings.TrimSpace(filename) == "-" {
                    return nil
            }
    
            dataBuf, err := yaml.Marshal(resultData)   //<========= Panic at this line
            if err != nil {
                    return err
            }
    
            genMetaBuf()
            buf := append(metaBuf, dataBuf...)
    
            if err := ioutil.WriteFile(filename, []byte(buf), 0644); err != nil {
                    return err
            }
            return nil
    }
    

    Investigation

    The problem here is the prober's result (statistics data) would be consumed by the following modules:

    • Data Saving
    • SLA Report
    • Web Server

    All of the above modules only read the statistics data, the probers would update the statistics data.

    So, this is the read-write concurrent problem.

    Solution

    We transfer all of the probers statistics data into the Save Manager (via a channel), and all of the consumers(Saving, SLA Report, Web Server) retrieve the statistics data from Save Manager instead of the probers directly.

    1. Each Prober retrieves the persistent data from Save Manager by a clone object.
    2. Each Prober clones & reports its Result to Save Manager via a go channel.
    3. Web Server and SLA Report would query the result data from Save Manager.
    4. A Read-Write Lock added in Save Manager's Get/Set method.
                                                                  ┌────────────┐
                                                       Query      │            │
      Result┌────────┐ retrieve                 ┌────────────────►│ Web Server │
    ┌───────┤ Prober │◄────────┐                │                 │            │
    │       └────────┘         │                │                 └────────────┘
    │                          │ Result. ┌──────┴──────┐
    │ Result┌────────┐ retrieve│ Clone() │             │          ┌────────────┐
    ├───────┤ Prober │◄────────┼─────────┤ Save Manager│  Query   │            │
    │       └────────┘         │         │   data.go   ├─────────►│ SLA Report │
    │                          │    ┌────►             │          │            │
    │ Result┌────────┐ retrieve│    │    └─────▲─┬─────┘          └────────────┘
    ├───────┤ Prober │◄────────┘    │          │ │
    │       └────────┘              │          │ │  map[name]*Result
    │                               │          │ │
    │                               │     Load │ │ Save
    │    Result.                    │      ┌───┴─▼────┐
    │    Clone()  ┌──────────────┐  │      │          │
    └────────────►│    Channel   ├──┘      │   File   │
                  └──────────────┘         │          │
                                           └──────────┘
    
    opened by haoel 17
  • Connect probers and notifiers by Channel

    Connect probers and notifiers by Channel

    This PR introduces the channel to connect the probers and notifiers.

    For more information, please take a look the discussion #82

    Example:

    if we have the following configuration

    http: 
       - name: probe A
         channels : [ Chann_A, Chann_B]
    shell:
       - name: probe B
         channels: [ Chann_C ]
    notify:
       - discord: Discord
         channels: [Chann_A, Chann_C]
       - email: Gmail
         channels: [Chann_B]
    

    Then, we will have the following diagram

    ┌───────┐          ┌─────────┐
    │Probe B├─────────►│ Chann_C ├─────┐
    └───────┘          └─────────┘     │
                                       │
                                       │
                       ┌─────────┐     │    ┌─────────┐
                ┌─────►│ Chann_A ├─────▼────► Discord │
                │      └─────────┘          └─────────┘
    ┌───────┐   │
    │Probe A├───┤
    └───────┘   │
                │      ┌─────────┐          ┌─────────┐
                └─────►│ Chann_B ├──────────►  Gmail  │
                       └─────────┘          └─────────┘
    

    Test

    I've done the following test:

    • [x] Case 1: backward compatibility - NO channels defined for all probers and notifiers.
    • [x] Case 2 : 1 prober -> 1 channel -> 1 notifier.
    • [x] Case 3: 5 probers and 3 notifiers, define 3 channels.
    • [x] Case 4: the channel hasn't probers. - everything's fine, but a warning message in the log
    • [x] Case 5: the channel hasn't notifiers - everything's fine, but a warning message in the log.
    • [x] Case 6: the probers and notifiers without channels that can be connected together.
    opened by haoel 11
  • Support keyword found/not found for HTTP probe

    Support keyword found/not found for HTTP probe

    When using http probing, it is common to check for the existence or absence of a keyword. I would love to have such a feature in easeprobe.

    Implementation suggestion:

    http:
    - name: ...
      url: ...
      success_keyword: "Welcome to my site"
      failure_keyword: "Unauthorized"
    
    enhancement 
    opened by DannyBen 10
  • Versionizing the binary, config, data file

    Versionizing the binary, config, data file

    fixes #98

    • [x] easeprobe -v
    $ ./easeprobe -v                                                                                                                                  ─╯
    EaseProbe v1.5.0
    
    • [x] easeprobe -h
    $ ./easeprobe -h                                                                                                                                  ─╯
    Usage of build/bin/easeprobe:
      -d    dry notification mode
      -f string
            configuration file (default "config.yaml")
      -v    prints version
    
    • [x] config.yaml
    version : 1.5.0
    
    • [x] data.yaml
    ---
    name: EaseProbe
    version: v1.5.0
    ---
    Probe:
       ...
      ....
    
    opened by haoel 7
  •  easeprod  start error

    easeprod start error

    /opt # easeprobe -f config.yaml INFO[0000] The data file data/data.yaml, was not found! INFO[0000] Load the configuration file successfully!
    INFO[0000] Successfully created the PID file: /opt/easeprobe.pid INFO[0000] Application Log File [Stdout] - Self-Rotate
    INFO[0000] Web Access Log File [Stdout] - Self-Rotate
    INFO[2022-07-05T03:44:22Z] [Web] HTTP server is listening on 0.0.0.0:8181 INFO[2022-07-05T03:44:22Z] Probe [http] - [ElasticSearch] base options are configured! INFO[2022-07-05T03:44:22Z] [Metric] Counter <EaseProbe_http_total> is created! INFO[2022-07-05T03:44:22Z] [Metric] Gauge <EaseProbe_http_duration> is created! INFO[2022-07-05T03:44:22Z] [Metric] Gauge <EaseProbe_http_status> is created! INFO[2022-07-05T03:44:22Z] [Metric] Gauge <EaseProbe_http_sla> is created! INFO[2022-07-05T03:44:22Z] [Metric] Counter <EaseProbe_http_status_code> is created! INFO[2022-07-05T03:44:22Z] [Metric] Gauge <EaseProbe_http_content_len> is created! INFO[2022-07-05T03:44:22Z] [Metric] Gauge <EaseProbe_http_dns_duration> is created! INFO[2022-07-05T03:44:22Z] [Metric] Gauge <EaseProbe_http_connect_duration> is created! INFO[2022-07-05T03:44:22Z] [Metric] Gauge <EaseProbe_http_tls_duration> is created! INFO[2022-07-05T03:44:22Z] [Metric] Gauge <EaseProbe_http_send_duration> is created! INFO[2022-07-05T03:44:22Z] [Metric] Gauge <EaseProbe_http_wait_duration> is created! INFO[2022-07-05T03:44:22Z] [Metric] Gauge <EaseProbe_http_transfer_duration> is created! INFO[2022-07-05T03:44:22Z] [Metric] Gauge <EaseProbe_http_total_duration> is created! FATA[2022-07-05T03:44:22Z] No notifies configured, exiting...

    config.yaml

    http:
      - name: test
        url: http://xxxx.com
    
    opened by hongery 6
  • fix undefined processExists error

    fix undefined processExists error

    just a copy of daemon_darwin to fix daemon/daemon.go:90:5: undefined: processExists

    I tried changing the headers to make the daemon_darwin be used but it kept failing.

    //go:build darwin && openbsd
    // +build darwin,openbsd
    

    Is this command i'm using to cross-compile easeprobe wrong?

    GOOS=openbsd GOARCH=amd64 go build -a -ldflags '-s -w -extldflags "-static"' -gcflags=-G=3 -o $PWD/build/bin/easeprobe.obsd $PWD/cmd/easeprobe
    
    
    opened by proditis 6
  • mysql client probe fails to close connections

    mysql client probe fails to close connections

    Enviornment:

    • OS: OpenBSD tester 6.5 GENERIC#13 amd64
    • EaseProbe Version v1.3.0
    • MySQL Ver 15.1 Distrib 10.0.38-MariaDB, for OpenBSD (amd64) using readline 4.3

    Describe the bug When the mysql client probe is activated the connection stays open which lead to exhaustion of the max connections of the database server.

    Based on the config below i get one connection per probe interval

    To Reproduce Steps to reproduce the behavior: Use the mysql client probe on a remote database. I used the following config

    settings:
      http:
        ip: 127.0.0.1
        port: 8181
        refresh: 5s
    
      sla:
        schedule : "daily"
        time: "23:59"
        debug: false
    
      notify:
        dry: true
        retry: # Global settings for retry
          times: 5
          interval: 10s
    
      probe:
        timeout: 30s
        interval: 1m # probe every minute for all probes
        logfile: "/var/logs/easyprobe.log"
    
      loglevel: "info"
      timeformat: "2006-01-02 15:04:05 UTC"
    
    client:
      - name: MariaDB Client
        driver: "mysql"
        host: "10.7.0.253:3306"
        username: "user"
        password: "pass"
    

    Run easeprobe and observe the connections staying open, one for each minute of uptime.

    Expected behavior I expect the connection from each probe to close after its done

    Extra details I have looked online for this kind of behavior it it seems the go-mysql driver has seen quite a few of similar reports (of non closing connections). Based on what i found so far, this problem seems to be observed on long running go applications mostly.

    My golang knowledge is limited and I could only try a few simple "suggestions" i saw online without success which included:

    • Adding these on mysql.go right after sql.Open() had: no success
            db.SetConnMaxIdleTime(10 * time.Second)
            db.SetConnMaxLifetime(30 * time.Second)
            db.SetMaxOpenConns(1)
            db.SetMaxIdleConns(1)
    
    • Removing the defer keyword from db.Close() and moving it right before the return: no success
    • Played with different connection/timeout settings: no success

    I will continue to investigate and test just to rule out any configuration issues on the database side and will update here accordingly.

    opened by proditis 6
  • Disable SLA persistence when conf.Settings.SLAReport.DataFile is

    Disable SLA persistence when conf.Settings.SLAReport.DataFile is "-"

    This PR does

    • [x] removes the Join(dir,'data',file) so that our data.yaml file location is predictable
    • [x] Changes the decision tree logic for the data.yaml file based on the specifications agreed with @haoel
    • [x] disables logging when conf.Settings.SLAReport.DataFile is explicitly set to "-"
    • [x] updates SLA data Persistence section to document the behavior of data: "-"
    • [x] merge a duplicate readme notice
    • [x] Update global.DefaultDataFile to data/data.yaml so that by default we use a sub-folder for the data files

    Cases

    • Case One: No data file is configured, then we use the $CWD/data.yaml as the default.
    • Case Two: data file name configured, but not configured the directory, such as: data: mydatafile.yaml, we use the $CWD/mydatafile.yaml
    • Case Three: the full path has been configured. we just simply use the full path.
    • Case Four: the disable flag configured - eg data : - , then we disable the data file.
    opened by proditis 5
  • Accidentally started another instance of easeprobe on same host and CTRL+C didnt seem to work

    Accidentally started another instance of easeprobe on same host and CTRL+C didnt seem to work

    Hi,

    I accidentally started a second easeprobe process (from a different binary / location) and after pressing ctrl+c i had to wait for a long time until the system exits.

    At first i thought that it got stuck but after testing further, it exited after the initiated probes had completed first.

    During the tests, the infrastructure the easeprobe was trying to "probe" was not responsive, so i suspect this was the connection timeout that was waiting to kick-in and finish up.

    I believe that the active probes should immediately stop operating once SIGINT is received, but i may overlooked something.

    ~Another workaround to this could be to to "release" the signal handler once the signal is received, so consecutive CTRL+C / SIGINT invocations can actually kill the process without waiting if needed?~

    After investigating it a bit more it seems to needing bit more than just signal.Ignore()

    opened by proditis 5
  • every hourly Restart stat up and down times

    every hourly Restart stat up and down times

    $CMD/data/data.yaml I want to stat up and down times,start from zero.every hourly. How it should be configured?

    ---
    name: EaseProbe
    version: v1.7.0
    ---
    "":
        name: ""
        endpoint: http://xxxxx:8000/accounts
        time: 2022-07-25T03:40:09.881474243Z
        timestamp: 1658720409881
        rtt: 354.042µs
        status: down
        prestatus: down
        message: 'Error (http): Error: Get "http://xxxx:8000/accounts": dial tcp xxxxx:8000: connect: connection refused'
        latestdowntime: 2022-07-25T02:44:48.241836769Z
        recoverytime: 0s
        stat:
            since: 2022-07-07T02:49:31.152596481Z
            total: 1454
            status:
                up: 1412
                down: 42
            uptime: 23h32m0s
            downtime: 42m0s
        timeformat: 2006-01-02 15:04:05 UTC
    
    opened by hongery 14
Releases(v1.7.0)
  • v1.7.0(Jul 27, 2022)

    Changed Logs

    Features

    Major Features

    • Support regexp output check for http/shell/ssh probe by @haoel in https://github.com/megaease/easeprobe/pull/169
    • Support MySQL/Redis/MongoDB/PostgreSQL/Zookeeper Native Client to check the data by @haoel in https://github.com/megaease/easeprobe/pull/171
    • Support the proxy for HTTP probe and can customize the User-Agent by @haoel in https://github.com/megaease/easeprobe/pull/177
    • Add HTTP Probe trace time metrics by @haoel in https://github.com/megaease/easeprobe/pull/150
    • Add the passphrase config for HTTPS private key by @zhangjunjie6b in https://github.com/megaease/easeprobe/pull/174
    • Add more query filter options for SLA HTML and JSON API by @haoel in https://github.com/megaease/easeprobe/pull/152 & https://github.com/megaease/easeprobe/pull/158
    • Support time zone configuration by @haoel in https://github.com/megaease/easeprobe/pull/167

    Enhancement

    • Enhancement: Equally distributing starts the probers. by @haoel in https://github.com/megaease/easeprobe/pull/157 & @proditis in https://github.com/megaease/easeprobe/pull/160
    • set the SO_LINGER=0 to TCP, HTTP, TLS, SSH probe by @haoel in https://github.com/megaease/easeprobe/pull/159

    Non-Functional

    • EaseProbe Benchmark Test Report by @haoel in https://github.com/megaease/easeprobe/pull/161

    Bug fixing

    • Fix the concurrent map access crashing problem by @haoel in https://github.com/megaease/easeprobe/pull/162
    • Fix Lark(Feishu) notifications don't work by @xhkyyy in https://github.com/megaease/easeprobe/pull/170

    Trivial

    • Using the default const value replace the hard code by @haoel in https://github.com/megaease/easeprobe/pull/151
    • Add an example config.yaml in Getting Start by @haoel in https://github.com/megaease/easeprobe/pull/164
    • Slightly optimizing the log and adding a few unit test cases by @haoel in https://github.com/megaease/easeprobe/pull/168
    • Change the getInt() and getFloat() to generic function by @haoel in https://github.com/megaease/easeprobe/pull/173

    New Contributors

    • @xhkyyy made their first contribution in https://github.com/megaease/easeprobe/pull/170
    • @zhangjunjie6b made their first contribution in https://github.com/megaease/easeprobe/pull/174

    Full Changelog: https://github.com/megaease/easeprobe/compare/v1.6.0...v1.7.0

    Source code(tar.gz)
    Source code(zip)
    checksums.txt(826 bytes)
    easeprobe-v1.7.0-darwin-amd64.tar.gz(7.45 MB)
    easeprobe-v1.7.0-darwin-arm64.tar.gz(7.19 MB)
    easeprobe-v1.7.0-linux-amd64.tar.gz(7.17 MB)
    easeprobe-v1.7.0-linux-arm64.tar.gz(6.58 MB)
    easeprobe-v1.7.0-openbsd-amd64.tar.gz(7.17 MB)
    easeprobe-v1.7.0-openbsd-arm64.tar.gz(6.58 MB)
    easeprobe-v1.7.0-windows-amd64.tar.gz(7.21 MB)
    easeprobe-v1.7.0-windows-arm64.tar.gz(6.62 MB)
  • v1.6.0(Jun 27, 2022)

    Changed Logs

    Features

    Major Features

    • Introduce the Channel to connect the probers and notifiers @haoel in https://github.com/megaease/easeprobe/pull/108
    • introduce TLS probe by @tg123 in https://github.com/megaease/easeprobe/pull/110, https://github.com/megaease/easeprobe/pull/139
    • Introduce Teams support by @tg123 in https://github.com/megaease/easeprobe/pull/109
    • Introduce the Syslog notification by @haoel in https://github.com/megaease/easeprobe/pull/129
    • Introduce the Shell notification by @haoel in https://github.com/megaease/easeprobe/pull/130
    • Introduce the Memcache client Probe by @proditis in https://github.com/megaease/easeprobe/pull/138
    • Support multiple disks usage check for host probe by @haoel in https://github.com/megaease/easeprobe/pull/147

    Enhancement

    • Add go ver and git SHA to version by @tg123 in https://github.com/megaease/easeprobe/pull/142
    • Add an option to disable the HTTPS security checks by @haoel in https://github.com/megaease/easeprobe/pull/145
    • Detecting the duplicated name and log the error message by @haoel in https://github.com/megaease/easeprobe/pull/131
    • Add env and clean_env for shell notification and probe by @haoel in https://github.com/megaease/easeprobe/pull/136
    • Remove probes with fail config by @proditis in https://github.com/megaease/easeprobe/pull/137

    Non-Functional

    • Add Unit Test Cases by @haoel in https://github.com/megaease/easeprobe/pull/118, https://github.com/megaease/easeprobe/pull/119, https://github.com/megaease/easeprobe/pull/127, https://github.com/megaease/easeprobe/pull/128,
    • Add contributing guide by @proditis in https://github.com/megaease/easeprobe/pull/114
    • Refactoring the Notify interface to align with the Probe interface by @haoel in https://github.com/megaease/easeprobe/pull/115
    • Add the license check in Github Action by @haoel in https://github.com/megaease/easeprobe/pull/112
    • Documentation update by by @proditis in https://github.com/megaease/easeprobe/pull/133, @haoel in https://github.com/megaease/easeprobe/pull/132, https://github.com/megaease/easeprobe/pull/140
    • disable CGO to build static executable by @hellojukay in https://github.com/megaease/easeprobe/pull/141

    Bug fixing

    • slack notify timeout should not be hard coded by @haoel in https://github.com/megaease/easeprobe/pull/113
    • Using DurationStr() format Discord Uptime and DownTime by @haoel in https://github.com/megaease/easeprobe/pull/148

    New Contributors

    • @tg123 made their first contribution in https://github.com/megaease/easeprobe/pull/109
    • @hellojukay made their first contribution in https://github.com/megaease/easeprobe/pull/141

    Full Changelog: https://github.com/megaease/easeprobe/compare/v1.5.0...v1.6.0

    Source code(tar.gz)
    Source code(zip)
    checksums.txt(826 bytes)
    easeprobe-v1.6.0-darwin-amd64.tar.gz(7.27 MB)
    easeprobe-v1.6.0-darwin-arm64.tar.gz(7.02 MB)
    easeprobe-v1.6.0-linux-amd64.tar.gz(7.00 MB)
    easeprobe-v1.6.0-linux-arm64.tar.gz(6.41 MB)
    easeprobe-v1.6.0-openbsd-amd64.tar.gz(6.99 MB)
    easeprobe-v1.6.0-openbsd-arm64.tar.gz(6.41 MB)
    easeprobe-v1.6.0-windows-amd64.tar.gz(7.03 MB)
    easeprobe-v1.6.0-windows-arm64.tar.gz(6.45 MB)
  • v1.5.0(May 24, 2022)

    Change Logs

    Features

    Functional

    • SMS alert services support. Support Twilio, Vonage, and YunPian PR #60
    • Support for keyword matching inside the body of HTTP responses PR #80
    • Customizable name and icon to be used by notifications PR #79
    • Support from-email in yaml if specified PR #96
    • Support for using URL as configuration file. PR #97
    • Support ?refresh=30s for SLA HTML page. PR #94

    Non-Functional

    • Persistence of SLA data.yaml. The default behavior for EaseProbe is now to create a file at $CWD/data/data.yaml with SLA details that should persist between restarts. If you don't want that behavior make sure you disable it explicitly. PR #81 #85 #92
    • Support to export the metrics to Prometheus. Supports probe status, duration, total, and the metrics for particular probe, like cpu, memory, and disk for host probe. PR #95
    • Introduing the easeprobe.pid. The default behavior for EaseProbe is now to create a file at $CWD/easeprobe.pid with the process id number to assist in administering the daemon. PR #75
    • Log file rotation. Support EaseProbe log and access log self-rotation and outside rotation (e.g. logrotate) PR #74 #75
    • Versionizing the binary, config, data file. PR #100

    Bug Fixies & Small Improvements

    • The API URL doesn't work with a / at the end by @proditis in https://github.com/megaease/easeprobe/pull/62
    • Correct the $PROBE_CONFIG assignment in entrypoint.sh by @haoel in https://github.com/megaease/easeprobe/pull/86
    • EaseProbe exits if the Web Server address is already in use by @haoel in https://github.com/megaease/easeprobe/pull/90
    • Content is truncated to send markdown msg on Wecom webhook(#101) by @jordy1024 in https://github.com/megaease/easeprobe/pull/103
    • Redirect df stderr to /dev/null and limit to rootfs / by @proditis in https://github.com/megaease/easeprobe/pull/61
    • Minor Dockerfile/entrypoint.sh edit and documentation updates by @proditis in https://github.com/megaease/easeprobe/pull/84

    Documentation

    • Initial roadmap draft by @proditis in https://github.com/megaease/easeprobe/pull/78
    • update the roadmap to reflect current plans by @proditis in https://github.com/megaease/easeprobe/pull/107
    • update README.md link to host.go by @proditis in https://github.com/megaease/easeprobe/pull/58
    • Document changes from #36 by @proditis in https://github.com/megaease/easeprobe/pull/59
    • Update the Overview Diagram and Using the Chi as Web Framework by @haoel in https://github.com/megaease/easeprobe/pull/72
    • Fix typo in README by @youniverse-zhao in https://github.com/megaease/easeprobe/pull/77
    • Fix typo by @Allenxuxu in https://github.com/megaease/easeprobe/pull/67

    CI

    • Add CI yaml by @Allenxuxu in https://github.com/megaease/easeprobe/pull/68
    • Add the code lint tool in CI by @haoel in https://github.com/megaease/easeprobe/pull/71
    • CI workflow restore GITHUB_WORKSPACE permissions by @proditis in https://github.com/megaease/easeprobe/pull/106

    New Contributors

    • @proditis made their first contribution in https://github.com/megaease/easeprobe/pull/58
    • @Allenxuxu made their first contribution in https://github.com/megaease/easeprobe/pull/67
    • @nullsimon made their first contribution in https://github.com/megaease/easeprobe/pull/60
    • @youniverse-zhao made their first contribution in https://github.com/megaease/easeprobe/pull/77
    • @SuperK- made their first contribution in https://github.com/megaease/easeprobe/pull/96
    • @jordy1024 made their first contribution in https://github.com/megaease/easeprobe/pull/103

    Full Changelog: https://github.com/megaease/easeprobe/compare/v1.4.0...v1.5.0

    Source code(tar.gz)
    Source code(zip)
    checksums.txt(826 bytes)
    easeprobe-v1.5.0-darwin-amd64.tar.gz(7.22 MB)
    easeprobe-v1.5.0-darwin-arm64.tar.gz(6.96 MB)
    easeprobe-v1.5.0-linux-amd64.tar.gz(6.94 MB)
    easeprobe-v1.5.0-linux-arm64.tar.gz(6.36 MB)
    easeprobe-v1.5.0-openbsd-amd64.tar.gz(6.94 MB)
    easeprobe-v1.5.0-openbsd-arm64.tar.gz(6.36 MB)
    easeprobe-v1.5.0-windows-amd64.tar.gz(6.97 MB)
    easeprobe-v1.5.0-windows-arm64.tar.gz(6.39 MB)
  • v1.4.0(Apr 29, 2022)

    Change Logs

    Features

    • Add fetch config from the internet by @gelleson in https://github.com/megaease/easeprobe/pull/36
    • Add the downtime for recovery notification https://github.com/megaease/easeprobe/pull/44
    • Support the SLA Live Report & Add Overview Diagram https://github.com/megaease/easeprobe/pull/51
    • Support custom preferred response code for HTTP probe by @douglarek in https://github.com/megaease/easeprobe/pull/53

    Release Package

    • Support the arm64 docker image https://github.com/megaease/easeprobe/pull/50
    • Support the OpenBSD platform https://github.com/megaease/easeprobe/pull/55

    Bug Fixings

    • MySQL client connection leaks https://github.com/megaease/easeprobe/pull/57

    Code Refactory

    • remove function configNotifiers useless parameters by @wuqinqiang in https://github.com/megaease/easeprobe/pull/46

    New Contributors

    • @wuqinqiang made their first contribution in https://github.com/megaease/easeprobe/pull/46
    • @douglarek made their first contribution in https://github.com/megaease/easeprobe/pull/53

    Full Changelog: https://github.com/megaease/easeprobe/compare/v1.3.0...v1.4.0

    Source code(tar.gz)
    Source code(zip)
    checksums.txt(826 bytes)
    easeprobe-v1.4.0-darwin-amd64.tar.gz(6.21 MB)
    easeprobe-v1.4.0-darwin-arm64.tar.gz(5.98 MB)
    easeprobe-v1.4.0-linux-amd64.tar.gz(5.98 MB)
    easeprobe-v1.4.0-linux-arm64.tar.gz(5.48 MB)
    easeprobe-v1.4.0-openbsd-amd64.tar.gz(5.98 MB)
    easeprobe-v1.4.0-openbsd-arm64.tar.gz(5.48 MB)
    easeprobe-v1.4.0-windows-amd64.tar.gz(6.04 MB)
    easeprobe-v1.4.0-windows-arm64.tar.gz(5.54 MB)
  • v1.3.0(Apr 19, 2022)

    Change Logs

    Features

    • Notify: Support Lark(Feishu) notification. #39
    • Notify: Support dingtalk notification. #23
    • Probe: Support SSH Probe and support the bastion/jumper #29, #33
    • Probe: Support host resource usage probe #40
    • Configuration: Support enviornment variables in yaml #34

    Bug Fixing

    • Fix gorelease problem - add CGO_ENABLED=0 https://github.com/megaease/easeprobe/pull/26
    • Fix the null pointer exception when TLS is not configured https://github.com/megaease/easeprobe/pull/31

    Code Refertory

    • Probe & Notification Abstration #25 #27 #28 #29
    • Make function generic by upgrading to Go 1.18 #18
    • Refactor the Docker entrypoint.sh #22
    • Refactory the Dockerfile #21 #37

    New Contributors

    • @zhangtaomox made their first contribution in https://github.com/megaease/easeprobe/pull/23
    • @muicoder made their first contribution in https://github.com/megaease/easeprobe/pull/31
    • @gelleson made their first contribution in https://github.com/megaease/easeprobe/pull/34
    • @tigerlee made their first contribution in https://github.com/megaease/easeprobe/pull/39

    Full Changelog: https://github.com/megaease/easeprobe/compare/v1.2.0...v1.3.0

    Source code(tar.gz)
    Source code(zip)
    checksums.txt(828 bytes)
    easeprobe-v1.3.0-darwin-amd64.tar.gz(6.02 MB)
    easeprobe-v1.3.0-darwin-arm64.tar.gz(5.79 MB)
    easeprobe-v1.3.0-linux-amd64.tar.gz(5.80 MB)
    easeprobe-v1.3.0-linux-arm64.tar.gz(5.31 MB)
    easeprobe-v1.3.0-openbsd-amd64.tar.gz(5.80 MB)
    easeprobe-v1.3.0-openbsd-arm64.tar.gz(5.31 MB)
    easeprobe-v1.3.0-windows-amd64.tar.gz(5.85 MB)
    easeprobe-v1.3.0-windows-arm64.tar.gz(5.36 MB)
  • v1.2.0(Mar 31, 2022)

    Change Logs

    • Support Zookeeper Native Client mTLS Probe #8
    • Support Telegram Notification #7
    • Support AWS SNS Notification #12
    • Support WeChat Work Notification #14
    • Move the debug option from settings to settings.sla #9

    Thanks for @HessTina-YuI and @xiekeyi98 contributing to the Zookeeper probe and WeChat Work notification.

    Source code(tar.gz)
    Source code(zip)
    checksums.txt(618 bytes)
    easeprobe-v1.2.0-darwin-amd64.tar.gz(5.54 MB)
    easeprobe-v1.2.0-darwin-arm64.tar.gz(5.46 MB)
    easeprobe-v1.2.0-linux-amd64.tar.gz(5.34 MB)
    easeprobe-v1.2.0-linux-arm64.tar.gz(4.91 MB)
    easeprobe-v1.2.0-windows-amd64.tar.gz(5.41 MB)
    easeprobe-v1.2.0-windows-arm64.tar.gz(4.98 MB)
  • v1.1.0(Mar 27, 2022)

    Change Logs

    • Support PostgreSQL probe (#3)
    • Support Telegram notification. (#7)
    • Support the avatar & thumbnail customization for discord notification (#7)
    • Add the name and timeout for notification (#7)
    • Refactory the notify retry function (#7)

    Thanks for @ken8203 contributing the PostgreSQL probe

    Source code(tar.gz)
    Source code(zip)
    checksums.txt(618 bytes)
    easeprobe-v1.1.0-darwin-amd64.tar.gz(4.66 MB)
    easeprobe-v1.1.0-darwin-arm64.tar.gz(4.58 MB)
    easeprobe-v1.1.0-linux-amd64.tar.gz(4.49 MB)
    easeprobe-v1.1.0-linux-arm64.tar.gz(4.10 MB)
    easeprobe-v1.1.0-windows-amd64.tar.gz(4.55 MB)
    easeprobe-v1.1.0-windows-arm64.tar.gz(4.17 MB)
  • v1.0.0(Mar 25, 2022)

    Release Notes

    EaseProbe would do 3 kinds of works - Probe, Notify and Report.

    1. Probe - Ease Probe supports the following probing methods:
    • HTTP. Checking the HTTP status code, Support mTLS, HTTP Basic Auth, and can set the Request Header/Body.
    • TCP. Just simply check the TCP connection can be established or not.
    • Shell. Run a Shell command and check the result.)
    • Client. Currently, support the following native client. Support the mTLS.
      • MySQL. Connect to the MySQL server and run the SHOW STATUS SQL.
      • Redis. Connect to the Redis server and run the PING command.
      • MongoDB. Connect to MongoDB server and just ping server.
      • Kafka. Connect to Kafka server and list all topics.
    1. Notification - EaseProbe supports the following notifications:
    • Email. Support multiple email addresses.
    • Slack. Using Webhook for notification
    • Discord. Using Webhook for notification
    • Log File. Write the notification into a log file
    1. Report
    • SLA Report. EaseProbe would send the daily, weekly or monthly SLA report.
    Source code(tar.gz)
    Source code(zip)
    checksums.txt(618 bytes)
    easeprobe-v1.0.0-darwin-amd64.tar.gz(4.41 MB)
    easeprobe-v1.0.0-darwin-arm64.tar.gz(4.34 MB)
    easeprobe-v1.0.0-linux-amd64.tar.gz(4.26 MB)
    easeprobe-v1.0.0-linux-arm64.tar.gz(3.88 MB)
    easeprobe-v1.0.0-windows-amd64.tar.gz(4.31 MB)
    easeprobe-v1.0.0-windows-arm64.tar.gz(3.95 MB)
Owner
MegaEase
Open Source, Freedom, Low Cost, High Availability Cloud Native Platform.
MegaEase
Implementing SPEEDEX price computation engine in Golang as a standalone binary that exchanges can call

speedex-standalone Implementing SPEEDEX price computation engine in Golang as a standalone binary that exchanges can call. Notes from Geoff About Tato

Samuel Wong 1 Dec 1, 2021
A tool for checking the accessibility of your data by IPFS peers

ipfs-check Check if you can find your content on IPFS A tool for checking the accessibility of your data by IPFS peers Documentation Build go build wi

Adin Schmahmann 17 Aug 5, 2022
A tool for capturing newly issued x.509 from Certificate Transparency logs & performing periodic revocation checking.

ct-logster This repository contains the tools for collecting newly issued x509 certificates from Certificate Transparency logs, as well as performing

Adam Halim 4 May 4, 2022
ScriptTiger 17 Aug 7, 2022
Go-aspell - GNU Aspell spell checking library bindings for golang

Aspell library bindings for Go GNU Aspell is a spell checking tool written in C/

Vladimir Sibirov 44 Nov 29, 2021
httpstream provides HTTP handlers for simultaneous streaming uploads and downloads of objects, as well as persistence and a standalone server.

httpfstream httpfstream provides HTTP handlers for simultaneous streaming uploads and downloads of files, as well as persistence and a standalone serv

Sourcegraph 16 May 1, 2021
Keeps track of Steam Deck Verifications. On first run, it reports all games with their respective Steam Deck Verification status. On subsequent runs, the tool will report newly tested and updated games.

Keeps track of Steam Deck Verifications. On first run, it reports all games with their respective Steam Deck Verification status. On subsequent runs, the tool will report newly tested and updated games.

henning mueller 1 Feb 2, 2022
Event driven modular status-bar for dwm; written in Go & uses Unix sockets for signaling.

dwmstat A simple event-driven modular status-bar for dwm. It is written in Go & uses Unix sockets for signaling. The status bar is conceptualized as a

Navaz Alani 1 Dec 25, 2021
Cross check makes health checks on PostgreSQL and MySQL database servers

Cross Check Cross check makes health checks on PostgreSQL and MySQL database servers, it also performs master & slave control for clusters in H/A Acti

Ali 2 Jan 14, 2022
Go library for writing standalone Map/Reduce jobs or for use with Hadoop's streaming protocol

dmrgo is a Go library for writing map/reduce jobs. It can be used with Hadoop's streaming protocol, but also includes a standalone map/reduce impleme

Damian Gryski 105 Nov 26, 2021
Standalone client for proxies of Opera VPN

opera-proxy Standalone Opera VPN client. Younger brother of hola-proxy. Just run it and it'll start a plain HTTP proxy server forwarding traffic throu

null 302 Jul 30, 2022
Standalone client for proxies of Windscribe browser extension

windscribe-proxy Standalone Windscribe proxy client. Younger brother of opera-proxy. Just run it and it'll start a plain HTTP proxy server forwarding

null 45 Aug 3, 2022
A standalone ipfs gateway

rainbow Because ipfs should just work like unicorns and rainbows Building go build Running rainbow Configuration NAME: rainbow - a standalone ipf

IPFS 22 May 3, 2022
A standalone Web Server developed with the standard http library, suport reverse proxy & flexible configuration

paddy 简介 paddy是一款单进程的独立运行的web server,基于golang的标准库net/http实现。 paddy提供以下功能: 直接配置http响应 目录文件服务器 proxy_pass代理 http反向代理 支持请求和响应插件 部署 编译 $ go build ./main/p

fangyousong 5 May 2, 2022
Scout is a standalone open source software solution for DIY video security.

scout Scout is a standalone open source software solution for DIY video security. https://www.jonoton-innovation.com Features No monthly fees! Easy In

null 4 Aug 1, 2022
🏥 Barebones, detailed health check library for Go

go-health ?? Barebones, detailed health check library for Go go-health does away with the kitchen sink mentality of other health check libraries. You

Jared Petersen 1 Oct 19, 2021
Health check for instances behaind the ipvs

ipvshc Health check for instances behaind the ipvs Futures: Health check instances (curl from srcip) Change state (ipvsadm) Config in sql (sqlite) Sta

Andrii Tuzhyk 2 Nov 4, 2021
This repo contains a sample app exposing a gRPC health endpoint to demo Kubernetes gRPC probes.

This repo contains a sample app exposing a health endpoint by implementing grpc_health_v1. Usecase is to demo the gRPC readiness and liveness probes introduced in Kubernetes 1.23.

Nico Meisenzahl 1 Feb 9, 2022
Check DNS and optionally Consul and serve the status from a Web page

dns-checker Table of contents Preamble Compiling the program Keepalived and LVS Available options Setting up systemd Preamble This application checks

Massimiliano Adamo 0 Nov 7, 2021