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

希望暴露出 actuator metrics 指标以提高 halo 的可观测性 #4894

Closed
guqing opened this issue Nov 23, 2023 · 4 comments · Fixed by #4898
Closed

希望暴露出 actuator metrics 指标以提高 halo 的可观测性 #4894

guqing opened this issue Nov 23, 2023 · 4 comments · Fixed by #4898
Assignees
Labels
area/core Issues or PRs related to the Halo Core kind/feature Categorizes issue or PR as related to a new feature.
Milestone

Comments

@guqing
Copy link
Member

guqing commented Nov 23, 2023

Your current Halo version

2.10.2

Describe this feature

目前 Halo 在生产模式下只提供了 ["health", "info", "startup", "globalinfo", "logfile", "shutdown", "restart"] 这些 actuator endpoint, 希望能暴露如 metrics 指标数据并加入 micrometer-registry-prometheus 以便能够使用 prometheus 抓取指标数据对 halo 进行服务监控

Additional information

/kind feature
/area core
/milestone 2.11.x

@f2c-ci-robot f2c-ci-robot bot added the kind/feature Categorizes issue or PR as related to a new feature. label Nov 23, 2023
@f2c-ci-robot f2c-ci-robot bot added this to the 2.11.x milestone Nov 23, 2023
@f2c-ci-robot f2c-ci-robot bot added the area/core Issues or PRs related to the Halo Core label Nov 23, 2023
@guqing
Copy link
Member Author

guqing commented Nov 23, 2023

/assign

@guqing
Copy link
Member Author

guqing commented Nov 23, 2023

貌似不需要引入 micrometer-registry-prometheus 如果有需要或可使用插件提供对应功能,比如 AppOpticsAtlasdatadoghqInfluxOpenTelemetryPrometheus 等,需要什么就由插件去添加即可

@JohnNiang
Copy link
Member

Hi @guqing ,如果想要暴露更多的 Actuator Endpoints,可以通过以下配置的方式配置即可:

management:
  endpoints:
    web:
      exposure:
        include: ["health", "info", "startup", "globalinfo", "logfile", "shutdown", "restart", "metrics"]

可能需要提供一个角色来决定是否可访问这些 endpoints。

@guqing
Copy link
Member Author

guqing commented Nov 23, 2023

可能需要提供一个角色来决定是否可访问这些 endpoints。

https://github.com/halo-dev/halo/pull/4898/files 已经提供了的,见 PR

f2c-ci-robot bot pushed a commit that referenced this issue Nov 27, 2023
#### What type of PR is this?
/kind feature
/area core
/milestone 2.11.x

#### What this PR does / why we need it:
暴露 Actuator 指标端点以便监控服务状态

暴露了 Actuator 端点并提供角色模板,用户可创建 PAT 用于获取 Halo 运行状态数据或分配给其他用户

#### Which issue(s) this PR fixes:
Fixes #4894

#### Does this PR introduce a user-facing change?
```release-note
暴露 Actuator 指标端点以便监控服务状态
```
@JohnNiang JohnNiang modified the milestones: 2.11.x, 2.11.0 Nov 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/core Issues or PRs related to the Halo Core kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants