News:

We really need your input in this questionnaire

Main Menu

Recent posts

#91
General Support / Database Upgrade Fails
Last post by murtalit - April 11, 2026, 05:32:12 AM
Hi,

when I tray to upgrade the database, I'll get the following error:

Upgrading database...
Upgrading from version 60.7 to 60.8
SQL query failed (BIGINT value is out of range in '`netxms`.`raw_dci_values`.`last_poll_time` * 1000'):
UPDATE raw_dci_values SET last_poll_time = last_poll_time * 1000, cache_timestamp = CASE WHEN cache_timestamp > 1 THEN cache_timestamp * 1000 ELSE cache_timestamp END
Rolling back last stage due to upgrade errors...
Database upgrade failed

How can I fix this ?
Thank you
#92
General Support / Re: Dashboard Blanks Itself Af...
Last post by Filipp Sudanov - April 10, 2026, 01:20:08 PM
Thanks for the info, developers fixed a few resource leaks in maps, to that could have been it.
#93
General Support / Re: Dashboard Blanks Itself Af...
Last post by dneil - April 09, 2026, 01:57:44 PM
Hi Filipp,

We wiped Windows on that machine and installed Linux Mint, running Mint we've had no issues with the Dashboard blanking itself.  As such, I won't be able to get any values from Task Manager for you.

The Dashboard elements are a Geo Map, a Map, the alarm list and a bunch of traffic graphs.

Thanks!
#94
Цепочка может уходить весьма глубоко, можно например

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
#95
Работает, принт отдает нужную инфу.
Как функционируют цепочки параметров?
Вот это имеется ввиду iface.peerNode.name - на сколько глубоко оно может уходить? Пробовал так построить в другом скрипте, постоянно ошибки ловил

Вопрос 2
В какой момент происходит запись информации о peer ноде интерфейса? Я так понимаю в момент SYS_NODE_ADDED этой инфы не существует еще т.к. в обнаруженных нодах оно появляется не сразу, а сия конструкция не добавляет в ивент новых пунктов
peerInfo = [];
for(iface : $node.interfaces)
{
peerIface = iface.peerInterface;
if (peerIface != null)
{
peerIF.append(peerIface.name);
peerN.append(iface.peerNode.name);
$event.addParameter("PeerIface", peerIF.join(", "));
$event.addParameter("PeerNode", peerN.join(", "));
}

}
#96
А что-нибудь такое:

  for (iface : $node.interfaces)                                                                                                                 
  {                                                                                                                                              
      peerIface = iface.peerInterface;
      if (peerIface != null)                                                                                                                     
      {                                              
          println("Port " .. peerIface.name .. " on " .. iface.peerNode.name);
      }                                                                                                                                          
  }
#97
General Support / Re: Dashboard Blanks Itself Af...
Last post by Filipp Sudanov - April 07, 2026, 04:55:40 PM
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.
#98
General Support / Re: ssh does not work
Last post by Filipp Sudanov - 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.
#99
General Support / Re: Filtering MikroTik Devices...
Last post by Victor Kirhenshtein - April 07, 2026, 04:06:01 PM
And just for completeness, script above can be simplified to
return InetAddress("192.168.56.0", 24).contains($node.ipAddress);

#100
General Support / Re: Filtering MikroTik Devices...
Last post by Filipp Sudanov - April 07, 2026, 03:59:51 PM
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
}