Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refined power metrics #21

Open
ben-thul opened this issue Nov 25, 2022 · 4 comments
Open

Refined power metrics #21

ben-thul opened this issue Nov 25, 2022 · 4 comments

Comments

@ben-thul
Copy link

Is it possible to get all of the information that's available in the in-game power dashboard through grafana? For example, I see that I can get per entity type (e.g. 'radar', 'pumpjack') consumption stats, but do I detect an underpower situation? The in-game dashboard will show XW/YW (hopefully X=Y).

Similarly, I can see the power being produced on a per entity type (e.g. 'solar panel', 'steam turbine') but how do I detect if I'm getting close to not producing enough to satisfy demand? The in-game dashboard shows maximum production capacity for a given network in addition to how much is currently being used.

Rounding out what I see in the in-game dashboard but cannot find in the grafana metrics is accumulator charge statistics. I see how much power is being consumed/produced by them, but not charge over time.

Having these would be useful in preventing and detecting power issues. Thanks for everything so far!

@Kariton
Copy link
Contributor

Kariton commented Dec 11, 2022

you mean like this?

Consumption

sum by (name) (rate(factorio_power_production_input[$__rate_interval]))

Production

sum by (name) (rate(factorio_power_production_output[$__rate_interval]))

It totally is.
You might want to have a look at #11

@ben-thul
Copy link
Author

I don't think it is. Comparing what comes out of those queries with what is shown in the in game dashboard, it looks like what those bring back is what is currently being produced, not what is capable of being produced. For example, in my current game I am producing 768 MW but am capable of producing 1.2 GW (see screenshot). Both numbers are interesting.
image

@Kariton
Copy link
Contributor

Kariton commented Dec 12, 2022

Oh - I misunderstood you at some point.

Yeah, a "capable of production" metric is indeed missing.
As well as accumulator charge. Both would be extremely helpful.

I have a graph were I tried to "see" power issues.
Haven't verified yet that I could actually see power outages.

sum(rate(factorio_power_production_output[$__rate_interval]))) - (
    sum(rate(factorio_power_production_input[$__rate_interval])

image

Maybe it would not fluctuate that way or something.

@ben-thul
Copy link
Author

In my ideal, I'd be able to set up a dashboard panel with production potential minus consumption and, when that's within some threshold (whether that's percentage-based or something like "less than half the output of a solar power city block"), that would be signal to address what is about to be a power issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants