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

#31
Да, по ссылке актуальная документация.
Можно на любой ноде сделать Execute script, там packageName задать вручную, а не из ивента и посмотреть что будет, у меня вот это выдает false:

sub main() {
  packageName = "2026-01 Обновление для системы безопасности";
  if (packageName == null) return false;
  packageName = packageName.toLowerCase();
  if ((packageName.contains("для системы безопасности")) ||
      (packageName.contains("adobe reader")) ||
      (packageName.contains("средства проверки правописания microsoft")))
  {
    return false;
  }
  return true;
}

И, кстати, в Configuration есть такая штука как Mapping tables, там можно вести табличку с названиями ненужного софта, в колонке Key, Value можно не заполнять, из NXSL это будет доступно в виде массива через функцию GetMappingTableKeys()
#32
На первом этапе дискавери сервер высылает пачку ICMP запросов на много адресов сразу (NetworkDiscovery.ActiveDiscovery.BlockSize - по умолчанию 1024), ждет ответов и рассылает следующую пачку. Так что список ответивших адресов он собирает достаточно быстро.
Дальше там два этапа - первоначальный сбор данных о каждом адресе - это делают паралельные треды (в количестве ThreadPool.Discovery.MaxSize) и потом есть один тред, который анализирует эти данные и решает что делать (один, потому что у одного девайса может быть несколько адресов, а мы не хотим насоздавать несколько нод).
В Debug Console по команде show queues показывается Node discovery poller, но это сумма очередей каждого из этих этапов. В 6.0 размер этих очередей скорее всего будет виден по-отдельности, когда-нибудь в будущем этот тикет может будет сделан: https://track.radensolutions.com/issue/NX-2616
#33
Highlighters need to be implemented in code to be present in this list. Currently not a single one is present.
What's you file format that you'd want to highlight, how complicated it is?
#34
Since the node works with snmp v2 I'd suggest to use that now to avoid encryption stuff.

For comparison we still need two captures - one from nxsnmpget, the other - when NetXMS is doing  configuration poll of that node.
#35
А скрипт которые параметр subnets прикрепляет к событию - он откуда запускается?

Ну и там нет такого, что в filter script в этих правилах EPP могут попадать события, у которых нет этого параметра?

Eсли параметра нет, то при обращении к $event.subnets скрипт завалится с ошибкой Unknown object's attribute. Безопаснее использовать метод:

$event.getParameter("subnets")
если параметра нет, он вернет null, но скрипт не завалится.

subnet_dc = $event.getParameter("subnets");
trace(0, "From EPP rule " .. typeof(subnet_dc) .. " " .. subnet_dc); // можно логить в серверный лог чтоб разобраться что происходит
if (subnet_dc == null) return false;

subnet_dc = subnet_dc.toLowerCase();
 
if (subnet_dc.contains("dc") || subnet_dc.contains("ts"))

    return true;
}
return false;

sub main() для EPP скриптов можно не писать, это актуально когда определяется функция, которую вызывают другие скрипты. И вместо sub теперь используется function.

#36
В дебаг информации не видно, чтоб дискавери прямо завис, он там что-то продолжает делать, во всех тредах он на разном месте в коде.

Есть шанс что настройки DBWriter чересчур накручены и ему мешают. DBWriter.DataQueues в случае таймскейла нет смысла поднимать больше 1, т.к. по сути там все данные DCI пишутся в одну таблицу - idata_sc_default. DBWriter.BackgroundWorkers тоже следует поднимать осторожно, т.к. когда их много, то они начинают мешать друг другу, по нашему опыту больше 4 их не нужно.
#37
А какое значение DBWriter.BackgroundWorkers на этой системе?
#38
contains это метод строки. Функции с таким именем нет. По идее в лог сервера должны сыпаться ошибки "Function not found" и создаваться ивенты SYS_SCRIPT_ERROR.

А надо так:

subnet.contains("dc")
#39
Yes, if isSNMP capability is "No", netxms might not send snmp requests to node. Please do packet capture while running full confuguration poll for that node.
#40
I've heard of two approaches - via web api and using pvesh command line utility. Both can be used - web services are supported in NXSL and there's now external data provider in agent that can parse json data (and pvesh provides json output). https://www.netxms.org/documentation/adminguide/agent-management.html#externaldataprovider

I'd suggest you to check what data proxmox provides via these two interfaces, as these may differ and also may depend on proxmox's version. I can help with template developing, specifically with instance discovery part.
#41
The reason seems to be with the framework used to build the GUI. Here's Anthropic's Claude's comment on this, pls give us update if any of this helps:

● This is a SWT/GTK compatibility crash on ARM64 (Raspberry Pi 5). The segfault occurs in GTK's native code when rendering the         
  Infrastructure view. Here are potential fixes:                                                                                       
                                                                                                                                       
  Quick Fixes to Try                                                                                                                   
                                                                                                                                       
  1. Force GTK3 settings                                                                                                               
                                                                                                                                       
  export SWT_GTK3=1                                                                                                                   
  export GDK_BACKEND=x11                                                                                                               
  java -jar nxmc-5.2.8-standalone.jar                                                                                                 
                                                                                                                                       
  2. Disable GTK overlay scrollbars (likely culprit given "Negative content width" errors)                                             
                                                                                                                                       
  export GTK_OVERLAY_SCROLLING=0                                                                                                       
  java -jar nxmc-5.2.8-standalone.jar                                                                                                 
                                                                                                                                       
  3. Try a simpler GTK theme                                                                                                           
                                                                                                                                       
  export GTK_THEME=Adwaita                                                                                                             
  java -jar nxmc-5.2.8-standalone.jar                                                                                                 
                                                                                                                                       
  4. All environment variables combined                                                                                               
                                                                                                                                       
  export SWT_GTK3=1                                                                                                                   
  export GDK_BACKEND=x11                                                                                                               
  export GTK_OVERLAY_SCROLLING=0                                                                                                       
  export GTK_THEME=Adwaita                                                                                                             
  java -jar nxmc-5.2.8-standalone.jar                                                                                                 
                                                                                                                                       
  5. Try with additional JVM flags                                                                                                     
                                                                                                                                       
  java -Dorg.eclipse.swt.internal.gtk.disablePrinting=true \                                                                           
       -Dorg.eclipse.swt.internal.gtk.noFocusHack=true \                                                                               
       -jar nxmc-5.2.8-standalone.jar                                                                                                 
                                                                                                                                       
  Root Cause                                                                                                                           
                                                                                                                                       
  The crash happens in g_type_check_instance_is_a which indicates GTK is receiving an invalid widget reference. The "Negative content 
  width -1" warnings suggest the scrollbar widget calculation fails before the crash. This is a known issue with:                     
  - SWT on ARM64 Linux                                                                                                                 
  - Certain GTK3 versions with KDE/Plasma (GTK apps under Qt-based desktop)                                                           
  - Overlay scrollbars in newer GTK versions                                                                                           
                                                                                                                                       
  If Above Doesn't Work                                                                                                               
                                                                                                                                       
  1. Try Wayland instead of X11 (or vice versa):                                                                                       
  export GDK_BACKEND=wayland                                                                                                           
  2. Install older GTK3:                                                                                                               
  Debian Trixie (testing) may have a bleeding-edge GTK that has compatibility issues.                                                 
  3. Use the Web UI instead - avoids native SWT/GTK entirely by running NXMC in a browser.                                             
  4. Report to NetXMS with the workaround that helped (or didn't) so they can investigate the SWT version bundled in the standalone JAR
   for ARM64.     
#42
General Support / Re: logging entries netxmsd.log
January 23, 2026, 01:17:36 PM
The error is "Data too long for column 'lldp_id' at row 1".

NetXMS found some new snmp device, for some reason the value for lldp_id column is too long and is not fitting into 255 chars.

It would be good to understand which exactly is that device on your network. You can enable debug for poll.discovery tag by issuing

debug poll.discovery 6

in Tools -> Server Debug Console. Then you should see some IP address being polled prior to the SQL error in the log. Once you know the IP address, please do a walk for 1.0.8802.1.1.2.1.3 branch and share the output. You can use nxsnmpwalk for that
#43
General Support / Re: User Sessions > Log to Events
January 23, 2026, 12:42:01 PM
We have this information in Audit log, but if you need it in Event Log - there's Hook::login script in script library that you can use for that. Make sure that this script returns true, otherwise it will prevent users from logging in.

To see what attributes are available in this script you can try this - it will log details to server log:

for (a : $user.__class.attributes) trace(0, "$user." .. a .. " = " .. $user.__get(a));
for (a : $session.__class.attributes) trace(0, "$session." .. a .. " = " .. $session.__get(a));
return true;

Then you can use PostEvent() or PostEventEx() to create the event (https://netxms.org/documentation/nxsl-latest/#func-postevent), drop us a line if you need more help with scripting.
#44
Can you do a tcpdump capture with this command:
tcpdump -s 0 -w snmp-exchange.pcap host = DEVICE_IP

We are interested in querying one problematic OID - first from nxsnmpget and then from NetXMS. Command will produce a file that can be opened using Wireshark. Please share the file.
#45
Currently not supported, but theoretically it could be implemented to choose port number from a specific range. However, this is not good approach from security standpoint as if you are opening these ports to the Internet anyone else could have access to what's exposed on these ports.

More advanced way would be to use WebSockets so that browser would open a port on localhost, but this might be complex to implement and I am note sure if this fits with current framework on which the client is based.

Have you considered using some sort of VPN to access your server instead of a forwarded port?