← Back to Changelog

12th May 2023

Introducing Infrastructure Alerts and Logs & Metrics via CLI/API

We are pleased to release a handful of highly requested features for monitoring, diagnosing, and optimising production workloads on Northflank. Highlights include infrastructure alerts for container restarts and volume usage, as well as access to logs and metrics via the API and CLI.

Infrastructure Alerts:

Users will now receive alerts when a container crashes or is evicted. Additionally, users can enable volume usage alerts to receive notifications when addon or service persistent disks hit 75% or 90% volume usage. These alerts can be integrated into users’ existing notifications so they can be kept up to date via Slack, Webhooks, and Discord. This will help users pre-emptively respond to database storage limits and OOM crashes.

Learn how to setup alerts.

Northflank Infrastructure alerts: CPU, memory, volume usage

Logs via CLI, API, and JS Client

At Northflank, we are committed to letting our users choose between a GUI and a CLI for ultimate flexibility. In our continuing efforts to deliver parity across these experiences, we’re excited to introduce log search and tailing via CLI, API, and JS Client.

Log retrieval endpoints have been added to the API to make it possible to fetch logs programmatically through HTTP requests or WebSockets. Users can now:

  • Fetch a range of logs within a time window or stream logs live as they are generated (log tailing).
  • Apply filters including time constraints, text, and regex.
  • Fetch logs from multiple service, job, or addon containers and filter at container level.
  • Quickly copy a CLI query from the logs dashboard to get started.

Learn how to programmatically search and stream logs using the API and Websockets.

Metrics via CLI, API, and JS Client

We have also added metrics querying and graphing via CLI, API, and JS client. This enables users to:

  • Fetch metrics at a single point in time or within a specified time window.
  • Fetch different types of metrics or multiple metrics at once.
  • Fetch metrics from multiple service or job containers or filter on container level.

Northflank cli showing metrics usage of a container

CLI and JS Client Releases

Update versions with: npm i -g @northflank/cli or npm i -g @northflank/js-client

  • CLI (v0.9.9) and js-client (v0.7.9) release:
    • CLI dynamic container selection for logs and metrics endpoint if –containerId is specified
    • CLI pagination support for dynamic domain and registry selection
    • js-client exec methods return proper command result object when exit is not zero
    • js-client fix of improper handling of falsy optional arguments for log and metrics endpoints

Have feedback, questions, or suggestions? Please reach out through our contact page or other direct channels. We’d love to hear from you!

To stay up to date on everything new at Northflank be sure to follow us on Twitter and LinkedIn.

Share this article with your network