Shumoku

YAML Reference

YAML syntax reference for network diagram definitions

Reference for all options available in YAML format.

To learn how to use it, see Basic Diagrams or Organizing with Groups.

Basic Structure

name: "Network Diagram"
description: "Optional description"

settings:
  # Graph settings

subgraphs:
  # Subgraph (group) definitions

nodes:
  # Node (device) definitions

links:
  # Link (connection) definitions

Settings

settings:
  direction: TB          # Layout direction
  theme: light           # Theme
  legend: true           # Show legend
  nodeSpacing: 50        # Node spacing
  rankSpacing: 100       # Rank spacing
  subgraphPadding: 20    # Subgraph inner padding
  canvas:                # Canvas settings
    preset: A4
    orientation: landscape
    width: 1920
    height: 1080
    dpi: 150
    fit: true
    padding: 20

direction

ValueAliasesDescription
TBtop-bottomTop to bottom
BTbottom-topBottom to top
LRleft-rightLeft to right
RLright-leftRight to left

theme

ValueDescription
lightLight theme
darkDark theme

legend

Display a legend explaining visual elements like bandwidth, device types, and cable types.

# Simple (default position: top-right)
legend: true

# Detailed settings
legend:
  enabled: true
  position: top-right      # Position
  showDeviceTypes: true    # Show device types
  showBandwidth: true      # Show bandwidth
  showCableTypes: true     # Show cable types
  showVlans: true          # Show VLANs
positionDescription
top-leftTop left
top-rightTop right (default)
bottom-leftBottom left
bottom-rightBottom right

canvas.preset (Paper Size)

A0, A1, A2, A3, A4, B0, B1, B2, B3, B4, letter, legal, tabloid

canvas.orientation

ValueAliasesDescription
portraitpPortrait
landscapelLandscape

Nodes

nodes:
  - id: router-1
    label: "Router 1"
    type: router
    shape: rounded
    parent: subgraph-id
    rank: 1
    vendor: yamaha
    model: rtx3510
    style:
      fill: "#ffffff"
      stroke: "#000000"
      strokeWidth: 2
      strokeDasharray: "5 5"
      textColor: "#333333"
      fontSize: 12
      fontWeight: bold
      opacity: 1.0

label

Single line or multi-line:

label: "Single line"

label:
  - "<b>Bold title</b>"
  - "Line 2"
  - "---"           # Separator line
  - "Line 3"

type (Device Type)

ValueAliasesDescription
router-Router
l3-switch-L3 Switch
l2-switchswitchL2 Switch
firewall-Firewall
load-balancerlbLoad Balancer
server-Server
access-pointapAccess Point
cpeonu, ontCPE (ONU / ONT)
console-serverterminal-serverConsole Server
cloud-Cloud
internet-Internet
vpn-VPN
databasedbDatabase
generic-Generic

shape (Node Shape)

ValueAliasesDescription
roundedroundRounded rectangle (default)
rectrectangleRectangle
circle-Circle
diamondrhombusDiamond
hexagon-Hexagon
cylinderdatabaseCylinder
stadiumpillStadium shape
trapezoid-Trapezoid

vendor / model (Vendor Icons)

Display hardware vendor icons:

vendor: yamaha
model: rtx3510

For cloud vendors:

vendor: aws
service: ec2
resource: instances

ports

Declare ports when you want links to attach to a specific interface on the device.

nodes:
  - id: sw-1
    label: "Switch 1"
    type: l2-switch
    ports:
      - id: p1
        label: "Gi1/0/1"
        interfaceName: GigabitEthernet1/0/1
FieldDescription
idIdentifier links refer to. Unique within the node
labelName shown on the diagram (e.g. Gi1/0/1)
interfaceNameFull OS / API interface name
identityKeys used to match monitoring data (see below)

Ports referenced by a link are created automatically. The example below produces p1 and ge-0/0/1 without a ports block, so declare ports explicitly only when you want to give them a label, an interfaceName or an identity.

links:
  - from: { node: fw-1, port: p1 }
    to: { node: sw-1, port: ge-0/0/1 }

identity

Keys that tie a device you drew by hand to the same device a monitoring system observed. Use these when combining hand-authored topology with a data source such as Zabbix or Prometheus.

nodes:
  - id: fw-1
    label: "Firewall"
    type: firewall
    identity:
      mgmtIp: 10.0.0.1
      chassisId: "aa:bb:cc:dd:ee:ff"
      sysName: fw01.example.com
      vendorIds:
        zabbix-hostid: "10780"
    ports:
      - id: p1
        label: "eth1/1"
        identity:
          ifName: GigabitEthernet1/0/1
FieldLevelDescription
mgmtIpnodeManagement IP (v4 or v6, as a string)
chassisIdnodeLLDP chassisId (MAC or vendor string)
sysNamenodeSNMP sysName
vendorIdsnodeSource-specific ids (e.g. zabbix-hostid)
ifNameportInterface name. The strong port key
ifIndexportifIndex. Weak — it can change across reboots
macportInterface MAC

Without these, a hand-drawn device never binds durably to a monitoring host. Matching falls back to names alone, which breaks the moment a display name changes. One key is enough; mgmtIp is the most reliable.

sysName must be the name the device reports about itself. Do not put an operational display name ("Core Switch #1") here — that belongs in label.

A sysName that disagrees with what the data source reports registers the same device twice, as two separate devices.


links:
  # Simple format
  - from: router-1
    to: switch-1

  # With port specification
  - from:
      node: router-1
      port: eth0
      ip: 192.168.1.1
    to:
      node: switch-1
      port: ge-0/0/0

  # Full specification
  - id: link-1
    from: router-1
    to: switch-1
    label: "10G Uplink"
    type: solid
    arrow: none
    standard: 10GBASE-SR
    redundancy: mlag
    vlan: [10, 20, 30]
    style:
      stroke: "#2196F3"
      strokeWidth: 2
      strokeDasharray: "5 5"
      opacity: 1.0
      minLength: 100
ValueAliasesDescription
solid-Solid line (default)
dasheddottedDashed line
thick-Thick line
double-Double line
invisiblehiddenHidden

arrow

ValueAliasesDescription
none-No arrow
forward->Forward
back<-Backward
both<->Bidirectional

Specify the Ethernet standard of the link. Faster standards are drawn with thicker lines, and the legend (when enabled) shows a thickness sample for each standard used.

links:
  - from: router-1
    to: switch-1
    standard: 10GBASE-SR
standardSpeed
1000BASE-T, 1000BASE-SX, 1000BASE-LX1G
2.5GBASE-T / 5GBASE-T2.5G / 5G
10GBASE-T, 10GBASE-SR, 10GBASE-LR10G
25GBASE-SR, 25GBASE-LR25G
40GBASE-SR4, 40GBASE-LR440G
100GBASE-SR4, 100GBASE-LR4100G

DAC / AOC cable assemblies (10GBASE-CR, 25G-AOC, etc.) are also accepted.

Link-level standard is a shorthand applied to both endpoints. For asymmetric links, set module.standard per endpoint instead — it overrides the link-level value:

links:
  - from:
      node: switch-1
      port: xe-0/0/1
      module:
        standard: 10GBASE-SR
    to:
      node: server-1
      port: eth0
      module:
        standard: 10GBASE-T

redundancy (Redundancy Type)

ValueAliasesDescription
havrrp, hsrp, glbp, keepaliveHA pair
vcvirtual-chassisVirtual Chassis
vss-VSS
vpc-vPC
mlagmclagMLAG
stackstacking, irfStack

vlan

Specify VLANs associated with the link. Color-coded based on VLAN ID.

# Single VLAN
vlan: 10

# Multiple VLANs (trunk)
vlan: [10, 20, 30]
  • Single VLAN: Displayed in color based on VLAN ID
  • Multiple VLANs: Displayed as trunk link with VLAN list in label

Subgraphs

subgraphs:
  - id: datacenter
    label: "Data Center"
    parent: null          # Root level
    direction: LR         # Internal layout direction
    vendor: aws
    service: vpc
    style:
      fill: "#f0f8ff"
      stroke: "#0072bc"
      strokeWidth: 2
      strokeDasharray: "5 5"
      labelPosition: top
      labelFontSize: 14
      padding: 20
      nodeSpacing: 50
      rankSpacing: 100

  - id: rack-1
    label: "Rack 1"
    parent: datacenter    # Nested

style.labelPosition

ValueDescription
topTop
bottomBottom
leftLeft
rightRight

Hierarchical Diagrams

Networks with multiple sites can be managed in multi-file configuration.

Basic Structure

# main.yaml - Parent file
name: "Multi-Site Network"

subgraphs:
  - id: headquarters
    label: "Headquarters"
    file: "./headquarters.yaml"   # External file reference
    style:
      fill: "#e3f2fd"
      stroke: "#1565c0"

  - id: branch
    label: "Branch Office"
    file: "./branch.yaml"
    style:
      fill: "#e8f5e9"
      stroke: "#2e7d32"

links:
  # Links across subgraphs reference devices directly
  - from:
      node: hq-router      # Device in headquarters.yaml
      port: wan1
    to:
      node: branch-router  # Device in branch.yaml
      port: wan1
    label: "Site-to-Site VPN"
    type: dashed
# headquarters.yaml - Child file
name: "Headquarters Network"

nodes:
  - id: hq-router
    label: "HQ-Router"
    type: router

  - id: hq-switch
    label: "HQ-Switch"
    type: l3-switch

links:
  - from: { node: hq-router, port: lan1 }
    to: { node: hq-switch, port: uplink }
    standard: 10GBASE-SR

file (External File Reference)

Specifying the file attribute on a subgraph loads its content from an external file.

subgraphs:
  - id: site-tokyo
    label: "Tokyo DC"
    file: "./sites/tokyo.yaml"

Links between devices in different subgraphs are specified by device name directly. The parser automatically detects which subgraph each belongs to and generates export connectors in child sheet views.

links:
  - from:
      node: tokyo-router    # Device in tokyo.yaml
      port: wan1
    to:
      node: osaka-router    # Device in osaka.yaml
      port: wan1
    label: "WAN Link"
    standard: 10GBASE-SR

Sheet Navigation

In hierarchical diagrams, click on a subgraph to navigate to its detail sheet. Each sheet displays breadcrumb navigation to return to parent sheets.


Complete Example

name: "Enterprise Network"
description: "Headquarters network diagram"

settings:
  direction: TB
  theme: light

subgraphs:
  - id: edge
    label: "Edge Layer"
    style:
      fill: "#fff5f5"
      stroke: "#d4a017"

  - id: core
    label: "Core Layer"
    style:
      fill: "#f0fff0"
      stroke: "#228b22"

nodes:
  - id: rt-01
    label:
      - "<b>RT-01</b>"
      - "192.168.1.1"
    type: router
    vendor: yamaha
    model: rtx3510
    parent: edge

  - id: sw-core-01
    label: "<b>SW-CORE-01</b>"
    type: l3-switch
    vendor: juniper
    model: ex4100-24mp
    parent: core

links:
  - from:
      node: rt-01
      port: lan1
    to:
      node: sw-core-01
      port: ge-0/0/0
    standard: 10GBASE-SR
    arrow: none

Vendor Icons

VendorExample
Yamahavendor: yamaha, model: rtx3510
Arubavendor: aruba, service: access-switch
AWSvendor: aws, service: ec2, resource: instances

On this page