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

Update TROUBLESHOOTING.md

parent b1ebb86b
No related branches found
No related tags found
No related merge requests found
......@@ -109,13 +109,13 @@ This can happen if NVDCT cannot map the neighbor names from CDP/LLDP to host nam
The best way to solve such issues use the same name on the device and in Checkmk. If this not possible there are several options how NVDCT converts neighbor names to Checkmk names
1. NVDCT removes the domain name and only uses the host name
1. You can remove the domain name from the neighbour name.
If the FQDN is used in Checkmk, this kan be disabled with the option `--keep-domain` or in the configuratin file with
To use only the hostname part from the neighbour as chekmk host name, use the option `--remove-domain` or in the configuratin file set `remove_domain` under `[SETTINGS]` to `true`.
```
[SETTINGS]
keep_domain = true
remove_domain = true
```
1. NVDCT can convert all neighbor names to upper or lower case
......@@ -136,18 +136,35 @@ The best way to solve such issues use the same name on the device and in Checkmk
prefix = "yor-prefix-"
```
4. NVDCT can map neighbor names to Checkmk names via the [HOST_MAP] section.
4. NVDCT can map neighbor names to Checkmk names via the L2_[HOST_MAP] section.
If all this options dont solve your nameig issues, there is as last option the [HOST_MAP] section in the settings file. Here you can map neighbor names to Checkmk names.
If all this options dont solve your nameig issues, there is as last option the [HOST_MAP] section in the settings file.
Here you can map neighbor names to Checkmk names.
```
[HOST_MAP]
[L2_HOST_MAP]
inventory_neighbour1 = "cmk_host1"
inventory_neighbour2 = "cmk_host2"
inventory_neighbour3 = "cmk_host3"
```
You can use the NVDCT log file to check for such issues
5. Use of L2_NEIGHBOUR_REPLACE_REGEX
If you need ro replace more comlex parts of the neighbour name (ie. serial numbers) you can use the L2_NEIGHBOUR_REPLACE_REGEX
section in the config file. Ie. to replace the serial number at the end of some neighbour names use
```
[L2_NEIGHBOUR_REPLACE_REGEX]
"\\([0-9a-zA-Z]+\\)$" = ""
```
You can also use this section to drop neighbour (Ie. MAC addresses).
```
[L2_NEIGHBOUR_REPLACE_REGEX]
"^(([0-9a-fA-F]){2}[:.-]?){5}([0-9a-fA-F]){2}$" = ""
```
6. You can use the NVDCT log file to check for such issues
```
OMD[build]:~$ grep "not found in CMK" ~/var/log/nvdct.log
......@@ -165,20 +182,19 @@ In most environments you will find some devices in the CDP/LLDP topology that ar
There are two options in the configuration file to remove such devices from the topology.
Under `DROP_HOST` you can simply add neighbor names to be excluded from the topology creation.
Under `L2_DROP_HOST` you can simply add neighbor names to be excluded from the topology creation.
```
DROP_HOSTS = [
L2_DROP_HOSTS = [
"not advertised",
"a nother invalid name",
]
```
If `DROP_HOST` is not sufficient, you can use `DROP_HOSTS_REGEX`. It has the same purpose as DROP_HOSTS, but the names are interpreted here as Python regex. You can use this, for example, to remove neighbors with a MAC address as a neighbor name from the topology.
If `L2_DROP_HOST` is not sufficient, you can use `L2_NEIGHBOUR_REPLACE_REGEX`. Ie. to remove neighbours with a MAC addresses as name use:
```
DROP_HOSTS_REGEX = [
"^(([0-9a-fA-F]){2}[:.-]?){5}([0-9a-fA-F]){2}$",
]
[L2_NEIGHBOUR_REPLACE_REGEX]
"^(([0-9a-fA-F]){2}[:.-]?){5}([0-9a-fA-F]){2}$" = ""
```
</details>
......
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