openStack ceilometer API
1.概述
Ceilometer是OpenStack中的一个子项目,它像一个漏斗一样,能把OpenStack内部发生的几乎所有的事件都收集起来,然后为计费和监控以及其它服务提供数据支撑。Ceilometer的核心架构图如下:
图1 Ceilometer的核心架构图
图2 Ceilometer架构模型
2.安装
2.1安装服务
apt-get install ceilometer-api
ceilometer-collector ceilometer-agent-central python-ceilometerclient
2.2配置
/etc/ceilometer/ceilometer.conf
[DEFAULT]
#rabbitMQ
rabbit_host = client
rabbit_password = 12345
rabbit_hosts = client:5672
rabbit_userid = guest
[database]
connection = mysql://ceilometer:12345@client/ceilometer
[publisher_rpc]
metering_secret = ADMIN
[keystone_authtoken]
auth_host = client
auth_port = 35357
auth_protocol = http
admin_tenant_name = service
admin_user = ceilometer
admin_password = ceilometers
2.3在keystone中创建ceilometer用户和服务endpoint
keystone user-create –name=ceilometer
–pass=CEILOMETER_PASS –email=ceilometer@example.com
keystone user-role-add –user=ceilometer
–tenant=service –role=admin
keystone service-create –name=ceilometer
–type=metering –description=”Ceilometer Telemetry Service”
keystone endpoint-create
–service-id=the_service_id_above
–publicurl=http://controller:8777/
–internalurl=http://controller:8777/
–adminurl=http://controller:8777/
2.4创建ceilometer的mysql数据表
ceilometer-dbsync
2.5重启服务
service ceilometer-agent-central restart
service ceilometer-api restart
service ceilometer-collector restart
3.API
3.1 Resources资源
获取资源的信息。
GET
http://HOST:8777/v2/resources
列出所有资源的定义。
GET
http://HOST:8777/v2/resources/{resource_id}
获取指定的资源的详细信息。
3.2 Meters计量
获取计量信息。
GET
http://HOST:8777/v2/meters
到目前为止的计量数据列表。
GET
http://HOST:8777/v2/meters/{meter_id}
获取指定ID的计量信息。
POST
http://HOST:8777/v2/meters/{meter_id}
更新指定ID的计量信息列表。
GET
http://HOST:8777/v2/meters/{meter_id}/statistics
计算在指定的时间范围内的样本的统计信息。
3.3 Alarms告警
列表,创建,获取详细信息,更新和删除报警。
GET
http://HOST:8777/v2/alarms
根据指定查询,列出了警报。
POST
http://HOST:8777/v2/alarms
创建一个报警。
GET
http://HOST:8777/v2/alarms/{alarm_id}
获取指定ID的报警信息。
PUT
http://HOST:8777/v2/alarms/{alarm_id}
更新指定ID的报警。
PUT
http://HOST:8777/v2/alarms/{alarm_id}/state
设置一个指定ID的报警状态。
GET
http://HOST:8777/v2/alarms/{alarm_id}/state
获取指定ID的报警状态。
GET
http://HOST:8777/v2/alarms/{alarm_id}/history
组装指定ID的报警历史记录。
4.OpenStack服务的监控
4.1Compute (Nova)
所有计量来自实例,不宿主机.
|
名称 |
类型 |
单位 |
资源 |
Origin |
说明 |
|
instance |
Gauge |
instance |
inst ID |
both |
Duration of instance |
|
instance:<type> |
Gauge |
instance |
inst ID |
both |
Duration of instance <type> |
|
memory |
Gauge |
MB |
inst ID |
notification |
Volume of RAM in MB |
|
cpu |
Cumulative |
ns |
inst ID |
pollster |
CPU time used |
|
cpu_util |
Gauge |
% |
inst ID |
pollster |
Average CPU utilisation |
|
vcpus |
Gauge |
vcpu |
inst ID |
notification |
Number of VCPUs |
|
disk.read.requests |
Cumulative |
request |
inst ID |
pollster |
Number of read requests |
|
disk.write.requests |
Cumulative |
request |
inst ID |
pollster |
Number of write requests |
|
disk.read.bytes |
Cumulative |
B |
inst ID |
pollster |
Volume of read in B |
|
disk.write.bytes |
Cumulative |
B |
inst ID |
pollster |
Volume of write in B |
|
disk.root.size |
Gauge |
GB |
inst ID |
notification |
Size of root disk in GB |
|
disk.ephemeral.size |
Gauge |
GB |
inst ID |
notification |
Size of ephemeral disk in GB |
|
network.incoming.bytes |
Cumulative |
B |
iface ID |
pollster |
number of incoming bytes on the network |
|
network.outgoing.bytes |
Cumulative |
B |
iface ID |
pollster |
number of outgoing bytes on the network |
|
network.incoming.packets |
Cumulative |
packet |
iface ID |
pollster |
number of incoming packets for a VM |
|
network.outgoing.packets |
Cumulative |
packet |
iface ID |
pollster |
number of outgoing packets for a VM |
At present, most of the Nova meters will
only work with libvirt front-end hypervisors while test coverage was mostly
done based on KVM. Contributors are welcome to implement other virtualization
backends’ meters or complete the existing ones.
4.2 Network (Neutron)
|
名称 |
类型 |
单位 |
资源 |
Origin |
说明 |
|
network |
Gauge |
network |
netw ID |
notification |
Duration of network |
|
network.create |
Delta |
network |
netw ID |
notification |
Creation requests for this network |
|
network.update |
Delta |
network |
netw ID |
notification |
Update requests for this network |
|
subnet |
Gauge |
subnet |
subnt ID |
notification |
Duration of subnet |
|
subnet.create |
Delta |
subnet |
subnt ID |
notification |
Creation requests for this subnet |
|
subnet.update |
Delta |
subnet |
subnt ID |
notification |
Update requests for this subnet |
|
port |
Gauge |
port |
port ID |
notification |
Duration of port |
|
port.create |
Delta |
port |
port ID |
notification |
Creation requests for this port |
|
port.update |
Delta |
port |
port ID |
notification |
Update requests for this port |
|
router |
Gauge |
router |
rtr ID |
notification |
Duration of router |
|
router.create |
Delta |
router |
rtr ID |
notification |
Creation requests for this router |
|
router.update |
Delta |
router |
rtr ID |
notification |
Update requests for this router |
|
ip.floating |
Gauge |
ip |
ip ID |
both |
Duration of floating ip |
|
ip.floating.create |
Delta |
ip |
ip ID |
notification |
Creation requests for this floating ip |
|
ip.floating.update |
Delta |
ip |
ip ID |
notification |
Update requests for this floating ip |
4.3Image (Glance)
|
名称 |
类型 |
单位 |
资源 |
Origin |
说明 |
|
image |
Gauge |
image |
image ID |
both |
Image polling -> it (still) exists |
|
image.size |
Gauge |
B |
image ID |
both |
Uploaded image size |
|
image.update |
Delta |
image |
image ID |
notification |
Number of update on the image |
|
image.upload |
Delta |
image |
image ID |
notification |
Number of upload of the image |
|
image.delete |
Delta |
image |
image ID |
notification |
Number of delete on the image |
|
image.download |
Delta |
B |
image ID |
notification |
Image is downloaded |
|
image.serve |
Delta |
B |
image ID |
notification |
Image is served out |
4.4Volume (Cinder)
|
名称 |
类型 |
单位 |
资源 |
Origin |
说明 |
|
volume |
Gauge |
volume |
vol ID |
notification |
Duration of volume |
|
volume.size |
Gauge |
GB |
vol ID |
notification |
Size of volume |
4.5Object Storage (Swift)
|
名称 |
类型 |
单位 |
资源 |
Origin |
说明 |
|
storage.objects |
Gauge |
object |
store ID |
pollster |
Number of objects |
|
storage.objects.size |
Gauge |
B |
store ID |
pollster |
Total size of stored objects |
|
storage.objects.containers |
Gauge |
container |
store ID |
pollster |
Number of containers |
|
storage.objects.incoming.bytes |
Delta |
B |
store ID |
notification |
Number of incoming bytes |
|
storage.objects.outgoing.bytes |
Delta |
B |
store ID |
notification |
Number of outgoing bytes |
|
storage.api.request |
Delta |
request |
store ID |
notification |
Number of API requests against swift |
|
storage.containers.objects |
Gauge |
object |
str ID/cont |
pollster |
Number of objects in container |
|
storage.containers.objects.size |
Gauge |
B |
str ID/cont |
pollster |
Total size of stored objects in container |
4.6Energy (Kwapi)
|
名称 |
类型 |
单位 |
资源 |
Origin |
说明 |
|
energy |
Cumulative |
kWh |
probe ID |
pollster |
Amount of energy |
|
power |
Gauge |
W |
probe ID |
pollster |
Power consumption |
openStack ceilometer API的更多相关文章
- 为自己的系统定制openstack ceilometer
一.目的 最近研究了一下ceilometer,目的做一个监控系统,对系统中发生的事件进行处理.ceilometer对openstack各个组件信息的收集方式主要由 推 和 拉 两种. “推”: 就是 ...
- Openstack python api 学习文档 api创建虚拟机
Openstack python api 学习文档 转载请注明http://www.cnblogs.com/juandx/p/4953191.html 因为需要学习使用api接口调用openstack ...
- Openstack Ceilometer监控项扩展
Openstack ceilometer主要用于监控虚拟机.服务(glance.image.network等)和事件.虚拟机的监控项主要包括CPU.磁盘.网络.instance.本文在现有监控项的基础 ...
- OpenStack REST API使用
以前一直想写博客,但因各种因素一直没写.最近在做OpenStack,而OpenStack对外提供REST API,今天就简要介绍一下OpenStack REST API 使用,关于什么是REST AP ...
- python调用openstack的api,create_instance的程序解析
python调用openstack的api,create_instance的程序解析 2017年10月17日 15:27:24 CloudXli 阅读数:848 版权声明:本文为博主原创文章,未经 ...
- (弃)解读Openstack Identity API v2.0
目前OpenStack社区提供了详尽的API文档,并配有丰富的说明和示例,关于Identity API v2查看这里, 关于Identity API v3请查看这里. 尽管现在官方已经不建议OpenS ...
- 使用curl调试openstack的api
一 系统环境 OpenStack: Mitaka 工具: 最简单的工具:restclient,本次使用curl 二 开搞 访问openstack的API之前,用户使用用户名和密码向keystone进行 ...
- <转>Openstack Ceilometer监控项扩展
Openstack ceilometer主要用于监控虚拟机.服务(glance.image.network等)和事件.虚拟机的监控项主要包含CPU.磁盘.网络.instance.本文在现有监控项的基础 ...
- <转>Openstack ceilometer 宿主机监控模块扩展
<Openstack ceilometer监控项扩展>( http://eccp.csdb.cn/blog/?p=352 )主要介绍了对虚拟机监控项扩展, 比較简单.怎样在ceilomet ...
随机推荐
- oracle服务器端-登陆
由于的的操作系统是windows server版本,所以想装服务器端的server版本,一般的oracle都有'scott'用户,但是貌似服务器端的没有该用户,我用以下方式登陆: sqlplus / ...
- 浅析CSS中的haslayout
作为一名web开发人员,最大的希望不是自己的水平有多高,而是希望浏览器厂家能够统一标准,相信任何一个只要是接触过web程序开发的人员都有那样的感受,就是浏览器之间的兼容性问题总是让我们的工作平添诸多的 ...
- ScheduleThreadPoolExecutor源码分析(二)
DelayedWorkQueue: DelayedWorkQueue实现了BlockingQueue接口,因此其可以作为线程池的任务队列.BlockingQueue的主要属性有以下几个: privat ...
- C++跨平台事件机制实现
今天看到有人在讨论C++标准没有提供类似操作系统层次的事件通知机制,如windows的事件内核对象.其实我想说的事,C++11标准里的互斥量及条件变量已经够帮我们实现类似的功能了. 刚编写了一个事件通 ...
- 基于GBT28181:SIP协议组件开发-----------第三篇SIP注册流程分析实现
原创文章,引用请保证原文完整性,尊重作者劳动,原文地址http://www.cnblogs.com/qq1269122125/p/3941172.html,qq:1269122125. 上两章节简要的 ...
- 用连接池提高Servlet访问数据库的效率
Java Servlet作为首选的服务器端数据处理技术,正在迅速取代CGI脚本.Servlet超越CGI的优势之一在于,不仅多个请求可以共享公用资源,而且还可以在不同用户请求之间保留持续数据.本文介绍 ...
- git extrad_addons 部署说明
注册一个git账号 : 网址: https://github.com/ 1:安装git sudo apt-get install git 2: b把urc扩展占模块pull下来 cd ...
- 独家分享——大牛教你如何学习Web前端开发
2014-12-18 14:35:42 引语 自从2008年接触网站开发以来到现在已经有六个年头了,今天偶然整理电脑资料看到当时为参加系里面一个比赛而做的第一个网站时,勾起了在这网站开发道路上 ...
- 一定要记住这20种PS技术!!!会让你的照片美的不行!!!
一种简单的数码照片后期润饰 1 打开图片,执行色像/饱和度(-40)降低饱和度. 2 新建一图层,将图层模式改为柔光,用画笔工具将需要润饰的部分画几下,这里可以利用色板方便的提取颜色 3 图片色彩过渡 ...
- nginx+uwsgi+WSGI applications
uwsgi一个专业的部署运用的工具,不仅能够部署Python运用,还能够部署其他运用比如Perl,Ruby等 uWSGI 安装: pip install uwsgi WSGI application( ...