Assure1 Relocate Metric Data Tool¶
Overview¶
The Assure1 Relocate Metric Data Tool is a basic threaded application for moving metric data for a single device from one zone or shard to another in the Influx metrics database.
Prerequisites¶
Telegraf is configured to write to the raw retention policy only and requires additional configuration to write to the additional retention policies hourly
and daily
.
The application sets a tag called rp
, to daily
or hourly
, for data not in the default retention policy.
Therefore, prior to running the tool some additional configuration is required to process the data written to the hourly
and daily
retention policies.
-
A new configuration file,
migrate.conf
, should be created in$A1BASEDIR/etc/telegraf.d/
on each database server with the following configuration:############################################################################### [[outputs.influxdb]] urls = ["https://$METRICHOSTFQDN:8086"] database = "Metric" skip_database_creation = true retention_policy = "hourly" tagexclude = ["rp"] write_consistency = "any" timeout = "30s" tls_ca = "$A1BASEDIR/etc/ssl/BundleCA.crt" tls_cert = "$A1BASEDIR/etc/ssl/User-assure1.crt" tls_key = "$A1BASEDIR/etc/ssl/User-assure1.key" [outputs.influxdb.tagpass] rp = ["hourly"] ############################################################################### [[outputs.influxdb]] urls = ["https://$METRICHOSTFQDN:8086"] database = "Metric" skip_database_creation = true retention_policy = "daily" tagexclude = ["rp"] write_consistency = "any" timeout = "30s" tls_ca = "$A1BASEDIR/etc/ssl/BundleCA.crt" tls_cert = "$A1BASEDIR/etc/ssl/User-assure1.crt" tls_key = "$A1BASEDIR/etc/ssl/User-assure1.key" [outputs.influxdb.tagpass] rp = ["daily"] ###############################################################################
Note
Replace $A1BASEDIR with the appropriate installation directory (usually
/opt/assure1
) and $METRICHOSTFQDN with the appropriate server FQDN (e.g. hostname.example.com). -
Restart the telegraf service for the change to take effect.
-
Run the RelocateMetricData tool.
-
Once completed remove the
migrate.conf
configuration file. -
Restart the telegraf service for the changes to be reversed.
Administration Details¶
The following list shows the technical details needed for advanced administration of the application:
-
Package - coreProcessing-app
-
Synopsis -
./RelocateMetricData [OPTIONS]
-
Options:
-d, --DeviceID N Device to move metric data for -f, --LogFile String Filename for logging. Defaults to ~/logs/RelocateMetricData.log if not defined -l, --LogLevel N Log level to use. Defaults to ALWAYS if not defined. LEVELS: 0 [OFF] 1 [FATAL] 2 [ERROR] 3 [WARN] 4 [INFO] 5 [DEBUG] -z, --NewZoneID N (Optional) New ZoneID for device, if not provided will use DeviceZoneID from Assure1.Devices table. Enables copying metrics to new zone before moving device -p, --PreviousZoneID N (Optional) Previous ZoneID of device, if not provided will use DeviceZoneID from Assure1.Devices table. Only required when device has already been or will be moved to another zone -s, --NewShardID N (Optional) New ShardID for device, if not provided will use ShardID from Assure1.Devices table. Enables copying of metrics to new shard before moving device -n, --PreviousShardID N (Optional) Previous ShardID of Device, if not provided will use ShardID from Assure1.Devices table. Only required when device has already been or will be moved to another shard -t, --Threads N Number of threads to use. Defaults to single threaded if not defined -w, --FlushTime N Number of seconds to wait to flush metrics before completing task. Defaults to 10 seconds -r, --Remove N Set to 1 to remove existing data after copying to new zone or shard -?, -h, --Help Print usage and exit
-
Threaded - Multi-Threaded