Metrics and Monitoring
Learn how to monitor your applications' performance and health.
Andasy provides a fully managed metrics service for monitoring application performance and health.
Metrics are numeric time-series values (for example CPU, memory, request rate, error rate). Unlike logs, metrics are designed to be:
- Aggregated across machines and time ranges
- Visualized in dashboards
- Used for threshold-based alerting
- Queried with Prometheus-compatible APIs
Andasy automatically collects metrics from deployed applications.
Components
The metrics stack includes:
- Metrics UI at metrics.andasy.io
- Prometheus-compatible time-series storage
- Automatic metric ingestion from Andasy apps
- Standard labels on published metrics (
app_name,org_id,machine_id)
Prometheus on Andasy.io
Andasy exposes a Prometheus-compatible querying surface, so you can use familiar PromQL workflows without managing your own Prometheus servers.
Supported API endpoints include:
/api/v1/query/api/v1/query_range/api/v1/series/api/v1/labels/api/v1/label/<label_name>/values/api/v1/status/tsdb/federate
Not supported:
Query Language
Queries use PromQL.
Query Endpoint
Send queries to:
https://metrics.andasy.io/
Authentication is required with a Bearer token:
- Header format:
Authorization: Bearer <TOKEN> - Get a token with
andasy auth token - Access is limited to applications in your organizations
Quick Start
TOKEN=$(andasy auth token)
curl https://metrics.andasy.io/api/v1/query \
--data-urlencode 'query=sum(increase(cpu_seconds_total)) by (app_name, org_id)' \
-H "Authorization: Bearer $TOKEN"
External or self-hosted Grafana
To use an existing Grafana instance:
- Add a Prometheus data source (Settings -> Data Sources -> Add data source -> Prometheus)
- Set
HTTP -> URLtohttps://metrics.andasy.io - Add a custom HTTP header:
Authorization: Bearer <token>
Standard Labels
All published metrics include labels for filtering and grouping:
app_name: application nameorg_id: organization identifiermachine_id: machine identifier
Common Use Cases
Monitor CPU Usage
TOKEN=$(andasy auth token)
curl https://metrics.andasy.io/api/v1/query \
--data-urlencode 'query=avg(cpu_usage_percent) by (app_name)' \
-H "Authorization: Bearer $TOKEN"
Track Request Rates
TOKEN=$(andasy auth token)
curl https://metrics.andasy.io/api/v1/query \
--data-urlencode 'query=rate(http_requests_total[5m]) by (app_name)' \
-H "Authorization: Bearer $TOKEN"
Monitor Memory Usage
TOKEN=$(andasy auth token)
curl https://metrics.andasy.io/api/v1/query \
--data-urlencode 'query=avg(memory_usage_bytes) by (app_name)' \
-H "Authorization: Bearer $TOKEN"
Related Documentation
- Logs - View application logs for detailed event information
- Apps - Manage your applications
- Prometheus Querying Basics - Learn PromQL for advanced queries