BIENVENUE10valid for the first month only! on all offersView plans
Skip to content
← Knowledge base

Monitor your service with Grafana & Prometheus

Deploy Prometheus, node_exporter and Grafana to collect, store and visualize your instance's metrics.

Monitor your service with Grafana & Prometheus

Prometheus collects and stores metrics (CPU, RAM, traffic), Grafana renders them in dashboards. The pair is the self-hosted observability standard.

Cause / The problem

Without monitoring, you discover outages when they hit: a full disk, saturated RAM, climbing latency. You must capture metrics continuously and visualize them to get ahead.

Solution

  1. Run Prometheus with this prometheus.yml:
    global:
      scrape_interval: 15s
    scrape_configs:
      - job_name: "node"
        static_configs:
          - targets: ["localhost:9100"]
  2. Start the stack with Docker:
    docker run -d -p 9090:9090 -v ./prometheus.yml:/etc/prometheus/prometheus.yml prom/prometheus
  3. Add node_exporter for system metrics (CPU, RAM, disk):
    docker run -d -p 9100:9100 --net=host prom/node-exporter
  4. Start Grafana:
    docker run -d -p 3000:3000 grafana/grafana
    Default login: admin / admin (change it immediately).
  5. Add Prometheus as a data source in Grafana: ConnectionsData sourcesAdd → type Prometheus, URL http://localhost:9090, then Save & test.
  6. Import a dashboard: DashboardsNewImport → enter ID 1860 (Node Exporter Full) and pick your Prometheus source.
  7. Set up an alert: in Alerting, create a rule (e.g. node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes < 0.1 for a RAM < 10% alert), then wire it to a contact point (email, webhook).

Put Grafana and Prometheus behind an HTTPS reverse proxy (see the dedicated article), and never expose them without authentication.

oneSubnet

French hosting provider in Paris. High-performance game and voice servers.

SERVICES

Resources

LEGAL

All systems operational