Collection of CheckMK checks (see https://checkmk.com/). All checks and plugins are provided as is. Absolutely no warranty. Send any comments to thl-cmk[at]outlook[dot]com

Skip to content
Snippets Groups Projects
Commit 338ec415 authored by thl-cmk's avatar thl-cmk :flag_na:
Browse files

Update README.md

parent 79171869
No related branches found
No related tags found
No related merge requests found
......@@ -20,7 +20,8 @@ Usage with CDP (this is the default):
Usage with LLDP:
```
~/local/lib/topology_data/create_topology_data.py -s CORE01 -m -p "networking,lldp_cache" -c "system_name,local_port_num,port_id" -d inv_LLDP
~/local/lib/topology_data/create_topology_data.py -s CORE01 -m --lldp -d inv_LLDP
```
---
......@@ -48,7 +49,7 @@ Nice ;-) Have a look at the [contribution guidelines](CONTRIBUTING.md "Contribut
```
OMD[build]:~$ ~/local/bin/topology_data/create_topology_data.py -h
usage: create_topology_data.py [-h] [-s SEED_DEVICES [SEED_DEVICES ...]] [-v] [-p PATH_IN_INVENTORY] [-c INVENTORY_COLUMNS] [-d DATA_SOURCE] [-t TIME_FORMAT] [-o OUTPUT_DIRECTORY] [-m] [-k] [-u | -l]
usage: create_topology_data.py [-h] [-c INVENTORY_COLUMNS] [-d DATA_SOURCE] [-m] [-o OUTPUT_DIRECTORY] [-p PATH_IN_INVENTORY] [-s SEED_DEVICES [SEED_DEVICES ...]] [-v] [--debug] [--keep-domain] [--lldp] [--lowercase] [--time-format TIME_FORMAT] [--uppercase]
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
......@@ -57,29 +58,31 @@ 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
Version: 0.0.4-202310116 | 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 [SEED_DEVICES ...], --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, --path-in-inventory PATH_IN_INVENTORY
Checkmk inventory path to the topology data. I.e. "networking,cdp_cache"
-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, --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, --time-format TIME_FORMAT
Format string to render the time. (default: %Y-%m-%dT%H:%M:%S.%m)
-m, --make-default Set the created topology data as default
-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
-p PATH_IN_INVENTORY, --path-in-inventory PATH_IN_INVENTORY
Checkmk inventory path to the topology data. I.e. "networking,cdp_cache"
-s SEED_DEVICES [SEED_DEVICES ...], --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
--debug Print debug information
--keep-domain Do not remove the domain name from the neighbor name
--lldp Set data source to inv_LLDP, inventory path to "networking,lldp_cache" and columns to "system_name,local_port_num,port_id"
--lowercase Change neighbour names to all lower case
--time-format TIME_FORMAT
Format string to render the time. (default: %Y-%m-%dT%H:%M:%S.%m)
--uppercase Change neighbour names to all upper case
Usage:
for CDP (the default):
......@@ -88,8 +91,9 @@ or
~/local/bin/network-topology/create_topology_data.py -s Core01 Core02 -m -p "networking,cdp_cache" -c "device_id,local_port,device_port" -d inv_CDP
for LLDP:
~/local/bin/network-topology/create_topology_data.py -s Core01 Core02 -m --lldp
or
~/local/bin/network-topology/create_topology_data.py -s Core01 Core02 -m -p "networking,lldp_cache" -c "system_name,local_port_num,port_id" -d inv_LLDP
OMD[build]:~$
```
......@@ -161,6 +165,19 @@ STATIC_CONNECTIONS = [
</details>
<details><summary>Can I use the tool with other inventory data plugins</summary>
\
Yes. If you don\`t use my plugins you can still use this tool to create your topology data, for this you need the path to your topology data in the inventory. For example for my CDP plugin this is _Networking_ -> _CDP Cache_ internally known as `networking` -> `cdp_cache`". The data must form a table in the inventory that contains at least the three columns for the neighbor name, neighbor port, and local port. For these columns you need the internal names. I.e. for my CDP plugin the columns _Neighbor device_, _Neighbor port_ and _Local port_ are known internally as `device_id`, `local_port` and `device_port`. With this information, you can run the tool like this
```
~/local/bin/network-topology/create_topology_data.py -s Core01 -p "networking,cdp_cache" -c "device_id,local_port,device_port"
```
Wehre -p is the path to your inventory data and -c are the columns used in the order _neighbor_, _local port_, _neighbor port_.
</details>
---
### Sample Output
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment