티스토리 뷰

OpenStack Mitaka (미타카) - Ceilometer 이용 방법

 

OpenStack Metering Service (Ceilometer)의 이용 방법입니다.

여기에서는 예로 다음과 같은 환경을 구축하고 있습니다.

                         




1. Ceilometer 설정 # 1 , Ceilometer 설정 # 2 , Ceilometer 설정 # 3 의 각 노드의 설정이 완료된 상태에서 다음 명령을 입력하면 설정에 문제가 없으면 다음과 같이 결과가 되돌아옵니다.


[root@cent7 ~(keystone)]# ceilometer meter-list 

+-------------------+------------+----------+------------------------+---------------------+-------------------+

| Name              | Type       | Unit     | Resource ID            | User ID             | Project ID        |

+-------------------+------------+----------+------------------------+---------------------+-------------------+

| cpu               | cumulative | ns       | 2c7a1025-30d6-446a-... | 704a7f5cf84a4797... | 98ea1b896d3a48... |

| image             | gauge      | image    | 2aab2d1a-e1e8-45c9-... | None            ... | 98ea1b896d3a48... |

| image.size        | gauge      | B        | 2aab2d1a-e1e8-45c9-... | None            ... | 98ea1b896d3a48... |

| instance          | gauge      | instance | 2c7a1025-30d6-446a-... | 704a7f5cf84a4797... | 98ea1b896d3a48... |

| instance:m1.small | gauge      | instance | 2c7a1025-30d6-446a-... | 704a7f5cf84a4797... | 98ea1b896d3a48... |

+-------------------+------------+----------+------------------------+---------------------+-------------------+




2. 여기까지 설정에서 Compute Service (Nova)의 감시가 가능한 상태로되어 있습니다. 인스턴스를 만들고 시작한 후 다시 meter-list를 보면 다음과 같이 검색된 미터를 확인할 수 있습니다.


[root@cent7 ~(keystone)]# neutron net-list 

+--------------------------------------+---------+-------------------------------------------------------+

| id                                   | name    | subnets                                               |

+--------------------------------------+---------+-------------------------------------------------------+

| 550b379c-90f6-4cff-8063-88167dc7c568 | ext_net | 702832ef-4de5-41ba-9c2c-de2450d15ab0 10.0.0.0/24      |

| a8705bd3-c2de-4526-aa7c-2c4605a6edf4 | int_net | f29ee9fd-7bae-40d8-8d4c-a1340092f258 192.168.100.0/24 |

+--------------------------------------+---------+-------------------------------------------------------+



[root@cent7 ~(keystone)]# Int_Net_ID=`neutron net-list | grep int_net | awk '{ print $2 }'` 


[root@cent7 ~(keystone)]# nova boot --flavor 2 --image CentOS7 --security-groups default --nic net-id=$Int_Net_ID CentOS_7 


[root@cent7 ~(keystone)]# ceilometer meter-list 

+---------------------+------------+----------+------------------------+---------------------+-------------------+

| Name                | Type       | Unit     | Resource ID            | User ID             | Project ID        |

+---------------------+------------+----------+------------------------+---------------------+-------------------+

| cpu                 | cumulative | ns       | 2c7a1025-30d6-446a-... | 704a7f5cf84a4797... | 98ea1b896d3a48... |

| disk.ephemeral.size | gauge      | GB       | 0fbc0272-285a-4d97-... | 704a7f5cf84a4797... | 98ea1b896d3a48... |

| disk.ephemeral.size | gauge      | GB       | 2c7a1025-30d6-446a-... | 704a7f5cf84a4797... | 98ea1b896d3a48... |

| disk.root.size      | gauge      | GB       | 0fbc0272-285a-4d97-... | 704a7f5cf84a4797... | 98ea1b896d3a48... |

| disk.root.size      | gauge      | GB       | 2c7a1025-30d6-446a-... | 704a7f5cf84a4797... | 98ea1b896d3a48... |

| image               | gauge      | image    | 2aab2d1a-e1e8-45c9-... | None            ... | 98ea1b896d3a48... |

| image.size          | gauge      | B        | 2aab2d1a-e1e8-45c9-... | None            ... | 98ea1b896d3a48... |

| instance            | gauge      | instance | 0fbc0272-285a-4d97-... | 704a7f5cf84a4797... | 98ea1b896d3a48... |

| instance            | gauge      | instance | 2c7a1025-30d6-446a-... | 704a7f5cf84a4797... | 98ea1b896d3a48... |

| instance:m1.small   | gauge      | instance | 0fbc0272-285a-4d97-... | 704a7f5cf84a4797... | 98ea1b896d3a48... |

| instance:m1.small   | gauge      | instance | 2c7a1025-30d6-446a-... | 704a7f5cf84a4797... | 98ea1b896d3a48... |

| memory              | gauge      | MB       | 0fbc0272-285a-4d97-... | 704a7f5cf84a4797... | 98ea1b896d3a48... |

| memory              | gauge      | MB       | 2c7a1025-30d6-446a-... | 704a7f5cf84a4797... | 98ea1b896d3a48... |

| port                | gauge      | port     | 188e5409-c6f4-4a7a-... | f13070920e5c477e... | 4e84300cbeeb4a... |

| port.create         | delta      | port     | 188e5409-c6f4-4a7a-... | f13070920e5c477e... | 4e84300cbeeb4a... |

| vcpus               | gauge      | vcpu     | 0fbc0272-285a-4d97-... | 704a7f5cf84a4797... | 98ea1b896d3a48... |

| vcpus               | gauge      | vcpu     | 2c7a1025-30d6-446a-... | 704a7f5cf84a4797... | 98ea1b896d3a48... |

+---------------------+------------+----------+------------------------+---------------------+-------------------+




3. Image Service (Glance)의 모니터링을 활성화하려면 다음과 같이 설정합니다.


[root@cent7 ~(keystone)]# vi /etc/glance/glance-api.conf

# [DEFAULT] 섹션 속으로 추가

rpc_backend = rabbit


# 마지막 줄에 추가

[oslo_messaging_notifications]

driver = messagingv2


[oslo_messaging_rabbit]

rabbit_host = 10.0.0.30

rabbit_port = 5672

rabbit_userid = openstack

rabbit_password = password 



[root@cent7 ~(keystone)]# vi /etc/glance/glance-registry.conf


# [DEFAULT] 섹션 속으로 추가

rpc_backend = rabbit


# 마지막 줄에 추가

[oslo_messaging_notifications]

driver = messagingv2


[oslo_messaging_rabbit]

rabbit_host = 10.0.0.30

rabbit_port = 5672

rabbit_userid = openstack

rabbit_password = password 


[root@cent7 ~(keystone)]# systemctl restart openstack-glance-api openstack-glance-registry


# 모니터가 활성화되어 있는지 확인

[root@cent7 ~(keystone)]# ceilometer meter-list 

+-------------------+------------+----------+------------------------+---------------------+-------------------+

| Name              | Type       | Unit     | Resource ID            | User ID             | Project ID        |

+-------------------+------------+----------+------------------------+---------------------+-------------------+

| cpu               | cumulative | ns       | 2c7a1025-30d6-446a-... | 704a7f5cf84a4797... | 98ea1b896d3a48... |

| cpu_util          | gauge      | %        | 2c7a1025-30d6-446a-... | 704a7f5cf84a4797... | 98ea1b896d3a48... |

| image             | gauge      | image    | 2aab2d1a-e1e8-45c9-... | None            ... | 98ea1b896d3a48... |

| image.size        | gauge      | B        | 2aab2d1a-e1e8-45c9-... | None            ... | 98ea1b896d3a48... |

| instance          | gauge      | instance | 2c7a1025-30d6-446a-... | 704a7f5cf84a4797... | 98ea1b896d3a48... |

| instance:m1.small | gauge      | instance | 2c7a1025-30d6-446a-... | 704a7f5cf84a4797... | 98ea1b896d3a48... |

+-------------------+------------+----------+------------------------+---------------------+-------------------+



# 시도에 이미지를 추가

[root@cent7 ~(keystone)]# glance image-create --name "CentOS71" --file /var/kvm/images/centos7.img --disk-format qcow2 --container-format bare --visibility public 


[root@cent7 ~(keystone)]# ceilometer meter-list 

+-------------------+------------+----------+------------------------+---------------------+-------------------+

| Name              | Type       | Unit     | Resource ID            | User ID             | Project ID        |

+-------------------+------------+----------+------------------------+---------------------+-------------------+

| cpu               | cumulative | ns       | 2c7a1025-30d6-446a-... | 704a7f5cf84a4797... | 98ea1b896d3a48... |

| cpu_util          | gauge      | %        | 2c7a1025-30d6-446a-... | 704a7f5cf84a4797... | 98ea1b896d3a48... |

| image             | gauge      | image    | 2aab2d1a-e1e8-45c9-... | None            ... | 98ea1b896d3a48... |

| image             | gauge      | image    | 95b05349-e9cb-4e88-... | None            ... | 98ea1b896d3a48... |

| image.size        | gauge      | B        | 2aab2d1a-e1e8-45c9-... | None            ... | 98ea1b896d3a48... |

| image.size        | gauge      | B        | 95b05349-e9cb-4e88-... | None            ... | 98ea1b896d3a48... |

| image.update      | delta      | image    | 95b05349-e9cb-4e88-... | None            ... | 98ea1b896d3a48... |

| image.upload      | delta      | image    | 95b05349-e9cb-4e88-... | None            ... | 98ea1b896d3a48... |

| instance          | gauge      | instance | 2c7a1025-30d6-446a-... | 704a7f5cf84a4797... | 98ea1b896d3a48... |

| instance:m1.small | gauge      | instance | 2c7a1025-30d6-446a-... | 704a7f5cf84a4797... | 98ea1b896d3a48... |

+-------------------+------------+----------+------------------------+---------------------+-------------------+

# 데이터가 취득 된




4. Block Storage (Cinder)의 모니터링을 활성화하려면 다음과 같이 설정합니다.


# Control Node, Network Node에서 설정 변경

[root@cent7 ~(keystone)]# vi /etc/cinder/cinder.conf


# 마지막 줄에 추가

[oslo_messaging_notifications]

driver = messagingv2


# Control Node

[root@cent7 ~(keystone)]# systemctl restart openstack-cinder-api openstack-cinder-scheduler 


# Storage Node

[root@network ~]# systemctl restart openstack-cinder-volume


# 모니터가 활성화되어 있는지 확인

[root@cent7 ~(keystone)]# ceilometer meter-list 

+------------+-------+-------+------------------------+---------+----------------------+

| Name       | Type  | Unit  | Resource ID            | User ID | Project ID           |

+------------+-------+-------+------------------------+---------+----------------------+

| image      | gauge | image | 2aab2d1a-e1e8-45c9-... | None    | 98ea1b896d3a48438... |

| image.size | gauge | B     | 2aab2d1a-e1e8-45c9-... | None    | 98ea1b896d3a48438... |

+------------+-------+-------+------------------------+---------+----------------------+


[root@cent7 ~(keystone)]# cinder create --display_name disk01 10 


[root@cent7 ~(keystone)]# ceilometer meter-list 

+---------------------+-------+--------+------------------------+---------------------+--------------------+

| Name                | Type  | Unit   | Resource ID            | User ID             | Project ID         |

+---------------------+-------+--------+------------------------+---------------------+--------------------+

| image               | gauge | image  | 2aab2d1a-e1e8-45c9-... | None                | 98ea1b896d3a484... |

| image.size          | gauge | B      | 2aab2d1a-e1e8-45c9-... | None                | 98ea1b896d3a484... |

| volume              | gauge | volume | 1dadb51f-9acb-4845-... | 704a7f5cf84a4797... | 98ea1b896d3a484... |

| volume.create.end   | delta | volume | 1dadb51f-9acb-4845-... | 704a7f5cf84a4797... | 98ea1b896d3a484... |

| volume.create.start | delta | volume | 1dadb51f-9acb-4845-... | 704a7f5cf84a4797... | 98ea1b896d3a484... |

| volume.size         | gauge | GB     | 1dadb51f-9acb-4845-... | 704a7f5cf84a4797... | 98ea1b896d3a484... |

+---------------------+-------+--------+------------------------+---------------------+--------------------+


※ download & Next Menu



저작자 표시 비영리 변경 금지
신고
댓글