Standardisierter allgemeiner JSON-Datensatz zur Unterstützung aller Service Graph Connectors

  • Freigeben Version: Zurich
  • Aktualisiert 31. Juli 2025
  • 8 Minuten Lesedauer
  • Verwenden Sie die TSOM-Architektur, um standardisierte Service Graph Connectors mithilfe eines einheitlichen Schemas und einer wiederverwendbaren ETL-Logik zu unterstützen. Dies reduziert die Onboarding-Zeit für neue Connectors und vereinfacht die Integration mit CMDB.

    1. Definieren Sie das allgemeine JSON-Schema

    Standardisieren Sie die Ausgabe aller Service Graph Connectors, um sie an einem einzigen JSON-Format auszurichten, das dem TNI-Schema entspricht.

    Stellen Sie die folgenden Punkte sicher:
    1. Implementieren Sie die Konvertierungslogik im Sammler oder Adapter, um Ausgabedaten im allgemeinen Schema auszugeben.
    2. Stellen Sie Sicher:
      • Hierarchien „Slot-on-Slot“ oder „Karte auf Karte“ werden ausgeschlossen.
      • Logische Schnittstellen sind deutlich mit gekennzeichnet Virtual=wahr .
      • Gerätetypen sind an Modellklassen-Zuordnungen ausgerichtet.
    Hinweis:
    Das Schema sollte die Laufzeitanpassung an TNI-Changes unterstützen, falls verfügbar.

    Im Folgenden finden Sie den allgemeinen Datensatz des JSON-Schemas, der alle TSOM-Service Graph-Connectors unterstützt:

    {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "title": "Telco Generic Schema",
      "version": "2.0.1",
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "logical_composites": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/logical_composite"
              }
            }
          },
          "required": [
            "logical_composites"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "devices": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/device"
              }
            }
          },
          "required": [
            "devices"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "logical_connections": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/logical_connection"
              }
            }
          },
          "required": [
            "logical_connections"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "port_relations": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/port_relation"
              }
            }
          },
          "required": [
            "port_relations"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "logical_connection_relations": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/logical_connection_relation"
              }
            }
          },
          "required": [
            "logical_connection_relations"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "numbers": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/number"
              }
            }
          },
          "required": [
            "numbers"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "topologies": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/network_topology"
              }
            }
          },
          "required": [
            "topologies"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "topology_relations": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/network_topology_relation"
              }
            }
          },
          "required": [
            "topology_relations"
          ],
          "additionalProperties": false
        }
      ],
      "$defs": {
        "keyRef": {
          "type": "object",
          "properties": { "key": { "type": "string" }
          },
          "required": [ "key" ],
          "additionalProperties": false
        },
        "optionalKeyRef": { "type": [ "object", "null" ],
          "properties": {
            "key": { "type": "string" }
          },
          "additionalProperties": false
        },
        "value": {
          "type": "object",
          "properties": {
            "from": { "type": [ "integer" ], "default": 0, "minimum": 0 },
            "to": { "type": [ "integer" ], "default": 0, "minimum": 0 }
          },
          "required": [ "from", "to" ],
          "additionalProperties": false
        },
        "logical_composite": {
          "type": "object",
          "properties": {
            "class": { "type": "string", "enum": [ "logical_composite" ] },
            "key": { "type": "string" },
            "name": { "type": [ "string", "null" ] },
            "description": { "type": [ "string", "null" ] },
            "devices": { "type": "array", "items": { "$ref": "#/$defs/keyRef" } },
            "power_units": { "type": "array", "items": { "$ref": "#/$defs/pdu" } },
            "fan_shelves": { "type": "array", "items": { "$ref": "#/$defs/fan_shelf" } } },
          "required": [ "key", "name" ]
        },
        "pdu": {
          "type": "object",
          "properties": {
            "class": { "type": "string", "enum": [ "pdu" ] },
            "key": { "type": "string" },
            "name": { "type": [ "string", "null" ] },
            "description": { "type": [ "string", "null" ] },
            "model_name": { "type": [ "string", "null" ] },
            "model_number": { "type": [ "string", "null" ] },
            "unit_position": { "type": [ "integer", "null" ], "minimum": 1 },
            "slots": { "type": "array", "items": { "$ref": "#/$defs/slot" } }
          },
          "required": [ "key", "name" ]
        },
        "fan_shelf": {
          "type": "object",
          "properties": {
            "class": { "type": "string", "enum": [ "fan_shelf" ] },
            "key": { "type": "string" },
            "name": { "type": [ "string", "null" ] },
            "description": { "type": [ "string", "null" ] },
            "slots": { "type": "array", "items": { "$ref": "#/$defs/slot" } }
          },
          "required": [ "key", "name" ]
        },
        "device": {
          "type": "object",
          "properties": {
            "class": { "type": "string", "enum": [ "device" ] },
            "key": { "type": "string" },
            "name": { "type": [ "string", "null" ] },
            "description": { "type": [ "string", "null" ] },
            "ip_address": { "type": [ "string", "null" ] },
            "mac_address": { "type": [ "string", "null" ] },
            "serial_number": { "type": [ "string", "null" ] },
            "model_name": { "type": [ "string", "null" ] },
            "model_number": { "type": [ "string", "null" ] },
            "manufacturer": { "type": [ "string", "null" ] },
            "firmware_version": { "type": [ "string", "null" ] },
            "slots": { "type": "array", "items": { "$ref": "#/$defs/slot" } },
            "ports": { "type": "array", "items": { "$ref": "#/$defs/port" } } },
          "required": [ "key", "name", "serial_number" ]
        },
        "slot": {
          "type": "object",
          "properties": {
            "class": { "type": "string", "enum": [ "slot" ] },
            "key": { "type": "string" },
            "name": { "type": [ "string", "null" ] },
            "description": { "type": [ "string", "null" ] },
            "model_name": { "type": [ "string", "null" ] },
            "model_number": { "type": [ "string", "null" ] },
            "manufacturer": { "type": [ "string", "null" ] },
            "unit_position": { "type": [ "integer", "null" ], "minimum": 1 },
            "cards": { "type": "array", "items": { "$ref": "#/$defs/card" } }
          },
          "required": [ "key", "name" ]
        },
        "card": {
          "type": "object",
          "properties": {
            "class": { "type": "string", "enum": [ "card" ] },
            "key": { "type": "string" },
            "name": { "type": [ "string", "null" ] },
            "description": { "type": [ "string", "null" ] },
            "mac_address": { "type": [ "string", "null" ] },
            "serial_number": { "type": [ "string", "null" ] },
            "firmware_version": { "type": [ "string", "null" ] },
            "model_name": { "type": [ "string", "null" ] },
            "model_number": { "type": [ "string", "null" ] },
            "manufacturer": { "type": [ "string", "null" ] },
            "unit_position": { "type": [ "integer", "null" ], "minimum": 1 },
            "slots": { "type": "array", "items": { "$ref": "#/$defs/slot" } },
            "ports": { "type": "array", "items": { "$ref": "#/$defs/port" } }
          },
          "required": [ "key", "name" ]
        },
        "port": {
          "type": "object",
          "properties": {
            "class": { "type": "string", "enum": [ "port" ] },
            "key": { "type": "string" },
            "name": { "type": [ "string", "null" ] },
            "description": { "type": [ "string", "null" ] },
            "model_name": { "type": [ "string", "null" ] },
            "ip_address": { "type": [ "string", "null" ] },
            "virtual": { "type": "boolean", "default": false },
            "unit_position": { "type": [ "integer", "null" ], "minimum": 1 },
            "bandwidth_name": { "type": [ "string", "null" ] },
            "bandwidth_group": { "type": [ "string", "null" ] },
            "bandwidth": { "type": [ "integer", "null" ], "minimum": 0 },
            "mtu_size": { "type": [ "integer", "null" ], "minimum": 0 }
          },
          "required": [ "key", "name" ]
        },
        "number": {
          "type": "object",
          "properties": {
            "class": { "type": "string", "enum": [ "number" ] },
            "key": { "type": "string" },
            "name": { "type": [ "string", "null" ] },
            "related_ci_type": { "type": "string", "enum": [ "Network Interface", "Physical Connection", "Logical Connection", "Equipment", "Topology" ] },
            "related_ci": { "$ref": "#/$defs/keyRef" },
            "type": { "type": "string", "enum": [ "vlan_range", "vlan_subrange", "vlan", "lag_range", "lag" ] },
            "vlan_type": { "type": "string", "enum": [ "inner", "outer" ] },
            "value": { "$ref": "#/$defs/value" }
          },
          "required": [ "key", "name", "type", "related_ci_type", "related_ci", "value" ] },
        "logical_connection": {
          "type": "object",
          "properties": {
            "class": { "type": "string", "enum": [ "logical_connection" ] },
            "key": { "type": "string" },
            "name": { "type": [ "string", "null" ] },
            "description": { "type": [ "string", "null" ] },
            "model_name": { "type": [ "string", "null" ] },
            "bandwidth_group": { "type": [ "string", "null" ] },
            "bandwidth_name_a_to_z": { "type": [ "string", "null" ] },
            "bandwidth_name_z_to_a": { "type": [ "string", "null" ] },
            "bandwidth_a_to_z": { "type": [ "integer", "null" ], "minimum": 0 },
            "bandwidth_z_to_a": { "type": [ "integer", "null" ], "minimum": 0 },
            "equipment_a": { "$ref": "#/$defs/optionalKeyRef" },
            "equipment_z": { "$ref": "#/$defs/optionalKeyRef" },
            "port_a": { "$ref": "#/$defs/keyRef" },
            "port_z": { "$ref": "#/$defs/keyRef" }
          },
          "required": [ "key", "name", "equipment_a", "equipment_z", "port_a", "port_z" ]
        },
        "port_relation": {
          "type": "object",
          "properties": {
            "class": { "type": "string", "enum": [ "port_relation" ] },
            "parent": { "$ref": "#/$defs/keyRef" },
            "child": { "$ref": "#/$defs/keyRef" }
          },
          "required": [ "parent", "child" ]
        },
        "logical_connection_relation": {
          "type": "object",
          "properties": {
            "class": { "type": "string", "enum": [ "logical_connection_relation" ] },
            "sequence": { "type": [ "integer", "null" ], "minimum": 1 },
            "route": { "type": [ "integer", "null" ], "minimum": 1 },
            "parent": { "$ref": "#/$defs/keyRef" },
            "child": { "$ref": "#/$defs/keyRef" }
          },
          "required": [ "parent", "child" ]
        },
        "network_topology": {
          "type": "object",
          "properties": {
            "class": { "type": "string", "enum": [ "network_topology" ] },
            "key": { "type": "string" },
            "name": { "type": "string" },
            "model_name": { "type": [ "string", "null" ] },
            "devices": { "type": "array", "items": { "key": "#/$defs/optionalKeyRef" } },
            "logical_connections": { "type": "array", "items": { "key": "#/$defs/optionalKeyRef" } }
          },
          "required": [ "key", "name", "devices", "logical_connections" ]
        }
      }
    }

    2. Entkoppeln Sie die Konnektivität von ETL

    Stellen Sie Flexibilität sicher, indem Sie die Interaktionslogik des Geräts von der Transformationslogik (ETL-Erfassung) trennen. Anwender können ihre eigenen Sammler unabhängig von der ETL-Logik entwickeln.

    Stellen Sie die folgenden Punkte sicher:
    1. Entwerfen Sie Sammler so, dass sie sich nur auf Konnektivität und Datenkonvertierung in das einheitliche Schema konzentrieren.
    2. Verwenden oder wiederverwenden Sie einen EMS/NMS-Adapter (einschließlich Adapter von Drittanbietern wie Atrinet).
    3. Verschieben Sie die standardisierten Daten in ServiceNow-Importsätze.

    3. Konfigurieren Sie generisches ETL für CMDB-Updates

    Verwenden Sie eine einzelne wiederverwendbare ETL, um alle standardisierten Importsätze zu verarbeiten und die CMDB genau zu aktualisieren.

    Stellen Sie die folgenden Punkte sicher:

    1. Validiert, dass der Importsatz Daten im standardisierten JSON-Format enthält.
    2. Verwenden Sie die generische TSOM-ETL, um:
      • Erkennen Sie den Entitätstyp (z. B. Steckplatz, Karte, logische Schnittstelle).
      • Ordnen Sie jede Entität basierend auf der Modellzuordnungslogik der richtigen CI-Klasse zu.
      • Füllen Sie ggf. Felder einschließlich Bestandskategorie aus.

    Spezielle Bearbeitung:

    • Logische Schnittstellen → Porttabelle ( Virtual=wahr )
    • Logische Verbindungen → Tabelle für logische Verbindungen
    • PDU-Karten → PDU-Tabelle
    • Gerät → modellbasierte CI-Klasse (neueste Zuordnung, wenn mehrere vorhanden sind)

    4. Konfigurieren Sie die Unterstützung für Multi-Chassis- und Composite-Geräte

    Modellieren Sie komplexe Geräte wie Router mit mehreren Gehäusen mit richtigen CMDB-Beziehungen.

    Stellen Sie die folgenden Punkte sicher:
    1. Verwenden Sie das logische zusammengesetzte Konstrukt, um gruppierte Entitäten wie Router + PDU darzustellen.
    2. Definieren Sie einzelne Komponenten (Lüfter, Verwaltung, Slot) in ihrer jeweiligen Hierarchie.
    3. Ordnen Sie jede Entität gemäß der TNI-Modellierungsanleitung zu.
    Beispiel: Für ein 7750-2s-Gerät mit mehreren Gehäusen:
    • Logische Zusammensetzung → enthält Router und PDU
    • PDU → enthält Steckplätze → Karten → Untersteckplätze

    5. Aktivieren Sie die Erstellung von TNI-Entitäten basierend auf der Installation

    Stellen Sie die Konsistenz mit TNI-Standards sicher, ohne unnötige Datensatzerstellung.

    Stellen Sie die folgenden Punkte sicher:
    • Wenn TNI installiert ist:
      • Erstellen Sie automatisch eine TNI-Entität für jedes erkannte CI.
      • Legen Sie die Bestandskategorie entsprechend fest (z. B. „logische Verbindung“, „Schnittstelle“).
    • Wenn TNI nicht installiert ist: Überspringen Sie die Erstellung der TNI-Entität, um verwaiste oder ungültige Datensätze zu vermeiden.