nanotools / nanonodemonitor Goto Github PK
View Code? Open in Web Editor NEWNano Node Monitor is a server-side PHP-based monitor for a Nano node.
License: GNU General Public License v3.0
Nano Node Monitor is a server-side PHP-based monitor for a Nano node.
License: GNU General Public License v3.0
When running nanomonitor I'm getting through the max allowed of 60 requests for unauthorized api attempts rather quickly, my guess is the version check when others are polling the nanonodemonitor api.
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 21
X-RateLimit-Reset: 1538819471
Number of delegators is not showing the real figure.
Any idea why I get these PHP errors after trying to run NNM?
[10-May-2020 14:24:02 UTC] PHP Fatal error: Uncaught Error: Call to undefined function json_decode() in /var/www/html/nanoNodeMonitor/modules/functions.php:134
Stack trace:
#0 /var/www/html/nanoNodeMonitor/modules/footer.php(33): getLatestReleaseVersion()
#1 /var/www/html/nanoNodeMonitor/modules/Cache.php(27): {closure}()
#2 /var/www/html/nanoNodeMonitor/modules/footer.php(35): Cache->fetch('footer-nano_3kw...', Object(Closure))
#3 /var/www/html/nanoNodeMonitor/index.php(43): include('/var/www/html/n...')
#4 {main}
thrown in /var/www/html/nanoNodeMonitor/modules/functions.php on line 134[10-May-2020 14:24:18 UTC] PHP Fatal error: Uncaught Error: Call to undefined function json_encode() in /var/www/html/nanoNodeMonitor/modules/functions_rpc.php:6
Stack trace:
#0 /var/www/html/nanoNodeMonitor/modules/functions_rpc.php(35): postCurl(Resource id #14, Array)
#1 /var/www/html/nanoNodeMonitor/api.php(36): getVersion(Resource id #14)
#2 /var/www/html/nanoNodeMonitor/modules/Cache.php(27): {closure}()
#3 /var/www/html/nanoNodeMonitor/api.php(186): Cache->fetch('api-nano_3kwppx...', Object(Closure))
#4 {main}
thrown in /var/www/html/nanoNodeMonitor/modules/functions_rpc.php on line 6
Most users lose hours about that, trying to fix it.
A node should be online always and usually has no funds, so it's 0 important.
Is it possible to fit everything in standard resolution on screen without having to scroll? I enjoy the new layout done by BitDesert, but it would be great to not have to scroll to see all the data.
Hi there,
I followed all the steps, and it all seem to be OK but the curl command which returns:
user@host:~$ curl -g -d '{ "action": "version" }' '127.0.0.1:7076'
curl: (7) Failed to connect to 127.0.0.1 port 7076: Connection refused
instead of
{ "rpc_version": "1", "store_version": "10", "node_vendor": "RaiBlocks 9.0" }
as it should have
what am I doing wrong?
please ignore
Looking for a HTML5 / CSS wizard to create a version of the phpNodeXRai node monitor webpage that is adapted to mobile.
Not sure why this is happening by my node has 13 delegators and is showing N/A.
Node Monitor: https://nanomakonode.com/
Delegators: https://nanocrawler.cc/explorer/account/nano_37ortkby6k68z8tkk8g63ndbp8wjbmofhn56oyxb4rm6s3x51pkpiwcnpgmq/history
I have several different nodes (Nano, Nano Beta, Banano) running on same host. I set up three Node Monitors (different directories, different hostnames etc).
But it seems that all 3 monitor using same directory and files for cache, and all 3 monitors are showing same data (for one of currencies/nodes, last updated).
I known that I may pass cache-dir
to cache options, but it seems not good. I think using currency as cache subdirectory is better solution.
2018/04/13 14:09:45 [error] 87735#87735: *11480 FastCGI sent in stderr: "PHP message: PHP Notice: Undefined variable: monitors in /var/www/html/monitor/modules/functions.php on line 189
PHP message: PHP Notice: Undefined property: stdClass::$ in /var/www/html/monitor/modules/functions.php on line 189
PHP message: PHP Notice: Trying to get property of non-object in /var/www/html/monitor/modules/functions.php on line 189" while reading response header from upstream, client: 98.188.54.10, server: 104.42.100.72, request: "GET /monitor/api.php HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.1-fpm.sock:", host: "rep.nanoisfast.com", referrer: "http://rep.nanoisfast.com/monitor/"
After a VPS hard restart, I noticed that the api.php
endpoint was returning a plain false
and my monitor was empty: https://imgur.com/bSiJiCq
However the node was running normally answering all rpc/cli requests and the config file of the monitor was in place, filled correctly.
I've got no cache set up, so as a quick fix I tried to comment out all the cache lines at the beginning of the api.php
file and return the $data
object directly to returnJson()
to finally get it up and running again.
I didnt have much time to further debug it, but I'll take a look at first chance.
Until then any thoughts are welcome...!
Backgrounds are not rendered properly on Chrome iOS. Safari iOS seems OK. This is on the head of "develop" branch. Live at http://138.197.179.164/
FYI @iamreyne
On the nano node monitor the nano addresses at the bottom of the screen are cut off. Cheers
The following response is happening a lot when frequently requesting a monitor url api.php.
The following happened 260 times out of 5700 (24h period). Requesting every 15 seconds.
<br />
<b>Warning</b>: usort() expects parameter 1 to be array, string given in <b>/var/www/html/api.php</b> on line <b>83</b><br />
<br />
<b>Warning</b>: Invalid argument supplied for foreach() in <b>/var/www/html/api.php</b> on line <b>88</b><br />
<br />
<b>Warning</b>: Cannot modify header information - headers already sent by (output started at /var/www/html/api.php:83) in <b>/var/www/html/modules/functions.php</b> on line <b>92</b><br />
<br />
<b>Warning</b>: Cannot modify header information - headers already sent by (output started at /var/www/html/api.php:83) in <b>/var/www/html/modules/functions.php</b> on line <b>93</b><br />
{"nanoNodeAccount":"nano_1eph1eg3c8wy1u8p3deq4r95cq5wxidy3ncjtr7q97fu7gzm8aotzfpdq9eso".....<the rest of the json>...
RPC command "account_info" works only with opened accounts, rep nodes work also if not opened but the monitor doesn't show it correctly.
Nanode is the main Nano explorer now. Looks as if the 'nano' option can be removed. Maybe nanode will be hosted within Nano.org!?
Additionally, https://creeper.banano.cc/ has become the main Banano explorer.
Node Monitor page does not show Node Location.
I would suggest adding a 'Location' field underneath 'Hostname' within the System Info table:
Table design would need to be adjusted to accommodate the extra row (and match the other two tables); however; I feel Node Location is a key piece of information that deserves a cemented listing.
To update and execute git pul it is instructed to switch to the Installation Directory. I'm not sure which directory that is. Any more specific directions?
Thanks
Shawn
Can be done via allowing a $googleAnalyticsId
var in config
Because api.php
doesn't offer any kind of caching layer between the public web and the node RPC, it would be pretty easy to overload the Nano node by DDoS'ing /api.php
.
At a quick glance, each run of api.php
makes 5 RPC calls, so even at a mild 200 requests per second to api.php, we're hitting the Nano RPC at 1000 times/second. I haven't tested it personally but that is a substantial load that I'm not sure it could handle. If you're able to gather even a portion of the nodes running nanoNodeMonitor, you could probably take down a nice chunk of the network via simple HTTP DDoS attacks.
nano_3eu3jaqanq35zhekqn86zr1kktsrzff9qx9gzzjidakf1oz61fumkptth817
I am new to this but had an idea that may be a good feature of the monitor to help decentralize the network for Nano - I have noticed that while the default monitor lists the wallet address it does have some room at the top of the page that could possibly accommodate a q.r. code also, With the Mobile wallets from Canoe and Nano coming out with QR scanner capabilities to change reps, It may not be a bad idea to incorporate showing the QR code for the Node to allow an easy way to help decentralize the network.
From apache error log:
[Mon Nov 05 14:09:44.727164 2018] [php7:notice] [pid 26610] [client 127.0.0.1:33190] PHP Notice: Trying to get property 'count' of non-object in /var/www/monitor/modules/functions.php on line 405
[Mon Nov 05 14:09:44.727263 2018] [php7:warn] [pid 26610] [client 127.0.0.1:33190] PHP Warning: Division by zero in /var/www/monitor/modules/functions.php on line 417
What I'm thinking is we could have an endpoint to permit anyone to process a block to the network, this way users of Nano we'll always have an access to it
something like : Accept 100 process block calls per day as a default setting
We can even go as far as open the generate work with the same vision
How it will be used ?
Randomly pick a node on mynano.ninja ask for work and process the block
it could be added to wallets this way, they will no longer have a point of failure
For exemple if the backend of Natrium go offline it will be a little problem, but if the wallet could back off to a random node it could be amazing
pending balance showing up as 0, even though it should be 10000 (with nano-beta explorer)
seeing " \u{3B2}NANO" instead of "βNANO"
Displaying blanks and zeros in every field.
... instead of keeping a fork at https://github.com/BananoTools/bananoNodeMonitor
Theme support will help a lot with that.
git clone https://github.com/dbachm123/phpNodeXRai.git . fatal: destination path '.' already exists and is not an empty directory.
Usually there are already files from nginx there, so better use a subfolder o update README.md
it shouldn't show system info if $nanoNodeRPCIP is different than the default, [::1]
Maybe I understand the load wrong but my show 1.7 but my server has a CPU load of 34%. Memory seems to be correct though.
[this part is solved]
Hey,
IPv6 doesn't work, if I put in
$nanoNodeRPCIP = '::1';
in the config.php file, it says node isn't running
I don't think my delegator count has updated in at least a week. I realize this is likely a Ninja issue, but wondering if there can be a config option to hit your own node on some frequency for the delegator RPC call? I know it's a heavy call so perhaps not on by default, but I would make the choice to have my node do it say every four hours.
Followed all at best knowledge, node and curl are working, also info.php and other test pages with php are working too.
the very first lines are not working:
<?php
// include config and functions
require_once($_SERVER["DOCUMENT_ROOT"] . '/modules/config.php');
require_once($_SERVER["DOCUMENT_ROOT"] . '/modules/functions.php');
?>
Solved. Came out that "modules" folder did not have 777 permissions.
It would be nice if the monitor could show a notification if the node is down as per Ninja standards (hasn't voted in 15 min I believe). This could look similar to the notification that's displayed if your node is not on the latest version.
Currently the favicon is being generated with the following HTML:
<link rel="icon" href="static/img/nano-mark-light.svg">
Note that while the SVG format for favicons is supported by Firefox, it is not supported by Chrome.
See https://caniuse.com/#feat=link-icon-svg.
The following screenshot shows Chrome tab on top, Firefox tab on bottom:
Please consider converting the favicon to PNG until browser support for SVG expands. Those of us who use Chrome for dev tools and keep a lot of tabs open would appreciate it. 👍
It would be great if, in addition to providing "Current Block" count, a third party like https://www.nanode.co/ could be contacted to get the total block count from servers that are up to date. Then an ongoing comparison could be shown, including percentage synced. See added red text in screenshot below.
Secondarily, if the current block count and total block count were both tracked over time they could be represented graphically and their relationship could be easily reasoned about. For example, it could be ascertained whether the local node would ever catch up with the current block count based on how fast the total block count is growing vs how fast the local node is processing blocks. Such graphs could also show spikes of transactions that may cause local node to fall behind temporarily. The data could be stored in LocalStorage of the browser.
As Nano continues to be adopted and more transactions appear on the network, it will become more and more likely that some nodes will fall behind and never reach the end of the current blockchain, thus halting all pending transactions to/from wallets controlled by the node. This will pose a problem for application layer services. Having graphical tools to help manage these situations will greatly improve devops experience.
Thanks for considering.
donating to a node works, but it just keeps showing "Waiting for payment", even after the payment has been made
I'm trying to change my account prefix to "nano_" to facilitate the name change. But it seems to break nodeNinja apis since it only recognizes "xrb_" for now. I'm wondering if you could add support for "nano_" so we can start to move away from "xrb_" and reduce confusion for newbies. Thanks!
We have lost the wiki entries mentioned in 'config.sample.php' when we have moved the Nano node monitor repo to nanotools:
https://github.com/nanotools/nanoNodeMonitor/wiki/Uptimerobot-Node-Monitoring
https://github.com/nanotools/nanoNodeMonitor/wiki/Social-Accounts
Is there a copy available somewhere? Links in 'config.sample.php' are dead now.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.