Node Resource

  • GET /v1/node

Returns a list of nodes known to a openLooKeng Server. This call doesn't require a query parameter of headers, it simply returns an array with each known node in a openLooKeng installation.

In the response, the values recentRequests, recentFailures, and recentSuccesses are decaying counters set to decay exponentially over time with a decay parameter of one minute. This decay rate means that if a openLooKeng node has 1000 successes in a few seconds, this statistic value will drop to 367 in one minute.

age shows you how long a particular node has been running, and uri points you to the HTTP server for a particular node. The last request and last response times show you how recently a node has been used.

The following example response displays a single node which has not experienced any failure conditions. Each node also reports statistics about traffic uptime, and failures.

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/javascript

[
{
    "uri":"http://192.168.1.1:8080",
"recentRequests":25.181940555111073,
"recentFailures":0.0,
"recentSuccesses":25.195472984170983,
"lastRequestTime":"2013-12-22T13:32:44.673-05:00",
"lastResponseTime":"2013-12-22T13:32:44.677-05:00",
"age":"14155.28ms",
"recentFailureRatio":0.0,
"recentFailuresByType":{}
}

]

If a node is experiencing errors, you'll see a response that looks like the following. Here we have a node which has experienced a spate of errors. The recentFailuresByType field lists the Java exception which have occurred recently on a particular node.

Example response with Errors:

HTTP/1.1 200 OK

Vary: Accept Content-Type: text/javascript

[

{

   ​    "age": "4.45m", "lastFailureInfo": { "message":
​     "Connect Timeout", "stack": [
   ​     "org.eclipse.jetty.io.ManagedSelector$ConnectTimeout.run(ManagedSelector.java:683)",
   ​     .... "java.lang.Thread.run(Thread.java:745)" ],
   ​     "suppressed": [], "type":
   ​     "java.net.SocketTimeoutException" }, "lastRequestTime":
   ​     "2017-08-05T11:53:00.647Z", "lastResponseTime":
   ​     "2017-08-05T11:53:00.647Z", "recentFailureRatio":
   ​     0.47263053472046446, "recentFailures": 2.8445543205610617,
   ​     "recentFailuresByType": {
   ​     "java.net.SocketTimeoutException": 2.8445543205610617 },
   ​     "recentRequests": 6.018558073577414, "recentSuccesses":
   ​     3.1746446343010297, "uri": "<http://172.19.0.3:8080>"
   
}

]
  • GET /v1/node/failed

Calling this service returns a JSON document listing all the nodes that have failed the last heartbeat check. The information returned by this call is the same as the information returned by the previous service.

Example response:


[
{

"age": "1.37m", "lastFailureInfo": { "message":
"Connect Timeout", "stack": [
"org.eclipse.jetty.io.ManagedSelector$ConnectTimeout.run(ManagedSelector.java:683)",
...
"java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)",
"java.lang.Thread.run(Thread.java:745)" ], "suppressed":
[], "type": "java.net.SocketTimeoutException" },
"lastRequestTime": "2017-08-05T11:52:42.647Z",
"lastResponseTime": "2017-08-05T11:52:42.647Z",
"recentFailureRatio": 0.22498784153043677,
"recentFailures": 20.11558290058638,
"recentFailuresByType": {
"java.net.SocketTimeoutException": 20.11558290058638 },
"recentRequests": 89.40742203558189, "recentSuccesses":
69.30583024727453, "uri": "<http://172.19.0.3:8080>"
   
}
]

有奖捉虫

“有虫”文档片段

0/500

存在的问题

文档存在风险与错误

● 拼写,格式,无效链接等错误;

● 技术原理、功能、规格等描述和软件不一致,存在错误;

● 原理图、架构图等存在错误;

● 版本号不匹配:文档版本或内容描述和实际软件不一致;

● 对重要数据或系统存在风险的操作,缺少安全提示;

● 排版不美观,影响阅读;

内容描述不清晰

● 描述存在歧义;

● 图形、表格、文字等晦涩难懂;

● 逻辑不清晰,该分类、分项、分步骤的没有给出;

内容获取有困难

● 很难通过搜索引擎,openLooKeng官网,相关博客找到所需内容;

示例代码有错误

● 命令、命令参数等错误;

● 命令无法执行或无法完成对应功能;

内容有缺失

● 关键步骤错误或缺失,无法指导用户完成任务,比如安装、配置、部署等;

● 逻辑不清晰,该分类、分项、分步骤的没有给出

● 图形、表格、文字等晦涩难懂

● 缺少必要的前提条件、注意事项等;

● 描述存在歧义

0/500

您对文档的总体满意度

非常不满意
非常满意

请问是什么原因让您参与到这个问题中

您的邮箱

创Issue赢奖品
根据您的反馈,会自动生成issue模板。您只需点击按钮,创建issue即可。
有奖捉虫