Hi everyone,
I seem to be getting the following kinds of messages in my logs exactly every 6 hours from my VMWare ESXi 6.5 host:
ifDescr: Device vmnic0 at 01:00.0 ntg3 -> vmnic0
ifDescr: Device vmnic1 at 01:00.1 ntg3 -> vmnic1
Does anyone know why these are being listed, and how I can suppress them?
The server is not being rebooted, and from the message I can’t see what is changing and why it is significant enough to be logged.
Hi,
I have the same problem, and it looks like it’s due to a difference between the discovery (running every 6 hours on my setup) and poller processes, specific to VMware OS.
As I undestand it, every 6 hours discovery will set ifDescr like Device vmnic0 at 01:00.0 ntg3.
Then, every polling time, poller will set ifDescr like vmnic0.
In the ports polling code (includes/polling/ports.inc.php) I found this bit of code that does the string pruning:
if ($device[‘os’] == ‘vmware’ && preg_match(‘/Device ([a-z0-9]+) at .*/’, $this_port[‘ifDescr’], $matches)) {
$this_port[‘ifDescr’] = $matches[1];
}
I added something very similar to the discovery code (includes/discovery/ports.inc.php), so that the discovery process does the same pruning before storing ifDescr. It seems to work well on my setup.
Now I need to make a bug report and learn how to send a patch
Hi everyone, sorry for the very late reply, and thanks @skanx for the solution.
It didn’t quite work for me, as the os is listed as " VMware ESXi 6.5.0 (build 5969303) " in LibreNMS.
I changed the first line of your code to the following
if (strpos($device['os'],'vmware') !==false && preg_match('/Device ([a-z0-9]+) at .*/', $snmp_data['ifDescr'], $matches)) {
And this seems to have worked. Can the devs check if this is a good solution and if it can be implemented?