# --------------------- HTTP Probe Configuration --------------------- # http: # # A completed HTTP Probe configuration # - name: Special Website # url: https://megaease.cn # # Proxy setting, support sock5, http, https, for example: # # proxy: http://proxy.server:8080 # # proxy: socks5://localhost:1085 # # proxy: https://user:password@proxy.example.com:443 # # Also support `HTTP_PROXY` & `HTTPS_PROXY` environment variables # proxy: http://proxy.server:8080 # # Request Method # method: GET # # Request Header # headers: # User-Agent: Customized User-Agent # default: "MegaEase EaseProbe / v1.6.0" # 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" : "user@example.com"}' # # HTTP Basic Auth # username: username # password: password # # mTLS # ca: /path/to/file.ca # cert: /path/to/file.crt # key: /path/to/file.key # # TLS # insecure: true # skip any security checks, useful for self-signed and expired certs. default: false # # 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. # regex: false # if true, the contain and not_contain will be treated as regular expression. default: false # eval: # eval is a expression evaluation for HTTP response message # doc: XML # support XML, JSON, HTML, TEXT. # expression: "x_time('//feed/updated') > '2022-07-01'" # the expression to evaluate. # # configuration # timeout: 10s # default is 30 seconds # failure: 2 # number of consecutive failed probes needed to determine the status down, default: 1 # success: 1 # number of consecutive successful probes needed to determine the status up , default: 1 http: # http probes - name: EaseProbe Github url: https://github.com/megaease/easeprobe # --------------------- TCP Probe Configuration --------------------- # # tcp: # - name: SSH Service # host: example.com:22 # timeout: 10s # default is 30 seconds # interval: 2m # default is 60 seconds # proxy: socks5://proxy.server:1080 # Optional. Only support socks5. # # Also support the `ALL_PROXY` environment. # failure: 2 # number of consecutive failed probes needed to determine the status down, default: 1 # success: 1 # number of consecutive successful probes needed to determine the status up, default: 1 # --------------------- Ping Probe Configuration --------------------- # # ping: # - name: Localhost # host: 127.0.0.1 # count: 5 # number of packets to send, default: 3 # lost: 0.2 # 20% lost percentage threshold, mark it down if the loss is greater than this, default: 0 # privileged: true # if true, the ping will be executed with icmp, otherwise use udp, default: false (Note: On Windows platform, this must be set to True) # timeout: 10s # default is 30 seconds # interval: 2m # default is 60 seconds # --------------------- Shell Probe Configuration --------------------- # # shell: # # run redis-cli ping and check the "PONG" # - name: Redis (Local) # cmd: "redis-cli" # args: # - "-h" # - "127.0.0.1" # - "ping" # clean_env: true # Do not pass the OS environment variables to the command # # default: false # 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" # not_contain: "failure" # response body must NOT contain this string, if it does the probe is considered failed. # regex: false # if true, the `contain` and `not_contain` will be treated as regular expression. default: false # --------------------- 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: ubuntu@gcp.basition.com: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 # passphrase: xxxxxxx # PrivateKey password # 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" # not_contain: "failure" # response body must NOT contain this string, if it does the probe is considered failed. # regex: false # if true, the contain and not_contain will be treated as regular expression. default: false # # 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" # --------------------- TLS Probe Configuration --------------------- # # tls: # - name: expired test # host: expired.badssl.com:443 # proxy: socks5://proxy.server:1080 # Optional. Only support socks5. # # Also support the `ALL_PROXY` environment. # insecure_skip_verify: true # don't check cert validity # expire_skip_verify: true # don't check cert expire date # alert_expire_before: 168h # alert if cert expire date is before X, the value is a Duration, # # see https://pkg.go.dev/time#ParseDuration. example: 1h, 1m, 1s. # # expire_skip_verify must be false to use this feature. # # root_ca_pem_path: /path/to/root/ca.pem # ignore if root_ca_pem is present # # root_ca_pem: | # # -----BEGIN CERTIFICATE----- # - name: untrust test # host: untrusted-root.badssl.com:443 # # insecure_skip_verify: true # don't check cert validity # # expire_skip_verify: true # don't check cert expire date # # root_ca_pem_path: /path/to/root/ca.pem # ignore if root_ca_pem is present # # root_ca_pem: | # # -----BEGIN CERTIFICATE----- # --------------------- Host Probe Configuration --------------------- # host: # bastion: # bastion server configuration # aws: # bastion host ID ◄──────────────────┐ # host: ubuntu@example.com # bastion host │ # key: /path/to/bastion.pem # private key file │ # # Servers List │ # servers: # │ # - name : aws server # │ # bastion: aws # <-- bastion server id ------─┘ # host: ubuntu@172.20.2.202:22 # key: /path/to/server.pem # disks: # [optional] Check multiple disks. if not present, only check `/` by default # - / # - /data # threshold: # cpu: 0.80 # cpu usage 80% # mem: 0.70 # memory usage 70% # disk: 0.90 # disk usage 90% # load: # load average - Note: the actual load would be divided by cpu core number, the threshold won't consider the cpu core number. # m1: 0.5 # 1 minute load average 0.5 (default: 0.8) # m5: 0.9 # 5 minute load average 0.9 (default: 0.8) # m15: 0.9 # 15 minute load average 0.9 (default: 0.8) # # Using the default threshold # # cpu 80%, mem 80%, disk 95% and 0.8 load average # - name : My VPS # host: user@example.com:22 # key: /Users/user/.ssh/id_rsa # --------------------- Native Client Probe Configuration --------------------- # # client: # - name: Redis Native Client (local) # driver: "redis" # driver is redis # host: "localhost:6379" # server and port # password: "abc123" # password # data: # Optional # key: val # Check that `key` exists and its value is `val` # # mTLS - Optional # 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" # data: # Optional, check the specific column value in the table # # Usage: "database:table:column:primary_key:value" : "expected_value" # # transfer to : "SELECT column FROM database.table WHERE primary_key = value" # # the `value` for `primary_key` must be int # "test:product:name:id:1" : "EaseProbe" # select name from test.product where id = 1 # "test:employee:age:id:2" : 45 # select age from test.employee where id = 2 # # mTLS - Optional # ca: /path/to/file.ca # cert: /path/to/file.crt # key: /path/to/file.key # - name: MongoDB Native Client (local) # driver: "mongo" # host: "localhost:27017" # username: "admin" # password: "abc123" # timeout: 5s # data: # Optional, find the specific value in the table # # Usage: "database:collection" : "{JSON}" # "test:employee" : '{"name":"Hao Chen"}' # find the employee with name "Hao Chen" # "test:product" : '{"name":"EaseProbe"}' # find the product with name "EaseProbe" # - name: Memcache Native Client (local) # driver: "memcache" # host: "localhost:11211" # timeout: 5s # data: # Optional # key: val # Check that key exists and its value is val # "namespace:key": val # Namespaced keys enclosed in " # - name: Kafka Native Client (local) # driver: "kafka" # host: "localhost:9093" # # mTLS - Optional # 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" # data: # Optional, check the specific column value in the table # # Usage: "database:table:column:primary_key:value" : "expected_value" # # transfer to : "SELECT column FROM table WHERE primary_key = value" # # the `value` for `primary_key` must be int # "test:product:name:id:1" : "EaseProbe" # select name from product where id = 1 # "test:employee:age:id:2" : 45 # select age from employee where id = 2 # # mTLS - Optional # ca: /path/to/file.ca # cert: /path/to/file.crt # key: /path/to/file.key # - name: Zookeeper Native Client (local) # driver: "zookeeper" # host: "localhost:2181" # timeout: 5s # data: # Optional, check the specific value in the path # "/path/to/key": "value" # Check that the value of the `/path/to/key` is "value" # # mTLS - Optional # ca: /path/to/file.ca # cert: /path/to/file.crt # key: /path/to/file.key # --------------------- Notification Configuration --------------------- # # notify: # log: # - name: log file # local log file # file: /var/log/easeprobe.log # - name: Remote syslog # syslog (!!! Not For Windows !!!) # file: syslog # <-- must be "syslog" keyword # host: 127.0.0.1:514 # remote syslog server - optional # network: udp #remote syslog network [tcp, udp] - optional # 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: user@example.com # password: ******** # to: "user1@example.com;user2@example.com" # 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" # secret: "" # sign secret if set # 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 # teams: # - name: "teams alert service" # webhook: "https://outlook.office365.com/webhook/a1269812-6d10-44b1-abc5-b84f93580ba0@9e7b80c7-d1eb-4b52-8582-76f921e416d9/IncomingWebhook/3fdd6767bae44ac58e5995547d66a4e4/f332c8d9-3397-4ac5-957b-b8e3fc465a8c" # see https://docs.microsoft.com/en-us/outlook/actionable-messages/send-via-connectors # shell: # EaseProbe set the environment variables - # # (see the example: resources/scripts/notify/notify.sh) # - name: "shell alert service" # cmd: "/bin/bash" # args: # - "-c" # - "/path/to/script.sh" # env: # set the env to the notification command # - "EASEPROBE=1" # ringcentral: # - name: "RingCentral alert service" # webhook: "https://hooks.ringcentral.com/webhook/v2/.........." notify: log: - name: log file # local log file file: /var/log/easeprobe.log # --------------------- Global Settings 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: # # minutely, hourly, daily, weekly (Sunday), monthly (Last Day), none # schedule : "daily" # # the time to send the SLA report. Ignored on hourly and minutely schedules # - the format is 'hour:min:sec' # # - the timezone can be configured by `settings.timezone`, default is UTC # time: "23:59" # # 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 # failure: 2 # number of consecutive failed probes needed to determine the status down, default: 1 # success: 1 # number of consecutive successful probes needed to determine the status up, default: 1 # alert: # alert interval for all probes # strategy: "regular" # it can be "regular", "increment" or "exponent", default: "regular" # factor: 1 # the factor of the interval, default: 1 # max: 5 # the max of the alert, default: 1 # # # 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 Z07:00" # # check the following link to see the time zone list # # https://en.wikipedia.org/wiki/List_of_tz_database_time_zones # timezone: "America/New_York" # default: UTC settings: probe: timeout: 30s # the time out for all probes interval: 1m # probe every minute for all probes