system_health - Kusama RPC Method
Check node health on Kusama. Essential for monitoring and load balancing.
Returns the health status of the Kusama node.
Use Cases
- Health checks - Monitor node availability
- Load balancing - Route traffic based on health for parachain experimentation, early feature deployment, and production-grade testing with real value
- Sync status - Verify node is synced
Request Parameters
This method accepts no parameters.
Response Body
Connected peer count
Whether node is syncing
Whether node should have peers
Code Examples
curl \
-X POST \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "system_health",
"params": [],
"id": 1
}'import { ApiPromise, WsProvider } from '@polkadot/api';
const provider = new WsProvider('');
const api = await ApiPromise.create({ provider });
const health = await api.rpc.system.health();
console.log('Peers:', health.peers.toNumber());
console.log('Is syncing:', health.isSyncing.isTrue);
await api.disconnect();import requests
def get_health():
url = ''
payload = {
'jsonrpc': '2.0',
'method': 'system_health',
'params': [],
'id': 1
}
response = requests.post(url, json=payload)
return response.json()['result']
health = get_health()
print(f"Peers: {health['peers']}")
print(f"Syncing: {health['isSyncing']}")Related Methods
system_version- Get node versionsystem_chain- Get chain name