问题描述
需要实现通过openfeign从Prometheus的API中查询监控指标数据,对过程进行一下记录。
OpenFeign内容
① PrometheusOpenFeign内容
package com.changkong.monitor.openfeign;
import com.changkong.monitor.dto.prom.PrometheusLabelResponse;
import com.changkong.monitor.dto.prom.PrometheusQueryResponse;
import com.changkong.monitor.dto.prom.PrometheusRangeQueryResponse;
import com.changkong.monitor.dto.prom.PrometheusSeriesResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
/**
* Prometheus
*/
@FeignClient(value = "prometheus", url = "http://localhost:9090", path = "/api/v1")
public interface PrometheusOpenFeign {
/**
* 查询prometheus指标
*
* @param query
* @param