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

[collector] enhancement: support user define which http statusCode sh… #989

Merged
merged 2 commits into from
May 31, 2023

Conversation

l646505418
Copy link
Contributor

@l646505418 l646505418 commented May 29, 2023

…ould monitor

modify HttpProtocal and HttpCollectImpl to support user defines which http status code is success code

Checklist

  • I have read the Contributing Guide
  • I have written the necessary doc or comment.
  • I have added the necessary unit tests and all cases have passed.

@tomsun28 tomsun28 added enhancement New feature or request good first pull request Good for newcomers labels May 29, 2023
@tomsun28 tomsun28 linked an issue May 29, 2023 that may be closed by this pull request
1 task
@l646505418
Copy link
Contributor Author

Hi @tomsun28 , I am just familiar with the backend development, maybe can find someone to modify the frontend code.😂

Copy link
Contributor

@tomsun28 tomsun28 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!👍

@tomsun28
Copy link
Contributor

I am just familiar with the backend development, maybe can find someone to modify the frontend code.😂

👍 hi, this feature no need to modify the frontend code.
one more thing is to update app-springboot2.yml health to fix issue #978 https://github.com/dromara/hertzbeat/blob/master/manager/src/main/resources/define/app-springboot2.yml#L300

  - name: health
    priority: 6
    fields:
      - field: status
        type: 1
    protocol: http
    http:
      host: ^_^host^_^
      port: ^_^port^_^
      url: ^_^base_path^_^/health
      method: GET
      ssl: ^_^ssl^_^
      parseType: default

to

  - name: health
    priority: 6
    fields:
      - field: status
        type: 1
    protocol: http
    http:
      host: ^_^host^_^
      port: ^_^port^_^
      url: ^_^base_path^_^/health
      method: GET
      ssl: ^_^ssl^_^
      successCodes: [200, 503]
      parseType: default

@l646505418
Copy link
Contributor Author

I am just familiar with the backend development, maybe can find someone to modify the frontend code.😂

👍 hi, this feature no need to modify the frontend code. one more thing is to update app-springboot2.yml health to fix issue #978 https://github.com/dromara/hertzbeat/blob/master/manager/src/main/resources/define/app-springboot2.yml#L300

  - name: health
    priority: 6
    fields:
      - field: status
        type: 1
    protocol: http
    http:
      host: ^_^host^_^
      port: ^_^port^_^
      url: ^_^base_path^_^/health
      method: GET
      ssl: ^_^ssl^_^
      parseType: default

to

  - name: health
    priority: 6
    fields:
      - field: status
        type: 1
    protocol: http
    http:
      host: ^_^host^_^
      port: ^_^port^_^
      url: ^_^base_path^_^/health
      method: GET
      ssl: ^_^ssl^_^
      successCodes: [200, 503]
      parseType: default

modify the spirngboot2 template

@tomsun28 tomsun28 merged commit d81776a into apache:master May 31, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix enhancement New feature or request good first pull request Good for newcomers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] springboot2.0 monitor health "status": "DOWN" No Metrics Data
2 participants