factorio-rcon-prometheus-exporter
v2.2.2
Published
A Prometheus exporter that connects to a Factorio server via RCON and exports metrics.
Maintainers
Readme
factorio-rcon-prometheus-exporter
A Prometheus Exporter that generates metrics by connecting to a Factorio server over RCON and executing a Lua script.

Usage
[!CAUTION] This will disable achievements because Factorio does not differentiate between reading and writing when using the Lua API.
With Docker Compose:
factorio-rcon-prometheus-exporter:
image: sleavely/factorio-rcon-prometheus-exporter:latest
restart: unless-stopped
environment:
# HTTP server options for Prometheus to scrape
- HOST=0.0.0.0
- PORT=9772
# Factorio RCON params
- RCON_HOST=my-factorio-server
- RCON_PORT=27015
- RCON_PASSWORD=
# The factorio_available_items metric counts items on belts, in chests, etc.
# This can cause the server to momentarily freeze, so by default it only does it when no players are online.
# To change this, set COUNT_AVAILABLE_ITEMS to "never", or "always"
- COUNT_AVAILABLE_ITEMS=Then, in your Prometheus configuration:
scrape_configs:
- job_name: factorio
scrape_interval: 60s
static_configs:
- targets:
- factorio-rcon-prometheus-exporter:9772Related
These repositories also export metrics using the RCON approach:
The more popular approach and most complete exporter requires you to install a mod:
- remijouannet/graftorio2 which
