ytx1991 / ChiaMonitor

An approach for monitoring multiple Chia harvester in one web app based dashboard
150 stars 41 forks source link

No data in dashboard #3

Closed unintended-consequences closed 3 years ago

unintended-consequences commented 3 years ago

Followed instructions for installation.

Am running harvester and full node / dashboard on same host to test.

I used SCREEN to keep run_mtail.sh in the background.

Have imported JSON but all the graphs show "No data".

Apologies - first time with Grafana / Prometheus.

Suspect mtail is not running. Have reviewed run_mtail.sh and I note that when I try to execute at the prompt ./mtail I receive a "command not found" response.

iwex commented 3 years ago

Hey! There some errors in run_mtail, watch command doesn't allow to run mtail in a single sh file. I made some scripts for my own harvesters - you can check it here https://github.com/iwex/chiascripts/blob/main/monitoring/init.sh You can copy it, but change paths to your own values.

ytx1991 commented 3 years ago

If you are using ssh, make sure run the command with nohup. e.g. nohup ./run_mtail.sh &

Also make sure the mtail binary file has right permission to execute. It requires 3.0.0 rc45 version.

ytx1991 commented 3 years ago

You can check your farmer host 9090 port first. It should show the Prometheus portal and you should be able to query the data like total_plots

iwex commented 3 years ago

Also, you can check http://ptometheus_ip:9090/metrics and find your chia services

cattivik66 commented 3 years ago

I have pretty much the same issue, probably some kind of configuration is missing. http://chiafarmer:9090/targets can be reached, and shows two targets up (chia and prometheus endpoints up).

Second thing is the run_mtail.sh script: The first line watch -n 30 ~/chia-blockchain/venv/bin/chia farm summary prevents executing the second line ./mtail --progs ./ --logs .chia/mainnet/log/debug.log --logs .chia/mainnet/log/farmer_summary.log --poll_interval 3000ms

In addition, I see mtail needs to look at ~/.chia/mainnet/log/farmer_summary.log but this file does not exists. So I opened two screen session and executed on the first one watch -n 30 ~/chia-blockchain/venv/bin/chia farm summary > .chia/mainnet/log/farmer_summary.log and on the second ./mtail --progs ./ --logs .chia/mainnet/log/debug.log --logs .chia/mainnet/log/farmer_summary.log --poll_interval 3000ms

In that way I have the grafana dashboard partially working: I have total plots, challenges per harvester, etc but missing earned xch, expected xch, netspace, etc

So I think we need to change something on the config.yaml of chia to generate ~/.chia/mainnet/log/farmer_summary.log That could be the logging option under full_node.

unintended-consequences commented 3 years ago

Hey! There some errors in run_mtail, watch command doesn't allow to run mtail in a single sh file. I made some scripts for my own harvesters - you can check it here https://github.com/iwex/chiascripts/blob/main/monitoring/init.sh You can copy it, but change paths to your own values.

This helped a lot. For anyone else, you need to change paths in EVERY script in the repository AND change the user in watch-farmer.service too!

VercauterenK commented 3 years ago

I have pretty much the same issue, probably some kind of configuration is missing. http://chiafarmer:9090/targets can be reached, and shows two targets up (chia and prometheus endpoints up).

Second thing is the run_mtail.sh script: The first line watch -n 30 ~/chia-blockchain/venv/bin/chia farm summary prevents executing the second line ./mtail --progs ./ --logs .chia/mainnet/log/debug.log --logs .chia/mainnet/log/farmer_summary.log --poll_interval 3000ms

In addition, I see mtail needs to look at ~/.chia/mainnet/log/farmer_summary.log but this file does not exists. So I opened two screen session and executed on the first one watch -n 30 ~/chia-blockchain/venv/bin/chia farm summary > .chia/mainnet/log/farmer_summary.log and on the second ./mtail --progs ./ --logs .chia/mainnet/log/debug.log --logs .chia/mainnet/log/farmer_summary.log --poll_interval 3000ms

In that way I have the grafana dashboard partially working: I have total plots, challenges per harvester, etc but missing earned xch, expected xch, netspace, etc

So I think we need to change something on the config.yaml of chia to generate ~/.chia/mainnet/log/farmer_summary.log That could be the logging option under full_node.

I have the same problem did you managed to fix it?

VercauterenK commented 3 years ago

Hey! There some errors in run_mtail, watch command doesn't allow to run mtail in a single sh file. I made some scripts for my own harvesters - you can check it here https://github.com/iwex/chiascripts/blob/main/monitoring/init.sh You can copy it, but change paths to your own values.

This helped a lot. For anyone else, you need to change paths in EVERY script in the repository AND change the user in watch-farmer.service too!

Hi,

Did you fix the missing data like earned xch, expected xch, netspace, etc I can't get that part running