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.

Messages - Alex Kirhenshtein

Pages: [1] 2 3 ... 66
скриптом в Hook::CreateInterface (в Scripting Library).

Хук вызывается перед созданием интерфеса, и получает $1 - объект Interface и $node - объект Node.

что-то типа:
Code: [Select]
if (...) {
return true; //  важно

General Support / Re: Microsoft Teams notification
« on: February 19, 2021, 07:01:25 pm »
Enable level 6 debugging for tag ncd.msteams and check server log (after attempt to send).

You can change debug level in runtime with
Code: [Select]
nxadm -c "debug ncd.msteams 6"

General Support / Re: Grouping (Count) of identical alarms in Alarm Browser
« on: February 19, 2021, 11:58:04 am »
Check alarm key in EPP rule which creates them. Also doubleclick on alarm and check key there.
Most likely key is either too narrow or unset (with empty key new alarm will be created even is similar already exists)

General Support / Re: Need NetXMS management console version for linux.
« on: February 11, 2021, 10:14:43 am »
All components with the same major.minor versions (e.g. 3.7) are compatible. Latest build of the management console is 144 (, and you should use it with the .145 server.

General Support / Re: Upgrade from 1.2.17 to 3.7 possible ?
« on: February 02, 2021, 05:27:38 pm »
Upgrades are incremental, so you can safely go directly to the latest version, "nxdbmgr upgrade" will handle all steps correctly.
Should be safe, but I'd backup first anyway.

EDIT: I tried upgrade from empty 1.2.17 database and found a small bug with the upgrade. Either wait for next release, or apply and rebuild.

Another option will be upgrading to some intermediate version, but I'm not sure which will work correctly (2.x something should work, but it will be trial and error).

General Support / Re: Nxmc management console
« on: February 02, 2021, 01:12:22 pm »

You need to upgrade Java to version 11 or newer.

General Support / Re: NetXMS Console fails to start
« on: January 29, 2021, 04:35:03 pm »
Since 3.7 minimal java version is 11

General Support / Re: Get mac vendor result as dci
« on: January 18, 2021, 05:20:49 pm »
You can download latest mapping here:

Then parse it and save in the mapping table (in this example - using nxshell):

Code: [Select]
#!/usr/bin/env nxshell


# find mapping table, create if missing
table_id = -1
for t in session.listMappingTables():
    if == TABLE_NAME:
        table_id =
if table_id == -1:
    table_id = session.createMappingTable(TABLE_NAME, 'Lookup table for MAC -> Vendor', 0)

target_table = session.getMappingTable(table_id)

with open('oui.txt', 'r') as f:
    for line in f.readlines():
        if "(hex)" in line:
            (mac, _, name) = line.strip().split('\t')
            mac = mac.split(' ')[0].replace('-', ':')
  , name, None))


Then you can lookup with map() function (in this example - find interface which have primary IP address):

Code: [Select]
for (i : $node->interfaces) {
if (i->ipAddr == $node->ipAddr) {
return map("MAC Address", (substr(i->macAddr, 0, 8)));
Code: [Select]
Result: Apple, Inc.

General Support / Re: Get mac vendor result as dci
« on: January 18, 2021, 03:18:35 pm »
On one of the nodes with agent (let's call it "node1") add external parameter:

ExternalParameter=ResolveMAC(*):curl -s "$1"

Then add DCI in the template:
Source Node=node1

But I'd use mapping tables instead of calling remote service.

Configuration -> Image Library

Общие вопросы / Re: создание пользователя
« on: January 11, 2021, 02:07:25 pm »
По умолчанию права наследуются от родителя (если это принудительно не отключить на контейнере). Именно так выданы права админам - на Infrastructure Services есть единственное правило для группы Admins.

Актуальные права пользователя высчитываются наложеним:
1) отнаследованные права на объекте
2) права на объекте для групп, в которых есть пользователь
3) права на объекте для пользователя

например можно сделать структуру (для примера есть user1, user2 и они в group1):
Container1 - тут дать read права для group1, наследование по умолчанию включено
+ Node1 - пустой access control
+ Node2 - тут в access control добавить user1 вообще без прав

по результатам:
user1 будет видеть Container1 и обе ноды
user2 будет видеть Container1 и только Node1 (read будет отнаследован от Container1, но потом перекрыт правилом на самой ноде)

Общие вопросы / Re: создание пользователя
« on: January 11, 2021, 01:56:41 pm »
права на объекты надо на самих объектах, права в редакторе юзеров - для глобальных вещей (типа достапа к логам)

General Support / Re: Failed DB Query count
« on: January 08, 2021, 11:09:59 am »
Which version you are currently using?

General Support / Re: Automatically Restarting a Program with GUI
« on: January 07, 2021, 01:41:42 am »
There are multiple ways to do that, I'd probably use instance in action name:

1) configure 2 actions on the agent: StartA, StartB
2) Create 2 DCIs - Process.Count(A) and Process.Count(B) with threshold "< 1" on both (or any other way how you detect that process is down), set instance to "A" and "B" respectively (in thresholds tab, will be used in action name) and some activation event (can be the same).
3) handle this event in EPP with "Execute command on remote node via agent" action, as agent action name put something "Start%<instance>"

General Support / Re: Automatically Restarting a Program with GUI
« on: January 06, 2021, 05:15:25 pm »
Sample config:

Code: [Select]



Core agent (which runs as service) will read main section, and second instance of the agent will read EXT: section instead.
Second instance should be started in the user's session with additional command line arguments: -G EXT:XYZ -H
-G should match EXT: section in the config file and -H will hide agent's console window from user.

You can add agent to autostart using reg command (or in any other way):
Code: [Select]
reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v NetXMSExternalAgent /t REG_SZ /d "C:\NetXMS\bin\nxagentd.exe -c C:\NetXMS\etc\nxagentd.conf -G EXT:XYZ -H" /f

Pages: [1] 2 3 ... 66