From cdc3d75526361ec7f9b2128fd9be64ffa700d439 Mon Sep 17 00:00:00 2001 From: thl-cmk <thl-cmk@outlook.com> Date: Thu, 12 Oct 2023 15:09:36 +0000 Subject: [PATCH] Update README.md --- README.md | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/README.md b/README.md index 2ec3d5b..d672c0e 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,53 @@ In the Enterprise/Free/Cloud edition of CheckMK you can use the GUI to install t Nice ;-) Have a look at the [contribution guidelines](CONTRIBUTING.md "Contributing") +--- +### Usage + +``` +OMD[build]:~$ ~/local/bin/topology_data/create_topology_data.py -h +usage: create_topology_data.py [-h] [-s, --seed-devices S, __SEED_DEVICES] [-v] [-p, --path-in-inventory P, __PATH_IN_INVENTORY] [-c, --inventory-columns C, __INVENTORY_COLUMNS] [-d, --data-source D, __DATA_SOURCE] [-t, --time-format T, __TIME_FORMAT] + [-o, --output-directory O, __OUTPUT_DIRECTORY] [-m] + +This script creates the topology data file needed for the Checkmk "network_visualization" plugin by Andreas Boesl and schnetz. +For more information see https://forum.checkmk.com/t/network-visualization/41680 and https://exchange.checkmk.com/p/network-visualization + +The inventory data could be created with my inventory plugins: +CDP: https://thl-cmk.hopto.org/gitlab/checkmk/vendor-independent/inventory/inv_cdp_cache +LLDP: https://thl-cmk.hopto.org/gitlab/checkmk/vendor-independent/inventory/inv_lldp_cache + +Version: 0.0.2-20231012 | Written by: thl-cmk, for more information see: https://thl-cmk.hopto.org + +options: + -h, --help show this help message and exit + -s, --seed-devices S, __SEED_DEVICES + List of devices to start the topology discovery from. I.e. "CORE01, CORE02" + -v, --version Print version of this script and exit + -p, --path-in-inventory P, __PATH_IN_INVENTORY + Checkmk inventory path to the topology data. I.e. "networking,cdp_cache" + -c, --inventory-columns C, __INVENTORY_COLUMNS + Columns used from the inventory data. I.e. "device_id,local_port,device_port" + NOTE: the columns must be in the order: neighbour, local_port, neighbour_port + -d, --data-source D, __DATA_SOURCE + The source from which the topology data originates. I.e. "inv_CDP" for CDP data from the inventory. NOTE: right now this only an unused label. + -t, --time-format T, __TIME_FORMAT + Format string to render the time. (default: %Y-%m-%dT%H:%M:%S.%m) + -o, --output-directory O, __OUTPUT_DIRECTORY + Directory name where to save the topology data. I.e.: my_topology. Default is the actual date/time in "--time-format" format. + NOTE: the directory is a sub directory under "~/var/topology_data/" + -m, --make_default Set the created topology data as default + +Usage: +for CDP (the default): +~/local/bin/network-topology/create_topology_data.py -s "CORE01,CORE02" -m +or +~/local/lib/topology_data/create_topology_data.py -s "CORE01,CORE02" -m -p "networking,cdp_cache" -c "device_id,local_port,device_port" + +for LLDP: +~/local/lib/topology_data/create_topology.py -s "CORE01,CORE02" -m -p "networking,lldp_cache" -c "system_name,local_port_num,port_id" +``` + + --- ### Limitations -- GitLab