Chapter 2. Questions and Answers 2.1. Getting Information This section describes how to use the RESTful plug-in to view information about the cluster, Monitors, OSDs, pools, hosts, and requests: Section 2.1.1, "How Can I View All Cluster Configuration Options?" Section 2.1.2, "How Can I View a Particular Cluster Configuration Option?" Section 2.1.3, "How Can I View All Configuration Options for OSDs?" Section 2.1.4, "How Can I View CRUSH Rules?" Section 2.1.5, "How Can I View Information about Monitors?" Section 2.1.6, "How Can I View Information About a Particular Monitor?" Section 2.1.7, "How Can I View Information about OSDs?" Section 2.1.8, "How Can I View Information about a Particular OSD?" Section 2.1.9, "How Can I Determine What Processes Can Be Scheduled on an OSD?" Section 2.1.10, "How Can I View Information About Pools?" Section 2.1.11, "How Can I View Information About a Particular Pool?" Section 2.1.12, "How Can I View Information About Requests?" Section 2.1.13, "How Can I View Information About a Particular Request?" Section 2.1.14, "How Can I View Information About Hosts?" Section 2.1.15, "How Can I View Information About a Particular Host?" 2.1.1. How Can I View All Cluster Configuration Options? This section describes how to use the RESTful plug-in to view cluster configuration options and their values. The curl Command On the command line, use: Replace: <user> with the user name <ceph-mgr> with the IP address or short host name of the node with the active ceph-mgr instance Enter the user's password when prompted. If you used a self-signed certificate, use the --insecure option: Python In the Python interpreter, enter: Replace: <ceph-mgr> with the IP address or short host name of the node with the active ceph-mgr instance <user> with the user name <password> with the user's password If you used a self-signed certificate, use the verify=False option: Web Browser In the web browser, enter: Replace: <ceph-mgr> with the IP address or short host name of the node with the active ceph-mgr instance Enter the user name and password when prompted. Additional Resources The Configuration Guide for Red Hat Ceph Storage 4 2.1.2. How Can I View a Particular Cluster Configuration Option? This section describes how to view a particular cluster option and its value. The curl Command On the command line, use: Replace: <user> with the user name <ceph-mgr> with the IP address or short host name of the node with the active ceph-mgr instance <argument> with the configuration option you want to view Enter the user's password when prompted. If you used a self-signed certificate, use the --insecure option: Python In the Python interpreter, enter: Replace: <ceph-mgr> with the IP address or short host name of the node with the active ceph-mgr instance <argument> with the configuration option you want to view <user> with the user name <password> with the user's password If you used a self-signed certificate, use the verify=False option: Web Browser In the web browser, enter: Replace: <ceph-mgr> with the IP address or short host name of the node with the active ceph-mgr instance <argument> with the configuration option you want to view Enter the user name and password when prompted. Additional Resources The Configuration Guide for Red Hat Ceph Storage 4 2.1.3. How Can I View All Configuration Options for OSDs? This section describes how to view all configuration options and their values for OSDs. The curl Command On the command line, use: Replace: <user> with the user name <ceph-mgr> with the IP address or short host name of the node with the active ceph-mgr instance Enter the user's password when prompted. If you used a self-signed certificate, use the --insecure option: Python In the Python interpreter, enter: Replace: <ceph-mgr> with the IP address or short host name of the node with the active ceph-mgr instance <user> with the user name <password> with the user's password If you used a self-signed certificate, use the verify=False option: Web Browser In the web browser, enter: Replace: <ceph-mgr> with the IP address or short host name of the node with the active ceph-mgr instance Enter the user name and password when prompted. Additional Resources The Configuration Guide for Red Hat Ceph Storage 4 2.1.4. How Can I View CRUSH Rules? This section describes how to view CRUSH rules. The curl Command On the command line, use: Replace: <user> with the user name <ceph-mgr> with the IP address or short host name of the node with the active ceph-mgr instance Enter the user's password when prompted. If you used a self-signed certificate, use the --insecure option: Python In the Python interpreter, enter: Replace: <ceph-mgr> with the IP address or short host name of the node with the active ceph-mgr instance <user> with the user name <password> with the user's password If you used a self-signed certificate, use the verify=False option: Web Browser In the web browser, enter: Replace: <ceph-mgr> with the IP address or short host name of the node with the active ceph-mgr instance Enter the user name and password when prompted. Additional Resources The CRUSH Rules section in the Administration Guide for Red Hat Ceph Storage 4 2.1.5. How Can I View Information about Monitors? This section describes how to view information about a particular Monitor, such as: IP address Name Quorum status The curl Command On the command line, use: Replace: <user> with the user name <ceph-mgr> with the IP address or short host name of the node with the active ceph-mgr instance Enter the user's password when prompted. If you used a self-signed certificate, use the --insecure option: Python In the Python interpreter, enter: Replace: <ceph-mgr> with the IP address or short host name of the node with the active ceph-mgr instance <user> with the user name <password> with the user's password If you used a self-signed certificate, use the verify=False option: Web Browser In the web browser, enter: Replace: <ceph-mgr> with the IP address or short host name of the node with the active ceph-mgr instance Enter the user name and password when prompted. 2.1.6. How Can I View Information About a Particular Monitor? This section describes how to view information about a particular Monitor, such as: IP address Name Quorum status The curl Command On the command line, use: Replace: <user> with the user name <ceph-mgr> with the IP address or short host name of the node with the active ceph-mgr instance <name> with the short host name of the Monitor Enter the user's password when prompted. If you used a self-signed certificate, use the --insecure option: Python In the Python interpreter, enter: Replace: <ceph-mgr> with the IP address or short host name of the node with the active ceph-mgr instance <name> with the short host name of the Monitor <user> with the user name <password> with the user's password If you used a self-signed certificate, use the verify=False option: Web Browser In the web browser, enter: Replace: <ceph-mgr> with the IP address or short host name of the node with the active ceph-mgr instance <name> with the short host name of the Monitor Enter the user name and password when prompted. 2.1.7. How Can I View Information about OSDs? This section describes how to view information about OSDs, such as: IP address Its pools Affinity Weight The curl Command On the command line, use: Replace: <user> with the user name <ceph-mgr> with the IP address or short host name of the node with the active ceph-mgr instance Enter the user's password when prompted. If you used a self-signed certificate, use the --insecure option: Python In the Python interpreter, enter: Replace: <ceph-mgr> with the IP address or short host name of the node with the active ceph-mgr instance <user> with the user name <password> with the user's password If you used a self-signed certificate, use the verify=False option: Web Browser In the web browser, enter: Replace: <ceph-mgr> with the IP address or short host name of the node with the active ceph-mgr instance Enter the user name and password when prompted. 2.1.8. How Can I View Information about a Particular OSD? This section describes how to view information about a particular OSD, such as: IP address Its pools Affinity Weight The curl Command On the command line, use: Replace: <user> with the user name <ceph-mgr> with the IP address or short host name of the node with the active ceph-mgr instance <id> with the ID of the OSD listed in the osd field Enter the user's password when prompted. If you used a self-signed certificate, use the --insecure option: Python In the Python interpreter, enter: Replace: <ceph-mgr> with the IP address or short host name of the node with the active ceph-mgr instance <id> with the ID of the OSD listed in the osd field <user> with the user name <password> with the user's password If you used a self-signed certificate, use the verify=False option: Web Browser In the web browser, enter: Replace: <ceph-mgr> with the IP address or short host name of the node with the active ceph-mgr instance <id> with the ID of the OSD listed in the osd field Enter the user name and password when prompted. 2.1.9. How Can I Determine What Processes Can Be Scheduled on an OSD? This section describes how to use the RESTful plug-in to view what processes, such as scrubbing or deep scrubbing, can be scheduled on an OSD. The curl Command On the command line, use: Replace: <user> with the user name <ceph-mgr> with the IP address or short host name of the node with the active ceph-mgr instance <id> with the ID of the OSD listed in the osd field Enter the user's password when prompted. If you used a self-signed certificate, use the --insecure option: Python In the Python interpreter, enter: Replace: <ceph-mgr> with the IP address or short host name of the node with the active ceph-mgr instance <id> with the ID of the OSD listed in the osd field <user> with the user name <password> with the user's password If you used a self-signed certificate, use the verify=False option: Web Browser In the web browser, enter: Replace: <ceph-mgr> with the IP address or short host name of the node with the active ceph-mgr instance <id> with the ID of the OSD listed in the osd field Enter the user name and password when prompted. 2.1.10. How Can I View Information About Pools? This section describes how to view information about pools, such as: Flags Size Number of placement groups The curl Command On the command line, use: Replace: <user> with the user name <ceph-mgr> with the IP address or short host name of the node with the active ceph-mgr instance Enter the user's password when prompted. If you used a self-signed certificate, use the --insecure option: Python In the Python interpreter, enter: Replace: <ceph-mgr> with the IP address or short host name of the node with the active ceph-mgr instance <user> with the user name <password> with the user's password If you used a self-signed certificate, use the verify=False option: Web Browser In the web browser, enter: Replace: <ceph-mgr> with the IP address or short host name of the node with the active ceph-mgr instance Enter the user name and password when prompted. 2.1.11. How Can I View Information About a Particular Pool? This section describes how to view information about a particular pool, such as: Flags Size Number of placement groups The curl Command On the command line, use: Replace: <user> with the user name <ceph-mgr> with the IP address or short host name of the node with the active ceph-mgr instance <id> with the ID the pool listed in the pool field Enter the user's password when prompted. If you used a self-signed certificate, use the --insecure option: Python In the Python interpreter, enter: Replace: <ceph-mgr> with the IP address or short host name of the node with the active ceph-mgr instance <id> with the ID the pool listed in the pool field <user> with the user name <password> with the user's password If you used a self-signed certificate, use the verify=False option: Web Browser In the web browser, enter: Replace: <ceph-mgr> with the IP address or short host name of the node with the active ceph-mgr instance <id> with the ID the pool listed in the pool field Enter the user name and password when prompted. 2.1.12. How Can I View Information About Requests? This section describes how view information about requests. The curl Command On the command line, use: Replace: <user> with the user name <ceph-mgr> with the IP address or short host name of the node with the active ceph-mgr instance Enter the user's password when prompted. If you used a self-signed certificate, use the --insecure option: Python In the Python interpreter, enter: Replace: <ceph-mgr> with the IP address or short host name of the node with the active ceph-mgr instance <user> with the user name <password> with the user's password If you used a self-signed certificate, use the verify=False option: Web Browser In the web browser, enter: Replace: <ceph-mgr> with the IP address or short host name of the node with the active ceph-mgr instance Enter the user name and password when prompted. 2.1.13. How Can I View Information About a Particular Request? This section describes how to view information about a particular request. The curl Command On the command line, use: Replace: <user> with the user name <ceph-mgr> with the IP address or short host name of the node with the active ceph-mgr instance <id> with the ID of the request listed in the id field Enter the user's password when prompted. If you used a self-signed certificate, use the --insecure option: Python In the Python interpreter, enter: Replace: <ceph-mgr> with the IP address or short host name of the node with the active ceph-mgr instance <id> with the ID of the request listed in the id field <user> with the user name <password> with the user's password If you used a self-signed certificate, use the verify=False option: Web Browser In the web browser, enter: Replace: <ceph-mgr> with the IP address or short host name of the node with the active ceph-mgr instance <id> with the ID of the request listed in the id field Enter the user name and password when prompted. 2.1.14. How Can I View Information About Hosts? This section describes how to view information about hosts, such as: Host names Ceph daemons and their IDs Ceph version The curl Command On the command line, use: Replace: <user> with the user name <ceph-mgr> with the IP address or short host name of the node with the active ceph-mgr instance Enter the user's password when prompted. If you used a self-signed certificate, use the --insecure option: Python In the Python interpreter, enter: Replace: <ceph-mgr> with the IP address or short host name of the node with the active ceph-mgr instance <user> with the user name <password> with the user's password If you used a self-signed certificate, use the verify=False option: Web Browser In the web browser, enter: Replace: <ceph-mgr> with the IP address or short host name of the node with the active ceph-mgr instance Enter the user name and password when prompted. 2.1.15. How Can I View Information About a Particular Host? This section describes how to view information about a particular host, such as: Host names Ceph daemons and their IDs Ceph version The curl Command On the command line, use: Replace: <user> with the user name <ceph-mgr> with the IP address or short host name of the node with the active ceph-mgr instance <hostname> with the host name of the host listed in the hostname field Enter the user's password when prompted. If you used a self-signed certificate, use the --insecure option: Python In the Python interpreter, enter: Replace: <ceph-mgr> with the IP address or short host name of the node with the active ceph-mgr instance <hostname> with the host name of the host listed in the hostname field <user> with the user name <password> with the user's password If you used a self-signed certificate, use the verify=False option: Web Browser In the web browser, enter: Replace: <ceph-mgr> with the IP address or short host name of the node with the active ceph-mgr instance <hostname> with the host name of the host listed in the hostname field Enter the user name and password when prompted. 2.2. Changing Configuration This section describes how to use the RESTful plug-in to change OSD configuration options, state of an OSD, and information about pools: Section 2.2.1, "How Can I Change OSD Configuration Options?" Section 2.2.2, "How Can I Change the OSD State?" Section 2.2.3, "How Can I Reweight an OSD?" Section 2.2.4, "How Can I Change Information for a Pool?" 2.2.1. How Can I Change OSD Configuration Options? This section describes how to use the RESTful plug-in to change OSD configuration options. The curl Command On the command line, use: Replace: <option> with the option to modify; pause , noup , nodown , noout , noin , nobackfill , norecover , noscrub , nodeep-scrub <value> with true or false <user> with the user name <ceph-mgr> with the IP address or short host name of the node with the active ceph-mgr instance Enter the user's password when prompted. If you used a self-signed certificate, use the --insecure option: Python In the Python interpreter, enter: Replace: <ceph-mgr> with the IP address or short host name of the node with the active ceph-mgr instance <option> with the option to modify; pause , noup , nodown , noout , noin , nobackfill , norecover , noscrub , nodeep-scrub <value> with True or False <user> with the user name <password> with the user's password If you used a self-signed certificate, use the verify=False option: 2.2.2. How Can I Change the OSD State? This section describes how to use the RESTful plug-in to change the state of an OSD. The curl Command On the command line, use: Replace: <state> with the state to change ( in or up ) <value> with true or false <user> with the user name <ceph-mgr> with the IP address or short host name of the node with the active ceph-mgr instance <id> with the ID of the OSD listed in the osd field Enter the user's password when prompted. If you used a self-signed certificate, use the --insecure option: Python In the Python interpreter, enter: Replace: <ceph-mgr> with the IP address or short host name of the node with the active ceph-mgr instance <state> with the state to change ( in or up ) <value> with True or False <id> with the ID of the OSD listed in the osd field <user> with the user name <password> with the user's password If you used a self-signed certificate, use the verify=False option: 2.2.3. How Can I Reweight an OSD? This section describes how to change the weight of an OSD. The curl Command On the command line, use: Replace: <value> with the new weight <user> with the user name <ceph-mgr> with the IP address or short host name of the node with the active ceph-mgr instance <id> with the ID of the OSD listed in the osd field Enter the user's password when prompted. If you used a self-signed certificate, use the --insecure option: Python In the Python interpreter, enter: Replace: <ceph-mgr> with the IP address or short host name of the node with the active ceph-mgr instance <value> with the new weight <id> with the ID of the OSD listed in the osd field <user> with the user name <password> with the user's password If you used a self-signed certificate, use the verify=False option: 2.2.4. How Can I Change Information for a Pool? This section describes how to use the RESTful plug-in to change information for a particular pool. The curl Command On the command line, use: Replace: <option> with the option to modify <value> with the new value of the option <user> with the user name <ceph-mgr> with the IP address or short host name of the node with the active ceph-mgr instance <id> with the ID the pool listed in the pool field Enter the user's password when prompted. If you used a self-signed certificate, use the --insecure option: Python In the Python interpreter, enter: Replace: <ceph-mgr> with the IP address or short host name of the node with the active ceph-mgr instance <id> with the ID the pool listed in the pool field <option> with the option to modify <value> with the new value of the option <user> with the user name <password> with the user's password If you used a self-signed certificate, use the verify=False option: 2.3. Administering the Cluster This section describes how to use the RESTful plug-in to initialize scrubbing or deep scrubbing on an OSD, create a pool or remove data from a pool, remove requests, or create a request: Section 2.3.1, "How Can I Run a Scheduled Process on an OSD?" Section 2.3.2, "How Can I Create a New Pool?" Section 2.3.3, "How Can I Remove Pools?" Section 2.3.4, "How Can I Remove All Finished Requests?" Section 2.3.5, "How Can I Remove a Particular Request?" Section 2.3.6, "How Can I Execute Administrative Commands?" 2.3.1. How Can I Run a Scheduled Process on an OSD? This section describes how to use the RESTful API to run scheduled processes, such as scrubbing or deep scrubbing, on an OSD. The curl Command On the command line, use: Replace: command with the process ( scrub , deep-scrub , or repair ) you want to start. Verify it the process is supported on the OSD. See Section 2.1.9, "How Can I Determine What Processes Can Be Scheduled on an OSD?" for details. <user> with the user name <ceph-mgr> with the IP address or short host name of the node with the active ceph-mgr instance <id> with the ID of the OSD listed in the osd field Enter the user's password when prompted. If you used a self-signed certificate, use the --insecure option: Python In the Python interpreter, enter: Replace: <ceph-mgr> with the IP address or short host name of the node with the active ceph-mgr instance <id> with the ID of the OSD listed in the osd field command with the process ( scrub , deep-scrub , or repair ) you want to start. Verify it the process is supported on the OSD. See Section 2.1.9, "How Can I Determine What Processes Can Be Scheduled on an OSD?" for details. <user> with the user name <password> with the user's password If you used a self-signed certificate, use the verify=False option: 2.3.2. How Can I Create a New Pool? This section describes how to use the RESTful plug-in to create a new pool. The curl Command On the command line, use: Replace: <name> with the name of the new pool <number> with the number of the placement groups <user> with the user name <ceph-mgr> with the IP address or short host name of the node with the active ceph-mgr instance Enter the user's password when prompted. If you used a self-signed certificate, use the --insecure option: Python In the Python interpreter, enter: Replace: <ceph-mgr> with the IP address or short host name of the node with the active ceph-mgr instance <name> with the name of the new pool <number> with the number of the placement groups <user> with the user name <password> with the user's password If you used a self-signed certificate, use the verify=False option: 2.3.3. How Can I Remove Pools? This section describes how to use the RESTful plug-in to remove a pool. This request is by default forbidden. To allow it, add the following parameter to the Ceph configuration guide. The curl Command On the command line, use: Replace: <user> with the user name <ceph-mgr> with the IP address or short host name of the node with the active ceph-mgr instance <id> with the ID the pool listed in the pool field Enter the user's password when prompted. If you used a self-signed certificate, use the --insecure option: Python In the Python interpreter, enter: Replace: <ceph-mgr> with the IP address or short host name of the node with the active ceph-mgr instance <id> with the ID the pool listed in the pool field <user> with the user name <password> with the user's password If you used a self-signed certificate, use the verify=False option: 2.3.4. How Can I Remove All Finished Requests? This section describes how to use the RESTful plug-in to remove all finished requests. The curl Command On the command line, use: Replace: <user> with the user name <ceph-mgr> with the IP address or short host name of the node with the active ceph-mgr instance Enter the user's password when prompted. If you used a self-signed certificate, use the --insecure option: Python In the Python interpreter, enter: Replace: <ceph-mgr> with the IP address or short host name of the node with the active ceph-mgr instance <user> with the user name <password> with the user's password If you used a self-signed certificate, use the verify=False option: 2.3.5. How Can I Remove a Particular Request? This section describes how to use the RESTful plug-in to remove a particular request from the database. The curl Command On the command line, use: Replace: <user> with the user name <ceph-mgr> with the IP address or short host name of the node with the active ceph-mgr instance <id> with the ID of the request listed in the id field Enter the user's password when prompted. If you used a self-signed certificate, use the --insecure option: Python In the Python interpreter, enter: Replace: <ceph-mgr> with the IP address or short host name of the node with the active ceph-mgr instance <id> with the ID of the request listed in the id field <user> with the user name <password> with the user's password If you used a self-signed certificate, use the verify=False option: 2.3.6. How Can I Execute Administrative Commands? Use the /request endpoint with the POST method to execute an administrative command. With this approach, you can use even commands that are not directly supported by the API, but are defined in the src/mon/MonCommands.h file in the Ceph source code. This is useful, for example, when building your own application that uses the API. Python Review src/mon/MonCommands.h and find the command you want to execute in the API, for example: The command is osd ls . The name bit specifies the name of an argument the command has, type specifies the type of values the argument takes, range specifies the range of accepted values of the argument, and req specifies whether the argument is required or not. In this example, the argument is epoch , the type of values the argument takes is integer, the range of accepted values is 0 , and the argument is optional. In the Python interpreter, enter: Replace : <ceph-mgr> with the IP address or short host name of the node with the active ceph-mgr instance <command> with the command listed in the src/mon/MonCommands.h file <argument> with any arguments of the command listed in the src/mon/MonCommands.h file, if the argument is optional, you can omit it <value> with the value of the argument <user> with the user name <password> with the user's password For example, to use the osd ls epoch 0 command. Replace <command> with osd ls and <argument> with epoch and <value> with 0 : If you used a self-signed certificate, use the verify=False option: Additional Resources The src/mon/MonCommands.h file on GitHub 2.4. Additional Resources Test API

Commands:
curl --silent --user <user> 'https://<ceph-mgr>:8003/config/cluster'
curl --silent --insecure --user <user> 'https://<ceph-mgr>:8003/config/cluster'
python >> import requests >> result = requests.get('https://<ceph-mgr>:8003/config/cluster', auth=("<user>", "<password>")) >> print result.json()
python >> import requests >> result = requests.get('https://<ceph-mgr>:8003/config/cluster', auth=("<user>", "<password>"), verify=False) >> print result.json()
https://<ceph-mgr>:8003/config/cluster
curl --silent --user <user> 'https://<ceph-mgr>:8003/config/cluster/<argument>'
curl --silent --insecure --user <user> 'https://<ceph-mgr>:8003/config/cluster/<argument>'
python >> import requests >> result = requests.get('https://<ceph-mgr>:8003/config/cluster/<argument>', auth=("<user>", "<password>")) >> print result.json()
python >> import requests >> result = requests.get('https://<ceph-mgr>:8003/config/cluster/<argument>', auth=("<user>", "<password>"), verify=False) >> print result.json()
https://<ceph-mgr>:8003/config/cluster/<argument>
curl --silent --user <user> 'https://<ceph-mgr>:8003/config/osd'
curl --silent --insecure --user <user> 'https://<ceph-mgr>:8003/config/osd'
python >> import requests >> result = requests.get('https://<ceph-mgr>:8003/config/osd', auth=("<user>", "<password>")) >> print result.json()
python >> import requests >> result = requests.get('https://<ceph-mgr>:8003/config/osd', auth=("<user>", "<password>"), verify=False) >> print result.json()
https://<ceph-mgr>:8003/config/osd
curl --silent --user <user> 'https://<ceph-mgr>:8003/crush/rule'
curl --silent --insecure --user <user> 'https://<ceph-mgr>:8003/crush/rule'
python >> import requests >> result = requests.get('https://<ceph-mgr>:8003/crush/rule', auth=("<user>", "<password>")) >> print result.json()
python >> import requests >> result = requests.get('https://<ceph-mgr>:8003/crush/rule', auth=("<user>", "<password>"), verify=False) >> print result.json()
https://<ceph-mgr>:8003/crush/rule
curl --silent --user <user> 'https://<ceph-mgr>:8003/mon'
curl --silent --insecure --user <user> 'https://<ceph-mgr>:8003/mon'
python >> import requests >> result = requests.get('https://<ceph-mgr>:8003/mon', auth=("<user>", "<password>")) >> print result.json()
python >> import requests >> result = requests.get('https://<ceph-mgr>:8003/mon', auth=("<user>", "<password>"), verify=False) >> print result.json()
https://<ceph-mgr>:8003/mon
curl --silent --user <user> 'https://<ceph-mgr>:8003/mon/<name>'
curl --silent --insecure --user <user> 'https://<ceph-mgr>:8003/mon/<name>'
python >> import requests >> result = requests.get('https://<ceph-mgr>:8003/mon/<name>', auth=("<user>", "<password>")) >> print result.json()
python >> import requests >> result = requests.get('https://<ceph-mgr>:8003/mon/<name>', auth=("<user>", "<password>"), verify=False) >> print result.json()
https://<ceph-mgr>:8003/mon/<name>
curl --silent --user <user> 'https://<ceph-mgr>:8003/osd'
curl --silent --insecure --user <user> 'https://<ceph-mgr>:8003/osd'
python >> import requests >> result = requests.get('https://<ceph-mgr>:8003/osd/', auth=("<user>", "<password>")) >> print result.json()
python >> import requests >> result = requests.get('https://<ceph-mgr>:8003/osd/', auth=("<user>", "<password>"), verify=False) >> print result.json()
https://<ceph-mgr>:8003/osd
curl --silent --user <user> 'https://<ceph-mgr>:8003/osd/<id>'
curl --silent --insecure --user <user> 'https://<ceph-mgr>:8003/osd/<id>'
python >> import requests >> result = requests.get('https://<ceph-mgr>:8003/osd/<id>', auth=("<user>", "<password>")) >> print result.json()
python >> import requests >> result = requests.get('https://<ceph-mgr>:8003/osd/<id>', auth=("<user>", "<password>"), verify=False) >> print result.json()
https://<ceph-mgr>:8003/osd/<id>
curl --silent --user <user> 'https://<ceph-mgr>:8003/osd/<id>/command'
curl --silent --insecure --user <user> 'https://<ceph-mgr>:8003/osd/<id>/command'
python >> import requests >> result = requests.get('https://<ceph-mgr>:8003/osd/<id>/command', auth=("<user>", "<password>")) >> print result.json()
python >> import requests >> result = requests.get('https://<ceph-mgr>:8003/osd/<id>/command', auth=("<user>", "<password>"), verify=False) >> print result.json()
https://<ceph-mgr>:8003/osd/<id>/command
curl --silent --user <user> 'https://<ceph-mgr>:8003/pool'
curl --silent --insecure --user <user> 'https://<ceph-mgr>:8003/pool'
python >> import requests >> result = requests.get('https://<ceph-mgr>:8003/pool', auth=("<user>", "<password>")) >> print result.json()
python >> import requests >> result = requests.get('https://<ceph-mgr>:8003/pool', auth=("<user>", "<password>"), verify=False) >> print result.json()
https://<ceph-mgr>:8003/pool
curl --silent --user <user> 'https://<ceph-mgr>:8003/pool/<id>'
curl --silent --insecure --user <user> 'https://<ceph-mgr>:8003/config/cluster'
python >> import requests >> result = requests.get('https://<ceph-mgr>:8003/pool/<id>', auth=("<user>", "<password>")) >> print result.json()
python >> import requests >> result = requests.get('https://<ceph-mgr>:8003/pool/<id>', auth=("<user>", "<password>"), verify=False) >> print result.json()
https://<ceph-mgr>:8003/pool/<id>
curl --silent --user <user> 'https://<ceph-mgr>:8003/request'
curl --silent --insecure --user <user> 'https://<ceph-mgr>:8003/request'
python >> import requests >> result = requests.get('https://<ceph-mgr>:8003/request', auth=("<user>", "<password>")) >> print result.json()
python >> import requests >> result = requests.get('https://<ceph-mgr>:8003/request', auth=("<user>", "<password>"), verify=False) >> print result.json()
https://<ceph-mgr>:8003/request
curl --silent --user <user> 'https://<ceph-mgr>:8003/request/<id>'
curl --silent --insecure --user <user> 'https://<ceph-mgr>:8003/request/<id>'
python >> import requests >> result = requests.get('https://<ceph-mgr>:8003/request/<id>', auth=("<user>", "<password>")) >> print result.json()
python >> import requests >> result = requests.get('https://<ceph-mgr>:8003/request/<id>', auth=("<user>", "<password>"), verify=False) >> print result.json()
https://<ceph-mgr>:8003/request/<id>
curl --silent --user <user> 'https://<ceph-mgr>:8003/server'
curl --silent --insecure --user <user> 'https://<ceph-mgr>:8003/server'
python >> import requests >> result = requests.get('https://<ceph-mgr>:8003/server', auth=("<user>", "<password>")) >> print result.json()
python >> import requests >> result = requests.get('https://<ceph-mgr>:8003/server', auth=("<user>", "<password>"), verify=False) >> print result.json()
https://<ceph-mgr>:8003/server
curl --silent --user <user> 'https://<ceph-mgr>:8003/server/<hostname>'
curl --silent --insecure --user <user> 'https://<ceph-mgr>:8003/server/<hostname>'
python >> import requests >> result = requests.get('https://<ceph-mgr>:8003/server/<hostname>', auth=("<user>", "<password>")) >> print result.json()
python >> import requests >> result = requests.get('https://<ceph-mgr>:8003/server/<hostname>', auth=("<user>", "<password>"), verify=False) >> print result.json()
https://<ceph-mgr>:8003/server/<hostname>
echo -En '{"<option>": <value>}' | curl --request PATCH --data @- --silent --user <user> 'https://<ceph-mgr>:8003/config/osd'
echo -En '{'<option>': <value>}' | curl --request PATCH --data @- --silent --insecure --user <user> 'https://<ceph-mgr>:8003/config/osd'
python >> import requests >> result = requests.patch('https://<ceph-mgr>:8003/config/osd', json={"<option>": <value>}, auth=("<user>", "<password>")) >> print result.json()
python >> import requests >> result = requests.patch('https://<ceph-mgr>:8003/config/osd', json={"<option>": <value>}, auth=("<user>", "<password>"), verify=False) >> print result.json()
echo -En '{"<state>": <value>}' | curl --request PATCH --data @- --silent --user <user> 'https://<ceph-mgr>:8003/osd/<id>'
echo -En '{"<state>": <value>}' | curl --request PATCH --data @- --silent --insecure --user <user> 'https://<ceph-mgr>:8003/osd/<id>'
python >> import requests >> result = requests.patch('https://<ceph-mgr>:8003/osd/<id>', json={"<state>": <value>}, auth=("<user>", "<password>")) >> print result.json()
python >> import requests >> result = requests.patch('https://<ceph-mgr>:8003/osd/<id>', json={"<state>": <value>}, auth=("<user>", "<password>"), verify=False) >> print result.json()
echo -En '{"reweight": <value>}' | curl --request PATCH --data @- --silent --user <user> 'https://<ceph-mgr>:8003/osd/<id>'
echo -En '{"reweight": <value>}' | curl --request PATCH --data @- --silent --insecure --user <user> 'https://<ceph-mgr>:8003/osd/<id>'
python >> import requests >> result = requests.patch('https://<ceph-mgr>:8003/osd/<id>', json={"reweight": <value>}, auth=("<user>", "<password>")) >> print result.json()
python >> import requests >> result = requests.patch('https://<ceph-mgr>:8003/osd/<id>', json={"reweight": <value>}, auth=("<user>", "<password>"), verify=False) >> print result.json()
echo -En '{"<option>": <value>}' | curl --request PATCH --data @- --silent --user <user> 'https://<ceph-mgr>:8003/pool/<id>'
echo -En '{"<option>": <value>}' | curl --request PATCH --data @- --silent --insecure --user <user> 'https://<ceph-mgr>:8003/pool/<id>'
python >> import requests >> result = requests.patch('https://<ceph-mgr>:8003/pool/<id>', json={"<option>": <value>}, auth=("<user>", "<password>")) >> print result.json()
python >> import requests >> result = requests.patch('https://<ceph-mgr>:8003/pool/<id>', json={"<option>": <value>}, auth=("<user>", "<password>"), verify=False) >> print result.json()
echo -En '{"command": "<command>"}' | curl --request POST --data @- --silent --user <user> 'https://<ceph-mgr>:8003/osd/<id>/command'
echo -En '{"command": "<command>"}' | curl --request POST --data @- --silent --insecure --user <user> 'https://<ceph-mgr>:8003/osd/<id>/command'
python >> import requests >> result = requests.post('https://<ceph-mgr>:8003/osd/<id>/command', json={"command": "<command>"}, auth=("<user>", "<password>")) >> print result.json()
python >> import requests >> result = requests.post('https://<ceph-mgr>:8003/osd/<id>/command', json={"command": "<command>"}, auth=("<user>", "<password>"), verify=False) >> print result.json()
echo -En '{"name": "<name>", "pg_num": <number>}' | curl --request POST --data @- --silent --user <user> 'https://<ceph-mgr>:8003/pool'
echo -En '{"name": "<name>", "pg_num": <number>}' | curl --request POST --data @- --silent --insecure --user <user> 'https://<ceph-mgr>:8003/pool'
python >> import requests >> result = requests.post('https://<ceph-mgr>:8003/pool', json={"name": "<name>", "pg_num": <number>}, auth=("<user>", "<password>")) >> print result.json()
python >> import requests >> result = requests.post('https://<ceph-mgr>:8003/pool', json={"name": "<name>", "pg_num": <number>}, auth=("<user>", "<password>"), verify=False) >> print result.json()
mon_allow_pool_delete = true
curl --request DELETE --silent --user <user> 'https://<ceph-mgr>:8003/pool/<id>'
curl --request DELETE --silent --insecure --user <user> 'https://<ceph-mgr>:8003/pool/<id>'
python >> import requests >> result = requests.delete('https://<ceph-mgr>:8003/pool/<id>', auth=("<user>", "<password>")) >> print result.json()
python >> import requests >> result = requests.delete('https://<ceph-mgr>:8003/pool/<id>', auth=("<user>", "<password>"), verify=False) >> print result.json()
curl --request DELETE --silent --user <user> 'https://<ceph-mgr>:8003/request'
curl --request DELETE --silent --insecure --user <user> 'https://<ceph-mgr>:8003/request'
python >> import requests >> result = requests.delete('https://<ceph-mgr>:8003/request', auth=("<user>", "<password>")) >> print result.json()
python >> import requests >> result = requests.delete('https://<ceph-mgr>:8003/request', auth=("<user>", "<password>"), verify=False) >> print result.json()
curl --request DELETE --silent --user <user> 'https://<ceph-mgr>:8003/request/<id>'
curl --request DELETE --silent --insecure --user <user> 'https://<ceph-mgr>:8003/request/<id>'
python >> import requests >> result = requests.delete('https://<ceph-mgr>:8003/request/<id>', auth=("<user>", "<password>")) >> print result.json()
python >> import requests >> result = requests.delete('https://<ceph-mgr>:8003/request/<id>', auth=("<user>", "<password>"), verify=False) >> print result.json()
COMMAND("osd ls " "name=epoch,type=CephInt,range=0,req=false", "show all OSD ids", "osd", "r", "cli,rest")
python >> import requests >> result = requests.post( 'https://<ceph-mgr>:8003/request', json={'prefix': '<command>', <argument>:<value>}, auth=("<user>", "<password>") ) >> print result.json()
python >> import requests >> result = requests.post( 'https://ceph-node1:8003/request', json={'prefix': 'osd ls', 'epoch': 0}, auth=("ceph-user", "<password>") ) >> print result.json()
python >> import requests >> result = requests.post( 'https://<ceph-mgr>:8003/request', json={'prefix': '<command>', <optional_argument>:<value>}, auth=("<user>", "<password>"), verify=False ) >> print result.json()