NetXMS Support Forum

English Support => General Support => Topic started by: Mystery on September 16, 2016, 08:40:03 AM

Title: Net.interface changed to UNSUPPORTED
Post by: Mystery on September 16, 2016, 08:40:03 AM
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 :-)
Title: Re: Net.interface changed to UNSUPPORTED
Post by: Victor Kirhenshtein on September 28, 2016, 05:47:15 PM
Hi,

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

Best regards,
Victor
Title: Re: Net.interface changed to UNSUPPORTED
Post by: Mystery on October 04, 2016, 09:38:08 AM
Hello,

it does not support Net.Interface.BytesOut(Ethernet). This is very strange.
Title: Re: Net.interface changed to UNSUPPORTED
Post by: Mystery on October 04, 2016, 10:57:26 AM
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 :-)
Title: Re: Net.interface changed to UNSUPPORTED
Post by: Victor Kirhenshtein on October 04, 2016, 06:50:49 PM
Hi,

filter where exactly?

Best regards,
Victor
Title: Re: Net.interface changed to UNSUPPORTED
Post by: Mystery on October 06, 2016, 02:14:13 PM
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?
Title: Re: Net.interface changed to UNSUPPORTED
Post by: Victor Kirhenshtein on October 20, 2016, 09:32:08 AM
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
Title: Re: Net.interface changed to UNSUPPORTED
Post by: Mystery on October 20, 2016, 03:11:30 PM
It works pretty well. Thank you sir :-)