This is a draft document that was built and uploaded automatically. It may document beta software and be incomplete or even incorrect. Use this document at your own risk.

Chapter 3. Operation and Maintenance

Table of Contents

Removing Metrics Data
Removing Log Data
Log File Handling
Backup and Recovery
Databases
Configuration Files
Dashboards

Regular operation and maintenance includes:

Removing Metrics Data

Metrics data is stored in the Metrics and Alarms InfluxDB Database. InfluxDB features an SQL-like query language for querying data and performing aggregations on that data.

The Metrics Agent configuration defines the metrics and types of measurement for which data is stored. For each measurement, a so-called series is written to the InfluxDB database. A series consists of a timestamp, the metrics, and the value measured.

Every series can be assigned key tags. In the case of SUSE OpenStack Cloud Monitoring, this is the _tenant_id tag. This tag identifies the OpenStack project for which the metrics data has been collected.

From time to time, you may want to delete outdated or unnecessary metrics data from the Metrics and Alarms Database, for example, to save space or remove data for metrics you are no longer interested in. To delete data, you use the InfluxDB command line interface, the interactive shell that is provided for the InfluxDB database.

Proceed as follows to delete metrics data from the database:

  1. Create a backup of the database. For details, refer to the section called “Backup and Recovery”.

  2. Determine the ID of the OpenStack project for the data to be deleted:

    Log in to the OpenStack dashboard and go to Identity > Projects. The monasca project initially provides all metrics data related to SUSE OpenStack Cloud Monitoring.

    In the course of the productive operation of SUSE OpenStack Cloud Monitoring, additional projects may be created, for example, for application operators.

    The Project ID field shows the relevant tenant ID.

  3. Log in to the host where the Monitoring Service is installed.

  4. Go to the directory where InfluxDB is installed:

    cd /usr/bin
  5. Connect to InfluxDB using the InfluxDB command line interface as follows:

    ./influx -host <host_ip>

    Replace <host_ip> with the IP address of the machine on which SUSE OpenStack Cloud Monitoring is installed.

    The output of this command is, for example, as follows:

    Connected to http://localhost:8086 version 1.1.1
    InfluxDB shell version: 1.1.1
    
  6. Connect to the InfluxDB database of SUSE OpenStack Cloud Monitoring (mon):

    > show databases
    name: databases
    name
    ----
    mon
    _internal
    
    > use mon
    Using database mon
  7. Check the outdated or unnecessary data to be deleted.

    • You can view all measurements for a specific project as follows:

      SHOW MEASUREMENTS WHERE _tenant_id = '<project ID>'
    • You can view the series for a specific metrics and project, for example, as follows:

      SHOW SERIES FROM "cpu.user_perc" WHERE _tenant_id = '<project ID>'
  8. Delete the desired data.

    • When a project is no longer relevant or a specific tenant is no longer used, delete all series for the project as follows:

      DROP SERIES WHERE _tenant_id = '<project ID>'

      Example:

      DROP SERIES WHERE _tenant_id = '27620d7ee6e948e29172f1d0950bd6f4'
    • When a metrics is no longer relevant for a project, delete all series for the specific project and metrics as follows:

      DROP SERIES FROM "<metrics>" WHERE _tenant_id = '<project ID>'

      Example:

      DROP SERIES FROM "cpu.user_perc" WHERE _tenant_id = '27620d7e'
  9. Restart the influxdb service, for example, as follows:

    sudo systemctl restart influxdb