Net.interface changed to UNSUPPORTED

Started by Mystery, September 16, 2016, 08:40:03 AM

Previous topic - Next topic

Mystery

Hello,

I have 5 similar servers running the same Windows version (Windows Server 2012 R2), same NetXMS agents version with the same subagents. One of these servers is reporting error when I am trying to monitor interface traffic via Net.Interface.BytesOut64(*).

Error :Status of DCI 617 (NetXMS Agent: Net.Interface.BytesOut64(Ethernet)) changed to UNSUPPORTED"

Interface name is correct, do you know where could be the problem? I am also experiencing this problem with one Windows 2008 server, but I guess it could be caused by old system.

Thank you in advance :-)

Victor Kirhenshtein

Hi,

does it support Net.Interface.BytesOut(Ethernet)?

Best regards,
Victor

Mystery

Hello,

it does not support Net.Interface.BytesOut(Ethernet). This is very strange.

Mystery

Ah, I solved it.

I was using template for these parameters and somehow one server refused to rename network interface to Ethernet (it showed as renamed but it wasn't). That's why it was reporting as unsupported ...)

Anyway, do you know how can I filter interface name by the first bytes of IP Address?

For an example, I have 10 network interfaces and one of them has IP 192.168.1.10 and I would like to return this one specific instance which begins by 192.168 ...

Thank you :-)

Victor Kirhenshtein

Hi,

filter where exactly?

Best regards,
Victor

Mystery

#5
Hello,

in instance Discovery ...

I configured parameter as Net.Interface.BytesOut({instance}) and in instance discovery I am using Agent List with List name Net.InterfaceList. I found some source code on this forum, so I modified it to:

if ($1 ~= "10.200.*.*")
{
   return %(true, $1);  // at this point $1 contains first matching group
}
return false;


But it is not working, I guess that if statement ($1 ~= "10.200.*.*") is incorrect. I would like to return one instance which start with 10.200 IP address. Any idea how to do that? Thank you

Edit: Well, it is returning whole instance (ifType, IP, MAC Name) ... How I can return only Name?

Victor Kirhenshtein

Hi,

~= will replace $1 which is instance on entry with first capture group, but you don't have one, so returning empty string. Server consider empty string as instruction no use original instance. Also, your regular expression is wrong. Something like this should work (didn't actually test it):


// Each line has format
// index addr type macaddr name
if ($1 ~= "[0-9]+ 10\\.200\\.[0-9]+\\.[0-9]+/[0-9]+ [0-9]+ [0-9A-Fa-f]+ (.*)")
{
   return %(true, $1);
}
return false;


This script checks that IP address part starts with 10.200 and extracts interface name as new instance.

Best regards,
Victor

Mystery

It works pretty well. Thank you sir :-)