From c15a86d6a81bc8ce9a2a2e1e3a82a379b6d39ba4 Mon Sep 17 00:00:00 2001 From: e025532 Date: Thu, 20 Mar 2025 15:07:45 +0100 Subject: [PATCH] update hyper-v part --- Hyper-V/Legacy-VMList.php | 165 ++++++++++++++++++++++++++ Hyper-V/Migration.php | 3 - Hyper-V/SYN-VMList.php | 178 ++++++++++++++++++++++++++++ Hyper-V/SYN-VMList2.php | 171 +++++++++++++++++++++++++++ Hyper-V/VMs-Backups.php | 10 +- Hyper-V/cluster-detail.php | 4 +- Hyper-V/clusters.php | 155 ++++++++++++++++-------- Hyper-V/clusters2.php | 233 +++++++++++++++++++++++++++++++++++++ X/StdOut-detail.php | 185 +++++++++++++++++++++++++++++ X/StdOut.php | 86 ++++++++++++++ navbar.html | 3 + reports/heartbeat.php | 2 +- 12 files changed, 1137 insertions(+), 58 deletions(-) create mode 100644 Hyper-V/Legacy-VMList.php create mode 100644 Hyper-V/SYN-VMList.php create mode 100644 Hyper-V/SYN-VMList2.php create mode 100644 Hyper-V/clusters2.php create mode 100644 X/StdOut-detail.php create mode 100644 X/StdOut.php diff --git a/Hyper-V/Legacy-VMList.php b/Hyper-V/Legacy-VMList.php new file mode 100644 index 0000000..505c0e7 --- /dev/null +++ b/Hyper-V/Legacy-VMList.php @@ -0,0 +1,165 @@ + + + + + + + + + + Web Infra Reports IT + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ +
+ +

Legacy Hyper-V VM List - VMs

+ + +
+ + + +
+ + + + + + + + + + + + + "; + # Name + $state = ' '; + if($row['State'] == "Running"){$state = ' ';} + if($row['State'] == "Off" || $row['State'] == "Stopping"){$state = ' ';} + if($row['State'] == "Paused"){$state = ' ';} + echo ""; + # Owner + echo ""; + # Infos + echo '"; + # Prefered Owner + if($row['Owner'] == $row['PreferredOwner']){ + echo ' '; + }else{ + if($row['IsClustered'] == 'True'){ + echo ' '; + }else{ + echo ' '; + } + } + # Gen & Ver + echo ""; + # TS + echo ""; + echo ""; + } + ?> + +
VMOwnerInfosPrefered OwnerGen & VersionLast Seen
".$state." ".$row['Name']."".$row['Owner']."'.$row['Memory'].'GB / '.$row['CPU'].' CPU '; + echo 'VHDx(s) : '.$row['TotalDiskSize'].' GB '; + if($row['WWPNs'] != ""){ + echo 'LUN(s) '; + } + echo "'.$row['Owner'].''.$row['PreferredOwner'].'NOT CLUSTERED"; + if($row['Generation'] == "2"){ + echo 'Gen '.$row['Generation'].' '; + }else{ + echo 'Gen '.$row['Generation'].' '; + } + if($row['Version'] == "10.0"){ + echo 'Ver '.$row['Version'].' '; + }else{ + echo 'Ver '.$row['Version'].' '; + } + echo "".$row['LastInventory']."
+
+
+
+ +
+
+
+ + + + + diff --git a/Hyper-V/Migration.php b/Hyper-V/Migration.php index 5343224..1d69dc5 100644 --- a/Hyper-V/Migration.php +++ b/Hyper-V/Migration.php @@ -140,9 +140,6 @@ - ".$er." issues - ".$outdated." outdated - ".$excluded.' excluded)'; - ?> diff --git a/Hyper-V/SYN-VMList.php b/Hyper-V/SYN-VMList.php new file mode 100644 index 0000000..692c099 --- /dev/null +++ b/Hyper-V/SYN-VMList.php @@ -0,0 +1,178 @@ + + + + + + + + + + Web Infra Reports IT + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ +
+ +

Synergy VM List - VMs

+ + +
+ + + +
+
+ + + + + + + + + + + + + "; + # Name + $state = ' '; + if($row['State'] == "Running"){$state = ' ';} + if($row['State'] == "Off" || $row['State'] == "Stopping"){$state = ' ';} + if($row['State'] == "Paused"){$state = ' ';} + echo ""; + # Owner + echo ""; + # Infos + echo '"; + # Prefered Owner + if($row['Owner'] == $row['PreferredOwner']){ + echo ' '; + }else{ + if($row['IsClustered'] == 'True'){ + echo ' '; + $wrongOwner++; + }else{ + echo ' '; + $unclustered++; + } + } + # Gen & Ver + echo ""; + # TS + echo ""; + echo ""; + + + } + if($wrongOwner > 0){$msg = "$wrongOwner VM(s) on Wrong Owner";} + if($unclustered > 0){$msg .= " $unclustered VM(s) Unclustered";} + if($v10 > 0){$msg .= " $v10 VM(s) < Ver 10.0";} + if($CpuComp > 0){$msg .= " $CpuComp VM(s) With 'CPU Compatibility' checked";} + ?> + +
VMOwnerInfosPrefered OwnerGen & VersionLast Seen
".$state." ".$row['Name']."".$row['Owner']."'.$row['Memory'].'GB / '.$row['CPU'].' CPU '; + echo 'VHDx(s) : '.$row['TotalDiskSize'].' GB '; + if($row['WWPNs'] != ""){ + echo 'LUN(s) '; + } + if($row['CPUcomp'] == "True"){ + echo 'CPU Comp. '; $CpuComp++; + } + echo "'.$row['Owner'].''.$row['Owner'].'NOT CLUSTERED"; + if($row['Generation'] == "2"){ + echo 'Gen '.$row['Generation'].' '; + }else{ + echo 'Gen '.$row['Generation'].' '; + } + if($row['Version'] == "10.0"){ + echo 'Ver '.$row['Version'].' '; + }else{ + echo 'Ver '.$row['Version'].' '; + $v10++; + } + echo "".$row['LastInventory']."
+
+
+
+ +
+
+
+ + + + + diff --git a/Hyper-V/SYN-VMList2.php b/Hyper-V/SYN-VMList2.php new file mode 100644 index 0000000..fa36f19 --- /dev/null +++ b/Hyper-V/SYN-VMList2.php @@ -0,0 +1,171 @@ + + + + + + + + + + Web Infra Reports IT + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ +
+ +

Synergy VM List - VMs

+ + +
+ + + +
+
+ + + + + + + + + + + + + "; + # Name + $state = ' '; + if($row['State'] == "Running"){$state = ' ';} + if($row['State'] == "Off" || $row['State'] == "Stopping"){$state = ' ';} + if($row['State'] == "Paused"){$state = ' ';} + echo ""; + # Owner + echo ""; + # Infos + echo '"; + # Prefered Owner + if($row['Owner'] == $row['PreferredOwner']){ + echo ' '; + }else{ + if($row['IsClustered'] == 'True'){ + echo ' '; + $wrongOwner++; + }else{ + echo ' '; + $unclustered++; + } + } + # Gen & Ver + echo ""; + # TS + echo ""; + echo ""; + + if($wrongOwner > 0){$msg = "$wrongOwner VM(s) on Wrong Owner";} + if($unclustered > 0){$msg .= " $unclustered VM(s) Unclustered";} + } + ?> + +
VMOwnerInfosPrefered OwnerGen & VersionLast Seen
".$state." ".$row['Name']."".$row['Owner']."'.$row['Memory'].'GB / '.$row['CPU'].' CPU '; + echo 'VHDx(s) : '.$row['TotalDiskSize'].' GB '; + if($row['WWPNs'] != ""){ + echo 'LUN(s) '; + } + echo "'.$row['Owner'].''.$row['Owner'].'NOT CLUSTERED"; + if($row['Generation'] == "2"){ + echo 'Gen '.$row['Generation'].' '; + }else{ + echo 'Gen '.$row['Generation'].' '; + } + if($row['Version'] == "10.0"){ + echo 'Ver '.$row['Version'].' '; + }else{ + echo 'Ver '.$row['Version'].' '; + } + echo "".$row['LastInventory']."
+
+
+
+ +
+
+
+ + + + + diff --git a/Hyper-V/VMs-Backups.php b/Hyper-V/VMs-Backups.php index ab7ed27..348d5e2 100644 --- a/Hyper-V/VMs-Backups.php +++ b/Hyper-V/VMs-Backups.php @@ -83,7 +83,7 @@ 'OK' or lastresult is null) order by lastresult,name"); + $answers = Invoke_infra("SELECT * FROM VMs_Backup where ( Owner like 'DUN-VMH%' or Owner like 'MDK-VMH%' ) and name not like 'WS%' and owner not like '%WKG%' and owner not like '%VMH-WM%' and Exclusion ='' and (LastResult <> 'OK' or lastresult is null) order by lastresult,name"); foreach ($answers as $row) { $er++; $date1 = date_create($row['LastKnownGood']); $diff = date_diff($date1, date_create(date("Y-m-d"))); @@ -106,7 +106,8 @@ // Backup OK $outdated = 0; - $answers = Invoke_infra("SELECT * FROM VMs_Backup where Owner like 'DUN-VMH%' and name not like 'WS%' and owner not like '%WKG%' and owner not like '%VMH-WM%' and Exclusion ='' and LastResult = 'OK' order by name"); + $answers = Invoke_infra("SELECT * FROM VMs_Backup where ( Owner like 'DUN-VMH%' or Owner like 'MDK-VMH%' ) and name not like 'WS%' and owner not like '%WKG%' and owner not like '%VMH-WM%' and Exclusion ='' and LastResult = 'OK' order by name"); + $total = count($answers); foreach ($answers as $row) { $date1 = date_create($row['LastKnownGood']); $diff = date_diff($date1, date_create(date("Y-m-d"))); if(date('w') >= 2 && date('w') <= 6 ){ @@ -146,7 +147,7 @@ // Backup OK $excluded = 0; - $answers = Invoke_infra("SELECT * FROM VMs_Backup where Owner like 'DUN-VMH%' and name not like 'WS%' and owner not like '%WKG%' and owner not like '%VMH-WM%' and Exclusion <> '' order by name"); + $answers = Invoke_infra("SELECT * FROM VMs_Backup where ( Owner like 'DUN-VMH%' or Owner like 'MDK-VMH%' ) and name not like 'WS%' and owner not like '%WKG%' and owner not like '%VMH-WM%' and Exclusion <> '' order by name"); foreach ($answers as $row) { $excluded++; echo ""; @@ -170,7 +171,8 @@ ".$er." issues - ".$outdated." outdated - ".$excluded.' excluded)'; + $success = $total - $er - $outdated -$excluded ; + $ERR = "VMs backups (".$total." Success - ".$er." issues - ".$outdated." outdated - ".$excluded.' excluded)'; ?> diff --git a/Hyper-V/cluster-detail.php b/Hyper-V/cluster-detail.php index 570d03c..c364a05 100644 --- a/Hyper-V/cluster-detail.php +++ b/Hyper-V/cluster-detail.php @@ -78,7 +78,7 @@ foreach ($clusters as $cluster) { echo "
"; $nbvm = Invoke_Infra("select count(*) as nbvm, sum(memory) as vmmem from cmdb_vms where owner ='".$cluster['node']."' and decomtime is null"); - echo '

'.$cluster['node']." - ".$nbvm[0]['nbvm']." VMs


"; + echo '

'.$cluster['node']." - ".$nbvm[0]['nbvm']." VMs ".$cluster['ts']."


"; #Memory echo "
"; echo "
"; @@ -156,7 +156,7 @@ echo "
"; echo ''.$vm['Memory'].'GB / '.$vm['CPU'].' CPU '; if($vm['WWPNs'] != ""){ - echo 'iSCSI '; + echo 'LUN(s) '; } #echo "
"; diff --git a/Hyper-V/clusters.php b/Hyper-V/clusters.php index da996cb..5a362f6 100644 --- a/Hyper-V/clusters.php +++ b/Hyper-V/clusters.php @@ -57,19 +57,22 @@ echo "
"; } $data = Invoke_Infra("select * from cmdb_HyperV_Hosts where cluster = '" . $cluster['cluster'] . "'"); + $clumem = (invoke_infra("select min(node_ram) as nmem from cmdb_HyperV_Hosts where cluster ='".$cluster['cluster']."'"))[0]['nmem']; + $nb = (invoke_infra("select count(node) as nb from cmdb_HyperV_Hosts where cluster ='".$cluster['cluster']."'"))[0]['nb']; + $clmem = $clumem-32; if($nb == 4){$clmem = $clmem*2;} $nodes = count($data); $vms = 0; $vm_mem = 0; $disk = 0; $io = 0; - $capacity = 0; + $capacity = 0; $free = 0; foreach ($data as $d) { $vms += $d['vm_count']; $vm_mem += $d['vm_memory']; $node_mem = 0 + (int) $d['node_ram']; foreach (explode("|", $d['csvs']) as $csv) { if (instr($csv, ';')) { - $free = explode(";", $csv)[1] - explode(";", $csv)[2]; + $free += explode(";", $csv)[1] - explode(";", $csv)[2]; $disk = max($disk, $free); $capacity += (int) explode(";", $csv)[1]; } @@ -77,7 +80,8 @@ $io += $d['io_disk']; } $node_mem = $node_mem * count($data) / 2; - $io = number_format($io / count($data), 2); + $io= round($io / count($data) * 1024); + if($io == 0){$io = "?";} $vmleft = floor(($node_mem - 24 - $vm_mem) / 16); $storageleft = floor($disk / 110); $vmleft = min($vmleft, $storageleft); @@ -100,55 +104,110 @@
-
Nodes / VMs -
+
Nodes / VMs
+ 0){ + $Repart = Invoke_Infra("select Owner, count(owner) as nbvm from cmdb_vms where Cluster ='".$cluster['cluster']."' and decomtime is null group by Owner order by Owner"); + $vmCountNode1 = $vmCountNode2 = 0; + $node1_name = $node2_name = ""; + if(count($Repart) == 1 ){ + $node1_name = $Repart[0]['Owner']; $vmCountNode1 = $Repart[0]['nbvm']; + }else{ + $node1_name = 'DUN'; $vmCountNode1 = $Repart[0]['nbvm']; + $node2_name = 'MDK'; $vmCountNode2 = $Repart[1]['nbvm']; + } + $totalVMs = $vmCountNode1 + $vmCountNode2; + $percentageNode1 = ($totalVMs > 0) ? ($vmCountNode1 / $totalVMs) * 100 : 0; + $percentageNode2 = ($totalVMs > 0) ? ($vmCountNode2 / $totalVMs) * 100 : 0; + echo "
+
+ $node1_name : $vmCountNode1 VMs +
+
+ $node2_name : $vmCountNode2 VMs +
+
"; + }elseif((int)$nodes == 4){ + $RepartD = Invoke_Infra("select count(owner) as nbvm from cmdb_vms where Cluster ='".$cluster['cluster']."' and Owner like 'DUN%' and decomtime is null"); + $RepartM = Invoke_Infra("select count(owner) as nbvm from cmdb_vms where Cluster ='".$cluster['cluster']."' and Owner like 'MDK%' and decomtime is null"); + $vmCountNode1 = $vmCountNode2 = 0; + $node1_name = 'DUN'; $vmCountNode1 = $RepartD[0]['nbvm']; + $node2_name = 'MDK'; $vmCountNode2 = $RepartM[0]['nbvm']; + $totalVMs = $vmCountNode1 + $vmCountNode2; + $percentageNode1 = ($totalVMs > 0) ? ($vmCountNode1 / $totalVMs) * 100 : 0; + $percentageNode2 = ($totalVMs > 0) ? ($vmCountNode2 / $totalVMs) * 100 : 0; + echo "
+
+ $node1_name : $vmCountNode1 VMs +
+
+ $node2_name : $vmCountNode2 VMs +
+
"; + + }else{ + echo "
+
+
"; + } + ?>
-
+ "; + echo "
"; + echo "Free Mem : ".($clmem - $vm_mem). " / " .$clmem. " GB"; + echo "
"; + $pcent = round(($clmem - $vm_mem)/$clmem*100); + $pcent_restant = 100 - $pcent; + if($pcent <= 5){ + $color = "bg-danger"; $border = "red"; + }else{ + if($pcent <= 10){ + $color = "bg-warning"; $border = "yellow"; + }else{ + $color = "bg-success"; $border = "green"; + } + } + echo " +
+
+
+
"; + echo "
"; + //DISK + echo "
"; + echo "
"; + $unit="GB"; + if($capacity > 10000){ + $capacity = round($capacity / 1024,1); $unit="TB"; + $free = round($free / 1024,1); + } + $used = $capacity - $free; + echo "Free CSV : ".$free. " / " .$capacity. " $unit"; + echo "
"; + $pcent = round(($free)/$capacity*100); + $pcent_restant = 100 - $pcent; + if($pcent <= 5){ + $color = "bg-danger"; $border = "red"; + }else{ + if($pcent <= 10){ + $color = "bg-warning"; $border = "yellow"; + }else{ + $color = "bg-success"; $border = "green"; + } + } + echo " +
+
+
+
"; + echo "
"; + echo "
CSV I/O R/W (24h) :
$io KB/s
"; -
- 2){$color='green';}elseif($storageleft==2){$color='orange';}else{$color='red';}?> -
Max Storage
-
-
-
-
- -
- 2){$color='green';}elseif(floor(($node_mem-24-$vm_mem)/16)==2){$color='orange';}else{$color='red';}?> -
Max Memory
-
-
-
-
- -
- -
I/O Disk
-
-
-
-
-
+ ?>
diff --git a/Hyper-V/clusters2.php b/Hyper-V/clusters2.php new file mode 100644 index 0000000..5a362f6 --- /dev/null +++ b/Hyper-V/clusters2.php @@ -0,0 +1,233 @@ + + + + + + + + + + Web Infra Reports + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ +
+ +

Hyper-V Clusters

+ + + '' and cluster not like '%-WM%' and cluster not like '%-C1MAS%' and cluster not like '%-vrs%' and (cluster like 'DUN%' or cluster like 'DMV%') order by cluster"); + ?> +
+
+ +
"; + } + $data = Invoke_Infra("select * from cmdb_HyperV_Hosts where cluster = '" . $cluster['cluster'] . "'"); + $clumem = (invoke_infra("select min(node_ram) as nmem from cmdb_HyperV_Hosts where cluster ='".$cluster['cluster']."'"))[0]['nmem']; + $nb = (invoke_infra("select count(node) as nb from cmdb_HyperV_Hosts where cluster ='".$cluster['cluster']."'"))[0]['nb']; + $clmem = $clumem-32; if($nb == 4){$clmem = $clmem*2;} + $nodes = count($data); + $vms = 0; + $vm_mem = 0; + $disk = 0; + $io = 0; + $capacity = 0; $free = 0; + foreach ($data as $d) { + $vms += $d['vm_count']; + $vm_mem += $d['vm_memory']; + $node_mem = 0 + (int) $d['node_ram']; + foreach (explode("|", $d['csvs']) as $csv) { + if (instr($csv, ';')) { + $free += explode(";", $csv)[1] - explode(";", $csv)[2]; + $disk = max($disk, $free); + $capacity += (int) explode(";", $csv)[1]; + } + } + $io += $d['io_disk']; + } + $node_mem = $node_mem * count($data) / 2; + $io= round($io / count($data) * 1024); + if($io == 0){$io = "?";} + $vmleft = floor(($node_mem - 24 - $vm_mem) / 16); + $storageleft = floor($disk / 110); + $vmleft = min($vmleft, $storageleft); + $totalleft += $vmleft; + if ($vmleft > 2) { + $vleft = "(" . $vmleft . " VMs left)"; + } elseif ($vmleft == 2) { + $vleft = "(" . $vmleft . " VMs left)"; + } else { + $vleft = "(" . $vmleft . " VM left)"; + } + + ?> + +
+ +
+
+

+
+

+
+
Nodes / VMs
+
+ 0){ + $Repart = Invoke_Infra("select Owner, count(owner) as nbvm from cmdb_vms where Cluster ='".$cluster['cluster']."' and decomtime is null group by Owner order by Owner"); + $vmCountNode1 = $vmCountNode2 = 0; + $node1_name = $node2_name = ""; + if(count($Repart) == 1 ){ + $node1_name = $Repart[0]['Owner']; $vmCountNode1 = $Repart[0]['nbvm']; + }else{ + $node1_name = 'DUN'; $vmCountNode1 = $Repart[0]['nbvm']; + $node2_name = 'MDK'; $vmCountNode2 = $Repart[1]['nbvm']; + } + $totalVMs = $vmCountNode1 + $vmCountNode2; + $percentageNode1 = ($totalVMs > 0) ? ($vmCountNode1 / $totalVMs) * 100 : 0; + $percentageNode2 = ($totalVMs > 0) ? ($vmCountNode2 / $totalVMs) * 100 : 0; + echo "
+
+ $node1_name : $vmCountNode1 VMs +
+
+ $node2_name : $vmCountNode2 VMs +
+
"; + }elseif((int)$nodes == 4){ + $RepartD = Invoke_Infra("select count(owner) as nbvm from cmdb_vms where Cluster ='".$cluster['cluster']."' and Owner like 'DUN%' and decomtime is null"); + $RepartM = Invoke_Infra("select count(owner) as nbvm from cmdb_vms where Cluster ='".$cluster['cluster']."' and Owner like 'MDK%' and decomtime is null"); + $vmCountNode1 = $vmCountNode2 = 0; + $node1_name = 'DUN'; $vmCountNode1 = $RepartD[0]['nbvm']; + $node2_name = 'MDK'; $vmCountNode2 = $RepartM[0]['nbvm']; + $totalVMs = $vmCountNode1 + $vmCountNode2; + $percentageNode1 = ($totalVMs > 0) ? ($vmCountNode1 / $totalVMs) * 100 : 0; + $percentageNode2 = ($totalVMs > 0) ? ($vmCountNode2 / $totalVMs) * 100 : 0; + echo "
+
+ $node1_name : $vmCountNode1 VMs +
+
+ $node2_name : $vmCountNode2 VMs +
+
"; + + }else{ + echo "
+
+
"; + } + ?> +
+
+ "; + echo "
"; + echo "Free Mem : ".($clmem - $vm_mem). " / " .$clmem. " GB"; + echo "
"; + $pcent = round(($clmem - $vm_mem)/$clmem*100); + $pcent_restant = 100 - $pcent; + if($pcent <= 5){ + $color = "bg-danger"; $border = "red"; + }else{ + if($pcent <= 10){ + $color = "bg-warning"; $border = "yellow"; + }else{ + $color = "bg-success"; $border = "green"; + } + } + echo " +
+
+
+
"; + echo "
"; + //DISK + echo "
"; + echo "
"; + $unit="GB"; + if($capacity > 10000){ + $capacity = round($capacity / 1024,1); $unit="TB"; + $free = round($free / 1024,1); + } + $used = $capacity - $free; + echo "Free CSV : ".$free. " / " .$capacity. " $unit"; + echo "
"; + $pcent = round(($free)/$capacity*100); + $pcent_restant = 100 - $pcent; + if($pcent <= 5){ + $color = "bg-danger"; $border = "red"; + }else{ + if($pcent <= 10){ + $color = "bg-warning"; $border = "yellow"; + }else{ + $color = "bg-success"; $border = "green"; + } + } + echo " +
+
+
+
"; + echo "
"; + echo "
CSV I/O R/W (24h) :
$io KB/s
"; + + ?> +
+
+ +
+ + +

Total VM Left :

+ + + +
+ +
+
+
+ + + + \ No newline at end of file diff --git a/X/StdOut-detail.php b/X/StdOut-detail.php new file mode 100644 index 0000000..120c27d --- /dev/null +++ b/X/StdOut-detail.php @@ -0,0 +1,185 @@ + + + + + + + + + + Web Infra Reports IT + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ +
+ +

Script Details

+ + +
+ + + +
+ +
+
+ Filters : +
+ + name="AIX" value="1"> + +
+   +
+ + name="linux" value="1"> + +
+   |   +
+ + name="DUN" value="1"> + +
+   +
+ + name="AZT" value="1"> + +
+   +
+ + name="other" value="1"> + +
+ + +
+
+ + + + + + + + + + + + + + + ""){$aixok++;}else{if((string)$rc <> ""){$aixko++;}} + }else{ + if($rc == 0 && (string)$rc <> ""){$linuxok++;}else{if((string)$rc <> ""){$linuxko++;}} + } + }else{ + $rc=$stdout=$ts=""; + } + echo ""; + echo ""; + echo ""; + if($rc == 0 && (string)$rc <> ""){ + echo ""; + }else{ + if((string)$rc <> ""){ + echo ""; + }else{ + echo ""; + } + } + echo ""; + } + ?> + +
+
$taix AIX : "; + echo "$aixok $aixko $aixNO
"; + echo "
$tlinux Linux : "; + echo "$linuxok $linuxko $linuxNO
"; ?> + + + + + + + + + \ No newline at end of file diff --git a/X/StdOut.php b/X/StdOut.php new file mode 100644 index 0000000..85248b1 --- /dev/null +++ b/X/StdOut.php @@ -0,0 +1,86 @@ + + + + + + + + + + Web Infra Reports IT + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ +
+ +

Script Execution Follow-up

+ + +
+ + + +
+ "; + foreach($answers as $cmd){ + $ts = Invoke_infra("SELECT max(ts) as fin, min(ts) as debut FROM x_stdout where cmd = '".$cmd['cmd']."'"); + echo " "; + + } + echo "
"; + ?> +
+
+ +
+
+ + + + \ No newline at end of file diff --git a/navbar.html b/navbar.html index f7bfb1e..8305924 100644 --- a/navbar.html +++ b/navbar.html @@ -37,6 +37,7 @@
  • - SVA/SCU Accounts - AutoRemediation Logs + - Scripts Result
  • @@ -56,6 +57,8 @@
  • - Hyper-V Clusters - VMs Backups + - Synergy VMs + - Legacy Hyper-V VMs - Migration FollowUp
  • diff --git a/reports/heartbeat.php b/reports/heartbeat.php index 13a92b2..ed7364f 100644 --- a/reports/heartbeat.php +++ b/reports/heartbeat.php @@ -30,7 +30,7 @@ '' order by hostname asc"); $linux = Invoke_aixcmdb("select h.hostname, h.hbtime, h.prevtime from heartbeat h left join srvall s on s.hostname = h.hostname where h.mainttime is null and h.decomtime is null and s.os_type = 'LINUX' order by h.hostname"); $aix = Invoke_aixcmdb("select h.hostname, h.hbtime, h.prevtime from heartbeat h left join srvall s on s.hostname = h.hostname where h.mainttime is null and h.decomtime is null and s.os_type = 'AIX' order by h.hostname"); $other = Invoke_aixcmdb("select h.hostname, h.hbtime, h.prevtime from heartbeat h left join srvall s on s.hostname = h.hostname where h.mainttime is null and h.decomtime is null and s.os_type is null order by h.hostname");
    HostOSTimeStampRCStdOut
    $host$os".$ts."".$rc."".(string)$rc."".$stdout."