Quick service interface monitoring

1. Background

In some businesses, the following situations may occur:

1.接口的不稳定导致APP/WEB端上的超时、抛错,而资源级监控不能达到业务健康状况监控的目的。
2.接口众多,服务部署后不知道是否每个接口都正常。
3.不同服务同一接口的响应时间。
5.依赖的其他接口异常导致不可用。
6.重要的接口不能等用户触发异常,需要在用户请求前就发现异常并处理掉

In order to ensure the stable operation of online services, in addition to the resource monitoring of key online services, each service interface is also very important. Troubleshooting problems such as interface exceptions is often more time-consuming and labor-intensive than service exceptions. So how to monitor key online interfaces?

2. Solutions

All the interfaces that have obtained the service will simulate requests for these periodically, and detect the return status and return data of the interfaces.

3. What is JPower

JPower is a completely open source microservice rapid development framework, including basic modules such as user management, system management, and unified authorization. Users can quickly enter business development on this framework.

Here I recommend a small tool jpower-log in JPower. The jpower-log module implements the health status monitoring of various interfaces.

Implementation function:

  • All API detections for a single service are supported.
  • Automatically roll back the data generated by the interface request, and will not retain any garbage data in the database;
  • Support HTTP, the request type can be all types such as GET, POST, HEADER, PUT, DELETE, etc.
  • Support any form of HTTP interface authentication configuration, only need to simply configure the login interface and login parameters
  • Calling the API can set request headers, request parameters, and customize configuration for a single interface
  • You can customize the detection result judgment, for example, the interface returns a status code of 200, and the returned content includes/excludes exceptions, etc.;
  • You can customize the monitoring frequency, such as 30 minutes/time, 1 hour/time, etc.
  • Monitoring log summary, export
  • Although this gadget is developed based on JPower, the detection object is not limited to JPower, and the HTTP interface of any third-party service can be configured and monitored

Use documentation:

https://www.kancloud.cn/guodingzhi/jpower/2251824

Technology used:

  • Technical framework: maven, Spring Boot, Mybatis, SpringMVC
  • Technical components: OKHttp, fastjson
  • UI technology: vue, Echarts

Operating environment

  • jdk8
  • tomcat
  • mysql

Screenshot preview:

{{o.name}}
{{m.name}}

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=324123445&siteId=291194637