|
Telemetry uses a combination of notifications and an agent to collect Compute meters. Perform these steps on each compute node. Install and configure components¶
. o- h/ S& j( K- S, R! ? F7 s6 ]/ wInstall the packages: # yum install openstack-ceilometer-compute# yum install openstack-ceilometer-ipmi (optional)
" L3 {# r) j+ y9 A+ n$ @3 b
$ h {+ }% D; `, N9 rConfigure Compute to use Telemetry¶
7 K* _( l6 R# k& j" @Configure Compute to poll IPMI meters¶
7 i% l* c) E! N6 |9 c% Z/ x+ G
/ X, X7 m" f2 Z( bNote
4 r. h8 v: I, m: y+ P- VTo enable IPMI meters, ensure IPMITool is installed and the host supports Intel Node Manager. " W6 r8 x0 N9 U S, t
1 x# x0 o% C6 y: g: c, ~* [; B
Edit the /etc/sudoers file and include: .. code-block:: ini) e. ?% t3 ]# W, l
( I& M" q" t6 |0 t9 R: N5 d8 K
ceilometer ALL = (root) NOPASSWD: /usr/bin/ceilometer-rootwrap /etc/ceilometer/rootwrap.conf *
7 T, f# R9 Q& T1 C4 {
Edit the /etc/ceilometer/polling.yaml to include the required meters, for example: .. code-block:: yaml
* h$ s/ L2 @' t. X2 e1 V w3 g- z* \+ H
7 _, h9 [' t+ w+ D+ y7 m
( P( E9 g; d% f
6 O, b* z* |- _
/ \4 `) _" i( ^! ~Finalize installation¶
) Z. R& x; b, a0 L, h. ^1 w1 n( U) y. K4 j2 Z
( K& t, I% g2 lThis 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. $ V" h' [% Q) S+ O8 C5 t& O5 a
Source the admin credentials to gain access to admin-only CLI commands: $ . admin-openrcTo create the service credentials, complete these steps:
2 B: e r# q) u: \$ ]- t) E
4 R; b8 p* v9 E1 H; L# tCreate 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
; v: R- J0 C9 o5 P/ S" T4 s& u
2 A1 h$ I0 t* G! p( r1 w. w1 U2 y2 Z; ~
) u# A" e$ ~! [: h) `, A
Note
6 O" e0 O" }. Q' X( e G8 n' MThis command provides no output. * V+ T; W. ^4 H
Register Gnocchi service in Keystone:
; H: ?/ I+ x- u/ C! o/ ]0 J' S6 ^ K( S3 `* L( c5 ?
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
# G6 _% v3 O/ R/ k9 o( ~ u6 o& _ s1 `+ l" w5 o1 w8 K
1 t5 d f' H% L* z
$ b0 c; a( |4 T" Y% A" F0 H: J" V9 UNote. }4 Y) m N3 [/ N/ X4 d+ i. s7 A
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 |+--------------+----------------------------------+
- i2 T/ w# v! O9 G* o ' n3 T! k6 I* W0 j
# z1 H% r7 o& c+ u: m% @1 @Install Gnocchi¶ 9 ^# g& e( b# K1 m: M( L" D- C
Install the Gnocchi packages. Alternatively, Gnocchi can be install using pip: # yum install openstack-gnocchi-api openstack-gnocchi-metricd \ python-gnocchiclient
5 }3 N+ O, v- n7 B8 q7 d) E
; D) A; {8 A: ~' b. k2 [1 K/ T9 W$ _1 {( @% p
: b. I4 u9 S" s4 i6 k5 W/ i
Note( [( E2 l0 \: L! p/ F0 w
Depending on your environment size, consider installing Gnocchi separately as it makes extensive use of the cpu. 6 c* U8 K/ B( e3 y6 Z5 H y
% b. k$ F8 y6 `; c* q; q+ m
Finalize Gnocchi installation¶ & v$ L4 S' z+ ]; h( ?- ]; `
Install and configure components¶
! _) y2 }, x) X3 M) m/ t7 {Edit the /etc/ceilometer/pipeline.yaml file and complete the following section:
' |: g; e' R" {: |; ]1 LEdit the /etc/ceilometer/ceilometer.conf file and complete the following actions: 2 X: @) \$ L* @
. \9 L$ Z/ A, N; @5 v; XIn the [DEFAULT] section, configure RabbitMQ message queue access: [DEFAULT]...transport_url = rabbit://openstack:RABBIT_PASS@controller
! ~- q- C: Q; @6 u+ G" U4 e+ a) D4 ]4 F7 ~& m( N
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 = RegionOne9 m M8 B. q) A+ j( A4 n
( t3 A6 x( \8 E, o* W* L1 E H# tReplace CEILOMETER_PASS with the password you chose for the ceilometer user in the Identity service.
8 {3 t y8 ^, D( K/ v3 Q
Create Ceilometer resources in Gnocchi. Gnocchi should be running by this stage: # ceilometer-upgrade, h& X. c+ t, t8 V) B
6 }# U" ~0 A0 oFinalize installation¶ 7 b; ?3 {4 p: e' y) f
8 g. ]3 d( @3 }/ u, `Telemetry uses notifications to collect Block Storage service meters. Perform these steps on the controller and Block Storage nodes. 2 @9 D) u, o6 P2 ] v* n
0 x) R3 g2 M) @8 ^1 ^; T0 X& bNote
q7 T: e$ n" p" fYour environment must include the Block Storage service.
7 P& L4 Z& l* n* A+ c8 dConfigure 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, O: {! E( c9 u) X$ ?
+ V. Q/ K1 k# @, F8 `/ J4 Z$ A
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) |0 m" j3 {/ U! m7 w6 F$ g
& |! X7 {, D- p6 r
( Z; @6 \$ }3 f- L2 z- I% F+ V
7 U' r6 v- X( g' I0 i( r. _
Finalize installation¶' {& d9 K+ W4 D) R; {
|