Navigation Menu

Skip to content

Commit

Permalink
Add description for the "status" command
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Jun 24, 2014
1 parent 1e7b71c commit 61db3b1
Show file tree
Hide file tree
Showing 5 changed files with 227 additions and 2 deletions.
6 changes: 4 additions & 2 deletions _po/ja/reference/1.0.4/commands/index.po
Expand Up @@ -27,10 +27,12 @@ msgstr "## ビルトインのコマンド"

msgid ""
" * [search](search/): Searches data\n"
" * [add](add/): Adds a record"
" * [add](add/): Adds a record\n"
" * [status](status/): Reports status of the cluster"
msgstr ""
" * [search](search/): データの検索\n"
" * [add](add/): レコードの追加"
" * [add](add/): レコードの追加\n"
" * [status](status/): クラスタの状態の取得"

msgid "## Groonga compatible commands"
msgstr "## Groonga互換コマンド"
Expand Down
1 change: 1 addition & 0 deletions ja/reference/1.0.4/commands/index.md
Expand Up @@ -18,6 +18,7 @@ layout: ja

* [search](search/): データの検索
* [add](add/): レコードの追加
* [status](status/): クラスタの状態の取得

## Groonga互換コマンド

Expand Down
115 changes: 115 additions & 0 deletions ja/reference/1.0.4/commands/status/index.md
@@ -0,0 +1,115 @@
---
title: status
layout: ja
---

{% comment %}
##############################################
THIS FILE IS AUTOMATICALLY GENERATED FROM
"_po/ja/reference/1.0.4/commands/status/index.po"
DO NOT EDIT THIS FILE MANUALLY!
##############################################
{% endcomment %}


* TOC
{:toc}

## 概要 {#abstract}

`statu` コマンドは、クラスタの現在の状態を返します。

## APIの形式 {#api-types}

### HTTP {#api-types-http}

リクエスト先
: `(ドキュメントルート)/droonga/status`

リクエストメソッド
: `GET`

リクエストのURLパラメータ
: なし。

リクエストのbody
: なし。

レスポンスのbody
: [レスポンスメッセージ](#response)

### REST {#api-types-rest}

対応していません。

### Fluentd {#api-types-fluentd}

形式
: Request-Response型。コマンドに対しては必ず対応するレスポンスが返されます。

リクエストの `type`
: `status`

リクエストの `body`
: なし。

レスポンスの `type`
: `status.result`

## パラメータの構文 {#syntax}

このコマンドはパラメータを取りません。

## 使い方 {#usage}

On the version {{ site.droonga_version }}, this command just reports the list of nodes and their vital information.
For example:

{
"type" : "status",
"body" : {}
}

=> {
"type" : "status.result",
"body" : {
"nodes": {
"192.168.0.10:10031/droonga": {
"live": true
},
"192.168.0.11:10031/droonga": {
"live": false
}
}
}
}


## レスポンス {#response}

This returns a hash like following as the response's `body`, with `200` as its `statusCode`.

{
"nodes" : {
"<Identifier of the node 1>" : {
"live" : <Vital status of the node>
},
"<Identifier of the node 2>" : { ... },
...
}
}

`nodes`
: A hash including information of nodes in the cluster.
Keys of the hash are identifiers of nodes defined in the `catalog.json`, with the format: `hostname:port/tag`.
Each value indicates status information of corresponding node, and have following information:

`live`
: A boolean value indicating vital state of the node.
If `true`, the node can process messages, and messages are delivered to it.
Otherwise, the node doesn't process any message for now, because it is down or some reasons.


## エラーの種類 {#errors}

This command reports [general errors](/reference/message/#error).
1 change: 1 addition & 0 deletions reference/1.0.4/commands/index.md
Expand Up @@ -9,6 +9,7 @@ Here are available commands

* [search](search/): Searches data
* [add](add/): Adds a record
* [status](status/): Reports status of the cluster

## Groonga compatible commands

Expand Down
106 changes: 106 additions & 0 deletions reference/1.0.4/commands/status/index.md
@@ -0,0 +1,106 @@
---
title: status
layout: en
---

* TOC
{:toc}

## Abstract {#abstract}

The `status` command reports current status of the clsuter itself.

## API types {#api-types}

### HTTP {#api-types-http}

Request endpoint
: `(Document Root)/droonga/status`

Request methd
: `GET`

Request URL parameters
: Nothing.

Request body
: Nothing.

Response body
: A [response message](#response).

### REST {#api-types-rest}

Not supported.

### Fluentd {#api-types-fluentd}

Style
: Request-Response. One response message is always returned per one request.

`type` of the request
: `status`

`body` of the request
: Nothing.

`type` of the response
: `status.result`

## Parameter syntax {#syntax}

This command has no parameter.

## Usage {#usage}

On the version {{ site.droonga_version }}, this command just reports the list of nodes and their vital information.
For example:

{
"type" : "status",
"body" : {}
}

=> {
"type" : "status.result",
"body" : {
"nodes": {
"192.168.0.10:10031/droonga": {
"live": true
},
"192.168.0.11:10031/droonga": {
"live": false
}
}
}
}


## Responses {#response}

This returns a hash like following as the response's `body`, with `200` as its `statusCode`.

{
"nodes" : {
"<Identifier of the node 1>" : {
"live" : <Vital status of the node>
},
"<Identifier of the node 2>" : { ... },
...
}
}

`nodes`
: A hash including information of nodes in the cluster.
Keys of the hash are identifiers of nodes defined in the `catalog.json`, with the format: `hostname:port/tag`.
Each value indicates status information of corresponding node, and have following information:

`live`
: A boolean value indicating vital state of the node.
If `true`, the node can process messages, and messages are delivered to it.
Otherwise, the node doesn't process any message for now, because it is down or some reasons.


## Error types {#errors}

This command reports [general errors](/reference/message/#error).

0 comments on commit 61db3b1

Please sign in to comment.