rodneymo / rig-monitor

monitoring solution for mining rigs
https://randomcryptostuff.blogspot.nl/2017/08/monitoring-ethereum-mining-farm-using.html
GNU General Public License v3.0
30 stars 12 forks source link

MODULE: ENV-MONITOR #50

Open wishbone1138 opened 6 years ago

wishbone1138 commented 6 years ago

We need to clean up the env module now that I'm looking at how to get smart things support into this. Our conf definitions are a bit confusing. It looks like you're calling out 0,1,2, but use actual text?

# PLUG_TYPE: 0 - disabled (default). 1 - TPLINK HS1110. 2 - SAMSUNG SMARTTHINGS (to be implemented) 
RIG_LIST=(
        'riglx01,sgminer,SUMO,,HASHVAULT,,192.168.1.98,6,0.004,0,TPLINK,192.168.1.74,1000,75'
        'riglx03,sgminer,SUMO,,HASHVAULT,,192.168.1.90,6,0.004,0,TPLINK,192.168.1.91,1000,75'
        'riglx04,sgminer,SUMO,,HASHVAULT,,192.168.1.93,6,0.004,0,TPLINK,192.168.1.94,1000,75'
)

Another question. Why are you tagging on POOL_LABEL_DCOIN. Wouldn't it make more sense to tag on the coin name? I'm using the same pool for both my coin and dcoin so it overwrites the same entry. If you have a specific need for pool name for your profit script, then I propose we add coin label as another tag.

rodneymo commented 6 years ago

We need to clean up the env module now that I'm looking at how to get smart things support into this. Our conf definitions are a bit confusing. It looks like you're calling out 0,1,2, but use actual text?

I just cleaned it up. I think using text for the plug types is less confusing and easier to read. See last commit

Another question. Why are you tagging on POOL_LABEL_DCOIN. Wouldn't it make more sense to tag on the coin name? I'm using the same pool for both my coin and dcoin so it overwrites the same entry. If you have a specific need for pool name for your profit script, then I propose we add coin label as another tag.

The reason for that is that there are cases in which one will mine the DCOIN on a different pool e.g. currently I am mining ETH on ethermine and SC on nano. If you do dual mining on nano then if you can use 2 labels e.g. NANO_ETH, NANO_SC for instance and define 2 mining pools in the POOL_LIST. This will also be required if you want to calculate profitability per POOL/CURRENCY combination

wishbone1138 commented 6 years ago

Gotcha, so "POOL_LABEL" in RIG_LIST and "LABEL" in POOL_LIST need to match? We probably need to call that out. I can't remember if I had another use for coin in env data, so I'll drop that idea for now.

Did you push that .conf file cleanup? I don't see it?

rodneymo commented 6 years ago

Sorry. Just uploaded latest version.

We could simplify and remove the COIN_LABEL, DCOIN_LABEL from the RIG definition. Those items are mapped to TAGS in the miner_system, but not used anywhere. They might come handy in the future if one has multiple rigs mining w/ same software but different altcoin forks e.g. ETH and EXPANSE

wishbone1138 commented 6 years ago

I guess we could use the pool_label/pool_label_dcoin instead? I use the coin_label for tables in grafana but there's no reason I couldn't use the pool labels instead, since I never really used them the way you intended. For now, I say we leave it. Gives us more flexibility and does make some sense.

I'll check out the conf file, I need to integrate my ST changes into env_monitor, so I was waiting to make sure we had a defined option in conf for that.