inettgmbh / checkmk-proxmox_backup_server

check_mk extension package for Proxmox Backup Server
https://www.inett.de/it-loesungen/checkmk
GNU General Public License v2.0
9 stars 5 forks source link

Support Namespaces #4

Open Jay2k1 opened 1 year ago

Jay2k1 commented 1 year ago

Hi,

you can create namespaces on PBS, so you can easily use one PBS for multiple PVE servers/clusters and separate their backups from each other. If all your backups are organized in namespaces, the current check doesn't see a single backup because it only looks at the root namespace:

root@pbs:/# proxmox-backup-client list --repository "$repo" --output-format json-pretty
[]
root@pbs:/# proxmox-backup-client list --repository "$repo" --output-format json-pretty --ns cust1 | head 
[
  {
    "backup-count": 27,
    "backup-id": "155",
    "backup-type": "vm",
    "files": [
      "qemu-server.conf.blob",
      "index.json.blob",
      "client.log.blob",
...

You'd have to iterate namespace dependent commands over all available namespaces using the --ns switch. You can get a list of all namespaces like so:

proxmox-backup-client namespace list --repository "$PBS_REPO:$name" --output-format json-pretty
marcogabriel commented 1 year ago

Thanks for mentioning this. I assumed we're already checking namespaces. At least we use namespaces already.

@nedjitef is this the latest version?

nedjitef commented 1 year ago

No, we don't monitor namespaces in the current check version but we should change that.

In the beginning, when PBS didn't have namespaces, we started using multiple data stores for these purposes. Since this works quite well, we didn't need to change that yet. We use them, but not that much.