Skip to content

Relations and hierarchies

graph draws dependencies and topology from -Source and -Target (-Layout Force | Circular | Layered, -EdgeLabel for ports on the lines, -Undirected); tree draws a hierarchy from -Path (-Orient LR | TB | Radial, -Depth, -RootName); sankey and chord show flows and overlaps between the same set of things.

Network path (layered graph)

Columns follow the links; ports on the lines, details in the tooltip.

$links = @(
    [pscustomobject]@{ From = 'fw-01'; To = 'core-01'; Kind = 'Firewall'; ToKind = 'Switch'; Ports = 'port9 > Te1/0/1'; Vlan = 'trunk' }
    [pscustomobject]@{ From = 'core-01'; To = 'access-01'; Kind = 'Switch'; ToKind = 'Switch'; Ports = 'Te1/0/11 > Te1/1/1'; Vlan = 'trunk' }
    [pscustomobject]@{ From = 'core-01'; To = 'access-02'; Kind = 'Switch'; ToKind = 'Switch'; Ports = 'Te1/0/12 > Te1/1/1'; Vlan = 'trunk' }
    [pscustomobject]@{ From = 'access-01'; To = 'esx-01'; Kind = 'Switch'; ToKind = 'Host'; Ports = 'Gi1/0/11 > vmnic0'; Vlan = '120' }
    [pscustomobject]@{ From = 'access-02'; To = 'esx-01'; Kind = 'Switch'; ToKind = 'Host'; Ports = 'Gi1/0/11 > vmnic1'; Vlan = '120' }
    [pscustomobject]@{ From = 'esx-01'; To = 'vm-web'; Kind = 'Host'; ToKind = 'VM'; Ports = ''; Vlan = '120' }
    [pscustomobject]@{ From = 'esx-01'; To = 'vm-db'; Kind = 'Host'; ToKind = 'VM'; Ports = ''; Vlan = '120' }
)
New-UDEChart -Data $links -Type graph -Layout Layered -Source From -Target To -GroupBy Kind -TargetGroup ToKind -EdgeLabel Ports -Undirected `
    -TooltipTemplate "{From} > {To}`nPorts: {Ports}`nVLAN: {Vlan}" -Height 380px

Folders as a tree

One "a/b/c" column or several -Path columns; label and tooltip from templates.

$vms = @(
    [pscustomobject]@{ Folder = 'vCenter/Customer A/Production/vm-a1'; Name = 'vm-a1'; Cpu = 4; RamGB = 16 }
    [pscustomobject]@{ Folder = 'vCenter/Customer A/Production/vm-a2'; Name = 'vm-a2'; Cpu = 8; RamGB = 32 }
    [pscustomobject]@{ Folder = 'vCenter/Customer A/Test/vm-a3'; Name = 'vm-a3'; Cpu = 2; RamGB = 8 }
    [pscustomobject]@{ Folder = 'vCenter/Customer B/Production/vm-b1'; Name = 'vm-b1'; Cpu = 4; RamGB = 16 }
    [pscustomobject]@{ Folder = 'vCenter/Infrastructure/Management/vm-mgmt'; Name = 'vm-mgmt'; Cpu = 2; RamGB = 4 }
)
New-UDEChart -Data $vms -Type tree -Path Folder -Depth 4 -LabelTemplate '{Name} ({Cpu} vCPU)' -TooltipColumns 'vCPU=Cpu', 'Memory (GB)=RamGB' -Height 360px

Flows (sankey)

$flows = @(
    [pscustomobject]@{ Source = 'Mail'; Target = 'Service Desk'; Value = 520 }
    [pscustomobject]@{ Source = 'Phone'; Target = 'Service Desk'; Value = 310 }
    [pscustomobject]@{ Source = 'Monitoring'; Target = 'Server'; Value = 140 }
    [pscustomobject]@{ Source = 'Service Desk'; Target = 'Closed'; Value = 700 }
    [pscustomobject]@{ Source = 'Service Desk'; Target = 'Server'; Value = 130 }
    [pscustomobject]@{ Source = 'Server'; Target = 'Closed'; Value = 250 }
    [pscustomobject]@{ Source = 'Server'; Target = 'Waiting'; Value = 20 }
)
New-UDEChart -Data $flows -Type sankey -Height 340px

Overlaps (chord)

$shared = @(
    [pscustomobject]@{ Source = 'Virtualisation'; Target = 'Backup'; Assets = 410 }
    [pscustomobject]@{ Source = 'Virtualisation'; Target = 'EDR'; Assets = 380 }
    [pscustomobject]@{ Source = 'Backup'; Target = 'EDR'; Assets = 350 }
    [pscustomobject]@{ Source = 'EDR'; Target = 'CMDB'; Assets = 300 }
    [pscustomobject]@{ Source = 'Backup'; Target = 'CMDB'; Assets = 260 }
)
New-UDEChart -Data $shared -Type chord -Source Source -Target Target -Value Assets -Legend None -Height 360px