Commit 9b003042 by 姜海波

prometheus 监控增加

parent c6f43e35
......@@ -146,7 +146,12 @@
<artifactId>apollo-client</artifactId>
<version>1.4.0</version>
</dependency>
<!-- promtheus -->
<dependency>
<groupId>io.prometheus</groupId>
<artifactId>simpleclient_spring_boot</artifactId>
<version>0.6.0</version>
</dependency>
</dependencies>
<build>
<plugins>
......
......@@ -14,6 +14,8 @@ package cn.freemud;
import cn.freemud.utils.LogTreadLocal;
import feign.RequestInterceptor;
import io.prometheus.client.spring.boot.EnablePrometheusEndpoint;
import io.prometheus.client.spring.boot.EnableSpringBootMetricsCollector;
import org.jasypt.encryption.StringEncryptor;
import org.jasypt.encryption.pbe.PooledPBEStringEncryptor;
import org.jasypt.encryption.pbe.config.SimpleStringPBEConfig;
......@@ -43,6 +45,8 @@ import org.springframework.context.annotation.EnableAspectJAutoProxy;
@EnableAspectJAutoProxy
@ComponentScan({"cn.freemud","com.freemud"})
@EnableFeignClients
@EnablePrometheusEndpoint
@EnableSpringBootMetricsCollector
@EnableAutoConfiguration
public class ApiApplication {
public static void main(String[] args) {
......
......@@ -8,4 +8,15 @@ app.id=SHOP_OPEN_STORE
apollo.meta=http://212.129.229.203
env=dev
apollo.bootstrap.enabled=true
apollo.bootstrap.namespaces=micro_progeram_commons,i_callback_service
\ No newline at end of file
apollo.bootstrap.namespaces=micro_progeram_commons,i_callback_service
endpoints.metrics.enabled=true
endpoints.health.sensitive=false
endpoints.health.enabled=true
management.endpoint.health.show-details=always
management.endpoints.web.base-path=/
management.endpoints.web.exposure.include=prometheus,info,health,shutdown
management.metrics.tags.application=${spring.application.name}
management.endpoint.shutdown.enabled=true
management.security.enabled=false
management.health.rabbit.enabled=false
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment