From 85ce85072994d2805ea4cf4365ab4536a202c3ca Mon Sep 17 00:00:00 2001 From: ageissler Date: Mon, 3 Mar 2025 11:43:01 +0100 Subject: [PATCH] pve-reporting/get_vminfo_clu1.pl aktualisiert --- pve-reporting/get_vminfo_clu1.pl | 41 ++++++++++++++++++++++---------- 1 file changed, 29 insertions(+), 12 deletions(-) diff --git a/pve-reporting/get_vminfo_clu1.pl b/pve-reporting/get_vminfo_clu1.pl index ad1baf8..3704c74 100644 --- a/pve-reporting/get_vminfo_clu1.pl +++ b/pve-reporting/get_vminfo_clu1.pl @@ -47,26 +47,22 @@ for $server (@servers) { print "\n"; } -#print Dumper(%vms); - open HTML, ">output1.html"; printf HTML "\n\n\n"; -printf HTML " - +printf HTML ' + - - - + + - -"; +'; printf HTML "\n\n"; + open OUTPUT, ">output1.txt"; +open EUREGON, ">output_euregon.txt"; print "-- print vm information to console and in file output1.txt\n"; $str = sprintf "VMID|NAME|OS|DISKSIZE(S)|DISKUSAGE(S)|SOCKETS|CORES|MEMORY(MB)|BOOTDISK(GB)|DESCRIPTION|TAGS|STATUS|HOST|PID|CDROM\n"; printf $str; printf OUTPUT $str; +printf EUREGON $str; $str = sprintf "\n\n"; printf HTML $str; @@ -105,6 +104,13 @@ foreach $vm (sort keys %vms) { $vms{$vm}{'cdrom'} ); printf $str; + + # if tag = euregon : extra datei + printf EUREGON $str if ($vms{$vm}{'tags'} =~ /euregon/i); + + # if disksize < 1072623616 : ignorieren + + # ausgabe printf OUTPUT $str; $vms{$vm}{'disksizes'} =~ s/,/
/g; @@ -130,12 +136,14 @@ foreach $vm (sort keys %vms) { printf HTML $str; } close OUTPUT; +close EUREGON; printf HTML "\n
VMIDNAMEOSDISKSIZE(S)DISKUSAGE(S)SOCKETSCORESMEMORY(MB)BOOTDISK(GB)DESCRIPTIONTAGSSTATUSHOSTPIDCDROM
\n"; close HTML; print "-- send output1.txt as attachement via email\n"; +# mail open MAIL, ">mail1.tmp"; printf MAIL "TO: $ARGV[0]\n"; printf MAIL "FROM: CONET Services Monitoring Reporter mail1.tmp"; +printf MAIL "TO: $ARGV[0]\n"; +printf MAIL "FROM: CONET Services Monitoring Reporter