centos7.6 如何安装 Ceilometer
时间: 2024-01-23 09:04:00 浏览: 69
Ceilometer 是一个用于收集和处理 OpenStack 中各个组件的计量数据(Metering data)的工具。下面是在 CentOS 7.6 上安装 Ceilometer 的步骤:
1. 安装 MongoDB 数据库:
```
sudo yum install mongodb-server
sudo systemctl enable mongod
sudo systemctl start mongod
```
2. 安装 Ceilometer:
```
sudo yum install openstack-ceilometer-api openstack-ceilometer-collector \
openstack-ceilometer-notification openstack-ceilometer-central \
python-ceilometerclient
```
3. 配置 Ceilometer:
编辑 /etc/ceilometer/ceilometer.conf 文件,修改以下配置项:
```
[database]
connection = mongodb://localhost:27017/ceilometer
[keystone_authtoken]
auth_uri = http://controller:5000
auth_url = http://controller:35357
memcached_servers = controller:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = ceilometer
password = CEILOMETER_PASS
[service_credentials]
auth_type = password
auth_url = http://controller:5000/v3
project_domain_name = default
user_domain_name = default
project_name = service
username = ceilometer
password = CEILOMETER_PASS
interface = internalURL
region_name = RegionOne
```
其中 CEILOMETER_PASS 是你为 ceilometer 用户设置的密码。
4. 启动 Ceilometer 服务:
```
sudo systemctl enable openstack-ceilometer-api openstack-ceilometer-notification \
openstack-ceilometer-central openstack-ceilometer-collector
sudo systemctl start openstack-ceilometer-api openstack-ceilometer-notification \
openstack-ceilometer-central openstack-ceilometer-collector
```
现在 Ceilometer 已经安装完成并运行了,可以通过 ceilometerclient 命令行工具或者 REST API 访问收集到的计量数据。
阅读全文