Monitoring
Custom Metrics
Send custom metrics to Argus via the SDK.
Overview
Beyond automatic system metrics, you can send any custom metric to Argus using the SDK or the ingest API directly.
Using the SDK
Python
client.ingest({
"host": "web-server-01",
"metrics": {
"http_request_count": 1847,
"http_error_rate": 0.02,
"response_time_p99": 245.5
},
"tags": {
"environment": "production",
"service": "api-gateway"
}
})Node.js
await client.ingest({
host: 'web-server-01',
metrics: {
http_request_count: 1847,
http_error_rate: 0.02,
response_time_p99: 245.5
},
tags: {
environment: 'production',
service: 'api-gateway'
}
});Using the API Directly
curl -X POST https://api.tryargus.cloud/api/v1/ingest \
-H "X-API-Key: your-api-key" \
-H "Content-Type: application/json" \
-d '{
"host": "web-server-01",
"metrics": {
"http_request_count": 1847,
"http_error_rate": 0.02
}
}'Best Practices
- Use consistent metric names across services
- Include relevant tags for filtering (environment, service, region)
- Keep collection intervals reasonable (30s-60s for most metrics)
- Use the SDK's built-in batching for high-frequency metrics