Deploy Autometrics on Northflank

Published 29th December 2023

Autometrics is an open-source micro-framework for application monitoring built on Prometheus.

Highlights

  • Libraries in C#, Go, Java, JS, Python, and Rust
  • Automate PromQL queries
  • Visual explorer to investige performance, SLOs, and alerts
  • Function-level metrics
  • CLI to preview metrics locally
  • Slack integration

Stack

  • Prometheus deployment with persistent volume
  • Autometrics Explorer deployment

Getting Started

  1. Create an account on Northflank
  2. Click deploy Autometrics now
  3. (Optional) Enter your app ID and URL to begin monitoring an application with Prometheus
  4. Click deploy stack to save and run the Autometrics template
  5. Select the Autometrics Explorer service when the template run has finished
  6. Open the code.run domain to use your Autometrics service

You can now configure and use your Autometrics instance on Northflank! Prometheus data will be written to the persistent volume.

Prometheus configuration

Prometheus can be configured to listen to your application by providing the argument overrides for PROMETHEUS_APP_ID and PROMETHEUS_APP_URL. These populate the prometheus.yml secret file injected into the container:

scrape_configs:
  - job_name: ${PROMETHEUS_APP_ID}
    metrics_path: /metrics
    static_configs:
      - targets: ["${PROMETHEUS_APP_URL}"]
    scrape_interval: 15s

You can update the environment variables in the secret group and restart the Prometheus deployment for them to take effect, or edit the secret file in the Prometheus service to update the Prometheus configuration.

Next steps

Share this template with your network
X