Hello,
first of all I want to be able to run a skript after each part of a backup job, that will send information to a zabbix server.
here it shows https://pve.proxmox.com/pve-docs/vzdump.1.html that there
when I use a absolut basic skript
I was getting the following output
so there seems no usefull variable for me
A longer time ago I even edited the Proxmox files and wrote a little package that was called by /usr/share/perl5/PVE/VZDump.pm right before
interestingly It does not seems to get called anymore since the new backup shedular in PVE7, old jobs still using crone seems to work.
The Question is is there any easy way to call a skript that gets basicly the information name of the VM, ID of the VM, Backupstatus (Ok, Error) , so that I could call zabbix-sender with that information?
first of all I want to be able to run a skript after each part of a backup job, that will send information to a zabbix server.
here it shows https://pve.proxmox.com/pve-docs/vzdump.1.html that there
when I use a absolut basic skript
Code:
# example hook script for vzdump (--script option)
use strict;
my $logfile = "/temp/ausgabentest.txt";
my $proxlogfile = $ENV{LOGFILE};
print "HOOK: " . join (' ', @ARGV) . "\n";
open(LFH, '>>', $logfile) or die "cannot open the log file $logfile: $!";
print LFH "HOOK: " . join (' ', @ARGV) . "\n".$proxlogfile."\n";
my $phase = shift;
if ($phase eq 'backup-end' ){
close LFH;
Code:
HOOK: job-start
HOOK: job-end
A longer time ago I even edited the Proxmox files and wrote a little package that was called by /usr/share/perl5/PVE/VZDump.pm right before
Code:
eval { $self->sendmail ($tasklist, $totaltime, undef, $job_start_log, $job_end_log); };
interestingly It does not seems to get called anymore since the new backup shedular in PVE7, old jobs still using crone seems to work.
The Question is is there any easy way to call a skript that gets basicly the information name of the VM, ID of the VM, Backupstatus (Ok, Error) , so that I could call zabbix-sender with that information?