Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
Chapter 4. Managing operational measurements
4.1. Modifying the environment variables based on your deployment Link kopierenLink in die Zwischenablage kopiert!
Procedure
-
Copy the
/usr/share/openstack-tripleo-heat-templates/environments/gnocchi-environment.yaml
file to your home directory. Modify the parameters to suit your environment. You can modify the following primary parameters in the YAML file:
-
GnocchiIndexerBackend: The database indexer backend to use, for example,
mysql
. See https://github.com/openstack/tripleo-heat-templates/blob/stable/queens/puppet/services/gnocchi-base.yaml#L33 -
GnocchiBackend: The type of transient storage. The value can be
rbd
,swift
, orfile
(ceph). For more information, see https://github.com/openstack/tripleo-heat-templates/blob/stable/queens/environments/storage-environment.yaml#L29-L30 - NumberOfStorageSacks: The number of storage sacks. For more information, see Section 4.1.2, “Number of sacks”.
-
GnocchiIndexerBackend: The database indexer backend to use, for example,
Add
gnocchi-environment.yaml
to theovercloud deploy
command with any other environment files that are relevant to your environment and deploy. Replace<existing_overcloud_environment_files>
with the list of environment files that are part of your existing deployment:openstack overcloud deploy \ <existing_overcloud_environment_files> \ -e ~gnocchi-environment.yaml \ ...
$ openstack overcloud deploy \ <existing_overcloud_environment_files> \ -e ~gnocchi-environment.yaml \ ...
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
4.1.1. Running metricd workers Link kopierenLink in die Zwischenablage kopiert!
By default, the gnocchi-metricd
daemon spans your CPU power to maximize CPU use when computing metric aggregation.
Procedure
Use the
openstack metric status
command to query the HTTP API and retrieve the status for metric processing:openstack metric status
# openstack metric status
Copy to Clipboard Copied! Toggle word wrap Toggle overflow The command output shows you the processing backlog for the
gnocchi-metrid
daemon. As long as this backlog is not continuously increasing, it means thatgnocchi-metricd
can cope with the amount of metrics that are being gathered. If the number of measures to process is continuously increasing, increase the number ofgnocchi-metricd
daemons. You can run any number of metricd daemons on any number of servers.
4.1.2. Number of sacks Link kopierenLink in die Zwischenablage kopiert!
Incoming metrics data in Gnocchi are pushed into different sacks and each sack is assigned to one or more gnocchi-metricd
daemons for processing. The number of sacks depends on the active metrics the system captures.
Red Hat recommends that the number of sacks is greater than the total number of active gnocchi-metricd
workers.
4.1.3. Changing the sack size Link kopierenLink in die Zwischenablage kopiert!
You can change the sack size if you want to collect more metrics than originally anticipated.
Measurement data that is pushed to Gnocchi is divided into sacks for better distribution. Incoming metrics are pushed to specific sacks and each sack is assigned to one or more gnocchi-metricd
daemons for processing. To set the number of sacks, use the number of active metrics the system captures. The number of sacks should be higher than the total number of active gnocchi-metricd
workers.
Procedure
To determine the appropriate sacks value to set, use the following equation:
sacks value = number of active metrics / 300
NoteIf the estimated number of metrics is the absolute maximum, divide the value by 500. If the estimated number of active metrics is conservative and expected to grow, divide the value by 100 to accommodate growth.
4.2. Monitoring the time-series database service Link kopierenLink in die Zwischenablage kopiert!
The /v1/status
endpoint of the HTTP API returns information, such as the number of measures to process (measures backlog), which you can monitor. The following conditions indicate a healthy system:
-
The HTTP server and
gnocchi-metricd
are running -
The HTTP server and
gnocchi-metricd
are not writing error messages to the log files.
Procedure
View the status of the time-series database:
openstack metric status
# openstack metric status
Copy to Clipboard Copied! Toggle word wrap Toggle overflow The output shows the status of the time-series database, as well as the number of metrics to process. Lower values are better here, ideally, they are near 0.
4.3. Backing up and restoring the time-series database Link kopierenLink in die Zwischenablage kopiert!
To be able to recover from an unfortunate event, backup the index and the storage. You must create a database dump using PostgreSQL or MySQL, and take snapshots or copies of your data storage, using Ceph, Swift, or your file system.
Procedure
- Restore your index and storage backups.
- Reinstall Gnocchi, if necessary.
- Restart Gnocchi.
4.4. Viewing measures Link kopierenLink in die Zwischenablage kopiert!
You can view a list of measures for a particular resource:
Procedure
Use the
metric measures
command:openstack metric measures show --resource-id UUID <METER_NAME>
# openstack metric measures show --resource-id UUID <METER_NAME>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow List measures for a particular resource within a range of timestamps:
openstack metric measures show --aggregation mean --start <START_TIME> --stop <STOP_TIME> --resource-id UUID <METER_NAME>
# openstack metric measures show --aggregation mean --start <START_TIME> --stop <STOP_TIME> --resource-id UUID <METER_NAME>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Timestamp variables <START_TIME> and <END_TIME> use the format iso-dateThh:mm:ss.
4.5. Managing resource types Link kopierenLink in die Zwischenablage kopiert!
You can create, view, and delete resource types. The default resource type is generic, but you can create your own resource type with any extra number of attributes.
Procedure
Create a new resource type:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Review the configuration of the resource type:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Delete the resource type:
openstack metric resource-type delete testResource01
$ openstack metric resource-type delete testResource01
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
You cannot delete a resource type if a resource is using it.
4.6. Viewing cloud usage measures Link kopierenLink in die Zwischenablage kopiert!
Procedure
View the average memory usage of all instances for each project:
openstack metrics measures aggregation --resource-type instance --groupby project_id -m “memoryView L3” --resource-id UUID
openstack metrics measures aggregation --resource-type instance --groupby project_id -m “memoryView L3” --resource-id UUID
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
4.6.1. Enabling L3 cache monitoring Link kopierenLink in die Zwischenablage kopiert!
If your Intel hardware and libvirt
version supports Cache Monitoring Technology (CMT), you can use the cpu_l3_cache
meter to monitor the amount of L3 cache used by an instance.
To monitor the L3 cache, you must have the following parameters and files:
-
cmt
in theLibvirtEnabledPerfEvents
parameter. -
cpu_l3_cache
in thegnocchi_resources.yaml
file. -
cpu_l3_cache
in the Ceilometerpolling.yaml
file.
Procedure
-
Create a YAML file for Telemetry, for example,
ceilometer-environment.yaml
. -
In the
ceilometer-environment.yaml
file, addcmt
to theLibvirtEnabledPerfEvents
parameter. For more information, see/usr/share/openstack-triple-heat-templates/puppet/services/nova_libvirt.yaml
. Deploy the overcloud with this YAML file. Replace
<existing_overcloud_environment_files>
with the list of environment files that are part of your existing deployment:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Verify that
cpu_l3_cache
is enabled in Gnocchi on the Compute node.Copy to Clipboard Copied! Toggle word wrap Toggle overflow NoteChanging the setting in the container image does not persist over a reboot.
After you launch a guest instance on this Compute node, monitor the
CMT
metrics:Copy to Clipboard Copied! Toggle word wrap Toggle overflow
4.7. Upgrading Gnocchi Link kopierenLink in die Zwischenablage kopiert!
By default, upgrading your deployment using Red Hat OpenStack Platform director upgrades Gnocchi. For information on upgrading your deployment, see Upgrading Red Hat OpenStack Platform. If you are using Red Hat OpenStack Platform 10 and want to upgrade to Red Hat OpenStack Platform 13, see Fast Forward Upgrades.