Advent Calendar Day 2: Watching Your Backup Server with VBR 13.1's Built-in Node Exporter
// Table of Contents
Advent Calendar Day 2: Watching Your Backup Server with VBR 13.1’s Built-in Node Exporter
Welcome back to Day 2 of our Veeam Blog Advent Calendar! Yesterday I laid out the plan for this year’s three series, and today we’re kicking off series one by getting some data out of Veeam and actually putting it to work.
The plan for today was to write my own little exporter. Something that logs in to the VBR REST API, polls a few endpoints and hands the results to Prometheus so I could build a nice backup dashboard. Then I remembered we’ve got this epic new feature in 13.1 that does exactly what I needed, and well, that plan went straight in the bin. Veeam already ships an exporter, so why build my own?
Grab your coffee, let’s get into it!
Why I Wanted This
The feature we are talking about today is the Node Exporter in Veeam Backup & Replication 13.1 which can be found under (Configuration > Observability).
If you’ve seen my lab before, you’ll know I already run Prometheus, Alertmanager and Grafana. Every Linux VM has node_exporter on it, and Grafana opens on a one-screen home dashboard that goes green, amber or red depending on whether something needs me.
The backup server was always the odd one out. My VBR is the Veeam Software Appliance, which is locked down by design. There’s no general shell and you can’t go installing your own agents on it, and that’s exactly the point! It’s meant to be secure by design. But it meant all I really had was:
- A blackbox probe checking the web UI answers over HTTPS
- Proxmox’s view of the VM from the outside (CPU, memory and disk I/O)
- Syslog events in Graylog, which is where my “Backups” tile gets its job results from
Nothing from inside the box itself. If a service ever stopped while the web UI kept answering, or a disk slowly filled up, I wanted to hear about it straight away.
Turning It On
This is the easy bit, and I mean really easy:
- Log into the VBR web UI
- Navigate to Configuration > Observability
- Select the Node Exporter tab
You’ll see three toggles:
- Enable metrics sharing turns the exporter on
- Enable secure connection serves the metrics over HTTPS on 443 instead of HTTP on 80
- Enable password authorization puts basic auth in front of it, which is optional
That’s my very first pass, on plain HTTP. I flicked secure connection on a few minutes later, as it costs nothing and Prometheus doesn’t mind either way. VBR then pushes the setting out to every Veeam appliance it manages, so in a bigger environment your proxies and hardened repositories get it too. In my lab that’s just the one appliance for now.
If you’re more of a scripting person (and if you’ve been following along, I suspect you are!), there’s PowerShell for this too: Get-VBRNodeExporterOptions and Set-VBRNodeExporterOptions, with switches for metrics sharing, TLS and password auth.
I left the password off. These metrics are versions, service states and resource numbers on a network only I use, and another secret to look after just wasn’t worth it for my lab. If this was a shared network, I’d turn it on. This is a homelab after all.
So What Do We Actually Get?
This is where it gets fun. Under the hood the node_exporter kicks in and you get all the usual goodies like CPU, memory, filesystems, network and disk I/O. But Veeam has added a few of their own on top, and these are the two I cared about:
veeam_service_state, one series per Veeam service,1for running and0for not, labelled with the service’snameand usually a friendlydescriptionveeam_component_info, the version of each installed component
My appliance exported 739 metric families on the very first scrape, with 43 services in veeam_service_state. Here they are sorted, with the stopped ones at the top:
See those seven zeros? Hang onto that thought, because they’re going to matter in a minute!
Getting It into Prometheus
On the Prometheus side, it’s one scrape job:
- job_name: veeam-node
scheme: https
tls_config:
insecure_skip_verify: true
static_configs:
- targets:
- 192.168.20.55:443You might be looking at insecure_skip_verify and raising an eyebrow, so let me explain. The appliance serves the metrics on its own self-signed certificate, which gets renewed whenever VBR is upgraded or reinstalled, so pinning it would mean re-pinning after every upgrade. No credentials ever go to this endpoint, so the worst a fake one could do is feed me some wrong numbers, and I’m comfortable with that in the lab.
And there it is, up and happy, and a full scrape takes less than a tenth of a second.
Making It Useful: Alerts
Let’s be honest, metrics on their own don’t do much for me. I’m not going to sit there watching graphs all day, nobody has the time for that! What I want is an email when something actually needs my attention, so I added two new alerts. To be fair, I don’t really want emails either, but it is what it is.
A Veeam service has stopped
The obvious version is “alert me when veeam_service_state is 0”, right? Remember those seven zeros from earlier? Those services are stopped while VBR is perfectly happy:
iscsidonly runs when an iSCSI session needs itveeamhasvcis for a VBR high availability cluster, which I don’t run- The other five are one-shot units that run at boot and then exit
The obvious rule would have sent me seven emails on day one, which is ok if I was using those services, but in my case they can happily stay stopped. So instead, the rule ignores those seven by name:
- alert: VeeamServiceStopped
expr: veeam_service_state{job="veeam-node", name!~`iscsid\.service|veeamhasvc\.service|...`} != 1
for: 10m
keep_firing_for: 15m
labels:
severity: critical
service: veeamThere are a few little details in there worth explaining:
- It’s
!= 1rather than== 0, so if Veeam ever adds another state, anything that isn’t “running” still counts for: 10mrides out a normal service restartkeep_firing_for: 15mmeans one missed scrape doesn’t send me a “resolved” email, followed by a brand new alert ten minutes later
The metrics have gone missing
If the scrape stops working, I want to know about it, because then nothing is watching those services. But if the whole appliance is down, I already get an email telling me VBR’s web UI is unreachable, and a second email about missing metrics just adds noise. So this one only fires while the web UI is still answering:
expr: up{job="veeam-node"} == 0 unless on () (probe_success{instance="veeam"} == 0)In practice, that means someone switched metrics sharing off, or the exporter itself broke.
Disk space, for free
This one was a nice bonus. I already alert on low and fast-filling filesystems on every Linux VM, so I just widened those rules to include the appliance. All 12 of its XFS volumes now get exactly the same treatment as everything else.
Disk health, new in 13.2
And here’s a nice little bonus. VBR 13.2 landed on 1 December, the day before this post went live, and it adds SMART disk health and key drive attributes to the node exporter. That means Prometheus, Veeam ONE or whatever you monitor with can warn you about a drive that’s on its way out before it actually fails. It’s all in the 13.2 What’s New.
Of course I patched the lab straight away, and five new series turned up as soon as the upgrade finished:
smart_collector_devices{} 0
smart_collector_smartctl_available{} 1
smart_device_skipped{device="/dev/sda",reason="unsupported"} 1
smart_device_skipped{device="/dev/sdb",reason="unsupported"} 1
smart_device_skipped{device="/dev/sr0",reason="unsupported"} 1My appliance is a VM on Proxmox, so its disks are virtual and there’s no SMART data to read, and the exporter tells you exactly that rather than just going quiet. Where this really earns its keep is a Veeam appliance on real hardware. A hardened repository full of disks is the obvious one, and an early warning on a failing drive there is exactly what you want!
The Dashboards (and a Little Surprise)
I didn’t build a new dashboard at all. The appliance is a Linux box at heart, so it simply joined the Linux guests on the dashboards I already had. And honestly, this turned out to be my favorite part.
See that red line sitting up around 48% and spiking to 75%? That’s the backup server, while everything else in the lab idles down near the floor. My lab appliance runs under Veeam’s recommended sizing to leave room for everything else in the lab (please don’t do this in production, my poor little NUCs overheat so I’m being nice to them ๐), so it’s no surprise it’s the busiest box here. Now I can see exactly how hard it’s working from inside the guest, not just what Proxmox can see from outside the VM.
It also turned out to have the fullest filesystem in the whole lab, with its root at about 54% used. That’s why my home dashboard’s Disk tile jumped from 51% to 54% the moment the appliance joined in:
The Hosts tile counts the appliance now too, so if its exporter ever stops answering, my home screen goes red. Exactly what I wanted!
Testing It Properly
Here’s something I’ve learned the hard way, and you probably have too: an alert rule that never fires looks exactly the same as one that works. So I don’t trust any of them until I’ve tested them. Everything in my lab is driven from a Git repo through Ansible, and every change goes in roughly like this:
- Run the checks before the change. They should fail! Before the rollout, my validation failed on “Prometheus doesn’t scrape the appliance yet”, and later on “the two new alert rules aren’t loaded yet”.
- Roll it out. A dry run with a diff first, then the real run, then a second run that has to report no changes at all.
- Run the checks again. This time they have to pass.
The alert rules get unit tests too. Prometheus ships a tool called promtool for exactly this: you feed it fake metrics, and it checks the right alerts come out. Then I go one step further and break each rule on purpose, 53 different ways across my rule files. I change a threshold, drop the ignore list, remove keep_firing_for, point it at the wrong job, that kind of thing. Every one of those broken copies has to fail the tests at exactly the point I expect. If a broken rule still passes, the test wasn’t really testing anything!
A Few Things Worth Knowing
- Job results still come from syslog. The node exporter tells you about the appliance and its services, not whether last night’s jobs succeeded. My Backups tile still reads VBR’s syslog events, which, fun fact, is the other tab on that same Observability page.
- Silence the alerts while you update. Updating VBR restarts its services, as you’d expect, so I’ll mute the Veeam alerts while an update runs.
- Turn the password on outside the lab. With it off, anyone who can reach port 443 on the appliance can read the metrics. That was fine for my lab, but for anything shared, flick on password authorization. It’s right there on the same page.
Wrapping Up
A couple of toggles in the web UI and one scrape job took my backup server from being the only box in the lab I couldn’t see inside, to the one I now watch most closely. And I didn’t write a single line of exporter code! The real work was deciding what actually deserves an email.
If you’re running VBR 13.1 or 13.2, I’d really encourage you to go and flick this on. Even if you don’t have Prometheus today, it’s a great excuse to start.
See you tomorrow for Day 3, where we flip things around and use the REST API to send a security event from Wazuh into Veeam! ๐
Stay curious, stay festive, and as always, happy backing up! ๐