Monitor
The nanoctl monitor
command provides real-time visibility into your Blok applications through a metrics dashboard. It offers both terminal-based and web-based interfaces, allowing you to monitor application performance, request counts, error rates, and resource usage.
This powerful observability tool connects to Prometheus metrics, making it easy to track the health and performance of your bloks whether they’re running locally or deployed to the cloud.
Monitor Blok Metrics
Syntax
Displays real-time metrics for your Blok application.
Options
Option | Type | Description | Default |
---|---|---|---|
--web | boolean | Launch web-based dashboard instead of terminal UI | false |
--host | string | Prometheus server URL | Local Prometheus URL |
--token | string | Bearer token for authenticated Prometheus access | None |
--help | boolean | Show help | false |
Examples
Monitor with Terminal UI (Local Development)
Monitor with Web Dashboard (Local Development)
Connect to Public Prometheus Instance
Connect to Private Prometheus Instance with Authentication
Setting Up Local Monitoring Environment
To use the monitor command with a local project:
-
Create a new project if you don’t have one:
-
Start the local observability stack:
-
Run your nanoservice application with docker:
-
Launch the monitor:
Monitoring Cloud Deployments
After deploying your nanoservice to Deskree Cloud:
-
Retrieve the Prometheus URL from your deployment information.
-
Generate an access token from https://atomic.deskree.com.
-
Run the monitor with the cloud Prometheus URL:
Key Metrics Displayed
The monitor dashboard displays several important metrics:
- Request counts by endpoint
- Response times
- Error rates
- Resource usage per module
- Historical trends (web UI only)
These metrics help you identify bottlenecks, troubleshoot issues, and optimize your nanoservice performance.