Skip to content

Simple guide · Overview

Page status: Active

Grafana Cloud Backup Monitoring

NutsNews uses Grafana Cloud Explore and Prometheus/PromQL to inspect home-server backup metrics before turning them into a dashboard.

Visual overview

Primary diagram

System map

NutsNews uses Grafana Cloud Explore and Prometheus/PromQL to inspect home-server backup metrics before turning them into a dashboard.

Render the repository-owned system map when you need it.

Diagram is not rendered yet.

View as text
Grafana Cloud Backup Monitoring

NutsNews uses Grafana Cloud Explore and Prometheus/PromQL to inspect home-server backup metrics before turning them into a dashboard.

flowchart TB
  accTitle: Grafana Cloud Backup Monitoring
  accDescr {
    NutsNews uses Grafana Cloud Explore and Prometheus/PromQL to inspect home-server backup metrics before turning them into a dashboard.
  }
  A["Grafana Cloud Backup Monitoring"] --> B["GRAFANA_BACKUP_MONITORING.md"]
  B --> C["Auto-generated placeholder diagram"]

Grafana Cloud Backup Monitoring

Fullscreen diagram view.

NutsNews uses Grafana Cloud Explore and Prometheus/PromQL to inspect home-server backup metrics before turning them into a dashboard.

This guide documents the backup-monitoring work for the home server named:

chingadera

Prometheus data source in Grafana Cloud:

grafanacloud-kindcantaloupe2036-prom

Confirmed backup metric:

home_server_backup_last_success

Confirmed label set:

instance="chingadera"
job="integrations/unix"

Confirmed result during setup:

home_server_backup_last_success{instance="chingadera", job="integrations/unix"} = 1

Result meaning:

1 = last backup succeeded
0 = last backup failed

The home server now has several operational responsibilities:

  • Runs the local AI service for NutsNews.
  • Hosts Ollama/qwen for local article review.
  • Runs through Cloudflare Tunnel at ai.nutsnews.com.
  • Provides live stats to the protected NutsNews admin page.
  • Needs reliable backup visibility so recovery is not a guessing game.

The Grafana backup dashboard should answer four simple questions:

When was the last backup?
Did the last backup succeed?
How many backups are available now?
When is the next backup expected?

  1. Open Grafana Cloud.
  2. Go to Explore.
  3. Select the Prometheus data source:
grafanacloud-kindcantaloupe2036-prom
  1. Use the query editor.
  2. Switch from Builder mode to Code mode when writing raw PromQL.
  3. Paste a query.
  4. Click Run query or press Shift + Enter.

Useful view modes:

ModeWhen to use it
TableBest for one current value
GraphBest for history over time
BothGood while testing a new query

Before building panels, discover every backup metric being scraped:

{__name__=~"home_server_backup_.*", instance="chingadera", job="integrations/unix"}

Use this first because metric names may evolve as the backup script grows.

Expected backup metrics may include names like:

home_server_backup_last_success
home_server_backup_last_run_timestamp_seconds
home_server_backup_last_success_timestamp_seconds
home_server_backup_available_count
home_server_backup_next_run_timestamp_seconds

Only build dashboard panels from metrics that actually return data in Explore.


Use this query for a stat panel:

home_server_backup_last_success{instance="chingadera", job="integrations/unix"}

Panel setup:

SettingValue
VisualizationStat
TitleLast Backup Success
UnitNone
Value mapping1Success
Value mapping0Failed
ThresholdGreen for 1, red for 0

This is the first confirmed working backup query.


Use this while troubleshooting or building an alert:

home_server_backup_last_success{instance="chingadera", job="integrations/unix"} == 0

If this returns a series, the last backup failed.


Use this while validating the exporter:

home_server_backup_last_success{instance="chingadera", job="integrations/unix"} == 1

If this returns a series, the last backup succeeded.


If the exporter provides a Unix timestamp metric, use:

home_server_backup_last_run_timestamp_seconds{instance="chingadera", job="integrations/unix"}

Panel setup:

SettingValue
VisualizationStat
TitleLast Backup Time
UnitDate & time
Query typeInstant

If the metric exists but the unit looks wrong, confirm whether the value is seconds or milliseconds. Prometheus timestamp metrics should normally be seconds.


If the exporter tracks the last successful backup separately, use:

home_server_backup_last_success_timestamp_seconds{instance="chingadera", job="integrations/unix"}

Panel setup:

SettingValue
VisualizationStat
TitleLast Successful Backup
UnitDate & time
Query typeInstant

This is better than last-run time because a failed run may be recent while the last successful backup may be old.


If home_server_backup_last_success_timestamp_seconds exists, use this to show how stale the latest successful backup is:

time() - home_server_backup_last_success_timestamp_seconds{instance="chingadera", job="integrations/unix"}

Panel setup:

SettingValue
VisualizationStat or Gauge
TitleBackup Age
UnitSeconds, then display as duration
Threshold ideaGreen under 24h, amber over 24h, red over 48h

This panel is often more useful than the raw backup time because it immediately answers whether the backup is fresh.


Use the exact metric name exported by the backup script.

Preferred query if the metric exists:

home_server_backup_available_count{instance="chingadera", job="integrations/unix"}

Alternative if the exporter uses a shorter name:

home_server_backup_count{instance="chingadera", job="integrations/unix"}

Panel setup:

SettingValue
VisualizationStat
TitleBackups Available
UnitNone
Query typeInstant
Threshold ideaRed at 0, amber at 1, green at 2+

If the exporter provides the next scheduled backup timestamp, use:

home_server_backup_next_run_timestamp_seconds{instance="chingadera", job="integrations/unix"}

Panel setup:

SettingValue
VisualizationStat
TitleNext Backup
UnitDate & time
Query typeInstant

If this metric does not exist yet, keep the panel out of the dashboard until the backup script exports it.


Dashboard name:

Home Server Backups

Suggested first row:

PanelQueryVisualization
Last Backup Successhome_server_backup_last_success{instance="chingadera", job="integrations/unix"}Stat
Last Successful Backuphome_server_backup_last_success_timestamp_seconds{instance="chingadera", job="integrations/unix"}Stat
Backup Agetime() - home_server_backup_last_success_timestamp_seconds{instance="chingadera", job="integrations/unix"}Stat or Gauge
Backups Availablehome_server_backup_available_count{instance="chingadera", job="integrations/unix"}Stat
Next Backuphome_server_backup_next_run_timestamp_seconds{instance="chingadera", job="integrations/unix"}Stat

Suggested second row:

PanelPurpose
Backup Success HistoryShows when success changed over time
Backup Count HistoryShows retention growth or cleanup behavior
Backup Age HistoryShows whether backups are regularly becoming stale

After a query works in Explore:

  1. Open the query in Explore.
  2. Click Add to dashboard or create a new panel from the query.
  3. Choose or create the dashboard:
Home Server Backups
  1. Select the visualization type.
  2. Set the panel title.
  3. Set unit, value mappings, and thresholds.
  4. Save the dashboard.

Start with the confirmed query:

home_server_backup_last_success{instance="chingadera", job="integrations/unix"}

Then add the timestamp/count panels only after those metrics show up in Explore.


Alert condition:

home_server_backup_last_success{instance="chingadera", job="integrations/unix"} == 0

Trigger when the condition stays true for several minutes.

Recommended alert name:

Home server backup failed

Alert condition if the last-success timestamp exists:

time() - home_server_backup_last_success_timestamp_seconds{instance="chingadera", job="integrations/unix"} > 86400

This means the last successful backup is older than 24 hours.

Recommended alert name:

Home server backup stale

Use a larger threshold if the backup schedule is weekly instead of daily.


Alert condition if the backup count metric exists:

home_server_backup_available_count{instance="chingadera", job="integrations/unix"} < 1

Recommended alert name:

No home server backups available

Run the discovery query:

{__name__=~"home_server_backup_.*", instance="chingadera", job="integrations/unix"}

If nothing returns, check whether the home server is still exporting the backup metrics and whether Grafana Cloud is scraping the Unix integration successfully.


Search without labels:

{__name__=~"home_server_backup_.*"}

Then inspect the returned labels and update the dashboard query.

The labels confirmed during setup were:

instance="chingadera"
job="integrations/unix"

That can be normal if backups are succeeding. To confirm history, switch the panel to Graph mode and increase the time range.

If the value never changes after a failed backup, check the backup script or textfile exporter that writes the metric.


The timestamp metric may be missing, zero, or exported in the wrong unit.

Check the raw value in Explore:

home_server_backup_last_success_timestamp_seconds{instance="chingadera", job="integrations/unix"}

Prometheus timestamps should usually be Unix seconds, not milliseconds.


NutsNews also exports Supabase database backup metrics through the same Grafana Alloy textfile collector path used by the home-server image backup.

Metrics file on the home server:

/var/lib/node_exporter/textfile_collector/nutsnews_db_backup.prom

Alloy reads the directory:

/var/lib/node_exporter/textfile_collector

The database backup metrics use the prefix:

nutsnews_db_backup_

Discovery query:

{__name__=~"nutsnews_db_backup_.*"}

Useful panel queries:

PanelQueryVisualization
NutsNews DB Backup Successnutsnews_db_backup_last_successStat
NutsNews DB Backup Agetime() - nutsnews_db_backup_last_run_timestamp_secondsStat or Gauge
NutsNews DB Backup Durationnutsnews_db_backup_last_duration_secondsStat
NutsNews DB Backup Sizenutsnews_db_backup_last_size_bytesStat
NutsNews DB Backup Filesnutsnews_db_backup_last_file_countStat
NutsNews DB Backups in OneDrivenutsnews_db_backup_cloud_available_countStat
NutsNews DB Backup Timer Enablednutsnews_db_backup_timer_enabledStat
NutsNews DB Backup Timer Activenutsnews_db_backup_timer_activeStat
NutsNews DB Backup Next Runnutsnews_db_backup_next_run_timestamp_secondsStat

Recommended success mapping:

1 = Success
0 = Failed

Recommended stale-backup alert:

time() - nutsnews_db_backup_last_run_timestamp_seconds > 93600

Recommended failed-backup alert:

nutsnews_db_backup_last_success == 0

The database backup schedule is daily at 3:15 AM with up to 10 minutes of randomized delay, so a 26-hour freshness threshold gives the timer a reasonable grace window.


Grafana Cloud is the best place for Prometheus time-series metrics and alerts.

The protected NutsNews admin pages are best for app-specific operational views such as:

  • /admin/home-server for live instance stats from https://ai.nutsnews.com/stats.
  • /admin/local-ai for model activity and local AI review behavior.
  • /admin/shards for Worker refresh health.
  • /admin/feed-health for RSS source quality.

The Grafana backup dashboard complements those pages by showing backup freshness and success history over time.


Do not put backup secrets, database URLs, API keys, or private SSH details into Grafana panel titles, descriptions, annotations, labels, or public screenshots.

Safe to show:

metric names
instance labels
job labels
success/failure values
timestamps
counts

Not safe to show:

Supabase database password
backup destination credentials
LOCAL_AI_API_KEY
HOME_SERVER_STATS_API_KEY
Cloudflare tokens
private SSH keys