The main metrics subsystem in MITIGATOR is Graphite in conjunction with Grafana. It is possible to export metrics to Prometheus via graphite_exporter.
To organize sending, you need to deploy and configure graphite_exporter
(the main configuration file and the configuration file for metrics matching),
then configure sending metrics to graphite_exporter.
Brief sequence of actions:
graphite_exporter
with this configuration.A list of metrics with a short description is available by link.
It is not guaranteed that metric names will not change between versions.
Configuration example:
- match: ^mitigator\.elements\.extInputCounter\.(.*)$
name: extInputCounter
labels:
unit: $1
- match: ^mitigator\.elements\.policy_(\d+)\.inputCounter\.(.*)$
name: inputCounter
labels:
policy: $1
unit: $2
- match: ^mitigator\.ports\.((?:int|ext)\d+)\.opackets$
name: opackets
labels:
port: $1
In docker-compose.override.yml
add:
version: "2.2"
services:
fwstats:
environment:
FWSTATS_GRAPHITE_ADDRESS: "carbon-clickhouse.mitigator:2003,some_server:9109"
Where some_server:9109
is the address and port of the graphite_exporter;
the first value must be saved. You can specify multiple servers if you wish.
Apply parameters:
docker-compose up -d fwstats