Using a single Graphite for multiple MITIGATOR complexes
Using a single Graphite for several MITIGATOR instances makes it possible to reduce the load on the computing resources of traffic processing complexes, simplify administration and set up complex monitoring.
Set up
The setup is similar to migration of Graphite to a separate server.
If you have a host with Graphite configured, you must skip to the Configuring MITIGATOR to work with External Shared Graphite step.
-
Create a directory for the services:
mkdir -p /opt/mitigator-graphite
-
Download
docker-compose.yml
:wget https://docs.mitigator.ru/v23.08/dist/grafbase/docker-compose.yml \ -O /opt/mitigator-graphite/docker-compose.yml
-
Download service file:
wget https://docs.mitigator.ru/v23.08/dist/grafbase/docker-compose@.service \ -O /etc/systemd/system/docker-compose@.service
-
Activate service:
systemctl enable docker-compose@mitigator-graphite
-
Run services:
-
Sign in to your account:
docker login docker.mitigator.ru
-
Go to work directory:
cd /opt/mitigator-graphite
-
Download Images:
docker-compose pull
-
Run service:
systemctl start docker-compose@mitigator-graphite
-
Configuring MITIGATOR to work with External Shared Graphite
-
Create
docker-compose.override.yml
or add following to it:version: "2.2" services: backend: environment: BACKEND_GRAPHITE_URL: "http://192.168.10.20/render/" BACKEND_GRAPHITE_PREFIX: "mitigator.foobar" fwstats: environment: FWSTATS_GRAPHITE_ADDRESS: "192.168.10.20:2003" FWSTATS_GRAPHITE_PREFIX: "mitigator.foobar" clickhouse: scale: 0 graphite-clickhouse: scale: 0 carbon-clickhouse: scale: 0 carbonapi: scale: 0 grafana: scale: 0
Where:
-
192.168.10.20
is a nominal host address that needs to be replaced with the actual location address of the Graphite service. -
mitigator.foobar
is a nominal metrics prefix that needs to be replaced. Themitigator.
part is required for rollup to work properly,foobar
is replaced with whatever you want, for example a hostname.
-
-
On the MITIGATOR host, restart its service:
systemctl restart mitigator