|
Telemetry uses a combination of notifications and an agent to collect Compute meters. Perform these steps on each compute node. Install and configure components¶ ! m c3 u2 Z' T4 t& M1 S) E6 h& E
Install the packages: # yum install openstack-ceilometer-compute# yum install openstack-ceilometer-ipmi (optional)& Q3 X1 @* c! [3 r
% e" [$ f! x# o! f# U7 DConfigure Compute to use Telemetry¶
3 H5 j& g }- wConfigure Compute to poll IPMI meters¶% `) b% P9 H7 u
4 q- i0 g- i3 l8 H! KNote0 ]. K j. H0 W+ Q
To enable IPMI meters, ensure IPMITool is installed and the host supports Intel Node Manager. 1 E6 I# \" z& I* F
* u# r5 A) G- E! P6 W" ]Edit the /etc/sudoers file and include: .. code-block:: ini
' Z% r6 n0 p$ K1 e( ~' }
6 e( x+ S8 `0 z8 l: E4 @$ O+ ]ceilometer ALL = (root) NOPASSWD: /usr/bin/ceilometer-rootwrap /etc/ceilometer/rootwrap.conf * ( \* _ N- ^9 _: _7 q
Edit the /etc/ceilometer/polling.yaml to include the required meters, for example: .. code-block:: yaml
) x) u5 h! {& I' \$ R/ T1 l7 D/ Y$ n/ \. p1 A
3 u6 ~( B, |& Q' J' e0 d- g+ t9 \
. n% Q) F% |) U9 [, I9 @ # ]! r0 N* N" A0 r7 k2 u
+ T# z. @" S; A2 f
Finalize installation¶
9 Y" F+ {3 O$ I6 H' Q2 \6 b+ g1 H
9 p: |# B& Y7 ^8 P/ ?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.
$ G! w5 t% K- ?6 m. Q+ C5 q# jSource the admin credentials to gain access to admin-only CLI commands: $ . admin-openrcTo create the service credentials, complete these steps: N! }/ l# U( W: D; k" t/ `
7 Z6 r2 u" m# H7 `4 z: gCreate 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
6 J+ B( }/ p g/ p& M7 I8 E% \4 T1 l4 ?
- c# A. {3 G, F4 I6 \
8 B) o* L9 \# q( Z( qNote
, i( i' |( N: ]- s; wThis command provides no output.
! ^1 K8 i; p6 _( Z; ]- q4 w
Register Gnocchi service in Keystone: / k) z: P' _; Z
, V- B. v! u2 \4 D6 ZCreate 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
3 i$ _! j4 p/ N
, y6 B; v$ x2 p. d- C5 b: |- n5 H) E
' z, b' M, f, C# h
Note; j0 r" t( P$ u7 C$ G
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 |+--------------+----------------------------------+
s+ ~8 X: F# V/ V9 y- X& s
. V2 o* b) _9 [( N/ J , [4 c- T! K( T# }$ s, M
Install Gnocchi¶
! D4 y6 \3 A. o" MInstall the Gnocchi packages. Alternatively, Gnocchi can be install using pip: # yum install openstack-gnocchi-api openstack-gnocchi-metricd \ python-gnocchiclient! L( w0 W/ `0 o
- y$ g% Z, k6 f8 Z$ u4 @3 N! H& K
) K- K4 [- f, F2 \, o8 y
1 ^& l B4 Q6 o; H- wNote! e5 ~' u' E( v* U+ G- n5 [
Depending on your environment size, consider installing Gnocchi separately as it makes extensive use of the cpu. + B9 O t! N1 O# X, d$ ?( W2 D! k& q( j
; U1 _$ q+ n$ q" l: w) I" B2 a
Finalize Gnocchi installation¶ 3 N8 c7 h8 a6 D
Install and configure components¶
, i5 K! d3 l8 A2 X& D9 o% yEdit the /etc/ceilometer/pipeline.yaml file and complete the following section: ! J* v- M7 n, D
Edit the /etc/ceilometer/ceilometer.conf file and complete the following actions: & E) ^6 ~" [4 [& s
' r3 O& s3 n5 u7 h+ c- k: L9 G/ a# zIn the [DEFAULT] section, configure RabbitMQ message queue access: [DEFAULT]...transport_url = rabbit://openstack:RABBIT_PASS@controller, Y- Y$ M6 k) Y9 Y4 m
( F) A# L% D' g4 H
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 = RegionOne0 I' r/ ^/ B1 V$ ]
' T" ~# Z. B! v5 s& z, o
Replace CEILOMETER_PASS with the password you chose for the ceilometer user in the Identity service.
y2 p- ]) D/ d
Create Ceilometer resources in Gnocchi. Gnocchi should be running by this stage: # ceilometer-upgrade
3 }) v& A$ [" a7 j5 u , j; v5 q# T$ Q4 _
Finalize installation¶
9 O0 s/ ]& E z. q! H9 ^3 k5 s8 M$ V" d/ [4 L( z. p
Telemetry uses notifications to collect Block Storage service meters. Perform these steps on the controller and Block Storage nodes.
- w. g/ q3 H" G& i J
- }& g- I$ F. Q% m7 SNote5 {6 J ~9 @7 t4 i7 J8 c3 x
Your environment must include the Block Storage service.
( I }5 J# }$ {% I2 V1 MConfigure 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
1 O$ u3 o: H/ P- c% f1 ^7 n& X* t% _$ S" L* `- c
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
, j2 } D" e0 @
* a, t- H2 Q! l" s2 r4 e X
- a) e4 H% F5 ~; t& z, w 9 Z5 p1 e6 D% A5 ]5 L6 v P! f' g
Finalize installation¶
" I% V, l0 M9 j. ~2 @/ O) U |