Quick Start Guide
1. Create Account
Start by creating your free account:
curl -X POST https://api.nestmonitor.com/v1/signup \
-H "Content-Type: application/json" \
-d '{"email": "your@email.com", "password": "securepassword"}'
2. Get API Key
Retrieve your API key from the dashboard:
const API_KEY = 'your_api_key_here';
3. Send First Metrics
Example Node.js monitoring agent:
const monitor = require('@network-monitor/client');
monitor.init({
apiKey: API_KEY,
serverName: 'production-web-01',
interval: 5000
});
API Reference
GET
/api/v1/metrics/{serverName}
Retrieve real-time metrics for a specific server
Parameters
serverName
- Name of the registered serverhistory
- Optional. Number of data points to return (max: 100)
curl -X GET \
-H "Authorization: Bearer $API_KEY" \
https://api.nestmonitor.com/v1/metrics/production-web-01
const response = await fetch(
'https://api.nestmonitor.com/v1/metrics/production-web-01',
{
headers: {
'Authorization': `Bearer ${API_KEY}`
}
}
);
import requests
response = requests.get(
'https://api.nestmonitor.com/v1/metrics/production-web-01',
headers={'Authorization': f'Bearer {API_KEY}'}
)
Response Sample
{
"server": "production-web-01",
"status": "online",
"metrics": {
"cpu": 24.5,
"memory": 68.3,
"network": {
"in": 145.6,
"out": 89.4
},
"timestamp": "2024-02-20T14:35:00Z"
}
}
Real-Time WebSocket API
Connect to our WebSocket endpoint for real-time updates:
const socket = new WebSocket('wss://api.nestmonitor.com/v1/realtime');
socket.addEventListener('open', () => {
socket.send(JSON.stringify({
type: 'auth',
apiKey: API_KEY,
serverName: 'production-web-01'
}));
});
socket.addEventListener('message', event => {
const data = JSON.parse(event.data);
// Handle real-time metrics
});
⚠️ Important Security Notes
- Always use wss:// protocol for secure connections
- Rotate API keys regularly via the dashboard
- Enable 2FA for production accounts
Premium Features
Advanced Analytics PRO PLAN+
Historical data retention up to 5 years
Custom Alerts TEAM PLAN+
Slack/Teams integration & SMS alerts