首页 > 代码库 > Openstack-Ceilometer-获取主机内存 的使用
Openstack-Ceilometer-获取主机内存 的使用
1. 物理server配置
1.1安装
參考 http://blog.csdn.net/qq_21398167/article/details/47019751
1.2 配置
关闭selinux和防火墙
#setenforce 0 #vi /etc/sysconfig/selinux 改动为:SELINUX=disabled
2. 在Ceilometer中測试
加入一个已存在的meter
2.1在pipline.yaml新增meter
添加一个内存meter,/etc/ceilometer/pipline.yaml
- name: hardware_memory_source interval: 60 meters: - "hardware.memory.*" resources: - snmp://172.16.1.212 sinks: - meter_sink
2.2重新启动ceilometer
#systemctl restart openstack-ceilometer-central.service
2.3 获取meter
#ceilometer meter-list | grep hardware #ceilometer sample-list -m hardware.memory.total
演示样例
+--------------+-----------------------+-------+-------------+------+---------------------+
| Resource ID | Name | Type | Volume | Unit | Timestamp |
+--------------+-----------------------+-------+-------------+------+---------------------+
| 172.16.1.212 | hardware.memory.total | gauge | 198293684.0 | B | 2014-12-05T03:41:10 |
| 172.16.1.212 | hardware.memory.total | gauge | 198293684.0 | B | 2014-12-05T03:31:10 |
| 172.16.1.212 | hardware.memory.total | gauge | 198293684.0 | B | 2014-12-05T03:21:10 |
| 172.16.1.212 | hardware.memory.total | gauge | 198293684.0 | B | 2014-12-05T03:11:10 |
| 172.16.1.212 | hardware.memory.total | gauge | 198293684.0 | B | 2014-12-05T03:01:10 |
| 172.16.1.212 | hardware.memory.total | gauge | 198293684.0 | B | 2014-12-05T02:51:10 |
| 172.16.1.212 | hardware.memory.total | gauge | 198293684.0 | B | 2014-12-05T02:41:10 |
| 172.16.1.212 | hardware.memory.total | gauge | 198293684.0 | B | 2014-12-05T02:31:10 |
| 172.16.1.212 | hardware.memory.total | gauge | 198293684.0 | B | 2014-12-05T02:21:10 |
+--------------+-----------------------+-------+-------------+------+---------------------+
Openstack-Ceilometer-获取主机内存 的使用