|
Telemetry uses a combination of notifications and an agent to collect Compute meters. Perform these steps on each compute node. Install and configure components¶
% ^. X& r; _7 u: EInstall the packages: # yum install openstack-ceilometer-compute# yum install openstack-ceilometer-ipmi (optional)( ^+ F( L1 H# I% I' N
; T* d/ q) X2 A0 h# d' M
Configure Compute to use Telemetry¶ # R6 g6 ^0 @# X, z: b
Configure Compute to poll IPMI meters¶9 v! F& \4 U; R9 D- a( y
! F+ @* y- G3 ?8 i5 J, aNote$ \: }, \( G$ I5 s; g, R
To enable IPMI meters, ensure IPMITool is installed and the host supports Intel Node Manager.
. P0 K/ B' Y/ t; @$ i; s
1 w2 X' X# r+ C6 ]1 A- pEdit the /etc/sudoers file and include: .. code-block:: ini" X+ A, @3 K7 v1 k; |* f* x7 U
0 U" ]% i# x+ i" w/ @! [ceilometer ALL = (root) NOPASSWD: /usr/bin/ceilometer-rootwrap /etc/ceilometer/rootwrap.conf * + R# E2 m; Q! `/ Y+ V. ^1 B$ z
Edit the /etc/ceilometer/polling.yaml to include the required meters, for example: .. code-block:: yaml
, E6 |# i+ K$ }2 ]" `+ F5 P3 o' ~! G s4 @+ @' j+ R
( ~# j3 N8 e( G {9 T/ d1 |2 e7 y* n7 B, L8 z
' ~" _3 U9 j: p2 g. R" j
3 l. U3 {! u; X0 gFinalize installation¶ % R: c* f6 \" n$ t4 K1 M
" [0 W. ?( T5 K' z. c' q& V
0 E# j! }" a8 {9 s( k4 z3 {
This section describes how to install and configure the Telemetry service, code-named ceilometer, on the controller node. Prerequisites¶ Before you install and configure the Telemetry service, you must configure a target to send metering data to. The recommended endpoint is Gnocchi. * A6 Q+ s; r) N3 N1 W
Source the admin credentials to gain access to admin-only CLI commands: $ . admin-openrcTo create the service credentials, complete these steps: & M( d3 ]1 Z( T- h
) n$ X8 u7 {. N5 [Create the ceilometer user: $ openstack user create --domain default --password-prompt ceilometerUser Password:Repeat User Password:+-----------+----------------------------------+| Field | Value |+-----------+----------------------------------+| domain_id | e0353a670a9e496da891347c589539e9 || enabled | True || id | c859c96f57bd4989a8ea1a0b1d8ff7cd || name | ceilometer |+-----------+----------------------------------+Add the admin role to the ceilometer user. $ openstack role add --project service --user ceilometer admin0 j( A1 ?) D5 k- B+ j; g& ?( e5 }
( O( Y2 z9 U' ?3 g' z% g
7 j- H( t" p# K
+ ^+ M6 H$ Z) ~
Note
: t) e* ?! J* _0 t* oThis command provides no output.
+ R4 W- X$ z1 y$ i1 V0 _( b% ^, z3 M
Register Gnocchi service in Keystone:
- L. }% f* M8 S
' c) M& v3 J, V8 F+ TCreate the gnocchi user: $ openstack user create --domain default --password-prompt gnocchiUser Password:Repeat User Password:+-----------+----------------------------------+| Field | Value |+-----------+----------------------------------+| domain_id | e0353a670a9e496da891347c589539e9 || enabled | True || id | 8bacd064f6434ef2b6bbfbedb79b0318 || name | gnocchi |+-----------+----------------------------------+Create the gnocchi service entity: $ openstack service create --name gnocchi \ --description "Metric Service" metric+-------------+----------------------------------+| Field | Value |+-------------+----------------------------------+| description | Metric Service || enabled | True || id | 205978b411674e5a9990428f81d69384 || name | gnocchi || type | metric |+-------------+----------------------------------+Add the admin role to the gnocchi user. $ openstack role add --project service --user gnocchi admin
8 ~" \: \6 e( y, H. R# }6 T% `0 f- K8 M
/ q2 b$ u0 v8 q* X9 j
7 V: C% z# \+ r2 F+ P' |( DNote
/ T6 m9 l: n3 K0 fThis command provides no output. Create the Metric service API endpoints: $ openstack endpoint create --region RegionOne \ metric public http://controller:8041+--------------+----------------------------------+| Field | Value |+--------------+----------------------------------+| enabled | True || id | b808b67b848d443e9eaaa5e5d796970c || interface | public || region | RegionOne || region_id | RegionOne || service_id | 205978b411674e5a9990428f81d69384 || service_name | gnocchi || service_type | metric || url | http://controller:8041 |+--------------+----------------------------------+$ openstack endpoint create --region RegionOne \ metric internal http://controller:8041+--------------+----------------------------------+| Field | Value |+--------------+----------------------------------+| enabled | True || id | c7009b1c2ee54b71b771fa3d0ae4f948 || interface | internal || region | RegionOne || region_id | RegionOne || service_id | 205978b411674e5a9990428f81d69384 || service_name | gnocchi || service_type | metric || url | http://controller:8041 |+--------------+----------------------------------+$ openstack endpoint create --region RegionOne \ metric admin http://controller:8041+--------------+----------------------------------+| Field | Value |+--------------+----------------------------------+| enabled | True || id | b2c00566d0604551b5fe1540c699db3d || interface | admin || region | RegionOne || region_id | RegionOne || service_id | 205978b411674e5a9990428f81d69384 || service_name | gnocchi || service_type | metric || url | http://controller:8041 |+--------------+----------------------------------+& n9 ~4 z k: n6 k8 n% e
" |8 {% z% R- X 9 Q) ]$ J$ ` }6 e! l' n: G1 F3 ?' Q: F
Install Gnocchi¶
+ p; l6 i$ ?% kInstall the Gnocchi packages. Alternatively, Gnocchi can be install using pip: # yum install openstack-gnocchi-api openstack-gnocchi-metricd \ python-gnocchiclient: l L/ \2 g6 h( \) u6 \
) d1 \8 g% N) b9 @$ E
6 o8 M8 q0 g. d3 v3 s4 I3 {
. G4 x4 e& l8 k, {1 c% Z, F: U
Note
! y2 `" W) X5 n0 vDepending on your environment size, consider installing Gnocchi separately as it makes extensive use of the cpu.
, H' |, m' H# J . f" O) w, [1 ?+ Y' h4 c
Finalize Gnocchi installation¶ ) F+ @3 ]. ~. W5 _( I
Install and configure components¶ 9 A2 D2 l' N. l
Edit the /etc/ceilometer/pipeline.yaml file and complete the following section: 2 D4 N. D# a% z2 \2 M. j* m9 B3 e
Edit the /etc/ceilometer/ceilometer.conf file and complete the following actions:
! c' }% g4 b: ~2 S" J" S
0 C# Z$ I7 x+ E& N; `9 J: [& ]8 P: [) x& gIn the [DEFAULT] section, configure RabbitMQ message queue access: [DEFAULT]...transport_url = rabbit://openstack:RABBIT_PASS@controller n) \" {/ m2 a+ S, c
; P# D" p4 S, W6 w2 m
Replace RABBIT_PASS with the password you chose for the openstack account in RabbitMQ. In the [service_credentials] section, configure service credentials: [service_credentials]...auth_type = passwordauth_url = http://controller:5000/v3project_domain_id = defaultuser_domain_id = defaultproject_name = serviceusername = ceilometerpassword = CEILOMETER_PASSinterface = internalURLregion_name = RegionOne* K& ]1 V+ U5 _3 ^
: x$ a. T6 |4 d+ e- b5 L! rReplace CEILOMETER_PASS with the password you chose for the ceilometer user in the Identity service.
4 z! p* s& n% d( I" D! _2 c3 U
Create Ceilometer resources in Gnocchi. Gnocchi should be running by this stage: # ceilometer-upgrade
6 i" z" q6 H7 h4 w
& }6 ~& f% J; |2 OFinalize installation¶
! v) V u& M$ y5 k
/ @! [5 C) q4 G5 r/ c0 wTelemetry uses notifications to collect Block Storage service meters. Perform these steps on the controller and Block Storage nodes.
+ |. a" R% S$ B
3 K+ O9 ?$ p8 y, ~. c1 INote
) V) I' A6 |% _+ YYour environment must include the Block Storage service. 4 ]5 C9 y9 \# ~7 Y
Configure Cinder to use Telemetry¶Edit the /etc/cinder/cinder.conf file and complete the following actions: Enable periodic usage statistics relating to block storage. To use it, you must run this command in the following format: $ cinder-volume-usage-audit --start_time='YYYY-MM-DD HH:MM:SS' \ --end_time='YYYY-MM-DD HH:MM:SS' --send_actions
& i1 w% y5 F% X, `9 M9 o! y# P! x' p7 F: P9 y. I2 k
This script outputs what volumes or snapshots were created, deleted, or exists in a given period of time and some information about these volumes or snapshots. Using this script via cron you can get notifications periodically, for example, every 5 minutes: */5 * * * * /path/to/cinder-volume-usage-audit --send_actions& R2 Q7 }/ B% \0 F: y& V u/ I
6 }; v; s# I- f! L2 P; r4 E e, E3 b& D8 J' f
9 C. w+ W& f) b, s8 xFinalize installation¶
( S) J$ q1 |# }; S+ ]: j |