bitlamas / xmrig-monitor

HTML XMRig Monitor for GPU & Proxy
GNU General Public License v3.0
9 stars 5 forks source link

Empty page #3

Closed minzak closed 6 years ago

minzak commented 6 years ago

I'm install nginx and made vhost with this code, edit variables.js ( same host - http://0.0.0.0:8080 ) And run it, but page is not dinamic, what wrong? capture

P.S. also nee favicon.ico in root folder. /var/log/nginx/error.log

2018/05/15 00:46:13 [error] 5180#5180: *1 open() "/opt/xmrig-monitor/favicon.ico" failed (2: No such file or directory), client: 192.168.100.7, server: localhost, request: "GET /favicon.ico HTTP/1.1", host: "192.168.100.4", referrer: "http://192.168.100
.4/"
bitlamas commented 6 years ago

The browser is just complaining it didn't find any favicon.ico in the root folder, which is strange because I state in the header that the favicon is a PNG file to be located in the media folder. I think you can safely ignore this error.

From what I can see in the page, http://0.0.0.0:8080 doesn't return your API endpoint, does it? In the same browser, if you enter this address, do you get the JSON result file?

minzak commented 6 years ago

Yes, on local 0.0.0.0 works miner, but acces it on external interface, 192.168.1.2, and i see all data in json style. Also here is work nginx with this code, and i can use 192.168.1.2 on 80 or 8080 port, bur your code not dinamic.

bitlamas commented 6 years ago

The code is pretty simple, it requests via JavaScript the JSON file from your API endpoint address. So you need to be sure the same machine running the monitor CAN access the API endpoint (result in JSON) and you should use that same address in your variables.js file.

Can you "inspect" the browser and tell me if there are any JavaScript errors in your console? You can paste them here.

shigutso commented 6 years ago

@bizlevel change from 0.0.0.0:8080 to 127.0.0.1:8080

0.0.0.0 is not a valid IP address, it's just for xmrig's config

minzak commented 6 years ago

Yes, i understood, this code can't work as backend ! To hem need that API works on external interface and put real external IP, not internal. It is mean, that i can't close my API to 127.0.0.1 and use only monitor outside. Need all service be run outside. untitled

When in config i put 192.168.1.2 - all is work.

It is possible to make work as background?

P.S. Try to make monitor for several RIGs. not just for one PC with one CPU, one or several GPU.

bitlamas commented 6 years ago

If you want to use the monitor to check your rig that is in another network (external monitoring) then I recommend the following:

These are extra steps that you can take so you can monitor externally. The monitor is really just an easy, HTML front-end monitor.

minzak commented 6 years ago

Thanks. All is it i know. But i mean, this soft can't recognise several host, in config just one )

shigutso commented 6 years ago

oh, you want to monitor multiple rigs

I don't think this is possible with the current code, you'll need to use one page per rig, and then you can get multiple pages together using iframes

minzak commented 6 years ago

yes, several hosts. iframes - no best way.

shigutso commented 6 years ago

are the hosts CPU only? or GPU rigs? if only CPU, you may want to take a look at xmrigCC, which has what you are looking for

https://github.com/Bendr0id/xmrigCC