Ceph Rest Api 是一套ceph自带的HTTP接口,官方文档上待补充,但其实,配好ceph rest api之后,默认页面会显示所有的API列表。放在这里作为参考。
Possible commands: | Method | Description |
---|---|---|
auth/add?entity=entity(<string>)&caps={c aps(<string>) [<string>...]} | PUT | add auth info for <entity> from input file, or random key if no input is given, and/or any caps specified in the command |
auth/caps?entity=entity(<string>)&caps=c aps(<string>) [<string>...] | PUT | update caps for <name> from caps specified in the command |
auth/del?entity=entity(<string>) | PUT | delete all caps for <name> |
auth/export?entity={entity(<string>)} | GET | write keyring for requested entity, or master keyring if none given |
auth/get?entity=entity(<string>) | GET | write keyring file with requested key |
auth/get-key?entity=entity(<string>) | GET | display requested key |
auth/get-or-create?entity=entity(<string >)&caps={caps(<string>) [<string>...]} | PUT | add auth info for <entity> from input file, or random key if no input given, and/or any caps specified in the command |
auth/get-or-create-key?entity=entity(<st ring>)&caps={caps(<string>) [<string>...]} | PUT | get, or add, key for <name> from system/caps pairs specified in the command. If key already exists, any given caps must match the existing caps for that key. |
auth/import | PUT | auth import: read keyring file from -i <file> |
auth/list | GET | list authentication state |
auth/print-key?entity=entity(<string>) | GET | display requested key |
auth/print_key?entity=entity(<string>) | GET | display requested key |
tell/<osdid-or-pgid>/bench?count={count( <int>)}&size={size(<int>)} | PUT | OSD benchmark: write <count> <size>-byte objects, (default 1G size 4MB). Results in log. |
tell/<osdid-or-pgid>/cluster_log?level=e rror&message=message(<string>) [<string>...] | PUT | log a message to the cluster log |
compact | PUT | cause compaction of monitor's leveldb storage |
config-key/del?key=key(<string>) | PUT | delete <key> |
config-key/exists?key=key(<string>) | GET | check for <key>'s existence |
config-key/get?key=key(<string>) | GET | get <key> |
config-key/list | GET | list keys |
config-key/put?key=key(<string>)&val={va l(<string>)} | PUT | put <key>, value <val> |
tell/<osdid-or- pgid>/cpu_profiler?arg=arg(status|flush) | PUT | run cpu profiling on daemon |
tell/<osdid-or-pgid>/debug/kick_recovery _wq?delay=delay(<int[0-]>) | PUT | set osd_recovery_delay_start to <val> |
tell/<osdid-or-pgid>/debug_dump_missing? filename=filename(<outfilename>) | GET | dump missing objects to a named file |
df?detail={detail} | GET | show cluster free space stats |
tell/<osdid-or- pgid>/dump_pg_recovery_stats | GET | dump pg recovery statistics |
tell/<osdid-or-pgid>/flush_pg_stats | PUT | flush pg stats |
fs/ls | GET | list filesystems |
fs/new?fs_name=fs_name(<string>)&metadat a=metadata(<string>)&data=data(<string>) | PUT | make new filesystem using named pools <metadata> and <data> |
fs/reset?fs_name=fs_name(<string>)&sure= {--yes-i-really-mean-it} | PUT | disaster recovery only: reset to a single-MDS map |
fs/rm?fs_name=fs_name(<string>)&sure={-- yes-i-really-mean-it} | PUT | disable the named filesystem |
fsid | GET | show cluster FSID/UUID |
health?detail={detail} | GET | show cluster health |
heap?heapcmd=heapcmd(dump|start_profiler |stop_profiler|release|stats) | PUT | show heap usage info (available only if compiled with tcmalloc) |
tell/<osdid-or-pgid>/heap?heapcmd=heapcm d(dump|start_profiler|stop_profiler|rele ase|stats) | PUT | show heap usage info (available only if compiled with tcmalloc) |
injectargs?injected_args=injected_args(< string>) [<string>...] | PUT | inject config arguments into monitor |
tell/<osdid-or-pgid>/injectargs?injected _args=injected_args(<string>) [<string>...] | PUT | inject configuration arguments into running OSD |
tell/<osdid-or-pgid>/list_missing?offset ={offset(<string>)} | GET | list missing objects on this pg, perhaps starting at an offset given in JSON |
log?logtext=logtext(<string>) [<string>...] | PUT | log supplied text to the monitor log |
tell/<osdid-or-pgid>/mark_unfound_lost?m ulcmd=mulcmd(revert|delete) | PUT | mark all unfound objects in this pg as lost, either removing or reverting to a prior version if o |