diff --git a/README.md b/README.md index 8955a99bca8700ffeb7f6c13159720ac3f0ba5e5..38f675e39f6ef9fe0faed6878c0b41577bf095dd 100644 --- a/README.md +++ b/README.md @@ -47,9 +47,8 @@ Nice ;-) Have a look at the [contribution guidelines](CONTRIBUTING.md "Contribut ### 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] +OMD[build]:~$ ./local/bin/topology_data/create_topology_data.py -h +usage: create_topology_data.py [-h] [-s SEED_DEVICES] [-v] [-p PATH_IN_INVENTORY] [-c INVENTORY_COLUMNS] [-d DATA_SOURCE] [-t TIME_FORMAT] [-o OUTPUT_DIRECTORY] [-m] [-k] [-u | -l] 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 @@ -62,22 +61,25 @@ Version: 0.0.2-20231012 | Written by: thl-cmk, for more information see: https:/ options: -h, --help show this help message and exit - -s, --seed-devices S, __SEED_DEVICES + -s SEED_DEVICES, --seed-devices 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 + -p PATH_IN_INVENTORY, --path-in-inventory PATH_IN_INVENTORY Checkmk inventory path to the topology data. I.e. "networking,cdp_cache" - -c, --inventory-columns C, __INVENTORY_COLUMNS + -c INVENTORY_COLUMNS, --inventory-columns 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 + -d DATA_SOURCE, --data-source 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 + -t TIME_FORMAT, --time-format TIME_FORMAT Format string to render the time. (default: %Y-%m-%dT%H:%M:%S.%m) - -o, --output-directory O, __OUTPUT_DIRECTORY + -o OUTPUT_DIRECTORY, --output-directory 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 + -k, --keep-domain Do not remove the domain name from the neighbor name + -u, --uppercase Change neighbour names to all upper case + -l, --lowercase Change neighbour names to all lower case Usage: for CDP (the default): @@ -89,7 +91,6 @@ 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 @@ -107,7 +108,7 @@ HOST_MAP = { 'nexus03': 'NX03', } ``` -**NOTE**: the script will automatically remove the domain name form the neighbour names. +**NOTE**: the script will automatically remove the domain name form the neighbour names. See Usage option `-k` / `--keep-domain` At the same place you can exclude invalid hosts from the topology data ```