Skip to content

Create VMware ESXiHost Inventory Diagrams with PowerShell

Notifications You must be signed in to change notification settings

tinuwalther/PSXiDiag

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PSXi

We currently have ~150 ESXi Hosts across 12 vCenters in our environemnt. Whenerver I'm done with the visualization of it, it's already wrong and I can start again. Why doesn't PowerShell do this for me? That's why I wrote this framework.

How it works

ScriptRunner runs scheduled PowerShell-Scripts to collect all the data of all vCenters and send it over WinRM as CSV-files to the Pode-Server. The Pode-Server has a FileWatcher where it check for new CSV-files in /pode/input.

The file should be named:

  • cloud_ESXiHosts.csv
  • classic_ESXiHosts.csv
  • cloud_Summary.csv
  • classic_Summary.csv

The content of the CSV-file will be stored in a SQLite DB in seperated tabels for Cloud and Classic. You can access over Pode.Web to the SQLite DB and get the properties of Cloud-/Classic ESXiHosts.

PSXiHomePage

PSXi Homepage

This is the Homepage of the PSXi App. It shows you the status of the Modules and the SQLite Database, Tables and Views.

PSXiHomePage Module Check PSXiHomePage DB and Table Check PSXiHomePage View Check

PSXi Summary

In the Summary, you can see the total of vCenter, and the count of each ESXiHost versions.

PSXiOverallSummary PSXiSummaryEsxiHosts

PSXi ESXi Inventory

If you click on the Group Classic and Classic ESXi Host Inventory, the first you can see is the summary of objects in this environment.

PSXiClassicSummaryEsxiHosts

At the next you can search for an ESXiHosts. Enter the name of the ESXiHost in the search box and press submit.

PSXiSearchEsxiHosts

Here you can view, add, update and remove note of an ESXiHost.

PSXiEsyiHostsNotes1

To add or update notes, enter the name of the ESXiHost and all Hosts of the ESXiHosts-table will be listet in the Dropdown, choose the one to edit and enter the note and press submit.

PSXiEsyiHostsNotes2

To delete the notes of an ESXiHost, enter the name of the ESXiHost and all Hosts of the ESXiHosts-table will be listet in the Dropdown, choose the one to remove the notes and press submit.

PSXiEsyiHostsNotes3

Each ESXiHosts of the Classic will be grouped by their vCenter Server.

PSXiEsxInventory

Each vCenter of the Cloud has it own tab where you can find all ESXiHosts.

PSXivCenterTabs

If you click at the row of an ESXiHost, all fileds of the selected ESXiHost will be showed as Sticky-note.

PSXiEsxiHostDetails

Mermaid Diagram

For each zones, there is a Mermaid-Class-Diagram for each vCenter.

PSXiEsxInventory

The Diagram is an iFrame to another page and it will be automatically genereate, if you upload a new CSV-file into the folder where the FileWatcher is configured. This page use pode, pode.web, PSHTML and Mermaid.

Top

Entity Relationship Diagrams

Possible entities are:

erDiagram
    classic_ESXiHosts ||--o{ View_classic_ESXiHosts : HostName
    classic_ESXiHosts {
        int ID
        string HostName
        string Version
        string HostName
        string Manufacturer
        string Model
        string vCenterServer
        string Cluster
        string PhysicalLocation
        string ConnectionState
    }
    classic_ESXiHostsNotes ||--o{ View_classic_ESXiHosts : HostName
    classic_ESXiHostsNotes {
        int ID
        string HostName
        string Notes
    }
    View_classic_ESXiHosts {
        int ID
        string HostName
        string Notes
    }
        
    classic_summary {
        int ID
        string vCenterServer
        string CountOfESXiHosts
        string CountOfVMs
    }

    cloud_ESXiHosts ||--o{ View_cloud_ESXiHosts : HostName
    cloud_ESXiHosts {
        int ID
        string HostName
        string Version
        string HostName
        string Manufacturer
        string Model
        string vCenterServer
        string Cluster
        string PhysicalLocation
        string ConnectionState
    }
    cloud_ESXiHostsNotes ||--o{ View_cloud_ESXiHosts : HostName
    cloud_ESXiHostsNotes {
        int ID
        string HostName
        string Notes
    }
    View_cloud_ESXiHosts {
        int ID
        string HostName
        string Notes
    }

    cloud_summary {
        int ID
        string vCenterServer
        string CountOfESXiHosts
        string CountOfVMs
    }
Loading

More entities are possible.

See also

Web Server: Pode Pode.Web

Database: mySQLite SQLite Tutorial

Top