Viewing information about a particular host

Understand how to use the RESTful plug-in to view information about a particular host, such as hostnames, Ceph daemons and their IDs, and Ceph versions.

Viewing information about a particular host using the curl command

On the command line, run the following command:
curl --silent --user USER 'https://CEPH_MANAGER:8080/api/host/HOSTNAME'
Replace:
  • USER with the username.
  • CEPH_MANAGER with the IP address or short hostname of the node with the active ceph-mgr instance.
  • HOSTNAME with the host name of the host listed in the host field.

Enter the user’s password when prompted.
Note: If using a self-signed certificate, use the --insecure option.
curl --silent --insecure --user USER 'https://CEPH_MANAGER:8080/api/host/HOSTNAME'

Viewing information about particular host using Python

In the Python interpreter, enter the following:
$ python
>> import requests
>> result = requests.get('https://CEPH_MANAGER:8080/api/host/HOSTNAME', auth=("USER", "PASSWORD"))
>> print result.json()
Replace:
  • CEPH_MANAGER with the IP address or short hostname of the node with the active ceph-mgr instance.
  • HOSTNAME with the host name of the host listed in the host field
  • USER with the username.
  • PASSWORD with the user’s password.
Note: If using a self-signed certificate, use verify=False.
$ python
>> import requests
>> result = requests.get('https://CEPH_MANAGER:8080/api/host', auth=("USER", "PASSWORD"), verify=False)
>> print result.json()

Viewing information about a particular host using a web browser

In the web browser, go to https://CEPH_MANAGER:8080/api/host/HOSTNAME.

Replace:
  • CEPH_MANAGER with the IP address or short hostname of the node with the active ceph-mgr instance.
  • HOSTNAME with the host name of the host listed in the host field.

Enter the username and password when prompted.