This is a simple demonstration of how to use our RPC monitoring tool to effectively monitor the health of any EVM RPC endpoint (such as Ethereum, Polygon, etc). For this demonstration, we've copied a simple NextJS blog web application that will collect your RPC monitoring data every time it's visited.
Please follow these steps:
- Go to RPC monitoring tool and connect your wallet
- Click the
Create monitoring
button and create a new RPC monitoring entity - Copy and paste the NextJS script generated at the bottom of the web page
- In the copy-pasted script replace
const RPC_URL = "YOUR_RPC_PROVIDER_URL_HERE"
with the URL of the RPC endpoint you want to monitor. If you don't have an endpoint, you can use our Ethereum mainnet test endpoint for this demonstration. For example, the updated line can look like thisconst RPC_URL = "https://api.noderpc.xyz/rpc-mainnet/2ab6fa32d9c7d78cc06ca652490"
- Clone this github repo into your local folder:
git clone git@github.com:xivanc/monitoring_tutorial.git
- In your local folder, in the
pages/_app.tsx
file, paste your modified script below the<Head>
component - Install the dependencies and run the web page locally:
yarn install; yarn dev -p 3000
- Refresh your localhost page
http://localhost:3000/
once a minute. Do this several times to simulate some traffic so that monitoring data can be collected - Go back to the monitoring tool where you should be able to see health statistics of your EVM RPC endpoint