|
Telemetry uses a combination of notifications and an agent to collect Compute meters. Perform these steps on each compute node. Install and configure components¶ ! G& C( [. v$ \% L( R" e6 n
Install the packages: # yum install openstack-ceilometer-compute# yum install openstack-ceilometer-ipmi (optional) V& V1 Z% r; o9 J, z4 G& f3 ~
' r) c# Y3 x; i! x2 N3 v
Configure Compute to use Telemetry¶
+ X; g9 t/ t" B5 g) M9 {8 e; ]Configure Compute to poll IPMI meters¶- P; w# k* I% h ?9 v* L
. A' j) y0 d9 VNote" L$ O" E% S7 j6 V; T
To enable IPMI meters, ensure IPMITool is installed and the host supports Intel Node Manager.
; V4 c" a% b3 l4 S
o( C# ?, \9 V6 F/ R+ z4 s7 ~Edit the /etc/sudoers file and include: .. code-block:: ini
1 I* D" U3 q/ \2 s/ O/ E6 i' v. g! |) E6 j+ E5 \/ Z
ceilometer ALL = (root) NOPASSWD: /usr/bin/ceilometer-rootwrap /etc/ceilometer/rootwrap.conf * + z3 w" q+ H) k! b) s% N
Edit the /etc/ceilometer/polling.yaml to include the required meters, for example: .. code-block:: yaml B' h2 ]; w; A9 _$ E* z* K6 u
$ r8 @; ?$ Q: l
2 o* a! I& K* i3 ^& w- C' ~
4 O4 V- B( v6 K) X; X 9 Q6 [$ ?. e5 m# x4 z
6 ?$ ]( z/ g" |) r+ T; R2 XFinalize installation¶ * W" h$ n4 F* Y; C
j5 d$ z- ~4 ?6 a; e- h0 i1 z+ a
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.
+ n. N3 Q3 v; P( A1 ^Source the admin credentials to gain access to admin-only CLI commands: $ . admin-openrcTo create the service credentials, complete these steps: 9 q$ T3 K6 e4 P8 @
: r* \! k- Q; z9 M& {0 ACreate 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 admin* Z# z: e" }- U( u- l! U3 p( j. ?8 f
$ f: a/ ~# Y: j$ P( M- e" m8 R
+ \$ M7 n" ~4 |% b
9 }/ _! c$ j# T: b6 x% [Note
) B0 k+ ~: n& M9 n \This command provides no output.
1 L' D* I, V1 n8 ?! C* L! P- {
Register Gnocchi service in Keystone:
6 b, m$ n# t$ k% t( n' W1 w" w. V. w
Create 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
9 l6 u% D* s/ r; {0 w9 O7 p
6 o$ ^. I: c2 T9 p6 D( _ A2 N; W0 N! @+ J7 g; O' Q
' H- J; B3 n; y; {: ^( p2 b# m( LNote
+ e0 V( @( ^& `This 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 |+--------------+----------------------------------+8 h2 x0 s" |* C5 [# F
& b- @7 v5 m8 n5 ^; s
5 C& k: k- z+ T6 [# R. ~. _Install Gnocchi¶ 6 b, Y: O9 B8 k+ F1 b
Install the Gnocchi packages. Alternatively, Gnocchi can be install using pip: # yum install openstack-gnocchi-api openstack-gnocchi-metricd \ python-gnocchiclient
* }' v$ H' b$ E4 M) E: t: g; s) x w& ` D
9 l0 g' P8 E8 |9 p( Y- p: U! N9 w& Q% [7 ?4 Y. r6 Y$ }
Note% X |6 {; [* M5 K4 S! }9 x
Depending on your environment size, consider installing Gnocchi separately as it makes extensive use of the cpu.
% I5 P! D" p& ]" p+ Y" L2 ]. q , @0 n9 o0 b' r' m
Finalize Gnocchi installation¶ 9 n6 y/ k( M! H; b1 O
Install and configure components¶
4 {! p! `+ ?: W* v2 X" s& {Edit the /etc/ceilometer/pipeline.yaml file and complete the following section: % v; U# q+ q7 D1 Q3 v2 j
Edit the /etc/ceilometer/ceilometer.conf file and complete the following actions: ! H- Y( H8 G r6 G% x4 U% l
; N6 l/ ^+ {( c4 I
In the [DEFAULT] section, configure RabbitMQ message queue access: [DEFAULT]...transport_url = rabbit://openstack:RABBIT_PASS@controller ^2 i# n L: Y- t; C; c. b
* l( A* j9 ], e
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; T0 R5 e [( y( s! k% F" I6 ]: h( i- n# a7 J
Replace CEILOMETER_PASS with the password you chose for the ceilometer user in the Identity service.
/ e% u) v$ y) S# M Create Ceilometer resources in Gnocchi. Gnocchi should be running by this stage: # ceilometer-upgrade
" Q& O: I4 C" z# Z* |* V% W5 T8 c
! U" R3 I' Y# z2 R/ c; `0 A- b" G# I2 v6 JFinalize installation¶ 0 Q' j' E' \9 G7 W
) ~8 T$ s- n" Z3 A3 B
Telemetry uses notifications to collect Block Storage service meters. Perform these steps on the controller and Block Storage nodes. : g7 z9 j) h g! V a
s6 l. a& ]) l
Note
2 h* }' f& i/ G2 d( aYour environment must include the Block Storage service. 9 x5 x2 n; T! ` ?( K
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
( T0 }& e2 Q! x9 I( G5 ]! N( k7 X& V- c4 t
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
5 y7 V2 I4 T" B4 E$ Q j. f! [* n& L O
% q7 W6 A) N* j
8 W; c3 }% D( U, L8 @* {2 X6 w& {
Finalize installation¶
1 \+ X- n$ v% a& |. i |