mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-27 16:08:55 +02:00
VMWARE SUPPORT!! :)
- Support for VMware hosts AND Virtual Machines. - VMware MIB files added. - SVN property ignore on MIB .index files. git-svn-id: http://www.observium.org/svn/observer/trunk@1976 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 4.5 KiB |
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
if (!is_integer($i/2)) { $bg_colour = $list_colour_a; } else { $bg_colour = $list_colour_b; }
|
||||
|
||||
echo("<tr bgcolor='$bg_colour'>");
|
||||
|
||||
echo("<td class=list>" . $vm['vmwVmDisplayName'] . "</td>");
|
||||
echo("<td class=list>" . $vm['vmwVmState'] . "</td>");
|
||||
|
||||
if ($vm['vmwVmGuestOS'] == "E: tools not installed") {
|
||||
echo("<td class=box-desc>Unknown (VMware Tools not installed)</td>");
|
||||
} else {
|
||||
echo("<td class=list>" . $config['vmware_guestid'][$vm['vmwVmGuestOS']] . "</td>");
|
||||
}
|
||||
|
||||
if ($vm['vmwVmMemSize'] >= 1024) {
|
||||
echo("<td class=list>" . $vm['vmwVmMemSize']/1024 . " GB</td>");
|
||||
} else {
|
||||
echo("<td class=list>" . $vm['vmwVmMemSize'] . " MB</td>");
|
||||
}
|
||||
|
||||
echo("<td class=list>" . $vm['vmwVmCpus'] . " CPU</td>");
|
||||
|
||||
?>
|
||||
@@ -105,6 +105,15 @@ if (device_permitted($_GET['id']) || $check_device == $_GET['id'])
|
||||
</li>');
|
||||
}
|
||||
|
||||
if (@mysql_result(mysql_query("SELECT COUNT(id) FROM vmware_vminfo WHERE device_id = '" . $device["device_id"] . "'"), 0) > '0')
|
||||
{
|
||||
echo('<li class="' . $select['vm'] . '">
|
||||
<a href="'.$config['base_url'].'/device/' . $device['device_id'] . '/vm/">
|
||||
<img src="images/16/server_cog.png" align="absmiddle" border="0" /> Virtual Machines
|
||||
</a>
|
||||
</li>');
|
||||
}
|
||||
|
||||
if (@mysql_result(mysql_query("select count(*) from vrfs WHERE device_id = '" . $device['device_id'] . "'"), 0) > '0')
|
||||
{
|
||||
echo('<li class="' . $select['vrfs'] . '">
|
||||
@@ -226,4 +235,4 @@ else
|
||||
{
|
||||
include("includes/error-no-perm.inc.php");
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
echo('<table border="0" cellspacing="0" cellpadding="5" width="100%" class="sortable"><tr class="tablehead"><th>Server Name</th><th>Power Status</th><th>Operating System</th><th>Memory</th><th>CPU</th></tr>');
|
||||
|
||||
$i = "1";
|
||||
$vm_query = mysql_query("SELECT id, vmwVmVMID, vmwVmDisplayName, vmwVmGuestOS, vmwVmMemSize, vmwVmCpus, vmwVmState FROM vmware_vminfo WHERE device_id = '".mres($_GET['id'])."' ORDER BY vmwVmDisplayName");
|
||||
|
||||
while ($vm = mysql_fetch_array($vm_query))
|
||||
{
|
||||
include("includes/print-vm.inc.php");
|
||||
$i++;
|
||||
}
|
||||
|
||||
echo("</table>");
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user