Proxmox VMs backup monitoring script

MR_Andrew

New Member
Aug 9, 2018
2
0
1
32
Hello!
I'm working on monitoring script for Zabbix. Purpose - get result of build-in Proxmox backup procedure.
Total Zabbix template will works with 2 scripts: discovery script that will find VM numbers and check if backup enabled; monitoring script that will do all other staff.
I want ask you to check my monitoring script. It's pretty much simple to understand. File attached.
Script works with 2 arguments: VM number and number of days to find backup files. Example:
Code:
./proxmox-vms-backup-status 100 7
I'm a little bit afraid about logic of script. I made tests of this script on 3 different proxmoxes with different versions. Now, after debugging and fixing issues that been found, seems like working correct. But I want to be sure that everything is fine before publishing to production.

Thanks a lot!
Kind regards, Andrew.
 

Attachments

  • proxmox-vms-backup-status.zip
    1.1 KB · Views: 96
This is a good starting point, but the only real test is to restore your backup, e.g. real restore in another datacenter or unpack with vzdump, everything else is just a check if a file exists - or a test if the backup is correctly exported (not that it is correctly written).
 
  • Like
Reactions: MR_Andrew
This is a good starting point, but the only real test is to restore your backup, e.g. real restore in another datacenter or unpack with vzdump, everything else is just a check if a file exists - or a test if the backup is correctly exported (not that it is correctly written).

Dear LnxBil, thanks for your reply!
I understand your idea. Unfortunately, I didn't found any way to check backup file consistence. Looks like Proxmox don't have such build-in procedure. It's pity.

"or a test if the backup is correctly exported" - what do you mean? Is it possible to check via bash?
Thanks!
 
If some are interested in Zabbix monitoring of PVE, I've also written some scripts. It also uses LLD to discover guests, storage, pools etc... It doesn't monitor backups, but can graph a lot of things. See

http://gitweb.firewall-services.com/?p=zabbix-agent-addons;a=blob;f=zabbix_scripts/disco_pve_sudo

And

http://gitweb.firewall-services.com/?p=zabbix-agent-addons;a=blob;f=zabbix_scripts/check_pve_sudo

And

http://gitweb.firewall-services.com/?p=zabbix-agent-addons;a=blob;f=zabbix_conf/pve.conf
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!