内置 API 接口

当调用 pairec.Run() 时,pairec 启动 http server 的同时,内置的 api 也会注册到路由中。

健康状态检查

接口名称

/ping

请求示例

curl http://host/ping

接口返回

服务正常的情况下,返回 success

prometheus 监控接口

接口名称

/metrics

请求示例

curl http://host/metrics

接口返回

go prometheus 监控数据和 pairec 框架内部监控指标数据,可用于 prometheus 抓取

接口名称

/custom_metrics

请求示例

curl http://host/custom_metrics

接口返回

用户自定义监控指标,可用于 prometheus 抓取