Archive Groups
An archive group is a logical structure that stores data with specific storage settings.
Archive groups have the following properties:
- storageGroup - Name of an archive group.
- retentionInterval - Time interval (hour, day, week, month) for how long archived data is stored in the database.
- retentionFactor - Multiplier for the retention interval.
- segmentDurationInterval - Duration of a single segment.
- segmentDurationFactor - Multiplier for segment duration interval.
- backupInterval - Period for the backup of segments.
- backupFactor - Multiplier for the backup interval.
- backupAgeInterval - Time limit for the age of a segment before backup takes place.
- backupAgeFactor - Multiplier for the age interval of the backup.
- nextScheduledBackup - Time of next scheduled backup (for sync).
- groupDatapointId - DP ID of the archive group DP.
- isAlert - Group is used for alert archiving (not for events).
- active - Group is active, data can be written and read.
- backupDayOfMonth - Day of the month on which the data is backed up.
- disableBackupOnDeletion - If a segment is deleted due to the retention period, the segment is backed up unless disableBackupOnDeletion is set to true.
The information above is saved in internal data points. For details, see the chapter Internal Datapoints.
When you start the backend, you must synchronize the information about the archive groups. To
do this, call the requestMetadataDeltaSynchronously function of the
ConfigChannelHandler class.. A list of the archive groups stored in the
database (type ArchiveGroupDeltaRequest) is passed to this function. The
result of this call is a list of archive groups with the type
ArchiveGroupDeltaRespone, similar to
MetadataDeltaResponse. In this list, the archive groups are divided into
updated, deleted and new groups for this backend.
Example
ArchiveGroupDeltaRespone archiveGroupsDeltaRespones;
// send an empty request to get all groups from the NGA Manager
// also, you can send groups from the database to get the only diff between groups in the database and the NGA Manager
ArchiveGroupDeltaRequest archiveGroupsRequest;
configChannelHandler.requestArchiveGroupDeltaSynchronously(archiveGroupsRequest, archiveGroupsDeltaRespones);
logDebug("Backend received archive groups changes: \n" + archiveGroupsDeltaRespones.DebugString());
MetadataHandler::processArchiveGroups(archiveGroupsDeltaRespones);
