Giter Club home page Giter Club logo

factorystatsd's People

Contributors

astraluma avatar ccbrown avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

factorystatsd's Issues

Add Tick Count To Samples

It would be useful to add the game.ticks_played value to the samples, so that metrics can be correlated with in-game time rather than wall time (to minimize the workarounds needed to analyze performance over periods of non-play).

Blank sample file

Until I tried enabling the "Treat absent signals as 0" setting, the contents of the samples file was nearly empty.

cat factorystatsd-samples.json
{"entities":{}}%    

However, after enabling it, there were entities which were not 0:

cat factorystatsd-samples.json
{"entities":[{"settings":{"name":"","tags":"","absent_signals":"treat-as-0"},"red_signals":[{"signal":{"type":"virtual","name":"signal-T"},"count":4299},{"signal":{"type":"virtual","name":"signal-X"},"count":123327},{"signal":{"type":"virtual","name":"signal-Y"},"count":123336},{"signal":{"type":"virtual","name":"signal-Z"},"count":3879},{"signal":{"type":"item","name":"coal"},"count":3},{"signal":{"type":"item","name":"iron-ore"},"count":13},{"signal":{"type":"item","name":"copper-ore"},"count":6},{"signal":{"type":"item","name":"copper-plate"},"count":11},{"signal":{"type":"item","name":"steel-plate"},"count":2},{"signal":{"type":"item","name":"electronic-circuit"},"count":1},{"signal":{"type":"item","name":"flying-robot-frame"},"count":1},{"signal":{"type":"item","name":"rocket-control-unit"},"count":2}]},{"settings":{"name":"","tags":"","absent_signals":"treat-as-0"},"green_signals":[{"signal":{"type":"fluid","name":"crude-oil"},"count":9},{"signal":{"type":"fluid","name":"sulfuric-acid"},"count":4},{"signal":{"type":"fluid","name":"lubricant"},"count":2},{"signal":{"type":"item","name":"coal"},"count":-1},{"signal":{"type":"item","name":"stone"},"count":1},{"signal":{"type":"item","name":"iron-ore"},"count":-11},{"signal":{"type":"item","name":"copper-ore"},"count":-6},{"signal":{"type":"item","name":"uranium-ore"},"count":2},{"signal":{"type":"item","name":"iron-plate"},"count":6},{"signal":{"type":"item","name":"copper-plate"},"count":-11},{"signal":{"type":"item","name":"steel-plate"},"count":-1},{"signal":{"type":"item","name":"plastic-bar"},"count":9},{"signal":{"type":"item","name":"sulfur"},"count":6},{"signal":{"type":"item","name":"battery"},"count":3},{"signal":{"type":"item","name":"electronic-circuit"},"count":6},{"signal":{"type":"item","name":"advanced-circuit"},"count":18},{"signal":{"type":"item","name":"processing-unit"},"count":4},{"signal":{"type":"item","name":"flying-robot-frame"},"count":-1},{"signal":{"type":"item","name":"rocket-control-unit"},"count":-1},{"signal":{"type":"item","name":"low-density-structure"},"count":2},{"signal":{"type":"item","name":"rocket-fuel"},"count":7},{"signal":{"type":"item","name":"automation-science-pack"},"count":2},{"signal":{"type":"item","name":"logistic-science-pack"},"count":1},{"signal":{"type":"item","name":"military-science-pack"},"count":1},{"signal":{"type":"item","name":"chemical-science-pack"},"count":2},{"signal":{"type":"item","name":"utility-science-pack"},"count":2}]},{"settings":{"name":"","tags":"","absent_signals":"treat-as-0"},"green_signals":[{"signal":{"type":"virtual","name":"signal-T"},"count":4299},{"signal":{"type":"virtual","name":"signal-X"},"count":123327},{"signal":{"type":"virtual","name":"signal-Y"},"count":123336},{"signal":{"type":"virtual","name":"signal-Z"},"count":3879},{"signal":{"type":"fluid","name":"crude-oil"},"count":9},{"signal":{"type":"fluid","name":"sulfuric-acid"},"count":4},{"signal":{"type":"fluid","name":"lubricant"},"count":2},{"signal":{"type":"item","name":"coal"},"count":2},{"signal":{"type":"item","name":"stone"},"count":1},{"signal":{"type":"item","name":"iron-ore"},"count":2},{"signal":{"type":"item","name":"uranium-ore"},"count":2},{"signal":{"type":"item","name":"iron-plate"},"count":6},{"signal":{"type":"item","name":"steel-plate"},"count":1},{"signal":{"type":"item","name":"plastic-bar"},"count":9},{"signal":{"type":"item","name":"sulfur"},"count":6},{"signal":{"type":"item","name":"battery"},"count":3},{"signal":{"type":"item","name":"electronic-circuit"},"count":7},{"signal":{"type":"item","name":"advanced-circuit"},"count":18},{"signal":{"type":"item","name":"processing-unit"},"count":4},{"signal":{"type":"item","name":"rocket-control-unit"},"count":1},{"signal":{"type":"item","name":"low-density-structure"},"count":2},{"signal":{"type":"item","name":"rocket-fuel"},"count":7},{"signal":{"type":"item","name":"automation-science-pack"},"count":2},{"signal":{"type":"item","name":"logistic-science-pack"},"count":1},{"signal":{"type":"item","name":"military-science-pack"},"count":1},{"signal":{"type":"item","name":"chemical-science-pack"},"count":2},{"signal":{"type":"item","name":"utility-science-pack"},"count":2}]}]}%

The sample file disappears immediately after being written, which I assume means it got forwarded. I haven't seen any factorio metrics show up yet but I'm unsure if that's a separate problem.

Grafana

Thank you for great mod.

It also work perfectly with free grafana cloud and grafana agent
here is a simple config:

  log_level: debug

metrics:
  wal_directory: C:\ProgramData\grafana-agent-wal
  global:
    scrape_interval: 60s
    remote_write:
    - url: https://prometheus-prod-24-prod-eu-west-2.grafana.net/api/prom/push 
      basic_auth:
        username: FILL ME
        password: FILL ME
  configs:
  - name: default
    remote_write:
    - url: https://prometheus-prod-24-prod-eu-west-2.grafana.net/api/prom/push
      basic_auth:
        username: FILL ME
        password: FILL ME
integrations:
  statsd_exporter:
    enabled: true
    scrape_integration: true
    scrape_interval: 30s

image

Surface names

As a follow-up to #6, I want to discuss what is a good way to include surface names?

I'm guessing the utility of it will vary by modpack. Eg, super great for space exploration, maybe not so great for factorissimo.

But at least for our use case, where we're writing a custom collector and playing space exploration, the name would be pretty nice to have.

@ccbrown, do you have opinions on this?

Add Unit Number To Samples

It would be useful to add the entity.unit_number field to the samples, maybe as a tag (a lot of analysis systems can use the entity_id=<id> tag to separate otherwise identical metrics)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.