Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/visual-studio-code/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在Kubernetes上使用Prometheus监控Spring引导应用程序,而不是设置端点_Kubernetes_Grafana_Prometheus_Kubernetes Helm_Spring Boot Actuator - Fatal编程技术网

在Kubernetes上使用Prometheus监控Spring引导应用程序,而不是设置端点

在Kubernetes上使用Prometheus监控Spring引导应用程序,而不是设置端点,kubernetes,grafana,prometheus,kubernetes-helm,spring-boot-actuator,Kubernetes,Grafana,Prometheus,Kubernetes Helm,Spring Boot Actuator,我正试图在库伯内特斯上使用普罗米修斯监控Spring启动应用程序。普罗米修斯当时正在使用头盔进行检查,我正在使用Spring Boot致动器进行健康检查、审计、指标收集和监控 致动器提供了有关应用的详细信息。比如说 http://**IP:Port**/actuator/health返回以下输出 {"status":"UP"}. 我使用下面的配置文件在promethus中添加应用程序端点 apiVersion: monitoring.coreos.com/v1 kind: ServiceMon

我正试图在库伯内特斯上使用普罗米修斯监控Spring启动应用程序。普罗米修斯当时正在使用头盔进行检查,我正在使用Spring Boot致动器进行健康检查、审计、指标收集和监控

致动器提供了有关应用的详细信息。比如说

http://**IP:Port**/actuator/health
返回以下输出

{"status":"UP"}.
我使用下面的配置文件在promethus中添加应用程序端点

apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
  name: scp-service-creator
  namespace: sc678
  labels:
    app: scp-service-creator
    release: prometheus-operator
spec:
  selector:
    matchLabels:
      app: scp-service-creator
  endpoints:
  - port: api
    path: "/actuator/prometheus"
    scheme: http
    interval: 10s
    honorLabels: true
所以我的问题是,即使将服务添加到prometheus,也没有指定端点。 那么这里会有什么问题呢。非常感谢你的帮助

谢谢。

从,更具体的部分。可以看出,除了禁用的
Shutdown
之外,端点是默认启用的,但只有
health
info
是公开的

这是可以检查的

您需要手动公开所需的端点

您要使用的端点是
Prometheus
,它不可用于JMX,并且已禁用用于Web

要更改暴露的端点,请使用以下特定于技术的
include
exclude
属性:

属性|默认值

management.endpoints.jmx.exposure.exclude
|

management.endpoints.jmx.exposure.include
|*

management.endpoints.web.exposure.exclude
|

management.endpoints.web.exposure.include
|
info,health

include
属性列出了公开的端点的ID。
exclude
属性列出了不应公开的端点ID。
exclude
属性优先于
include
属性。
include
exclude
属性都可以使用端点ID列表进行配置

例如,要停止在JMX上公开所有端点,而只公开
运行状况
信息
端点,请使用以下属性:

management.endpoints.jmx.exposure.include=health,info

*
可用于选择所有端点。例如,要通过HTTP公开除
env
bean
端点之外的所有内容,请使用以下属性:

management.endpoints.web.exposure.include=*
management.endpoints.web.exposure.exclude=env,bean

从中,更具体的部分。可以看出,除了禁用的
Shutdown
之外,端点是默认启用的,但只有
health
info
是公开的

这是可以检查的

您需要手动公开所需的端点

您要使用的端点是
Prometheus
,它不可用于JMX,并且已禁用用于Web

要更改暴露的端点,请使用以下特定于技术的
include
exclude
属性:

属性|默认值

management.endpoints.jmx.exposure.exclude
|

management.endpoints.jmx.exposure.include
|*

management.endpoints.web.exposure.exclude
|

management.endpoints.web.exposure.include
|
info,health

include
属性列出了公开的端点的ID。
exclude
属性列出了不应公开的端点ID。
exclude
属性优先于
include
属性。
include
exclude
属性都可以使用端点ID列表进行配置

例如,要停止在JMX上公开所有端点,而只公开
运行状况
信息
端点,请使用以下属性:

management.endpoints.jmx.exposure.include=health,info

*
可用于选择所有端点。例如,要通过HTTP公开除
env
bean
端点之外的所有内容,请使用以下属性:

management.endpoints.web.exposure.include=*
management.endpoints.web.exposure.exclude=env,bean


你能提供普罗米修斯
.yaml
?没有使用这样的文件。普罗米修斯是通过头盔安装的。你能提供普罗米修斯
.yaml
?没有使用这样的文件。普罗米修斯是通过头盔安装的。