Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

easeprod start error #163

Closed
hongery opened this issue Jul 5, 2022 · 6 comments
Closed

easeprod start error #163

hongery opened this issue Jul 5, 2022 · 6 comments

Comments

@hongery
Copy link

hongery commented Jul 5, 2022

/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
@haoel
Copy link
Contributor

haoel commented Jul 5, 2022

as the error message mentioned, you need to configure a notification.

try the following configuration

http:
   - name: test
     url: http://xxxx.com
notify:
   log:
     - name: "log file"
       file: "/tmp/easeprobe"

@hongery
Copy link
Author

hongery commented Jul 5, 2022

why test successed, status no value

test:
    name: test
    endpoint: http://10.61.101.65:8000
    time: 2022-07-05T04:30:40.567928992Z
    timestamp: 1656995440567
    rtt: 0s
    status: init
    prestatus: init
    message: Good Configuration!
    latestdowntime: 0001-01-01T00:00:00Z
    recoverytime: 0s
    stat:
        since: 2022-07-05T04:22:05.631087089Z
        total: 0
        status: {}
        uptime: 0s
        downtime: 0s
    timeformat: 2006-01-02 15:04:05 UTC
/opt # curl -I http://10.61.101.65:8000
HTTP/1.1 404 Not Found
Content-Type: text/plain
Date: Tue, 05 Jul 2022 04:33:53 GMT
Content-Length: 18

@haoel
Copy link
Contributor

haoel commented Jul 5, 2022

404 considering is good. the default valid status code is [0-499], if you need to customize it you can configure:

http:
    - name : test
      url: http://10.61.101.65:8000
      success_code:
          - [200,206] # the code >=200 and <= 206
          - [300,308] # the code >=300 and <= 308

Please read the readme for more information:
https://github.com/megaease/easeprobe#31-http-probe-configuration

@hongery
Copy link
Author

hongery commented Jul 5, 2022

still status no value
data.yaml

---
name: EaseProbe
version: v1.7.0
---
test:
    name: test
    endpoint: http://10.61.101.65:8000/accounts
    time: 2022-07-05T06:08:59.725688132Z
    timestamp: 0
    rtt: 0s
    status: init
    prestatus: init
    message: Good Configuration!
    latestdowntime: 0001-01-01T00:00:00Z
    recoverytime: 0s
    stat:
        since: 2022-07-05T06:08:59.725688175Z
        total: 0
        status: {}
        uptime: 0s
        downtime: 0s
    timeformat: 2006-01-02 15:04:05 UTC

config.yaml

http:
  # Some of the Software support the HTTP Query
  - name: test
    method: GET
    url: http://10.61.101.65:8000/accounts
    #content_encoding: text/json
    success_code:
      - [200,502]
    timeout: 10s # default is 30 seconds
notify:
    # dry: true # Global settings for dry run
    retry: # Global settings for retry
    times: 5
    interval: 10s
    log:
     - name: "log file"
       file: "/tmp/easeprobe"

http request

2022/07/05 14:11:32 Reporting span 36f22974c7f82fd4:36f22974c7f82fd4:0000000000000000:1
[GIN] 2022/07/05 - 14:11:32 | 200 |     240.566µs |      172.17.0.4 | GET      "/accounts"

but request url:http://localhost:8181 can find http status code

@haoel
Copy link
Contributor

haoel commented Jul 5, 2022

for the data.yaml, you need to wait a while... the default is 60s.

@haoel
Copy link
Contributor

haoel commented Jul 6, 2022

@hongery can you confirm the result of this issue? and do you have any further issues or concerns?

@hongery hongery closed this as completed Jul 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants