Hi to all
(im pretty new to LibreNMS and Linux)
I have LibreNMS 1.86 up and running on a Ubuntu server 20.04. Validate.php shows no error. Web-interface is perfectly working and i have 15 devices (Win-servers, Switches, NAS, etc…) in monitoring.
The only problem is autodiscover does not want to work. It does work and it finds new devices but it fails to add them. When i look at the eventlog it seems it’s a DNS-problem.
LLDP discovery of NET-B7-UTP-21 failed - Check name lookup System
LLDP discovery of GXW4200 failed - Check name lookup
When i ping these devices i can ping the FQDN but not the Netbios-names:
librenms@srv-librenms:~$ ping -c 2 NET-B7-UTP-21.lyceum.lyceumgenk.be
PING NET-B7-UTP-21.lyceum.lyceumgenk.be (172.16.0.21) 56(84) bytes of data.
64 bytes from net-b7-utp-21.lyceum.lyceumgenk.be (172.16.0.21): icmp_seq=1 ttl=64 time=1.81 ms
64 bytes from net-b7-utp-21.lyceum.lyceumgenk.be (172.16.0.21): icmp_seq=2 ttl=64 time=1.41 ms
— NET-B7-UTP-21.lyceum.lyceumgenk.be ping statistics —
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 1.414/1.612/1.811/0.198 ms
librenms@srv-librenms:~$ ping -c 2 NET-B7-UTP-21
ping: NET-B7-UTP-21: Name or service not known
On other linux-machines (older ubuntu’s and one Kali-vm) in our network the netbios-names are pingable. I know its an Ubuntu-problem, but i’ve tried everything i can find online.
librenms@srv-librenms:~$ ./discovery.php -h net-b7-utp-21 -d -m discovery-protocols
LibreNMS Discovery
SQL[select `migration` from `migrations` order by `id` desc limit 1 [] 0.49ms]
SQL[select count(*) as aggregate from `migrations` limit 1 [] 0.38ms]
SQL[SELECT version() [] 0.37ms]
===================================
Version info:
Commit SHA: 599c42353287cf2fd2e2f54a780c4c7dc8f00892
Commit Date: 1603847119
DB Schema: 2020_10_21_124101_allow_nullable_ospf_columns (187)
PHP: 7.4.3
MySQL: 10.3.25-MariaDB-0ubuntu0.20.04.1
RRDTool: 1.7.2
SNMP: NET-SNMP 5.8
==================================DEBUG!
Updating os_def.cache
Override discovery modules: discovery-protocols
SQL[SELECT * FROM devices
WHERE disabled = 0 AND snmp_disable = 0 AND hostname
LIKE ‘net-b7-utp-21’ ORDER BY device_id DESC 1.22ms]
./discovery.php net-b7-utp-21 2020-10-28 11:33:59 - 0 devices discovered in 0.440 secs
MySQL [1/0.00s]: Cell[1/0.00s] Row[-1/-0.00s] Rows[1/0.00s] Column[0/0.00s] Update[0/0.00s] Insert[0/0.00s] Delete[0/0.00s] RRD [0/0.00s]:
I will ask this question on the askubuntu-forum too. I followed all the steps in the LibreNMS-installation for Ubuntu 20.04 at Installing LibreNMS - LibreNMS Docs
Kind regards.
Hi @Jens_Veltjen
You can define the domains list in a linux server. You should list there all the possible domains and it should solve your issue. Have a look at the specific ubuntu netplan documentation for this.
Basically, you probably need to add something like this, supposing your interface is named ensxxxx. This is not tested, so again, check the netplan documentation.
In the interface configurations :
/run/netplan/*.yaml
/etc/netplan/*.yaml
/lib/netplan/*.yaml
ethernets:
<ensxxxx>:
nameservers:
search: [domain1.home.com, domain2.home.com, home.com]
Dear PipoCanaja,
Thank you very much for the quick reply.
I tried to add the extra search-section to the yaml-file but then after a reboot my LibreNMS is not reachable anymore (eth0 is just gone, if i comment that section and reboot it is reachable again).
/etc/netplan/00-installer-config.yaml
network:
ethernets:
eth0:
commented out → # dhcp4: true
commented out → # version: 2
addresses: [172.16.1.18/23]
gateway4: 172.16.0.1
nameservers:
commented out → # search: [ lyceum.lyceumgenk.be ]
addresses: [172.16.1.10, 172.16.1.11, 172.16.0.1]
You need to check the ubuntu netplan documentation. My understanding is that you only need to add the “search” line. Everything else must not be changed.
I appreciate the help very much mr/mss PipoCanaja but i checked https://netplan.io/ for all information. I think you are right about the search-option but if i add it, netplan gives an error.
MY YAML-FILE:
# This is the network config written by 'subiquity'
network:
ethernets:
eth0:
#dhcp4: true
#version: 2
addresses: [172.16.1.18/23]
gateway4: 172.16.0.1
nameservers:
search: [lyceum.lyceumgenk.be, lyceum]
addresses: [172.16.1.10, 172.16.1.11, 172.16.0.1]
(dont mind the dots before the hashtag’s)
But when i try this (sudo netplan try) it returns:
Error while loading /etc/netplan/00-installer-config.yaml, aborting.
If i comment the search-parameter it works again.
Thank you for your help, i’ll try my luck at the Ubuntu-forums too (but for now i’m running out of time ;-))
I don’t see anything wrong there, but I am not at all a netplan specialist. You have to be very careful with space indentation, cause it is part of the YAML structure. Use 2 spaces for each level, no tabs. “search” and “addresses” statement must start exactly after the same number of spaces.
# This is the network config written by 'subiquity'
network:
ethernets:
eth0:
#dhcp4: true
#version: 2
addresses: [172.16.1.18/23]
gateway4: 172.16.0.1
nameservers:
search: [lyceum.lyceumgenk.be, lyceum]
addresses: [172.16.1.10, 172.16.1.11, 172.16.0.1]
If it is still not OK, I don’t have any other idea.
That was it!
It’s not viewable directly, but i did indeed use TAB to indent (instead of spaces).
Thank you very much for the info.