[关闭]
@tony-yin 2018-08-07T16:51:31.000000Z 字数 3727 阅读 678

Report API

API


所有report接口的urlheaders全都一致,只是body会存在不同,所以在下面的API中,只会在第一个API中展示urlheaders,其他的API都只会展示bodyresponse

health

Url

  1. http://192.168.232.182:9666/search/report/

Headers

  1. {
  2. 'Authorization': JWT [Token]
  3. }

Body

  1. {
  2. 'health': 'v'
  3. }

Response

  1. [
  2. {
  3. "health": [
  4. {
  5. "epoch": "1533629872",
  6. "timestamp": "16:17:52",
  7. "cluster": "elasticsearch",
  8. "status": "yellow",
  9. "node.total": "1",
  10. "node.data": "1",
  11. "shards": "102",
  12. "pri": "102",
  13. "relo": "0",
  14. "init": "0",
  15. "unassign": "101",
  16. "pending_tasks": "0",
  17. "max_task_wait_time": "-",
  18. "active_shards_percent": "50.2%"
  19. }
  20. ]
  21. }
  22. ]

Allocation

Body

  1. {
  2. 'allocation': 'v'
  3. }

Response

  1. [
  2. {
  3. "allocation": [
  4. {
  5. "shards": "102",
  6. "disk.indices": "2.7gb",
  7. "disk.used": "8.1gb",
  8. "disk.avail": "89.2gb",
  9. "disk.total": "97.4gb",
  10. "disk.percent": "8",
  11. "host": "192.168.232.192",
  12. "ip": "192.168.232.192",
  13. "node": "hN4mYuz"
  14. },
  15. ...
  16. ]
  17. }
  18. ]

count

Body

  1. {
  2. 'count': 'v'
  3. }

Response

  1. [
  2. {
  3. "count": [
  4. {
  5. "epoch": "1533630479",
  6. "timestamp": "16:27:59",
  7. "count": "13848289"
  8. }
  9. ]
  10. }
  11. ]

indices

Body

  1. {
  2. 'indices': 'v'
  3. }

Response

  1. [
  2. {
  3. "indices": [
  4. {
  5. "health": "yellow",
  6. "status": "open",
  7. "index": "filebeat-6.3.0-2018.07.27",
  8. "uuid": "BHe00xWbTTmbEraopqU59Q",
  9. "pri": "3",
  10. "rep": "1",
  11. "docs.count": "306588",
  12. "docs.deleted": "0",
  13. "store.size": "75.5mb",
  14. "pri.store.size": "75.5mb"
  15. },
  16. ...
  17. ]
  18. }
  19. ]

master

Body

  1. {
  2. 'master': 'v'
  3. }

Response

  1. [
  2. {
  3. "master": [
  4. {
  5. "id": "hN4mYuzpQaG9FVF9nIzwjw",
  6. "host": "192.168.232.192",
  7. "ip": "192.168.232.192",
  8. "node": "hN4mYuz"
  9. }
  10. ]
  11. }
  12. ]

nodes

Body

  1. {
  2. 'nodes': 'v'
  3. }

Response

  1. [
  2. {
  3. "nodes": [
  4. {
  5. "ip": "192.168.232.192",
  6. "heap.percent": "59",
  7. "ram.percent": "70",
  8. "cpu": "12",
  9. "load_1m": "1.39",
  10. "load_5m": "1.49",
  11. "load_15m": "1.31",
  12. "node.role": "mdi",
  13. "master": "*",
  14. "name": "hN4mYuz"
  15. }
  16. ]
  17. }
  18. ]

recovery

Body

  1. {
  2. 'recovery': 'v'
  3. }

Response

  1. [
  2. {
  3. "recovery": [
  4. {
  5. "index": "filebeat-6.3.0-2018.07.04",
  6. "shard": "0",
  7. "time": "1.1s",
  8. "type": "existing_store",
  9. "stage": "done",
  10. "source_host": "n/a",
  11. "source_node": "n/a",
  12. "target_host": "192.168.232.192",
  13. "target_node": "hN4mYuz",
  14. "repository": "n/a",
  15. "snapshot": "n/a",
  16. "files": "0",
  17. "files_recovered": "0",
  18. "files_percent": "100.0%",
  19. "files_total": "61",
  20. "bytes": "0",
  21. "bytes_recovered": "0",
  22. "bytes_percent": "100.0%",
  23. "bytes_total": "30236642",
  24. "translog_ops": "0",
  25. "translog_ops_recovered": "0",
  26. "translog_ops_percent": "100.0%"
  27. },
  28. ...
  29. ]
  30. }
  31. ]

shards

Body

  1. {
  2. 'shards': 'v'
  3. }

Response

  1. [
  2. {
  3. "shards": [
  4. {
  5. "index": "filebeat-6.3.0-2018.08.05",
  6. "shard": "1",
  7. "prirep": "p",
  8. "state": "STARTED",
  9. "docs": "101841",
  10. "store": "24.6mb",
  11. "ip": "192.168.232.192",
  12. "node": "hN4mYuz"
  13. },
  14. ...
  15. ]
  16. }
  17. ]

segments

Body

  1. {
  2. 'segments': 'v'
  3. }

Response

  1. [
  2. {
  3. "segments": [
  4. {
  5. "index": "filebeat-6.3.0-2018.07.04",
  6. "shard": "0",
  7. "prirep": "p",
  8. "ip": "192.168.232.192",
  9. "segment": "_v",
  10. "generation": "31",
  11. "docs.count": "72178",
  12. "docs.deleted": "0",
  13. "size": "13.1mb",
  14. "size.memory": "54408",
  15. "committed": "true",
  16. "searchable": "true",
  17. "version": "7.3.1",
  18. "compound": "false"
  19. },
  20. ...
  21. ]
  22. }
  23. ]

snapshots

Body

  1. {
  2. 'snapshots': 'v'
  3. }

Response

  1. [
  2. {
  3. "snapshots": {
  4. "error": {
  5. "root_cause": [
  6. {
  7. "type": "action_request_validation_exception",
  8. "reason": "Validation Failed: 1: repository is missing;"
  9. }
  10. ],
  11. "type": "action_request_validation_exception",
  12. "reason": "Validation Failed: 1: repository is missing;"
  13. },
  14. "status": 400
  15. }
  16. }
  17. ]

fielddata

Body

  1. {
  2. 'fielddata': 'v'
  3. }

Response

  1. [
  2. {
  3. "fielddata": [
  4. {
  5. "id": "hN4mYuzpQaG9FVF9nIzwjw",
  6. "host": "192.168.232.192",
  7. "ip": "192.168.232.192",
  8. "node": "hN4mYuz",
  9. "field": "redis.log.level",
  10. "size": "1.2kb"
  11. },
  12. ...
  13. ]
  14. }
  15. ]

fielddata

Body

  1. {
  2. 'fielddata': 'v'
  3. }

Response

  1. [
  2. {
  3. "aliases": []
  4. }
  5. ]

nodeattrs

Body

  1. {
  2. 'nodeattrs': 'v'
  3. }

Response

  1. [
  2. {
  3. "nodeattrs": [
  4. {
  5. "node": "hN4mYuz",
  6. "host": "192.168.232.192",
  7. "ip": "192.168.232.192",
  8. "attr": "ml.machine_memory",
  9. "value": "8201891840"
  10. },
  11. ...
  12. ]
  13. }
  14. ]

pending_tasks

Body

  1. {
  2. 'pending_tasks': 'v'
  3. }

Response

  1. [
  2. {
  3. "pending_tasks": []
  4. }
  5. ]

plugins

Body

  1. {
  2. 'plugins': 'v'
  3. }

Response

  1. [
  2. {
  3. "plugins": [
  4. {
  5. "name": "hN4mYuz",
  6. "component": "ingest-geoip",
  7. "version": "6.3.0"
  8. },
  9. {
  10. "name": "hN4mYuz",
  11. "component": "ingest-user-agent",
  12. "version": "6.3.0"
  13. }
  14. ]
  15. }
  16. ]

repositories

Body

  1. {
  2. 'repositories': 'v'
  3. }

Response

  1. [
  2. {
  3. "repositories": []
  4. }
  5. ]

thread_pool

Body

  1. {
  2. 'thread_pool': 'v'
  3. }

Response

  1. [
  2. {
  3. "thread_pool": [
  4. {
  5. "node_name": "hN4mYuz",
  6. "name": "analyze",
  7. "active": "0",
  8. "queue": "0",
  9. "rejected": "0"
  10. },
  11. ...
  12. ]
  13. }
  14. ]
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注