Exporting Metrics to Prometheus
Metrics in MITIGATOR are stored in Graphite. 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:
- Writing a metric compliance configuration for specific needs.
- Deploying
graphite_exporterwith this configuration. - Setting up data sending in the MITIGATOR system.
graphite_exporter metrics matching configuration
A list of metrics with a short description is available by link.
Info
It is not guaranteed that metric names will not change between versions.
Configuration example:
mappings:
- match: ^mitigator\.(\d+)\.elements\.router\.extInputCounter\.(.*)$
match_type: regex
name: extInputCounter
labels:
instance: $1
unit: $2
- match: ^mitigator\.(\d+)\.elements\.\.policy_(\d+)\.policy\.inputCounter\.(.*)$
name: inputCounter
match_type: regex
labels:
instance: $1
policy: $2
unit: $3
- match: ^mitigator\.(\d+)\.ports\.((?:int|ext)\d+)\.opackets$
name: opackets
match_type: regex
labels:
instance: $1
port: $2MITIGATOR Setup
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 fwstatsRelated Content
- Graphite on a Separate Server
- Setting the Storage Time for Metrics in Graphite
- Using a Single Graphite for Multiple MITIGATOR Clusters
- Подключение внешней Grafana
- Access to the Grafana Interface
- Blocking IP on MITIGATOR with Nginx and Fail2ban
- Challenge-response Authentication Module for HTTP/HTTPS
- Executing Scripts on Log Events
- FastNetMon Integration
- Integration with the Vestochka Notification Service