第 2 章 问题和答案
2.1. 获取信息 复制链接链接已复制到粘贴板!
本节介绍如何使用 RESTful 插件查看有关集群、监控器、OSD、池、主机和请求的信息:
- 第 2.1.1 节 “如何查看所有群集配置选项?”
- 第 2.1.2 节 “如何查看部分群集配置选项?”
- 第 2.1.3 节 “如何查看 OSD 的所有配置选项?”
- 第 2.1.4 节 “如何查看 CRUSH 规则?”
- 第 2.1.5 节 “如何查看有关 monitor 的信息?”
- 第 2.1.6 节 “我如何查看有关部分 monitor 的信息?”
- 第 2.1.7 节 “如何查看有关 OSD 的信息?”
- 第 2.1.8 节 “如何查看有关部分 OSD 的信息?”
- 第 2.1.9 节 “如何确定哪些进程可以在 OSD 上调度?”
- 第 2.1.10 节 “如何查看关于池的信息?”
- 第 2.1.11 节 “我如何查看关于组件池的信息?”
- 第 2.1.12 节 “如何查看关于请求的信息?”
- 第 2.1.13 节 “我如何查看关于部分请求的信息?”
- 第 2.1.14 节 “如何查看关于主机的信息?”
- 第 2.1.15 节 “我如何查看关于部分主机的信息?”
2.1.1. 如何查看所有群集配置选项? 复制链接链接已复制到粘贴板!
本节论述了如何使用 RESTful 插件查看集群配置选项及其值。
curl
命令
在命令行中使用:
curl --silent --user <user> 'https://<ceph-mgr>:8003/config/cluster'
curl --silent --user <user> 'https://<ceph-mgr>:8003/config/cluster'
替换:
-
<user>
with user name -
<ceph-mgr>
,带有活跃的ceph-mgr
实例,节点的 IP 地址或短主机名
出现提示时,输入用户的密码。
如果您使用自签名证书,请使用 --insecure
选项:
curl --silent --insecure --user <user> 'https://<ceph-mgr>:8003/config/cluster'
curl --silent --insecure --user <user> 'https://<ceph-mgr>:8003/config/cluster'
Python
在 Python 解释器中输入:
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>"))
>> print result.json()
替换:
-
<ceph-mgr>
,带有活跃的ceph-mgr
实例,节点的 IP 地址或短主机名 -
<user>
with user name -
<password>
和用户的密码
如果您使用自签名证书,请使用 verify=False
选项:
python > import requests > result = requests.get('https://<ceph-mgr>:8003/config/cluster', auth=("<user>", "<password>"), verify=False) > print result.json()
$ python
>> import requests
>> result = requests.get('https://<ceph-mgr>:8003/config/cluster', auth=("<user>", "<password>"), verify=False)
>> print result.json()
Web 浏览器
在 Web 浏览器中输入:
https://<ceph-mgr>:8003/config/cluster
https://<ceph-mgr>:8003/config/cluster
替换:
-
<ceph-mgr>
,带有活跃的ceph-mgr
实例,节点的 IP 地址或短主机名
出现提示时,输入用户名和密码。
其它资源
- Red Hat Ceph Storage 4 配置指南
2.1.2. 如何查看部分群集配置选项? 复制链接链接已复制到粘贴板!
本节论述了如何查看特定集群选项及其值。
curl
命令
在命令行中使用:
curl --silent --user <user> 'https://<ceph-mgr>:8003/config/cluster/<argument>'
curl --silent --user <user> 'https://<ceph-mgr>:8003/config/cluster/<argument>'
替换:
-
<user>
with user name -
<ceph-mgr>
,带有活跃的ceph-mgr
实例,节点的 IP 地址或短主机名 -
<argument>
带有您要查看的配置选项
出现提示时,输入用户的密码。
如果您使用自签名证书,请使用 --insecure
选项:
curl --silent --insecure --user <user> 'https://<ceph-mgr>:8003/config/cluster/<argument>'
curl --silent --insecure --user <user> 'https://<ceph-mgr>:8003/config/cluster/<argument>'
Python
在 Python 解释器中输入:
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>"))
>> print result.json()
替换:
-
<ceph-mgr>
,带有活跃的ceph-mgr
实例,节点的 IP 地址或短主机名 -
<argument>
带有您要查看的配置选项 -
<user>
with user name -
<password>
和用户的密码
如果您使用自签名证书,请使用 verify=False
选项:
python > import requests > result = requests.get('https://<ceph-mgr>:8003/config/cluster/<argument>', auth=("<user>", "<password>"), verify=False) > print result.json()
$ python
>> import requests
>> result = requests.get('https://<ceph-mgr>:8003/config/cluster/<argument>', auth=("<user>", "<password>"), verify=False)
>> print result.json()
Web 浏览器
在 Web 浏览器中输入:
https://<ceph-mgr>:8003/config/cluster/<argument>
https://<ceph-mgr>:8003/config/cluster/<argument>
替换:
-
<ceph-mgr>
,带有活跃的ceph-mgr
实例,节点的 IP 地址或短主机名 -
<argument>
带有您要查看的配置选项
出现提示时,输入用户名和密码。
其它资源
- Red Hat Ceph Storage 4 配置指南
2.1.3. 如何查看 OSD 的所有配置选项? 复制链接链接已复制到粘贴板!
本节介绍如何查看 OSD 的所有配置选项及其值。
curl
命令
在命令行中使用:
curl --silent --user <user> 'https://<ceph-mgr>:8003/config/osd'
curl --silent --user <user> 'https://<ceph-mgr>:8003/config/osd'
替换:
-
<user>
with user name -
<ceph-mgr>
,带有活跃的ceph-mgr
实例,节点的 IP 地址或短主机名
出现提示时,输入用户的密码。
如果您使用自签名证书,请使用 --insecure
选项:
curl --silent --insecure --user <user> 'https://<ceph-mgr>:8003/config/osd'
curl --silent --insecure --user <user> 'https://<ceph-mgr>:8003/config/osd'
Python
在 Python 解释器中输入:
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>"))
>> print result.json()
替换:
-
<ceph-mgr>
,带有活跃的ceph-mgr
实例,节点的 IP 地址或短主机名 -
<user>
with user name -
<password>
和用户的密码
如果您使用自签名证书,请使用 verify=False
选项:
python > import requests > result = requests.get('https://<ceph-mgr>:8003/config/osd', auth=("<user>", "<password>"), verify=False) > print result.json()
$ python
>> import requests
>> result = requests.get('https://<ceph-mgr>:8003/config/osd', auth=("<user>", "<password>"), verify=False)
>> print result.json()
Web 浏览器
在 Web 浏览器中输入:
https://<ceph-mgr>:8003/config/osd
https://<ceph-mgr>:8003/config/osd
替换:
-
<ceph-mgr>
,带有活跃的ceph-mgr
实例,节点的 IP 地址或短主机名
出现提示时,输入用户名和密码。
其它资源
- Red Hat Ceph Storage 4 配置指南
2.1.4. 如何查看 CRUSH 规则? 复制链接链接已复制到粘贴板!
本节介绍如何查看 CRUSH 规则。
curl
命令
在命令行中使用:
curl --silent --user <user> 'https://<ceph-mgr>:8003/crush/rule'
curl --silent --user <user> 'https://<ceph-mgr>:8003/crush/rule'
替换:
-
<user>
with user name -
<ceph-mgr>
,带有活跃的ceph-mgr
实例,节点的 IP 地址或短主机名
出现提示时,输入用户的密码。
如果您使用自签名证书,请使用 --insecure
选项:
curl --silent --insecure --user <user> 'https://<ceph-mgr>:8003/crush/rule'
curl --silent --insecure --user <user> 'https://<ceph-mgr>:8003/crush/rule'
Python
在 Python 解释器中输入:
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>"))
>> print result.json()
替换:
-
<ceph-mgr>
,带有活跃的ceph-mgr
实例,节点的 IP 地址或短主机名 -
<user>
with user name -
<password>
和用户的密码
如果您使用自签名证书,请使用 verify=False
选项:
python > import requests > result = requests.get('https://<ceph-mgr>:8003/crush/rule', auth=("<user>", "<password>"), verify=False) > print result.json()
$ python
>> import requests
>> result = requests.get('https://<ceph-mgr>:8003/crush/rule', auth=("<user>", "<password>"), verify=False)
>> print result.json()
Web 浏览器
在 Web 浏览器中输入:
https://<ceph-mgr>:8003/crush/rule
https://<ceph-mgr>:8003/crush/rule
替换:
-
<ceph-mgr>
,带有活跃的ceph-mgr
实例,节点的 IP 地址或短主机名
出现提示时,输入用户名和密码。
其它资源
- 红帽 Ceph 存储 4 管理指南 中的 CRUSH 规则 部分
2.1.5. 如何查看有关 monitor 的信息? 复制链接链接已复制到粘贴板!
本节论述了如何查看特定 monitor 的信息,例如:
- IP 地址
- 名称
- 仲裁状态
curl
命令
在命令行中使用:
curl --silent --user <user> 'https://<ceph-mgr>:8003/mon'
curl --silent --user <user> 'https://<ceph-mgr>:8003/mon'
替换:
-
<user>
with user name -
<ceph-mgr>
,带有活跃的ceph-mgr
实例,节点的 IP 地址或短主机名
出现提示时,输入用户的密码。
如果您使用自签名证书,请使用 --insecure
选项:
curl --silent --insecure --user <user> 'https://<ceph-mgr>:8003/mon'
curl --silent --insecure --user <user> 'https://<ceph-mgr>:8003/mon'
Python
在 Python 解释器中输入:
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>"))
>> print result.json()
替换:
-
<ceph-mgr>
,带有活跃的ceph-mgr
实例,节点的 IP 地址或短主机名 -
<user>
with user name -
<password>
和用户的密码
如果您使用自签名证书,请使用 verify=False
选项:
python > import requests > result = requests.get('https://<ceph-mgr>:8003/mon', auth=("<user>", "<password>"), verify=False) > print result.json()
$ python
>> import requests
>> result = requests.get('https://<ceph-mgr>:8003/mon', auth=("<user>", "<password>"), verify=False)
>> print result.json()
Web 浏览器
在 Web 浏览器中输入:
https://<ceph-mgr>:8003/mon
https://<ceph-mgr>:8003/mon
替换:
-
<ceph-mgr>
,带有活跃的ceph-mgr
实例,节点的 IP 地址或短主机名
出现提示时,输入用户名和密码。
2.1.6. 我如何查看有关部分 monitor 的信息? 复制链接链接已复制到粘贴板!
本节论述了如何查看特定 monitor 的信息,例如:
- IP 地址
- 名称
- 仲裁状态
curl
命令
在命令行中使用:
curl --silent --user <user> 'https://<ceph-mgr>:8003/mon/<name>'
curl --silent --user <user> 'https://<ceph-mgr>:8003/mon/<name>'
替换:
-
<user>
with user name -
<ceph-mgr>
,带有活跃的ceph-mgr
实例,节点的 IP 地址或短主机名 -
<name>
,带有 monitor 的短主机名
出现提示时,输入用户的密码。
如果您使用自签名证书,请使用 --insecure
选项:
curl --silent --insecure --user <user> 'https://<ceph-mgr>:8003/mon/<name>'
curl --silent --insecure --user <user> 'https://<ceph-mgr>:8003/mon/<name>'
Python
在 Python 解释器中输入:
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>"))
>> print result.json()
替换:
-
<ceph-mgr>
,带有活跃的ceph-mgr
实例,节点的 IP 地址或短主机名 -
<name>
,带有 monitor 的短主机名 -
<user>
with user name -
<password>
和用户的密码
如果您使用自签名证书,请使用 verify=False
选项:
python > import requests > result = requests.get('https://<ceph-mgr>:8003/mon/<name>', auth=("<user>", "<password>"), verify=False) > print result.json()
$ python
>> import requests
>> result = requests.get('https://<ceph-mgr>:8003/mon/<name>', auth=("<user>", "<password>"), verify=False)
>> print result.json()
Web 浏览器
在 Web 浏览器中输入:
https://<ceph-mgr>:8003/mon/<name>
https://<ceph-mgr>:8003/mon/<name>
替换:
-
<ceph-mgr>
,带有活跃的ceph-mgr
实例,节点的 IP 地址或短主机名 -
<name>
,带有 monitor 的短主机名
出现提示时,输入用户名和密码。
2.1.7. 如何查看有关 OSD 的信息? 复制链接链接已复制到粘贴板!
本节介绍如何查看 OSD 的信息,例如:
- IP 地址
- 其池
- 关联性
- weight
curl
命令
在命令行中使用:
curl --silent --user <user> 'https://<ceph-mgr>:8003/osd'
curl --silent --user <user> 'https://<ceph-mgr>:8003/osd'
替换:
-
<user>
with user name -
<ceph-mgr>
,带有活跃的ceph-mgr
实例,节点的 IP 地址或短主机名
出现提示时,输入用户的密码。
如果您使用自签名证书,请使用 --insecure
选项:
curl --silent --insecure --user <user> 'https://<ceph-mgr>:8003/osd'
curl --silent --insecure --user <user> 'https://<ceph-mgr>:8003/osd'
Python
在 Python 解释器中输入:
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>"))
>> print result.json()
替换:
-
<ceph-mgr>
,带有活跃的ceph-mgr
实例,节点的 IP 地址或短主机名 -
<user>
with user name -
<password>
和用户的密码
如果您使用自签名证书,请使用 verify=False
选项:
python > import requests > result = requests.get('https://<ceph-mgr>:8003/osd/', auth=("<user>", "<password>"), verify=False) > print result.json()
$ python
>> import requests
>> result = requests.get('https://<ceph-mgr>:8003/osd/', auth=("<user>", "<password>"), verify=False)
>> print result.json()
Web 浏览器
在 Web 浏览器中输入:
https://<ceph-mgr>:8003/osd
https://<ceph-mgr>:8003/osd
替换:
-
<ceph-mgr>
,带有活跃的ceph-mgr
实例,节点的 IP 地址或短主机名
出现提示时,输入用户名和密码。
2.1.8. 如何查看有关部分 OSD 的信息? 复制链接链接已复制到粘贴板!
本节论述了如何查看特定 OSD 的信息,例如:
- IP 地址
- 其池
- 关联性
- weight
curl
命令
在命令行中使用:
curl --silent --user <user> 'https://<ceph-mgr>:8003/osd/<id>'
curl --silent --user <user> 'https://<ceph-mgr>:8003/osd/<id>'
替换:
-
<user>
with user name -
<ceph-mgr>
,带有活跃的ceph-mgr
实例,节点的 IP 地址或短主机名 -
<id>
带有osd
字段中列出的 OSD 的 ID
出现提示时,输入用户的密码。
如果您使用自签名证书,请使用 --insecure
选项:
curl --silent --insecure --user <user> 'https://<ceph-mgr>:8003/osd/<id>'
curl --silent --insecure --user <user> 'https://<ceph-mgr>:8003/osd/<id>'
Python
在 Python 解释器中输入:
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>"))
>> print result.json()
替换:
-
<ceph-mgr>
,带有活跃的ceph-mgr
实例,节点的 IP 地址或短主机名 -
<id>
带有osd
字段中列出的 OSD 的 ID -
<user>
with user name -
<password>
和用户的密码
如果您使用自签名证书,请使用 verify=False
选项:
python > import requests > result = requests.get('https://<ceph-mgr>:8003/osd/<id>', auth=("<user>", "<password>"), verify=False) > print result.json()
$ python
>> import requests
>> result = requests.get('https://<ceph-mgr>:8003/osd/<id>', auth=("<user>", "<password>"), verify=False)
>> print result.json()
Web 浏览器
在 Web 浏览器中输入:
https://<ceph-mgr>:8003/osd/<id>
https://<ceph-mgr>:8003/osd/<id>
替换:
-
<ceph-mgr>
,带有活跃的ceph-mgr
实例,节点的 IP 地址或短主机名 -
<id>
带有osd
字段中列出的 OSD 的 ID
出现提示时,输入用户名和密码。
2.1.9. 如何确定哪些进程可以在 OSD 上调度? 复制链接链接已复制到粘贴板!
本节介绍如何使用 RESTful 插件查看哪些进程(如清理或深度清理)可以调度到 OSD 上。
curl
命令
在命令行中使用:
curl --silent --user <user> 'https://<ceph-mgr>:8003/osd/<id>/command'
curl --silent --user <user> 'https://<ceph-mgr>:8003/osd/<id>/command'
替换:
-
<user>
with user name -
<ceph-mgr>
,带有活跃的ceph-mgr
实例,节点的 IP 地址或短主机名 -
<id>
带有osd
字段中列出的 OSD 的 ID
出现提示时,输入用户的密码。
如果您使用自签名证书,请使用 --insecure
选项:
curl --silent --insecure --user <user> 'https://<ceph-mgr>:8003/osd/<id>/command'
curl --silent --insecure --user <user> 'https://<ceph-mgr>:8003/osd/<id>/command'
Python
在 Python 解释器中输入:
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>"))
>> print result.json()
替换:
-
<ceph-mgr>
,带有活跃的ceph-mgr
实例,节点的 IP 地址或短主机名 -
<id>
带有osd
字段中列出的 OSD 的 ID -
<user>
with user name -
<password>
和用户的密码
如果您使用自签名证书,请使用 verify=False
选项:
python > import requests > result = requests.get('https://<ceph-mgr>:8003/osd/<id>/command', auth=("<user>", "<password>"), verify=False) > print result.json()
$ python
>> import requests
>> result = requests.get('https://<ceph-mgr>:8003/osd/<id>/command', auth=("<user>", "<password>"), verify=False)
>> print result.json()
Web 浏览器
在 Web 浏览器中输入:
https://<ceph-mgr>:8003/osd/<id>/command
https://<ceph-mgr>:8003/osd/<id>/command
替换:
-
<ceph-mgr>
,带有活跃的ceph-mgr
实例,节点的 IP 地址或短主机名 -
<id>
带有osd
字段中列出的 OSD 的 ID
出现提示时,输入用户名和密码。
2.1.10. 如何查看关于池的信息? 复制链接链接已复制到粘贴板!
本节论述了如何查看池的信息,例如:
- 标记
- Size
- 放置组数量
curl
命令
在命令行中使用:
curl --silent --user <user> 'https://<ceph-mgr>:8003/pool'
curl --silent --user <user> 'https://<ceph-mgr>:8003/pool'
替换:
-
<user>
with user name -
<ceph-mgr>
,带有活跃的ceph-mgr
实例,节点的 IP 地址或短主机名
出现提示时,输入用户的密码。
如果您使用自签名证书,请使用 --insecure
选项:
curl --silent --insecure --user <user> 'https://<ceph-mgr>:8003/pool'
curl --silent --insecure --user <user> 'https://<ceph-mgr>:8003/pool'
Python
在 Python 解释器中输入:
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>"))
>> print result.json()
替换:
-
<ceph-mgr>
,带有活跃的ceph-mgr
实例,节点的 IP 地址或短主机名 -
<user>
with user name -
<password>
和用户的密码
如果您使用自签名证书,请使用 verify=False
选项:
python > import requests > result = requests.get('https://<ceph-mgr>:8003/pool', auth=("<user>", "<password>"), verify=False) > print result.json()
$ python
>> import requests
>> result = requests.get('https://<ceph-mgr>:8003/pool', auth=("<user>", "<password>"), verify=False)
>> print result.json()
Web 浏览器
在 Web 浏览器中输入:
https://<ceph-mgr>:8003/pool
https://<ceph-mgr>:8003/pool
替换:
-
<ceph-mgr>
,带有活跃的ceph-mgr
实例,节点的 IP 地址或短主机名
出现提示时,输入用户名和密码。
2.1.11. 我如何查看关于组件池的信息? 复制链接链接已复制到粘贴板!
本节论述了如何查看特定池的信息,例如:
- 标记
- Size
- 放置组数量
curl
命令
在命令行中使用:
curl --silent --user <user> 'https://<ceph-mgr>:8003/pool/<id>'
curl --silent --user <user> 'https://<ceph-mgr>:8003/pool/<id>'
替换:
-
<user>
with user name -
<ceph-mgr>
,带有活跃的ceph-mgr
实例,节点的 IP 地址或短主机名 -
<id>
带有在pool
字段中列出的池的 ID
出现提示时,输入用户的密码。
如果您使用自签名证书,请使用 --insecure
选项:
curl --silent --insecure --user <user> 'https://<ceph-mgr>:8003/config/cluster'
curl --silent --insecure --user <user> 'https://<ceph-mgr>:8003/config/cluster'
Python
在 Python 解释器中输入:
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>"))
>> print result.json()
替换:
-
<ceph-mgr>
,带有活跃的ceph-mgr
实例,节点的 IP 地址或短主机名 -
<id>
带有在pool
字段中列出的池的 ID -
<user>
with user name -
<password>
和用户的密码
如果您使用自签名证书,请使用 verify=False
选项:
python > import requests > result = requests.get('https://<ceph-mgr>:8003/pool/<id>', auth=("<user>", "<password>"), verify=False) > print result.json()
$ python
>> import requests
>> result = requests.get('https://<ceph-mgr>:8003/pool/<id>', auth=("<user>", "<password>"), verify=False)
>> print result.json()
Web 浏览器
在 Web 浏览器中输入:
https://<ceph-mgr>:8003/pool/<id>
https://<ceph-mgr>:8003/pool/<id>
替换:
-
<ceph-mgr>
,带有活跃的ceph-mgr
实例,节点的 IP 地址或短主机名 -
<id>
带有在pool
字段中列出的池的 ID
出现提示时,输入用户名和密码。
2.1.12. 如何查看关于请求的信息? 复制链接链接已复制到粘贴板!
本节论述了如何查看请求的信息。
curl
命令
在命令行中使用:
curl --silent --user <user> 'https://<ceph-mgr>:8003/request'
curl --silent --user <user> 'https://<ceph-mgr>:8003/request'
替换:
-
<user>
with user name -
<ceph-mgr>
,带有活跃的ceph-mgr
实例,节点的 IP 地址或短主机名
出现提示时,输入用户的密码。
如果您使用自签名证书,请使用 --insecure
选项:
curl --silent --insecure --user <user> 'https://<ceph-mgr>:8003/request'
curl --silent --insecure --user <user> 'https://<ceph-mgr>:8003/request'
Python
在 Python 解释器中输入:
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>"))
>> print result.json()
替换:
-
<ceph-mgr>
,带有活跃的ceph-mgr
实例,节点的 IP 地址或短主机名 -
<user>
with user name -
<password>
和用户的密码
如果您使用自签名证书,请使用 verify=False
选项:
python > import requests > result = requests.get('https://<ceph-mgr>:8003/request', auth=("<user>", "<password>"), verify=False) > print result.json()
$ python
>> import requests
>> result = requests.get('https://<ceph-mgr>:8003/request', auth=("<user>", "<password>"), verify=False)
>> print result.json()
Web 浏览器
在 Web 浏览器中输入:
https://<ceph-mgr>:8003/request
https://<ceph-mgr>:8003/request
替换:
-
<ceph-mgr>
,带有活跃的ceph-mgr
实例,节点的 IP 地址或短主机名
出现提示时,输入用户名和密码。
2.1.13. 我如何查看关于部分请求的信息? 复制链接链接已复制到粘贴板!
本节论述了如何查看特定请求的信息。
curl
命令
在命令行中使用:
curl --silent --user <user> 'https://<ceph-mgr>:8003/request/<id>'
curl --silent --user <user> 'https://<ceph-mgr>:8003/request/<id>'
替换:
-
<user>
with user name -
<ceph-mgr>
,带有活跃的ceph-mgr
实例,节点的 IP 地址或短主机名 -
<id>
带有id
字段中列出的请求的 ID
出现提示时,输入用户的密码。
如果您使用自签名证书,请使用 --insecure
选项:
curl --silent --insecure --user <user> 'https://<ceph-mgr>:8003/request/<id>'
curl --silent --insecure --user <user> 'https://<ceph-mgr>:8003/request/<id>'
Python
在 Python 解释器中输入:
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>"))
>> print result.json()
替换:
-
<ceph-mgr>
,带有活跃的ceph-mgr
实例,节点的 IP 地址或短主机名 -
<id>
带有id
字段中列出的请求的 ID -
<user>
with user name -
<password>
和用户的密码
如果您使用自签名证书,请使用 verify=False
选项:
python > import requests > result = requests.get('https://<ceph-mgr>:8003/request/<id>', auth=("<user>", "<password>"), verify=False) > print result.json()
$ python
>> import requests
>> result = requests.get('https://<ceph-mgr>:8003/request/<id>', auth=("<user>", "<password>"), verify=False)
>> print result.json()
Web 浏览器
在 Web 浏览器中输入:
https://<ceph-mgr>:8003/request/<id>
https://<ceph-mgr>:8003/request/<id>
替换:
-
<ceph-mgr>
,带有活跃的ceph-mgr
实例,节点的 IP 地址或短主机名 -
<id>
带有id
字段中列出的请求的 ID
出现提示时,输入用户名和密码。
2.1.14. 如何查看关于主机的信息? 复制链接链接已复制到粘贴板!
本节论述了如何查看主机的信息,例如:
- 主机名
- Ceph 守护进程及其 ID
- Ceph 版本
curl
命令
在命令行中使用:
curl --silent --user <user> 'https://<ceph-mgr>:8003/server'
curl --silent --user <user> 'https://<ceph-mgr>:8003/server'
替换:
-
<user>
with user name -
<ceph-mgr>
,带有活跃的ceph-mgr
实例,节点的 IP 地址或短主机名
出现提示时,输入用户的密码。
如果您使用自签名证书,请使用 --insecure
选项:
curl --silent --insecure --user <user> 'https://<ceph-mgr>:8003/server'
curl --silent --insecure --user <user> 'https://<ceph-mgr>:8003/server'
Python
在 Python 解释器中输入:
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>"))
>> print result.json()
替换:
-
<ceph-mgr>
,带有活跃的ceph-mgr
实例,节点的 IP 地址或短主机名 -
<user>
with user name -
<password>
和用户的密码
如果您使用自签名证书,请使用 verify=False
选项:
python > import requests > result = requests.get('https://<ceph-mgr>:8003/server', auth=("<user>", "<password>"), verify=False) > print result.json()
$ python
>> import requests
>> result = requests.get('https://<ceph-mgr>:8003/server', auth=("<user>", "<password>"), verify=False)
>> print result.json()
Web 浏览器
在 Web 浏览器中输入:
https://<ceph-mgr>:8003/server
https://<ceph-mgr>:8003/server
替换:
-
<ceph-mgr>
,带有活跃的ceph-mgr
实例,节点的 IP 地址或短主机名
出现提示时,输入用户名和密码。
2.1.15. 我如何查看关于部分主机的信息? 复制链接链接已复制到粘贴板!
本节论述了如何查看特定主机的信息,例如:
- 主机名
- Ceph 守护进程及其 ID
- Ceph 版本
curl
命令
在命令行中使用:
curl --silent --user <user> 'https://<ceph-mgr>:8003/server/<hostname>'
curl --silent --user <user> 'https://<ceph-mgr>:8003/server/<hostname>'
替换:
-
<user>
with user name -
<ceph-mgr>
,带有活跃的ceph-mgr
实例,节点的 IP 地址或短主机名 -
<hostname>
以及hostname
字段中列出的主机主机名
出现提示时,输入用户的密码。
如果您使用自签名证书,请使用 --insecure
选项:
curl --silent --insecure --user <user> 'https://<ceph-mgr>:8003/server/<hostname>'
curl --silent --insecure --user <user> 'https://<ceph-mgr>:8003/server/<hostname>'
Python
在 Python 解释器中输入:
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>"))
>> print result.json()
替换:
-
<ceph-mgr>
,带有活跃的ceph-mgr
实例,节点的 IP 地址或短主机名 -
<hostname>
以及hostname
字段中列出的主机主机名 -
<user>
with user name -
<password>
和用户的密码
如果您使用自签名证书,请使用 verify=False
选项:
python > import requests > result = requests.get('https://<ceph-mgr>:8003/server/<hostname>', auth=("<user>", "<password>"), verify=False) > print result.json()
$ python
>> import requests
>> result = requests.get('https://<ceph-mgr>:8003/server/<hostname>', auth=("<user>", "<password>"), verify=False)
>> print result.json()
Web 浏览器
在 Web 浏览器中输入:
https://<ceph-mgr>:8003/server/<hostname>
https://<ceph-mgr>:8003/server/<hostname>
替换:
-
<ceph-mgr>
,带有活跃的ceph-mgr
实例,节点的 IP 地址或短主机名 -
<hostname>
以及hostname
字段中列出的主机主机名
出现提示时,输入用户名和密码。