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.

  1. Create a directory for the services:

    mkdir -p /opt/mitigator-graphite
  2. Download docker-compose.yml:

    wget https://docs.mitigator.ru/v23.12/dist/grafbase/docker-compose.yml \
        -O /opt/mitigator-graphite/docker-compose.yml
  3. Download service file:

    wget https://docs.mitigator.ru/v23.12/dist/grafbase/docker-compose@.service \
        -O /etc/systemd/system/docker-compose@.service
  4. Activate service:

    systemctl enable docker-compose@mitigator-graphite
  5. 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

  1. 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. The mitigator. part is required for rollup to work properly, foobar is replaced with whatever you want, for example a hostname.

  2. On the MITIGATOR host, restart its service:

    systemctl restart mitigator