Questo contenuto non è disponibile nella lingua selezionata.
Chapter 4. Managing operational measurements
4.1. Modifying the environment variables based on your deployment Copia collegamentoCollegamento copiato negli appunti!
Procedure
-
Copy the
/usr/share/openstack-tripleo-heat-templates/environments/gnocchi-environment.yamlfile 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.yamlto theovercloud deploycommand 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 Copia collegamentoCollegamento copiato negli appunti!
By default, the gnocchi-metricd daemon spans your CPU power to maximize CPU use when computing metric aggregation.
Procedure
Use the
openstack metric statuscommand to query the HTTP API and retrieve the status for metric processing:openstack metric status
# openstack metric statusCopy to Clipboard Copied! Toggle word wrap Toggle overflow The command output shows you the processing backlog for the
gnocchi-metriddaemon. As long as this backlog is not continuously increasing, it means thatgnocchi-metricdcan cope with the amount of metrics that are being gathered. If the number of measures to process is continuously increasing, increase the number ofgnocchi-metricddaemons. You can run any number of metricd daemons on any number of servers.
4.1.2. Number of sacks Copia collegamentoCollegamento copiato negli appunti!
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 Copia collegamentoCollegamento copiato negli appunti!
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 Copia collegamentoCollegamento copiato negli appunti!
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-metricdare running -
The HTTP server and
gnocchi-metricdare not writing error messages to the log files.
Procedure
View the status of the time-series database:
openstack metric status
# openstack metric statusCopy 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 Copia collegamentoCollegamento copiato negli appunti!
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 Copia collegamentoCollegamento copiato negli appunti!
You can view a list of measures for a particular resource:
Procedure
Use the
metric measurescommand: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 Copia collegamentoCollegamento copiato negli appunti!
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 testResource01Copy 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 Copia collegamentoCollegamento copiato negli appunti!
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 UUIDCopy to Clipboard Copied! Toggle word wrap Toggle overflow
4.6.1. Enabling L3 cache monitoring Copia collegamentoCollegamento copiato negli appunti!
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:
-
cmtin theLibvirtEnabledPerfEventsparameter. -
cpu_l3_cachein thegnocchi_resources.yamlfile. -
cpu_l3_cachein the Ceilometerpolling.yamlfile.
Procedure
-
Create a YAML file for Telemetry, for example,
ceilometer-environment.yaml. -
In the
ceilometer-environment.yamlfile, addcmtto theLibvirtEnabledPerfEventsparameter. 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_cacheis 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
CMTmetrics:Copy to Clipboard Copied! Toggle word wrap Toggle overflow
4.7. Upgrading Gnocchi Copia collegamentoCollegamento copiato negli appunti!
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.