ENTERPRISE PLUS:对于JFrog平台产品有哪些有用的路由器健康检查api ?hth华体会最新官方网站

马修•王
2023-01-22 11:05

有一些有用的api可以在JFrog路由器上运行。如果你想查看所有微服务的健康状态,可以运行:

curl - shttp://localhost:8082/router/api/v1/system/health

上面的api将显示:

健康的反应:
200好了
内容类型:application / json
{
“路由器”:{
:“node_id dsf76s-f87df86sdf-kjhsdg329”,
“状态”:“健康”,
“消息”:“OK”
},
“服务”:[
{
:“service_id jfsvc@123”,
:“node_id dsf76s-f87df86sdf-kjhsdg329”,
“状态”:“健康”,
“消息”:“OK”
},


}

还有一个系统ping API:

旋度-s http://localhost:8082/router/api/v1/system/ping

回应:
OK 200 /服务不可用503

如果你想检查平台中所有产品的微服务状态,你可以运行下面的命令(必须针对本地主机端口8046):hth华体会最新官方网站

Curl -s http://localhost:8046/router/api/v1/topology/health | jq

{
“节点”:{
" http://10.128.0.51:8082 ": {
“service_registry_state”:“健康”,
“last_heartbeat”:1631303251664,
“effective_state”:“健康”,
" health_response ": {
“路由器”:{
“信息”:“OK”,
:“node_id test-arti-unified”,
“状态”:“健康”
},
“服务”:[
{
“信息”:“OK”,
:“node_id test-arti-unified”,
:“service_id jfac@01c2jcb06rqw0w0j7p93xj19g8”,
“状态”:“健康”
},
{
“信息”:“OK”,
:“node_id test-arti-unified”,
:“service_id jfevt@01c2jcb06rqw0w0j7p93xj19g8”,
“状态”:“健康”
},
{
“信息”:“OK”,
:“node_id test-arti-unified”,
:“service_id jffe@000”,
“状态”:“健康”
},
{
“信息”:“OK”,
:“node_id test-arti-unified”,
:“service_id jfmd@01e4a9wqe59amqtnvd7jgysb2f”,
“状态”:“健康”
},
{
“信息”:“OK”,
:“node_id test-arti-unified”,
:“service_id jfrt@01c2jcbmcp8f2b0qfpw9c8021z”,
“状态”:“健康”
}

}
},
" http://10.128.0.51:8083 ": {
“service_registry_state”:“健康”,
“last_heartbeat”:1631303253016,
“effective_state”:“健康”,
" health_response ": {
“路由器”:{
“信息”:“OK”,
:“node_id test-xray”,
“状态”:“健康”
},
“服务”:[
{
“信息”:“OK”,
:“node_id test-xray”,
:“service_id jfxana@01e4d0gfnhrd5sbx9jxv4phw83”,
“状态”:“健康”
},
{
“信息”:“OK”,
:“node_id test-xray”,
:“service_id jfxidx@01e4d0gfne22g14vjcv2hyryj7”,
“状态”:“健康”
},
{
“信息”:“OK”,
:“node_id test-xray”,
:“service_id jfxpst@01e4d0gfnhp9bqjhqtk07837xn”,
“状态”:“健康”
},
{
“信息”:“OK”,
:“node_id test-xray”,
:“service_id jfxr@01cesj8cb47pffmh3bg00hxb6j”,
“状态”:“健康”
}

}
},
" http://10.128.0.51:8084 ": {
“service_registry_state”:“健康”,
“last_heartbeat”:1631303251976,
“effective_state”:“健康”,
" health_response ": {
“路由器”:{
“信息”:“OK”,
:“node_id test-jfmc”,
“状态”:“健康”
},
“服务”:[
{
“信息”:“OK”,
:“node_id test-jfmc”,
:“service_id jfisc@01e4eqhwqptx881h0st5bm078k”,
“状态”:“健康”
},
{
“信息”:“OK”,
:“node_id test-jfmc”,
:“service_id jfisv@01efn18zhx3awv1knpqgnw07xy”,
“状态”:“健康”
},
{
“信息”:“OK”,
:“node_id test-jfmc”,
:“service_id jfmc@01e4eqhatbr80e1rg1ag9p0s0w”,
“状态”:“健康”
}

}
},
" http://10.128.0.51:8088 ": {
“service_registry_state”:“健康”,
“last_heartbeat”:1631303252261,
“effective_state”:“健康”,
" health_response ": {
“路由器”:{
“信息”:“OK”,
:“node_id test-dist”,
“状态”:“健康”
},
“服务”:[
{
“信息”:“OK”,
:“node_id test-dist”,
:“service_id jfds@01e4w0vwy2z8e817mgth1817w4”,
“状态”:“健康”
}

}
}
}
}