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

#466
Hi!

Simplest would be to store this in DCI's comment, and since recently we have %D macro that resolves to that comment, but the problem is that editing that comment from NXSL (e.g. in transformation script) is not currently possible. But we will add that at some point.

Currently you can use custom attributes on node to store such information, e.g. if DCI's tranformation script has
$node->setCustomAttribute("DCI_DESC_".$dci->name, 123);
this will update a custom attribute.

Then in script library you can have e.g. GetDciDescFromCustomAttribute script with the following:
return $node->getCustomAttribute("DCI_DESC_" . $dci->name);

And now in event's message you can have %[GetDciDescFromCustomAttribute] macro that would call above script and will get value of the custom attribute.
#467
We are currently working to improve maps in v5.0. There will be option to define link color by script and other fixes.

Can you explain a bit on multiple links - what information/benefits it gives if you see all links separately? Status of these links? Understanding how many links there are? Throughput for each link separately?
#468
Да, из snmp данные можно собирать в таблицу, вот в этом вебинаре это подрбно разбиралось:
https://www.youtube.com/watch?v=BBHAErzMU38&t=549s

Второй вариант - instance discovery - для этого определяется один DCI у которого на закладке instance discovery описывается OID начиная от которого сервер сделает walk. И на основании этого DCI будет создано много экземпляров DCI по одному на каждый OID.
Если нужно больше информации с примерами, пишите
#469
Можно через NXSL - это встроенный скриптовый язык, можно на любом объекте сделать "Execute script".
https://www.netxms.org/documentation/nxsl-latest/#func-createnode

Можно через nxshell - там можно писать код на Jithon, оно подключается к серверу через то же API что и десктопный клиент. Вот какой-то пример создания ноды:

parentId = objects.GenericObject.SERVICEROOT # Infrastructure Services root

flags = NXCObjectCreationData.CF_DISABLE_ICMP | \
        NXCObjectCreationData.CF_DISABLE_NXCP | \
        NXCObjectCreationData.CF_DISABLE_SNMP

name = "Node created by nxshell"
cd = NXCObjectCreationData(objects.GenericObject.OBJECT_NODE, name, parentId);
cd.setCreationFlags(flags);
cd.setPrimaryName("0.0.0.0") # Create node without IP address
nodeId = session.createObject(cd)
print '"%s" created, id=%d' % (name, nodeId)


И еще можно через web api (web api для этого нужно установить - это отдельный war файл, так же как и у web UI).
https://www.netxms.org/documentation/adminguide/rest-api.html#create-object
#470
You have to fill in all the fields:
Database server: 127.0.0.1
Database name: any name - a new DB with this name will be created
Login name: any name, postgres user with this name will be created
Password: any password for the above user
#471
General Support / Re: Cannot do SNMP MIB walk
November 11, 2023, 01:18:26 AM
What version of client is that? Is it legacy or the new one? Have you tried latest 4.4.3?
What actions do you perform to get to that error - mib explorer on node or something else?
#472
General Support / Re: Add New Devices Driver
November 10, 2023, 12:30:17 PM
Yes, it would be valuable for NetXMS to have support for these devices. Could you possibly provide remote access to these devices for some time - this would be the most efficient way to develop drivers?
#473
General Support / Re: Using Scripts in Action Messagetext
November 09, 2023, 05:50:01 PM
It's a bug, was fixed couple of days ago, if there will be another patch release for 4.4, fix will be there, otherwise it will be in 5.0 which should be out in December
#474
А как выглядят настройки notification channel (если убрать пароли) ?
#475
General Support / Re: Sending Alarms via webhook
November 09, 2023, 12:40:49 PM
Yes, doing this from script is better as you can control web service reply. To use web services from script, you have to create a web service definition under Configuration->Web service definition. For example let's create one named "example" with url http://example.com

Web services are called via an agent, typically agent which is running along with the server is used. Configuration file of that agent should have
EnableWebServiceProxy=yes

Now if you do "Execute script" on your server node and try the following script:
result = $node->callWebService("example", "GET");
println(result->success);
println(result->errorMessage);
println(result->agentErrorCode);
println(result->httpResponseCode);
println(result->document);

It will perform GET request and would print the result.

Alternative way is to use getWebService(webSvcName) method on node, this would create WebService object which has get(), post(), etc methods.

You can use GetServerNode() function instead of $node to get your netxms server node.
#476
General Support / Re: Using Scripts in Action Messagetext
November 08, 2023, 05:14:12 PM
Nested custom attributes are not supported. But you can get all the data you need within the script, either by using object attributes, e.g.

$node->ipAddr

or by calling expandString method of NetObj, Event or Alarm , e.g.:

$node->expandString("%n")

#477
Configuration polls are executed periodically on their own schedule (previously it was so that configuration poll was executed only if status poll detected node up situation, but that had issued - e.g. SNMP community string changed and that required conf poll to find the correct one).

For tunnel nodes, however, conf poll should be scheduled right after tunnel is established, so you can try that.

There is no way to force a poll from NXSL, I've created an issue so at some moment of time this could be added: https://track.radensolutions.com/issue/NX-2480

A bit crazy approach which might currently work - we have an option to redefine poll intervals using custom attributes, e.g:
SysConfig:Objects.ConfigurationPollingIntervalso status poll hook can detect that node comes up and set such custom interval (with value say 60) and conf poll hook would delete this custom attribute.
#478
Is it legacy or the new web UI. On what OS Firefox is running?
#479
First advice would be to try latest version of nxmc, for 4.3. it's 4.3.7
https://netxms.org/download/releases/4.3/
#480
Здравствуйте,


Какое-то краткое описание есть тут, возможно оно устарело
https://www.netxms.org/documentation/adminguide/quickstart.html

логика процесса такая:
event (событие) -> action (действие) -> notification channel


при переходе в node down (а также при срабатывании трешхолда и много чем еще) происходит событие. Дальше есть Event processing policy (EPP) - набор правил где решается, что по каждому событию делать.

в правиле EPP может вызываться действие

действия конфигурируются в Configuration->Actions. Нас интересует тип Send notification. Тут нужно выбрать конкретный notification channel.

это настраивается в configuration -> notification channels. Нас интересует драйвер SNMP. В Driver Configuration пишутся параметры для дравйвера в виде
параметр=значение
описание параметров тут: https://www.netxms.org/documentation/adminguide/event-processing.html#drivers


Когда notification channel сохранен, по правой кнопке мыши по нему (в новом клиенте, не legacy) будет пункт send notification - так можно проверить что что-то шлется