ceilometer命令行常用的二级子命令有以下一些:
首先创建要使用 hw_qemu_guest_agent
的镜像
hzhuangzhexiao@10-180-2-112:~$ glance image-show 06ec58df-fc10-4e25-88ac-6c6f1533de58
+--------------------------------+------------------------------------------+
| Property | Value |
+--------------------------------+------------------------------------------+
| Property 'hw_qemu_guest_agent' | yes |
| Property 'hypervisor_type' | qemu |
| Property 'os_type' | linux |
| Property 'support_inject_ip' | yes |
| checksum | 2bc9185deadfb28dcb881c4e0b7f9595 |
| container_format | ovf |
| created_at | 2016-02-03T09:31:18 |
| deleted | False |
| disk_format | qcow2 |
| id | 06ec58df-fc10-4e25-88ac-6c6f1533de58 |
| is_public | True |
| min_disk | 0 |
| min_ram | 0 |
| name | debian_7_x86_64_nce_release2_22362.qcow2 |
| owner | 5116a55a1a91499986c20803a901f0a4 |
| protected | False |
| size | 519897088 |
| status | active |
| updated_at | 2016-02-03T09:31:44 |
+--------------------------------+------------------------------------------+
然后查到云主机的uuid
通过这个查询,这个云主机有哪些 meter。
ceilometer meter-list -q resource="aed3992e-7f9a-4fab-88e5-727c0a700a4b"
一般返回示例为
hzhuangzhexiao@10-180-2-112:~$ ceilometer meter-list -q resource="aed3992e-7f9a-4fab-88e5-727c0a700a4b"
+--------------------------------------------------------------------------------+-------+------+---------------------------------------------------------------------------------------------------------------------+----------------------------------+----------------------------------+
| Name | Type | Unit | Resource ID | User ID | Project ID |
+--------------------------------------------------------------------------------+-------+------+---------------------------------------------------------------------------------------------------------------------+----------------------------------+----------------------------------+
| netease.cpu.rate | gauge | % | aed3992e-7f9a-4fab-88e5-727c0a700a4b.netease.cpu.rate | 1e5607d739cc4c4fab1ba1ee9bbf1c17 | 067d4c55e93e42eca837d1c7a1a74ce8 |
| netease.disk.vda.read.delay | gauge | ms | aed3992e-7f9a-4fab-88e5-727c0a700a4b.netease.disk.vda.read.delay | 1e5607d739cc4c4fab1ba1ee9bbf1c17 | 067d4c55e93e42eca837d1c7a1a74ce8 |
| netease.disk.vda.read.rate | gauge | Bps | aed3992e-7f9a-4fab-88e5-727c0a700a4b.netease.disk.vda.read.rate | 1e5607d739cc4c4fab1ba1ee9bbf1c17 | 067d4c55e93e42eca837d1c7a1a74ce8 |
| netease.disk.vda.read.req | gauge | Hz | aed3992e-7f9a-4fab-88e5-727c0a700a4b.netease.disk.vda.read.req | 1e5607d739cc4c4fab1ba1ee9bbf1c17 | 067d4c55e93e42eca837d1c7a1a74ce8 |
| netease.disk.vda.write.delay | gauge | ms | aed3992e-7f9a-4fab-88e5-727c0a700a4b.netease.disk.vda.write.delay | 1e5607d739cc4c4fab1ba1ee9bbf1c17 | 067d4c55e93e42eca837d1c7a1a74ce8 |
| netease.disk.vda.write.rate | gauge | Bps | aed3992e-7f9a-4fab-88e5-727c0a700a4b.netease.disk.vda.write.rate | 1e5607d739cc4c4fab1ba1ee9bbf1c17 | 067d4c55e93e42eca837d1c7a1a74ce8 |
| netease.disk.vda.write.req | gauge | Hz | aed3992e-7f9a-4fab-88e5-727c0a700a4b.netease.disk.vda.write.req | 1e5607d739cc4c4fab1ba1ee9bbf1c17 | 067d4c55e93e42eca837d1c7a1a74ce8 |
| netease.disk.vda1.read.delay | gauge | ms | aed3992e-7f9a-4fab-88e5-727c0a700a4b.netease.disk.vda1.read.delay | 1e5607d739cc4c4fab1ba1ee9bbf1c17 | 067d4c55e93e42eca837d1c7a1a74ce8 |
| netease.disk.vda1.read.rate | gauge | Bps | aed3992e-7f9a-4fab-88e5-727c0a700a4b.netease.disk.vda1.read.rate | 1e5607d739cc4c4fab1ba1ee9bbf1c17 | 067d4c55e93e42eca837d1c7a1a74ce8 |
| netease.disk.vda1.read.req | gauge | Hz | aed3992e-7f9a-4fab-88e5-727c0a700a4b.netease.disk.vda1.read.req | 1e5607d739cc4c4fab1ba1ee9bbf1c17 | 067d4c55e93e42eca837d1c7a1a74ce8 |
| netease.disk.vda1.write.delay | gauge | ms | aed3992e-7f9a-4fab-88e5-727c0a700a4b.netease.disk.vda1.write.delay | 1e5607d739cc4c4fab1ba1ee9bbf1c17 | 067d4c55e93e42eca837d1c7a1a74ce8 |
| netease.disk.vda1.write.rate | gauge | Bps | aed3992e-7f9a-4fab-88e5-727c0a700a4b.netease.disk.vda1.write.rate | 1e5607d739cc4c4fab1ba1ee9bbf1c17 | 067d4c55e93e42eca837d1c7a1a74ce8 |
| netease.disk.vda1.write.req | gauge | Hz | aed3992e-7f9a-4fab-88e5-727c0a700a4b.netease.disk.vda1.write.req | 1e5607d739cc4c4fab1ba1ee9bbf1c17 | 067d4c55e93e42eca837d1c7a1a74ce8 |
| netease.disk.vdb.read.delay | gauge | ms | aed3992e-7f9a-4fab-88e5-727c0a700a4b.netease.disk.vdb.read.delay | 1e5607d739cc4c4fab1ba1ee9bbf1c17 | 067d4c55e93e42eca837d1c7a1a74ce8 |
| netease.disk.vdb.read.rate | gauge | Bps | aed3992e-7f9a-4fab-88e5-727c0a700a4b.netease.disk.vdb.read.rate | 1e5607d739cc4c4fab1ba1ee9bbf1c17 | 067d4c55e93e42eca837d1c7a1a74ce8 |
| netease.disk.vdb.read.req | gauge | Hz | aed3992e-7f9a-4fab-88e5-727c0a700a4b.netease.disk.vdb.read.req | 1e5607d739cc4c4fab1ba1ee9bbf1c17 | 067d4c55e93e42eca837d1c7a1a74ce8 |
| netease.disk.vdb.write.delay | gauge | ms | aed3992e-7f9a-4fab-88e5-727c0a700a4b.netease.disk.vdb.write.delay | 1e5607d739cc4c4fab1ba1ee9bbf1c17 | 067d4c55e93e42eca837d1c7a1a74ce8 |
| netease.disk.vdb.write.rate | gauge | Bps | aed3992e-7f9a-4fab-88e5-727c0a700a4b.netease.disk.vdb.write.rate | 1e5607d739cc4c4fab1ba1ee9bbf1c17 | 067d4c55e93e42eca837d1c7a1a74ce8 |
| netease.disk.vdb.write.req | gauge | Hz | aed3992e-7f9a-4fab-88e5-727c0a700a4b.netease.disk.vdb.write.req | 1e5607d739cc4c4fab1ba1ee9bbf1c17 | 067d4c55e93e42eca837d1c7a1a74ce8 |
| netease.fs.vda1.$!.total | gauge | byte | aed3992e-7f9a-4fab-88e5-727c0a700a4b.netease.fs.vda1.$!.total | 1e5607d739cc4c4fab1ba1ee9bbf1c17 | 067d4c55e93e42eca837d1c7a1a74ce8 |
| netease.fs.vda1.$!.used | gauge | byte | aed3992e-7f9a-4fab-88e5-727c0a700a4b.netease.fs.vda1.$!.used | 1e5607d739cc4c4fab1ba1ee9bbf1c17 | 067d4c55e93e42eca837d1c7a1a74ce8 |
| netease.loadavg.avg5_rate | gauge | - | aed3992e-7f9a-4fab-88e5-727c0a700a4b.netease.loadavg.avg5_rate | 1e5607d739cc4c4fab1ba1ee9bbf1c17 | 067d4c55e93e42eca837d1c7a1a74ce8 |
| netease.memory.total | gauge | kB | aed3992e-7f9a-4fab-88e5-727c0a700a4b.netease.memory.total | 1e5607d739cc4c4fab1ba1ee9bbf1c17 | 067d4c55e93e42eca837d1c7a1a74ce8 |
| netease.memory.used | gauge | kB | aed3992e-7f9a-4fab-88e5-727c0a700a4b.netease.memory.used | 1e5607d739cc4c4fab1ba1ee9bbf1c17 | 067d4c55e93e42eca837d1c7a1a74ce8 |
| netease.memory.used.rate | gauge | % | aed3992e-7f9a-4fab-88e5-727c0a700a4b.netease.memory.used.rate | 1e5607d739cc4c4fab1ba1ee9bbf1c17 | 067d4c55e93e42eca837d1c7a1a74ce8 |
| netease.nic.eth0.826f526e-6d7f-4073-9bb7-a4bf302835c5.10-180-194-55.recv | delta | Byte | aed3992e-7f9a-4fab-88e5-727c0a700a4b.netease.nic.eth0.826f526e-6d7f-4073-9bb7-a4bf302835c5.10-180-194-55.recv | 1e5607d739cc4c4fab1ba1ee9bbf1c17 | 067d4c55e93e42eca837d1c7a1a74ce8 |
| netease.nic.eth0.826f526e-6d7f-4073-9bb7-a4bf302835c5.10-180-194-55.recv.rate | delta | Bps | aed3992e-7f9a-4fab-88e5-727c0a700a4b.netease.nic.eth0.826f526e-6d7f-4073-9bb7-a4bf302835c5.10-180-194-55.recv.rate | 1e5607d739cc4c4fab1ba1ee9bbf1c17 | 067d4c55e93e42eca837d1c7a1a74ce8 |
| netease.nic.eth0.826f526e-6d7f-4073-9bb7-a4bf302835c5.10-180-194-55.trans | delta | Byte | aed3992e-7f9a-4fab-88e5-727c0a700a4b.netease.nic.eth0.826f526e-6d7f-4073-9bb7-a4bf302835c5.10-180-194-55.trans | 1e5607d739cc4c4fab1ba1ee9bbf1c17 | 067d4c55e93e42eca837d1c7a1a74ce8 |
| netease.nic.eth0.826f526e-6d7f-4073-9bb7-a4bf302835c5.10-180-194-55.trans.rate | delta | Bps | aed3992e-7f9a-4fab-88e5-727c0a700a4b.netease.nic.eth0.826f526e-6d7f-4073-9bb7-a4bf302835c5.10-180-194-55.trans.rate | 1e5607d739cc4c4fab1ba1ee9bbf1c17 | 067d4c55e93e42eca837d1c7a1a74ce8 |
+--------------------------------------------------------------------------------+-------+------+---------------------------------------------------------------------------------------------------------------------+----------------------------------+----------------------------------+
hzhuangzhexiao@10-180-2-112:~$
网易云新用户大礼包:https://www.163yun.com/gift
本文来自网易实践者社区,经作者黄哲骁授权发布。