Multi-tier storage

Multi-tier storage#

Scrutinizer can be configured to use additional storage locations in a multi-tiered storage system for raw 1-minute data. Once multi-tier storage is enabled, older 1-minute records that need to be accessed less frequently can be automatically moved to a “cold” tier for extended storage.

The Cooling data history setting (under Admin > Settings > Data History > Flows) can be used to configure how long 1-minute data is kept “hot” before being moved to cold storage.

Setting up cold storage#

A single cold storage tier is already defined as part of Scrutinizer’s factory configuration and can be enabled as follows:

Important

The steps below must be performed on each collector that needs multi-tier/cold storage enabled.

  1. Prepare (deploy, partition, format, etc.) the storage location to be used.

  2. Mount the location:

    Example - Existing NFS v4 share
    1. Install NFS Client Tools:

      sudo yum install nfs-utils
      
    2. Allow NFS traffic through the firewall:

      echo "add element inet filter tcp_service_ports { 2049 }" > /etc/nftables-plixer/21-nfs-rules.nft
      sudo systemctl reload nftables
      
    3. Create the mount point:

      sudo mkdir -p /var/db/cold
      
    4. Add the following entry to to /etc/fstab with the NFS server’s details (NFS_SERVER and EXPORT_PATH):

      NFS_SERVER:EXPORT_PATH   /var/db/cold   nfs4    hard,noatime,nofail,rsize=1048576,wsize=1048576,timeo=60,retrans=2,sec=sys,rw  0  0
      
    5. Mount the NFS share:

      sudo systemctl daemon-reload && sudo mount -a
      
    Example - Disk added in vSphere, partitioned with fdisk and formatted as ext4
    1. Create the mount point:

      sudo mkdir -p /var/db/cold
      
    2. Get the device’s UUID:

      sudo blkid /dev/sdb1
      
    3. Add an entry to /etc/fstab in the following format:

      UUID=DEVICE-UUID-HERE   /var/db/cold   ext4   defaults   0   2
      
    4. Mount the device:

      sudo systemctl daemon-reload && sudo mount -a
      
  3. Enable the cold storage tier:

    scrut_util --enable tier --tier cold --verbose
    

    Note

    In distributed setups, the enable command must be run on both the collector and the cluster’s primary reporter.

After the cold storage tier has been enabled, multi-tier storage options and rules can be configured from the Admin > Settings > Data History > Flows view of the web interface.

Important

If multi-tier storage is disabled (using disable instead of enable) at a later time, new data will no longer be moved to the specified storage tier/device, but data already stored will be retained.