Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Filipp Sudanov

#47
You can do
return DataCollection::ERROR;
this will prevent storing of a value into the DB, DCI will show <ERROR>.

These constants can be found here: https://netxms.org/documentation/nxsl-latest/#const-dci-exitcode
#48
Thanks for the info, developers fixed a few resource leaks in maps, to that could have been it.
#49
Цепочка может уходить весьма глубоко, можно например

for (i : $node.interfaces) {
  println(i.peerInterface.node.name);
}

Не обязательно писать цепочкой, можно раскапывать по одному шагу и сохранять в переменные:

for (i : $node.interfaces) {
  p = i.peerInterface;
  n = p.node;
  name = n.name;
  println(name);
}

но может оказаться, что в этой цепочке какой-то атрибут является null, а не объектом, и тогда все ломается в примере выше, если переменная p будет null, то в следующей строчке, где мы делаем p.node, то есть пытаемся получить атрибут node мы не можем этого сделать, потому что у null нет такого атрибута. Чтоб не ломалось, можно делать проверки в тех местах, которые могут оказаться null, например peerInterface:

for (i : $node.interfaces) {
  p = i.peerInterface;
  if (p != null) {
    println(p.node.name);
  }
}

Или использовать новый синтаксис, появившийся в версии 4.5, называется это safe dereference и если кто-то и окажется null, то попытка обратиться к его атрибуту не завершится ошибкой. Но .? должыть быть в цепочке начиная с первого места, которое может оказаться null и до конца цепочки:

for (i : $node.interfaces) {
  println(i.peerInterface?.node?.name);
}

Peer ноды определяются во время topology poll
#50
А что-нибудь такое:

  for (iface : $node.interfaces)                                                                                                                 
  {                                                                                                                                              
      peerIface = iface.peerInterface;
      if (peerIface != null)                                                                                                                     
      {                                              
          println("Port " .. peerIface.name .. " on " .. iface.peerNode.name);
      }                                                                                                                                          
  }
#51
Which exactly dashboard elements are used on that dashboard?

In Windows task manager in "Details" screen right-click on any header in the table, click "Select columns" and add "User objects" and "GDI objects". Check these values after a day, if they grow or stay stable.
#52
General Support / Re: ssh does not work
April 07, 2026, 04:27:08 PM
Note the %(username) macro in object tool's command line. This object tool has an input field configured, so when tool is executed a dialog with input field should appear. Username should be entered there. If username is not entered, then command line is formed incorrectly.

You can check actual command line by changing
cmd /c "ssh %(in:username)@%u || pause"
to
echo cmd /c "ssh %(in:username)@%u || pause"
it will just display the command line on the screen.

Also, you can use ssh username specified in node properties, in this cause use this command:
cmd /c "ssh %{ssh.login}@%u || pause"
and remove input field from the object tool.
#53
First of all two first lines should end with ; char.
There is no isInSubnet() method on InetAddress class, but there is contains() method on subnet, so we should go opposite way and check it on the subnet, there's an example here: https://netxms.org/documentation/nxsl-latest/#_instance_methods_18
So, modifying your code:

subnetObject = InetAddress("192.168.56.0", 24);

if (subnetObject.contains($node.ipAddress)) {
    return 1;  // match
} else {
    return 0;  // no match
}
#54
General Support / Re: Port View is Blank
April 07, 2026, 02:50:00 PM
Port view works only for devices for which NetXMS has device drivers, so some of these drivers are capable of getting port information. Zyxel devices are not in priority for driver development due to limited resources.
#55
Replicated that, forwarded to developers
#56
Fix should be in 6.1, it's expected in the coming days.
#57
That's a new feature to display gaps on charts if data interval is several times longer then collection interval. It went out a bit buggy in 6.0, some fixes should be in 6.0.4, which exactly version of GUI do you have?
#58
yes, because newer agent updated schema of agent database and we don't have automation for agent downgrade with that. Just delete nxagentd.db file, it will be recreated on agent start.
#59
You can add this to agent config for additional debug:

EnableSSLTrace = yes
DebugTags = ssl:8
DebugTags = tunnel:8

Does roll-back to 5.2.8 help (agent protocol is backward and forward compatible, so you can use older agent with newer server).
#60
General Support / Re: ssh does not work
March 10, 2026, 04:08:19 PM
For SSH - please show how your object tool is currently configured.

For MikroTik - is it showing SNMP = Yes? What driver it currently uses (this is also visible in Overview tab).

There's currently no support for CAPsMAN