Recent posts

#1
Общие вопросы / Re: Filtering scripts в EPP
Last post by Argonauts - Today at 04:34:11 AM
А он давал такую ошибку, да. Но на линию 2, сейчас там
    subnet = toLowerCase($event.subnets);Собственно в таком виде
sub main() {
    subnet_dc = toLowerCase($event.subnets);
   
    // Быстрая проверка по ключевым словам
    if(subnet_dc.contains("dc") ||
       subnet_dc.contains("ts")) {   
        return true;
    }
    return false;
}
Все равно не работает корректно - уведомления продолжают идти в оба топика. Ошибки видел на линию 2 Function not found
Если верить https://netxms.org/documentation/nxsl-latest/#class-event parameterNames существует в виде array - поиск по нему в таком виде вообще возможен? Или я изначально накосячил

Референсом было вот это
sub main() {
    packageName = toLowerCase($alarm.key);
   
    // Быстрая проверка по ключевым словам
    if(packageName.contains("7-zip") ||
       packageName.contains("adobe reader")) {
        nxlog(4, "FILTER: Blocked package - " . $alarm->key);
        return false;
    }
   
    return true;
}
Как оказалось по логам - оно так же не работает, жалуясь Function or operation argument is not an object на линию
packageName = toLowerCase($alarm.key);
#2
DBWriter.BackgroundWorkers 10

Как и
DBWriter.DataQueues 10
DBWriter.InsertParallelismDegree 10
DBWriter.UpdateParallelismDegree 10

По ключу DBWriter это все, что менял
#3
Общие вопросы / Re: Active discovery застрял
Last post by Filipp Sudanov - January 28, 2026, 09:34:05 PM
А какое значение DBWriter.BackgroundWorkers на этой системе?
#4
General Support / Re: Full configuration poll fo...
Last post by gkaudewitz - January 28, 2026, 03:55:27 PM
I did the first request out of capture for full configuration poll and got following results:

nxsnmpget -v 3 -u xxxxx IP 1.3.6.1.2.1.1.2.0
1.3.6.1.2.1.1.2.0 [OBJECT IDENTIFIER]: 1.3.6.1.4.1.19536.10.1
// Value seems to be OK as the PDU comes from Panduit

nxsnmpget -v 3 -u xxxxx IP 1.3.6.1.2.1.1.1.0
1.3.6.1.2.1.1.1.0 [STRING]:  SN:PDU Metered PN:Device Model:P30D05M Rating:346-415V, 16A, 11.0kVA, 50/60Hz
// Value is OK

nxsnmpget -v 3 -u xxxxx IP 1.3.6.1.4.1.35160.1.1.0
1.3.6.1.4.1.35160.1.1.0 [NULL]:
// I don't know why this OID is requested it seems that it has nothing to do with Panduit

nxsnmpget -v 3 -u xxxxx IP 1.3.6.1.6.3.15.1.1.4.0
1.3.6.1.6.3.15.1.1.4.0 [NULL]:
// This is the OID from the report

it seems that the next calls to the device are done with global configured authtenticationparameters as they are encrypted. Within nodeconfiguration I have configured authentication parameters for that host.

nxsnmpget -v 3 -u xxxxx IP 1.3.6.1.2.1.1.3.0
1.3.6.1.2.1.1.3.0 [TIMETICKS]: 866125100
// Result for this request returned that is done as the last SNMP-Request in packet-capture

So it seems to be odd why the PDU is nor recognized as SNMP capable...

Best regards

Georg
#5
Общие вопросы / Re: Filtering scripts в EPP
Last post by Filipp Sudanov - January 28, 2026, 12:58:39 PM
contains это метод строки. Функции с таким именем нет. По идее в лог сервера должны сыпаться ошибки "Function not found" и создаваться ивенты SYS_SCRIPT_ERROR.

А надо так:

subnet.contains("dc")
#6
Общие вопросы / Filtering scripts в EPP
Last post by Argonauts - January 28, 2026, 05:19:35 AM
Добрый день!
Имеется скрипт
subnets = [];

for (p : $node.parents) if (classof(p) == "Subnet") subnets.append(p.alias);

$event.addParameter("subnets", subnets.join(", "));

return true;
Прицепляющий alias подсети к ивенту SYS_NODE_ADDED
В EPP созданы 2 правила на тот же ивент, отличающиеся действием и Filter скриптами
1-ый вроде как должен фильтровать ивенты, где в alias нет dc и ts
sub main() {

    subnet = tolower($event->subnets);

   

    // Быстрая проверка по ключевым словам

    if(contains(subnet, "dc") ||

       contains(subnet, "ts")) {

        nxlog(4, "FILTER: Blocked DC subnet - " . $event->subnets);

        return false;

    }

   

    return true;

}
2-ой - где alias содержит dc и ts
sub main() {

    subnet = tolower($event->subnets);

   

    // Быстрая проверка по ключевым словам

    if(contains(subnet, "dc") ||

       contains(subnet, "ts")) {

        return true;

    }

    nxlog(4, "FILTER: Blocked Users subnet - " . $event->subnets);

    return false;

}

Если в ивенте действительно ЕСТЬ dc или ts - приходит 1 ивент в нужный топик. Но если в alias нет dc\ts - алармы сыпятся в оба топика, что на 1-ый фильтр, что на второй
Вот пример такого ивента
{
  "id": 180591103,
  "rootId": 0,
  "code": 1,
  "name": "SYS_NODE_ADDED",
  "timestamp": 1769568582,
  "originTimestamp": 1769568582,
  "origin": 0,
  "source": 1051263,
  "zone": 0,
  "dci": 0,
  "severity": 0,
  "message": "Node added",
  "lastAlarmKey": "",
  "lastAlarmMessage": "",
  "tags": [
    "NewObject"
  ],
  "parameters": [
    {
      "name": "nodeOrigin",
      "value": "1"
    },
    {
      "name": "subnets",
      "value": "KRS_Gaydashovka_UC"
    }
  ]
}
Что я сделал не так с этими фильтрами? ::)
#7
General Support / Re: Full configuration poll fo...
Last post by Filipp Sudanov - January 26, 2026, 05:49:06 PM
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.
#8
General Support / Re: Full configuration poll fo...
Last post by gkaudewitz - January 26, 2026, 05:44:30 PM
I captured data for two situations:
1.) Configuration poll (full poll)
2.) nxsnmpget for special OID

Capturing a DCI-Poll (Forced Poll) gave me an empty file. I think the poll was  not done, because netxms was not able to detect SNMP capabilities at configuration poll.

@Filipp: I will send You a downloadlink as PM
#9
General Support / Re: Anyone used netxms agent t...
Last post by Filipp Sudanov - January 24, 2026, 10:28:12 AM
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.
#10
General Support / Re: Anyone used netxms agent t...
Last post by kavirondo - January 23, 2026, 07:44:23 PM
Hi,

Old thread I know, but did you make any progress with this?

Alex