메뉴 닫기

openstack gnocchi archive-policy 생성하기

openstack gnocchi archive-policy 생성하기

archive-policy 생성 후 리소스 모니터링 확인

https://gnocchi.osci.io/_static/gnocchi-logo.png

  • 기존 gnocchi policy 확인 하기 

root@controller:~# openstack metric archive-policy list  (gnocchi  archive-policy list 명령어로 사용가능 ) 

+———————-+————-+———————————————————————–+——————————————–+
| name | back_window | definition | aggregation_methods |
+———————-+————-+———————————————————————–+——————————————–+
| bool | 3600 | – timespan: 365 days, 0:00:00, granularity: 0:00:01, points: 31536000 | last |
| ceilometer-high | 0 | – timespan: 1:00:00, granularity: 0:00:01, points: 3600 | mean |
| | | – timespan: 1 day, 0:00:00, granularity: 0:01:00, points: 1440 | |
| | | – timespan: 365 days, 0:00:00, granularity: 1:00:00, points: 8760 | |
| ceilometer-high-rate | 0 | – timespan: 1:00:00, granularity: 0:00:01, points: 3600 | rate:mean, mean |
| | | – timespan: 1 day, 0:00:00, granularity: 0:01:00, points: 1440 | |
| | | – timespan: 365 days, 0:00:00, granularity: 1:00:00, points: 8760 | |
| ceilometer-low | 0 | – timespan: 30 days, 0:00:00, granularity: 0:05:00, points: 8640 | mean |
| ceilometer-low-rate | 0 | – timespan: 30 days, 0:00:00, granularity: 0:05:00, points: 8640 | rate:mean, mean |
| high | 0 | – timespan: 1:00:00, granularity: 0:00:01, points: 3600 | max, count, sum, mean, std, min |
| | | – timespan: 7 days, 0:00:00, granularity: 0:01:00, points: 10080 | |
| | | – timespan: 365 days, 0:00:00, granularity: 1:00:00, points: 8760 | |
| low | 0 | – timespan: 30 days, 0:00:00, granularity: 0:05:00, points: 8640 | max, count, sum, mean, std, min |
| medium | 0 | – timespan: 7 days, 0:00:00, granularity: 0:01:00, points: 10080 | max, count, sum, mean, std, min |
| | | – timespan: 365 days, 0:00:00, granularity: 1:00:00, points: 8760 | |
+———————-+————-+———————————————————————–+——————————————–+

 

  •  새로운 gnocchi policy 생성하기 

gnocchi 명령어 또는 metric 명령어도 사용 가능 

root@controller:~# gnocchi archive-policy create -d points:10,granularity:0:01:00,timespan:0:10:00 -m sum -m std -m count -m min -m mean -m max -m rate:mean iwinv8
+———————+——————————————————-+
| Field | Value |
+———————+——————————————————-+
| aggregation_methods | rate:mean, std, max, mean, min, sum, count |
| back_window | 0 |
| definition | – timespan: 0:10:00, granularity: 0:01:00, points: 10 |
| name | iwinv8 |
+———————+——————————————————-+

 

  • 생성한 gnocchi policy 옵션 설명  

gnocchi plicy 옵션 

gnocchi archive-policy create -d points:10,granularity:0:01:00,timespan:0:10:00 -m sum -m std -m count -m min -m mean -m max -m rate:mean (생성 명령어)

d <DEFINITION>

  1. timespan – 메트릭이 집계를 유지하는 시간
  2. Granularity – 메트릭의 시간 간격 세분화
  3. points – 리소스값 갯수를 제한하여 기록한다.

ex) +—————————+————-+—————–+
| timestamp | granularity | value |
+—————————+————-+—————–+
| 2021-12-20T15:48:00+09:00 | 60.0 | 685650000000.0 |
| 2021-12-20T15:49:00+09:00 | 60.0 | 796780000000.0 |
| 2021-12-20T15:50:00+09:00 | 60.0 | 907130000000.0 |
| 2021-12-20T15:51:00+09:00 | 60.0 | 1018650000000.0 |
| 2021-12-20T15:52:00+09:00 | 60.0 | 1128760000000.0 |
| 2021-12-20T15:53:00+09:00 | 60.0 | 1239330000000.0 |
| 2021-12-20T15:54:00+09:00 | 60.0 | 1349190000000.0 |
| 2021-12-20T15:55:00+09:00 | 60.0 | 1459830000000.0 |
| 2021-12-20T15:56:00+09:00 | 60.0 | 1569880000000.0 |
| 2021-12-20T15:57:00+09:00 | 60.0 | 1680410000000.0 |
+—————————+————-+—————–+
-> point 갯수 10개로 고정 1분 간격으로 metric 기록

  1. sum – metric의 총 값을 계산
  2. std – 표준 편차 계산 – 메트릭 값 , 날짜
  3. min – 최소값 선택 You can use this aggregation method for numbers, dates, times, and durations
  4. max – 최대값 선택 You can use this aggregation method for numbers, dates, times, and durations.
  5. count – 선택한 특성의 값을 가진 레코드 수를 계산 모든 데이터 유형에 대해 이 집계 방법을 사용가능 이 집계는 시스템 값이 있는 레코드 수 메트릭을 구성 요소에 추가하여 적용
  6. rate:mean – cpu %로 계산하기 위한 값으로 전환해주는 옵션

 

  • openstack metric list 확인 

root@controller:~# openstack metric list

+————————————–+———————+————–+——+————————————–+
| id | archive_policy/name | name | unit | resource_id |
+————————————–+———————+————–+——+————————————–+
| 504eb828-7e89-4fea-ac2f-4f612d3b3b81 | lkj | memory.usage | MB | aa1d8d14-3b55-405c-b2ac-a7088eba79f3 |
| b8314bbb-2bdd-43f0-8f70-b64418e4f6b8 | lkj | cpu | ns | aa1d8d14-3b55-405c-b2ac-a7088eba79f3 |
+————————————–+———————+————–+——+————————————–+

-> cpu, memory 리소스를 기록하는 metric 생성 

  • 정상적으로 리소스 기록 확인 

root@controller:~# openstack metric measures show –resource-id aa1d8d14-3b55-405c-b2ac-a7088eba79f3 cpu

+—————————+————-+—————–+
| timestamp | granularity | value |
+—————————+————-+—————–+
| 2023-04-27T10:03:00+09:00 | 60.0 | 3159770000000.0 |
| 2023-04-27T10:04:00+09:00 | 60.0 | 3160180000000.0 |
| 2023-04-27T10:05:00+09:00 | 60.0 | 3160360000000.0 |
| 2023-04-27T10:06:00+09:00 | 60.0 | 3161120000000.0 |
| 2023-04-27T10:07:00+09:00 | 60.0 | 3161220000000.0 |
| 2023-04-27T10:08:00+09:00 | 60.0 | 3161320000000.0 |
| 2023-04-27T10:09:00+09:00 | 60.0 | 3161410000000.0 |
| 2023-04-27T10:10:00+09:00 | 60.0 | 3161510000000.0 |
| 2023-04-27T10:11:00+09:00 | 60.0 | 3161600000000.0 |
| 2023-04-27T10:12:00+09:00 | 60.0 | 3162280000000.0 |
+—————————+————-+—————–+

root@controller:~# openstack metric measures show –resource-id aa1d8d14-3b55-405c-b2ac-a7088eba79f3 memory.usage

+—————————+————-+————–+
| timestamp | granularity | value |
+—————————+————-+————–+
| 2023-04-27T10:33:00+09:00 | 60.0 | 179.77734375 |
| 2023-04-27T10:34:00+09:00 | 60.0 | 179.74609375 |
| 2023-04-27T10:35:00+09:00 | 60.0 | 179.71484375 |
| 2023-04-27T10:36:00+09:00 | 60.0 | 179.87109375 |
| 2023-04-27T10:37:00+09:00 | 60.0 | 181.14453125 |
| 2023-04-27T10:38:00+09:00 | 60.0 | 179.80078125 |
| 2023-04-27T10:39:00+09:00 | 60.0 | 179.921875 |
| 2023-04-27T10:40:00+09:00 | 60.0 | 179.890625 |
| 2023-04-27T10:41:00+09:00 | 60.0 | 179.78125 |
| 2023-04-27T10:42:00+09:00 | 60.0 | 179.93359375 |
+—————————+————-+————–+

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x