visualize metrics from your factorio game in grafana
grafana is an open-source project for rendering time-series metrics. by using graftorio, you can create a dashboard with various charts monitoring aspects of your factorio factory. this dashboard is viewed using a web browser outside of the game client. (works great in a 2nd monitor!)
in order to use graftorio, you need to run the grafana software and a database called prometheus locally. graftorio automates this process using docker, or you can set these up by hand.
docker-compose.yml
in a text editor and uncomment the correct path to your factorio installdocker-compose up
inside the extracted directorylocalhost:3000
in a browser, you should see the grafana login screenhttp://prometheus:9090
as its address, and 10s
as the scrape interval. (don't forget the 's')to see if factorio is generating stats, confirm a game.prom
file exists at the configured exporter volume directory. when opened, it should look something like this:
# HELP factorio_item_production_input items produced
# TYPE factorio_item_production_input gauge
factorio_item_production_input{force="player",name="burner-mining-drill"} 3
factorio_item_production_input{force="player",name="iron-chest"} 1
to see if prometheus is scraping the data, load localhost:9090/targets
in a browser and confirm that the status is "UP"
to see if the grafana data source can read correctly, start a new dashboard and add a graph with the query factorio_item_production_input
. the graph should render the total of every item produced in your game.