afex / graftorio Goto Github PK
View Code? Open in Web Editor NEWvisualize metrics from your factorio game in grafana
License: MIT License
visualize metrics from your factorio game in grafana
License: MIT License
I just have the home version of windows 10
there is a version of docker that is for old versions of windows so is there something specific that is needed of the version you are recommending or it is just won't work with the non-windows 10 pro
Second after starting up grafana and prometheus goes down... can You help me with that?
prometheus_1 | level=info ts=2018-06-26T20:16:01.658027853Z caller=main.go:225 fd_limits="(soft=1048576, hard=1048576)"
exporter_1 | time="2018-06-26T20:16:00Z" level=info msg=" - bcache" source="node_exporter.go:97"
exporter_1 | time="2018-06-26T20:16:00Z" level=info msg=" - bonding" source="node_exporter.go:97"
grafana_1 | GF_PATHS_DATA='/var/lib/grafana' is not writable.
prometheus_1 | level=info ts=2018-06-26T20:16:01.658545356Z caller=web.go:415 component=web msg="Start listening for connections" address=0.0.0.0:9090
prometheus_1 | level=info ts=2018-06-26T20:16:01.658534343Z caller=main.go:514 msg="Starting TSDB ..."
exporter_1 | time="2018-06-26T20:16:00Z" level=info msg=" - conntrack" source="node_exporter.go:97"
grafana_1 | You may have issues with file permissions, more information here: http://docs.grafana.org/installation/docker/#migration-from-a-previous-version-of-the-docker-container-to-5-1-or-later
exporter_1 | time="2018-06-26T20:16:00Z" level=info msg=" - cpu" source="node_exporter.go:97"
prometheus_1 | level=info ts=2018-06-26T20:16:01.658732121Z caller=main.go:402 msg="Stopping scrape discovery manager..."
prometheus_1 | level=info ts=2018-06-26T20:16:01.658752761Z caller=main.go:416 msg="Stopping notify discovery manager..."
grafana_1 | mkdir: cannot create directory '/var/lib/grafana/plugins': Permission denied
exporter_1 | time="2018-06-26T20:16:00Z" level=info msg=" - diskstats" source="node_exporter.go:97"
exporter_1 | time="2018-06-26T20:16:00Z" level=info msg=" - edac" source="node_exporter.go:97"
exporter_1 | time="2018-06-26T20:16:00Z" level=info msg=" - entropy" source="node_exporter.go:97"
exporter_1 | time="2018-06-26T20:16:00Z" level=info msg=" - filefd" source="node_exporter.go:97"
exporter_1 | time="2018-06-26T20:16:00Z" level=info msg=" - filesystem" source="node_exporter.go:97"
prometheus_1 | level=info ts=2018-06-26T20:16:01.658770945Z caller=main.go:438 msg="Stopping scrape manager..."
exporter_1 | time="2018-06-26T20:16:00Z" level=info msg=" - hwmon" source="node_exporter.go:97"
exporter_1 | time="2018-06-26T20:16:00Z" level=info msg=" - infiniband" source="node_exporter.go:97"
prometheus_1 | level=info ts=2018-06-26T20:16:01.658797604Z caller=manager.go:464 component="rule manager" msg="Stopping rule manager..."
exporter_1 | time="2018-06-26T20:16:00Z" level=info msg=" - ipvs" source="node_exporter.go:97"
prometheus_1 | level=info ts=2018-06-26T20:16:01.658814814Z caller=manager.go:470 component="rule manager" msg="Rule manager stopped"
exporter_1 | time="2018-06-26T20:16:00Z" level=info msg=" - loadavg" source="node_exporter.go:97"
exporter_1 | time="2018-06-26T20:16:00Z" level=info msg=" - mdadm" source="node_exporter.go:97"
prometheus_1 | level=info ts=2018-06-26T20:16:01.65882582Z caller=notifier.go:512 component=notifier msg="Stopping notification manager..."
prometheus_1 | level=info ts=2018-06-26T20:16:01.658827398Z caller=main.go:398 msg="Scrape discovery manager stopped"
prometheus_1 | level=info ts=2018-06-26T20:16:01.658848585Z caller=main.go:432 msg="Scrape manager stopped"
exporter_1 | time="2018-06-26T20:16:00Z" level=info msg=" - meminfo" source="node_exporter.go:97"
exporter_1 | time="2018-06-26T20:16:00Z" level=info msg=" - netdev" source="node_exporter.go:97"
exporter_1 | time="2018-06-26T20:16:00Z" level=info msg=" - netstat" source="node_exporter.go:97"
prometheus_1 | level=info ts=2018-06-26T20:16:01.658846641Z caller=main.go:412 msg="Notify discovery manager stopped"
exporter_1 | time="2018-06-26T20:16:00Z" level=info msg=" - nfs" source="node_exporter.go:97"
prometheus_1 | level=info ts=2018-06-26T20:16:01.658881873Z caller=main.go:588 msg="Notifier manager stopped"
exporter_1 | time="2018-06-26T20:16:00Z" level=info msg=" - nfsd" source="node_exporter.go:97"
exporter_1 | time="2018-06-26T20:16:00Z" level=info msg=" - sockstat" source="node_exporter.go:97"
exporter_1 | time="2018-06-26T20:16:00Z" level=info msg=" - stat" source="node_exporter.go:97"
exporter_1 | time="2018-06-26T20:16:00Z" level=info msg=" - textfile" source="node_exporter.go:97"
exporter_1 | time="2018-06-26T20:16:00Z" level=info msg=" - time" source="node_exporter.go:97"
prometheus_1 | level=error ts=2018-06-26T20:16:01.658920728Z caller=main.go:597 err="Opening storage failed lock DB directory: open /prometheus/lock: permission denied"
exporter_1 | time="2018-06-26T20:16:00Z" level=info msg=" - timex" source="node_exporter.go:97"
exporter_1 | time="2018-06-26T20:16:00Z" level=info msg=" - uname" source="node_exporter.go:97"
exporter_1 | time="2018-06-26T20:16:00Z" level=info msg=" - vmstat" source="node_exporter.go:97"
prometheus_1 | level=info ts=2018-06-26T20:16:01.658963384Z caller=main.go:599 msg="See you next time!"
exporter_1 | time="2018-06-26T20:16:00Z" level=info msg=" - wifi" source="node_exporter.go:97"
exporter_1 | time="2018-06-26T20:16:00Z" level=info msg=" - xfs" source="node_exporter.go:97"
prometheus_1 | 2018/06/26 20:16:01 grpc: addrConn.resetTransport failed to create client transport: connection error: desc = "transport: write tcp 127.0.0.1:60624->127.0.0.1:9090: write: connection reset by peer"; Reconnecting to {0.0.0.0:9090 <nil>}
exporter_1 | time="2018-06-26T20:16:00Z" level=info msg=" - zfs" source="node_exporter.go:97"
exporter_1 | time="2018-06-26T20:16:00Z" level=info msg="Listening on :9100" source="node_exporter.go:111"
graftorio_prometheus_1 exited with code 0
graftorio_grafana_1 exited with code 1
I run a grafana instance on another machine and would like to be able to send stats to that without hosting another database/grafana instance locally.
Is power output logged by this exporter? I was thinking about making some graphs of power used/generated per energy type and such.
If not, how hard do you think it would be to implement this?
Have a nice day!
Hello,
i just want to know if this project isn't maintain anymore or not
For people like me who never used grafana nor prometheus before it should be helpful if you added some of your queries that you used for the dashboard screenshot.
For instance, here's two of mine that are part of this panel:
rate(factorio_item_production_output{name="high-tech-science-pack"}[2m])*100
(factorio_item_production_output{name="high-tech-science-pack"} - (factorio_item_production_output{name="high-tech-science-pack"} offset 1m)) * (60 / 36)
The latter query has this weird factor to compensate for my reduced UPS (approximately 36 UPS instead of 60). But this is another issue.
@afex I can file a PR with some of my queries if you want
This is lovely, @afex! I was planning to write something like it for the Elastic stack. Would it be OK if I started with a fork of your work? I didn't see an explicit licence, so wanted to check with you.
Cheers.
I was a bit confused to find that factorio_item_production_input
stands for the items produced by your factory while factorio_item_production_output
denotes the items consumed. Is this intended?
My base is big enough that it runs only at 30 to 40 UPS. While in game production stats factor this in, graftorio (or prometheus and grafana) does not. Dumping stats every 600 ticks and have prometheus pick them up every 10s means that with UPS less than 60 oversampling happens. Graphs in grafana will show lower production stats with reduced UPS. This differs from the in game production graphs and you'll end up wondering what made your base output less items than usually even though it was perfectly fine!
I think the correct way to deal with this is to include the in-game time as timestamp
in the exposition .prom file: https://prometheus.io/docs/instrumenting/exposition_formats/
The timestamp is an int64 (milliseconds since epoch, i.e. 1970-01-01 00:00:00 UTC, excluding leap seconds), represented as required by Go's ParseInt() function.
If this is not possible one could also just dump the current tick value to the .prom file as its own metric. However this would require more complex queries in grafana and in my understanding the timestamp attribute is exactly what should be used here.
When using the timestamp value you can retrieve the in-game time using the prometheus timestamp()
function.
In addition to that I think dumping the current tick value or the current UPS would be an interesting metric for a dashboard, too!
This would also compensate for pauses and delays introduced by saving (and autosaves).
Another option might be to add metrics for "items per minute" instead of just the total amount and then having to calculate the rate yourself just as it is already done for YARM.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.