Observe /
View metrics
Northflank provides access to metrics from builds, deployments, addons, and job runs.
These metrics allow you to analyse builds and deployments to ensure your code is performant and without errors.
Metrics can be viewed by selecting a container or build in a Northflank service. You can also retrieve metrics using the Northflank API, CLI, and JavaScript client.
View metrics
Metrics are collected and displayed on a 15-second scale up until the container's termination. The metrics view live-tails the previous 30 minutes of data by default, you can select another time interval to view, or enter a custom range to see metrics from a precise period.
You can adjust the size and position of each graph according to your personal preferences.
Graphs can be enlarged up to three times, to take up the entire width of the metrics view, or decreased in size to take up 1/4 of the view.
You can also change the order of graphs by moving them right or left .
Container metrics can be viewed in:
- a combined or deployment service by selecting an entry from the containers list
- an addon by selecting an entry from the containers list
- a job by selecting an entry from the list of containers for a job run
Build metrics can be viewed in:
- a combined or build service by selecting an entry from the builds list
- a job that builds from a repository by selecting an entry from the builds list
Viewing metrics across all containers or builds in a service will show logs from:
- running and terminated containers deployed in a service
- CI tracking build progress across parallel builds
- parallel job runs triggered via cron schedule or API trigger
- database masters and replicas
Viewing metrics from all containers may take a moment to load.
You can use the drop-down menu next to the instance name to select another container to view, or choose to view logs from all containers combined.
The instance header contains contextual information about the build or instance selected. You can open the dropdown menu to view more details.
Types of metric
You can view a variety of different metrics related to container performance and demand.
Resources
You can view the CPU and memory usage for containers, which can help you identify bottlenecks or issues with your code. For example, you may notice CPU and memory usage spiking with increased traffic, which means you could increase the resources available to your containers, add more instances, or enable autoscaling to resolve it.
If your CPU and memory usage continues to increase, despite increasing the resources, it may indicate a problem with your code.
The volume capacity graph shows the usage of any persistent volumes associated with a service or addon. Only services with a persistent volume will display this graph, and addons will show the volume usage for the selected replica.
Networking
There are multiple graphs for different aspects of container networking:
- The network usage graph displays ingress and egress bandwidth
- The network requests graph shows the number of HTTP requests per second
- The opened TCP connections graph shows how many TCP connections are opened per second
- The network 4xx responses shows how many HTTP client error responses were returned by the container
- The network 5xx responses shows how many HTTP server error responses were returned by the container
These metrics can help you investigate various issues with your services. For example, if you see a lot of 5xx responses you may have a problem with a function in your code, or the server may be overloaded if you also see a spike in network requests.
Events
The events graph displays when a container was started and when it was terminated.
Next steps
View logs
View detailed, real-time logs from builds, deployments, and more.
Configure health checks
Monitor the uptime and success of your deployed services and builds to ensure your code runs correctly and is always available.
Scale your services
Increase the resources available to your services, and the number of instances to deploy.
Expose a deployment's port
Configure ports and security for your deployments.