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

[BUG] springboot2.0 monitor health "status": "DOWN" No Metrics Data #978

Closed
1 task done
jvhuaxia opened this issue May 23, 2023 · 5 comments · Fixed by #989
Closed
1 task done

[BUG] springboot2.0 monitor health "status": "DOWN" No Metrics Data #978

jvhuaxia opened this issue May 23, 2023 · 5 comments · Fixed by #989
Assignees
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed new feature task

Comments

@jvhuaxia
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

springboot2.0 monitor health { "status": "DOWN" } collected donotwork and show No Metrics Data
but "status": "UP" collected work

Expected Behavior

No response

Steps To Reproduce

No response

Environment

HertzBeat version(s):
1.2.3

Debug logs

No response

Anything else?

No response

@jvhuaxia jvhuaxia added the bug Something isn't working label May 23, 2023
@jvhuaxia
Copy link
Author

image
image
i think is the http code problem
can i edit app-springboot2.yml config file ignore this 503 code to collected DOWN data?

@tomsun28 tomsun28 added good first issue Good for newcomers help wanted Extra attention is needed labels May 23, 2023
@tomsun28
Copy link
Contributor

can i edit app-springboot2.yml config file ignore this 503 code to collected DOWN data?

@jvhuaxia current not support. weclome to update collecting metrics code to implement this.

@tomsun28
Copy link
Contributor

tomsun28 commented May 28, 2023

Design Http Collect YML Format.
Add successCode field, the successCode means what http response status code we consider it collect success.

    http:
      host: ^_^host^_^
      port: ^_^port^_^
      url: ^_^base_path^_^/health
      method: GET
      ssl: ^_^ssl^_^
      successCode: [200, 503]
      parseType: default

@l646505418
Copy link
Contributor

maybe I can work on this, pls asign to me

@tomsun28
Copy link
Contributor

hi welcome @l646505418 , i think we should update the http protocol file https://github.com/dromara/hertzbeat/blob/master/common/src/main/java/org/dromara/hertzbeat/common/entity/job/protocol/HttpProtocol.java

Add Field.


    /**
     * http success status code. default 200
     * successCode means what http response status code we consider it collect success.
     */
    private List<Integer> successCode = List.of(200);

And update http collecting implment. https://github.com/dromara/hertzbeat/blob/master/collector/src/main/java/org/dromara/hertzbeat/collector/collect/http/HttpCollectImpl.java#L118

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed new feature task
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants