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 704d61f9 authored by thl-cmk's avatar thl-cmk :flag_na:
Browse files

Update HOWTO.md

parent 394353c7
No related branches found
No related tags found
No related merge requests found
# HOWTO
1. Requirements
## 1. Requirements
You need at least CMK 2.2.0 or CMK 2.3.0 to use the Network visualization
You need at least CMK 2.2.0 or CMK 2.3.0 to use the Network visualization
1. Installed packages
## 2. Installed packages
For the Network visualization to work you need to install some additional plugins (MKPs).
For the Network visualization to work you need to install some additional plugins (MKPs).
For the OSI layer 2 topology
- [CDP cache HW/SW inventory plugin](https://thl-cmk.hopto.org/gitlab/checkmk/vendor-independent/inventory/inv_cdp_cache)
- [LLDP cache HW/SW inventory plugin](https://thl-cmk.hopto.org/gitlab/checkmk/vendor-independent/inventory/inv_lldp_cache)
For the OSI layer 2 topology
- [CDP cache HW/SW inventory plugin](https://thl-cmk.hopto.org/gitlab/checkmk/vendor-independent/inventory/inv_cdp_cache)
- [LLDP cache HW/SW inventory plugin](https://thl-cmk.hopto.org/gitlab/checkmk/vendor-independent/inventory/inv_lldp_cache)
For the OSI layer 3 topology
- [IPv4 address HW/SW inventory plugin](https://thl-cmk.hopto.org/gitlab/checkmk/vendor-independent/inventory/inv_ipv4_addresses)
For the OSI layer 3 topology
- [IPv4 address HW/SW inventory plugin](https://thl-cmk.hopto.org/gitlab/checkmk/vendor-independent/inventory/inv_ipv4_addresses)
For the name to service matching (optional, but recommended)
- [INV_IFNAME HW/SW inventory plugin](https://thl-cmk.hopto.org/gitlab/checkmk/vendor-independent/inventory/inv_ifname)
For the name to service matching (optional, but recommended)
- [INV_IFNAME HW/SW inventory plugin](https://thl-cmk.hopto.org/gitlab/checkmk/vendor-independent/inventory/inv_ifname)
For the topology data creation
- [NVDCT (NetworkVisualizationDataCreationTool) plugin](https://thl-cmk.hopto.org/gitlab/checkmk/vendor-independent/nvdct)
For the topology data creation
- [NVDCT (NetworkVisualizationDataCreationTool) plugin](https://thl-cmk.hopto.org/gitlab/checkmk/vendor-independent/nvdct)
For topology visualization (**only CMK 2.2.0x**, CMK 2.3.0 has this built-in)
- [Network visualization plugin](https://exchange.checkmk.com/p/network-visualization)
For topology visualization (**only CMK 2.2.0x**, CMK 2.3.0 has this built-in)
- [Network visualization plugin](https://exchange.checkmk.com/p/network-visualization)
**Note**: [Here](https://thl-cmk.hopto.org/gitlab/explore/projects/topics/Network%20Visualization) you can find all plugins from this page at one place.
**Note**: [Here](https://thl-cmk.hopto.org/gitlab/explore/projects/topics/Network%20Visualization) you can find all plugins from this page at one place.
If you are done with the package installation your package repository should look like this
![](img/installed_packages.png "Installed extensions")
If you are done with the package installation your package repository should look like this
![](img/installed_packages.png "Installed extensions")
Here you will find help on [Checkmk extension packages (MKPs)](https://docs.checkmk.com/latest/en/mkps.html).
1. Checkmk Rules
## 3. Checkmk Rules
You should have two rules:
- Enable the HW/SW inventory for all your (network) devices that you want to include in the topology.
![](img/hw_sw_inventory_rule.png "HW/SW inventory rule")
- Normal check interval for the HW/SW inventory check
![](img/hw_sw_inventory_check_interval.png "Check interval for HW/SW inventory")
You should have two rules:
- Enable the HW/SW inventory for all your (network) devices that you want to include in the topology.
![](img/hw_sw_inventory_rule.png "HW/SW inventory rule")
- Normal check interval for the HW/SW inventory check
![](img/hw_sw_inventory_check_interval.png "Check interval for HW/SW inventory")
Here you will find help on CMKs [HW/SW Inventory](https://docs.checkmk.com/latest/en/inventory.html)
Here you will find help on CMKs [HW/SW Inventory](https://docs.checkmk.com/latest/en/inventory.html)
1. Host labels
## 4. Host labels
Some parts of the NVDCT are dependent on the presence of certain host labels:
- `nvdct/routing_capable:yes` for the IPv4 topology and `--pre-fetch` option
- `nvdct/has_cdp_neighbours:yes` for the `--pre-fetch` option
- `nvdct/has_lldp_neighbours:yes` for the `--pre-fetch` option
Some parts of the NVDCT are dependent on the presence of certain host labels:
- `nvdct/routing_capable:yes` for the IPv4 topology and `--pre-fetch` option
- `nvdct/has_cdp_neighbours:yes` for the `--pre-fetch` option
- `nvdct/has_lldp_neighbours:yes` for the `--pre-fetch` option
After installing the HW/SW inventory plugins, you must therefore perform rediscovery of host labels.
After installing the HW/SW inventory plugins, you must therefore perform rediscovery of host labels.
![_**Bulk discovery**_ -> _**Only discover new host labels**_](img/bulk-discovery.png "Bulk discovery -> Only discover new host labels")
![_**Bulk discovery**_ -> _**Only discover new host labels**_](img/bulk-discovery.png "Bulk discovery -> Only discover new host labels")
Depending on the host data, the host labels should then be found on the host.
![](img/host_labels.png)
Depending on the host data, the host labels should then be found on the host.
![](img/host_labels.png)
Here you will find help on [Including labels found in the discovery check](https://docs.checkmk.com/latest/en/labels.html?lquery=host%20label#discovery_check)
Here you will find help on [Including labels found in the discovery check](https://docs.checkmk.com/latest/en/labels.html?lquery=host%20label#discovery_check)
1. Check the HW/SW inventory
## 5. Check the HW/SW inventory
Run the HW/SW inventory at least once for each host and then check whether the required data has been found. If so, proceed to the next step. If your device has CDP neighbors, you should see a table like the table for LLDP.
![](img/hw_sw_inventory.png)
Run the HW/SW inventory at least once for each host and then check whether the required data has been found. If so, proceed to the next step. If your device has CDP neighbors, you should see a table like the table for LLDP.
![](img/hw_sw_inventory.png)
1. Modify the user settings for NVDCT
## 6. Modify the user settings for NVDCT
Before you create the topology data, take a look at `~/local/bin/nvdct/conf/nvdct.toml`. Here you can fine tune some aspects of the topology creation. Before you do this, please create a copy of the nvdct.toml file (e.g. my_nvdct.toml) and only change the copy. By working with a copy of the `nvdct.toml` file, you ensure that your changes will survive the next update of the `nvdct.mkp`. For the CDP/LLDP topologies add at least your seed devices - from where NVDCT will start to create the topology - in the `SEED_DEVICES` section.
Before you create the topology data, take a look at `~/local/bin/nvdct/conf/nvdct.toml`. Here you can fine tune some aspects of the topology creation. Before you do this, please create a copy of the nvdct.toml file (e.g. my_nvdct.toml) and only change the copy. By working with a copy of the `nvdct.toml` file, you ensure that your changes will survive the next update of the `nvdct.mkp`. For the CDP/LLDP topologies add at least your seed devices - from where NVDCT will start to create the topology - in the `SEED_DEVICES` section.
```
# list of (additional to -s/--seed-devices) seed devices
SEED_DEVICES = [
"DEVICE01",
"DEVICE02",
"DEVICE03",
]
```
In the [SETTINGS] section enable the layers you want to create. By default NVDCT will onyl create the CDP layer.
```
# settings equivalent to CLI options
[SETTINGS]
# layers = ["LLDP", "CDP", "STATIC", "CUSTOM", "L3v4"]
layers = ["LLDP", "L3v4"]
```
```
# list of (additional to -s/--seed-devices) seed devices
SEED_DEVICES = [
"DEVICE01",
"DEVICE02",
"DEVICE03",
]
```
In the [SETTINGS] section enable the layers you want to create. By default NVDCT will onyl create the CDP layer.
```
# settings equivalent to CLI options
[SETTINGS]
# layers = ["LLDP", "CDP", "STATIC", "CUSTOM", "L3v4"]
layers = ["LLDP", "L3v4"]
```
## 7. Create the topology data
```
~/local/bin/nvdct/nvdct.py -u ~/local/bin/nvdct/conf/my_nvdct.toml
```
1. Create the topology data
For CMK 2.3.0 you should find the created data under `~/var/check_mk/topology/data`. There should be also a symbolic link to the default topology.
```
~$ ls -ls ~/var/check_mk/topology/data
total 20
4 drwx------ 2 build build 4096 Apr 30 13:54 2024-04-30T13:54:51.04/
4 drwx------ 2 build build 4096 Apr 30 14:17 2024-04-30T14:17:05.04/
4 drwx------ 2 build build 4096 Apr 30 14:20 2024-04-30T14:20:07.04/
4 drwx------ 2 build build 4096 Apr 30 14:25 2024-04-30T14:25:17.04/
4 drwx------ 2 build build 4096 May 1 13:15 2024-05-01T13:15:51.05/
0 lrwxrwxrwx 1 build build 57 Apr 30 14:25 default -> /omd/sites/build/var/check_mk/topology/data/2024-04-30T14:25:17.04/
```
~/local/bin/nvdct/nvdct.py -u ~/local/bin/nvdct/conf/my_nvdct.toml
```
```
For CMK 2.2.0 you will find those files under `~/var/topology_data/`
For CMK 2.3.0 you should find the created data under `~/var/check_mk/topology/data`. There should be also a symbolic link to the default topology.
```
~$ ls -ls ~/var/check_mk/topology/data
total 20
4 drwx------ 2 build build 4096 Apr 30 13:54 2024-04-30T13:54:51.04/
4 drwx------ 2 build build 4096 Apr 30 14:17 2024-04-30T14:17:05.04/
4 drwx------ 2 build build 4096 Apr 30 14:20 2024-04-30T14:20:07.04/
4 drwx------ 2 build build 4096 Apr 30 14:25 2024-04-30T14:25:17.04/
4 drwx------ 2 build build 4096 May 1 13:15 2024-05-01T13:15:51.05/
0 lrwxrwxrwx 1 build build 57 Apr 30 14:25 default -> /omd/sites/build/var/check_mk/topology/data/2024-04-30T14:25:17.04/
```
For CMK 2.2.0 you will find those files under `~/var/topology_data/`
1. Go to CMK and show the network topology
## 8. Go to CMK and show the network topology
Now you can show the Network topology ![](img/show_topology.png)
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