simplecrypto / powerpool

A Python gevent driven stratum mining server
BSD 2-Clause "Simplified" License
48 stars 71 forks source link

issue in powerpool/monitor.py #116

Closed museack closed 9 years ago

museack commented 9 years ago
class ServerMonitor(Component, WSGIServer):
    """ Provides a few useful json endpoints for viewing server health and
    performance. """
    # Use our custom wsgi handler
    handler_class = CustomWSGIHandler
    defaults = dict(address="127.0.0.1",
                    port=3855,
                    JSON_SORT_KEYS=False,
                    JSONIFY_PRETTYPRINT_REGULAR=False,
                    DEBUG=False)

The address & port values are hard-coded in monitor.py. I'm trying to run powerpool and simplecoin_multi on two separate hosts... the settings in config.yml are not overridding the values set here.

ericecook commented 9 years ago

The code section you've posted is a default. The config settings do override the monitor (we're running about 8 instances on simplemulti), please make sure your config file is getting used/loaded in.

If it is a configuration issue I'm happy to take a look - but it is probably better to handle those sorts of issues on our mailing list - https://groups.google.com/forum/#!forum/simplecrypto-dev

museack commented 9 years ago

I think I may understand my issue... The example config shows:

#MON:
    #address: "127.0.0.1"
    # Default port. This gets ofset
    #port: 3855
    # Whether or not to sort + pretty print the JSON output.
    #JSON_SORT_KEYS: False
    #JSONIFY_PRETTYPRINT_REGULAR: False
    # Use DEBUG output
    #DEBUG: False

####### Monitor config example #######
MON:
    type: powerpool.monitor.ServerMonitor

That's how I built my config,2 separate sections. Thought it looked weird.
I'm guessing that this needs to be all together:

MON: type: powerpool.monitor.ServerMonitor address: "my.ip.address" port: 3855 etc.... ?

ericecook commented 9 years ago

Yea, I believe you can only set one monitor per PowerPool instance

icook commented 9 years ago

Your top section is that you gave is all commented out, so it's doing nothing...

For support please email the mailing list instead.