File tree Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -55,11 +55,12 @@ sudo supervisorctl start zeroops_*
5555ps aux | grep zeroops_
5656
5757# 健康检查
58- curl http://localhost:8181/health # metadata-service
59- curl http://localhost:8191/health # storage-service
60- curl http://localhost:8201/health # queue-service
61- curl http://localhost:8211/health # third-party-service
62- curl http://localhost:8221/health # mock-error-service
58+ ```
59+ for port in 8182 8183 8191 8192 8201 8202 8211 8221; do
60+ echo "Checking port $port:"
61+ curl -s -o /dev/null -w "HTTP Status: %{http_code}\n" http://localhost:$port/metrics ||echo "Failed"
62+ done
63+ ```
6364
6465# 查看日志
6566tail -f /home/qboxserver/zeroops_metadata_1/logs/service.log
Original file line number Diff line number Diff line change @@ -153,9 +153,9 @@ func (c *MetricCollector) initMetrics() error {
153153 return err
154154 }
155155
156- // HTTP 请求时延 (使用 Prometheus 兼容的命名)
156+ // HTTP 请求时延
157157 if c .httpRequestDuration , err = c .meter .Float64Histogram (
158- "http.server.request.duration_seconds " ,
158+ "http_latency " ,
159159 metric .WithDescription ("HTTP server request duration in seconds" ),
160160 metric .WithUnit ("s" ),
161161 metric .WithExplicitBucketBoundaries (
You can’t perform that action at this time.
0 commit comments