Slide 49
Slide 49 text
© Cygames, Inc.
CLIでホスト情報の取得
CLIからJSON形式で特定ホストのタグ情報を取得
$ eshosttag-list -l "hostname:XXX_WEB1003" | jq .
{
"took": 1,
"timed_out": false,
"_shards": {
"total": 5,
"successful": 5,
"failed": 0
},
"hits": {
"total": 1,
"max_score": null,
"hits": [
{
"_index": "hosts",
"_type": "hosts",
"_id": "XXX_WEB1003-xx.xx.88.53",
"_score": null,
"_source": {
"created_at": "2015-12-17T13:44:29+09:00",
"datacenter": ”XX",
"env": "prd",
"hostname": "XXX_WEB1003",
"ip": ”xx.xx.88.53",
"ips": [
”xx.xx.88.53"
],
"num": 1003,
"project": ”XXXXX",
"type": "web",
"updated_at": "2016-08-19T01:02:54+09:00",
"updated_by": ”yamada_taro",
"service80": "true",
"lastping_at": "2017-02-12T15:22:51+09:00",
"dead": null,
"s_updated_by": "esbigip",
"s_updated_at": "2016-12-05T16:48:13+09:00",
"": "",
"deploy_state": "deployable",
"server_state": "ready",
"newrelic": "true",
"iptables_stop": "true",
"mackerel_id": ”XXXXXXXX"
},
"sort": [
"web",
1003
]
}
]
}
}