Graphite on a Separate Server
Moving Graphite to a separate server allows you to split the load between two servers.
Until the metrics archive is transferred, only new graphs can be viewed in the MITIGATOR interface.
Further in the text Server1 is the server with MITIGATOR, Server2 is the server to which the transfer is being performed.
It is assumed that Server2 already has Docker and docker-compose installed and has a way to deliver the filebase from Server1 to Server2 (the amount of data can be more than 100 GB depending on the number of policies).
Versions of MITIGATOR on Server1 and on Server2 must match, for which:
Write a line with the version to the .env file for Server1 and Server2:
Where vXX.XX.X is a target version (i.e.: v20.12.1).
Preparing the storage server
-
Create
docker-compose.ymlon Server2:Download
docker-compose.yml: -
Create a service to run on Server2:
Download service file:
Activate service:
-
Start services on Server2:
-
log in to docker.mitigator.ru
-
Go to work directory
-
Download images
-
Run service
-
Switching graphs to the second server
-
On Server1, create
docker-compose.override.ymlor add the following to it:Where
192.0.2.10is the notional address of Server2, which should be replaced with a valid address. -
Apply parameters:
Attention! The backend service and BGP speaker will be restarted.
This command launches a temporary ClickHouse instance to transfer data from it to a separate server. If migration is not required, you can skip to the «Finish» section.
Data transfer
-
Back up metrics on the old server according to instructions.
-
Move
metrics.tgzto the new server. -
On the new server, restore the backup copy of the metrics according to instructions.
In the first step, set
VOLUME=mitigator-graphite_clickhouse.
Finish
After the successful completion of all processes, you need to make sure that the archived metrics data is available from the MITIGATOR interface.
After that, stop and delete the ClickHouse container on Server1:
To free up space on Server1, you can delete the ClickHouse volume if it is no longer needed:
Updating Server2
Info
Before updating, it is highly recommended to make a backup.
-
Stop MITIGATOR:
-
Update
docker-compose.ymlin/srv/mitigator: -
Update
.env:- Set
VERSION=v21.04.0(or newer minor).
- Set
Graph migration when upgrading to version 21.04
-
Download the migration file update2104.sql to
/srv/mitigator. -
Run ClickHouse:
-
Perform the migration:
Messages are written only in case of errors. In this case, the text of the message must be reported to the developers.
-
Make sure that the
docker-compose.override.ymlfile on Server1 has: port 3080 specified
Completing the update
Run MITIGATOR service:
Related Content
- Подключение внешней Grafana
- Access to the Grafana Interface
- Setting the Storage Time for Metrics in Graphite
- Using a Single Graphite for Multiple MITIGATOR Clusters
- Exporting Metrics to Prometheus
- Изменение конфигурационных параметров ClickHouse
- Challenge-response Authentication Module for HTTP/HTTPS
- Configuration Change
- Configuring Tiered Protection with MITIGATOR
- Core Isolation for Performance Optimization