News:

We really need your input in this questionnaire

Main Menu
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

#826
General Support / Re: Script DCI
May 11, 2022, 04:18:07 PM
Starting from 4.1.283 there is $dci variable that contains corresponding DCI object.
#827
General Support / Re: Telegram channel Issue
May 10, 2022, 09:10:34 PM
You still have a lot of these lines in the log:

2022.05.10 08:28:21.888 *D* [ncd.telegram       ] Cannot find chat ID for recipient Utelred_bot and bot Ut

It looks that NetXMS is attempting to send something to Utelred_bot all the time. Please check if there is an action that is configured to send notification to Utelred_bot and check what could be triggering that action from Event Processing Policy.


The way it works is that after NetXMS is trying to send something to Utelred_bot driver status falls into error. When you are sending something to josebriseno, sending is successfull and driver status becomes success for some time (till another attempt to send to Utelred_bot).
#828
General Support / Re: Telegram channel Issue
May 10, 2022, 01:34:35 PM
In one place of your log a message seems to be delivered:
2022.05.09 14:09:17.735 *D* [ncd.telegram       ] Message from bot Ut to recipient josebriseno successfully sent

Did you actually get it?


A bit below it says that can not find chat id:
2022.05.09 14:09:18.843 *D* [ncd.telegram       ] Cannot find chat ID for recipient Utelred_bot and bot Ut

This place looks like Ut is trying to send message to Utelred_bot. I doubt that a bot can send message to another bot (but you can create a chat where bots are participants).


So the question is - what exactly is not working?
#829
General Support / Re: Trusted Nodes
May 10, 2022, 12:54:44 PM
First of all, you can turn checking of trusted nodes on server level by changing CheckTrustedNodes server configuration parameter.

Mass changins of node properties is only possible with nxshell - you'd need to create a script using jithon. nxshell communicates with the same api as management client, so everything that could be done via client can be done in nxshell.
API documentation is here: https://www.netxms.org/documentation/javadoc/latest/index.html
Some information about nxshell is here: https://wiki.netxms.org/wiki/Using_nxshell_to_automate_bulk_operations
#830
General Support / Re: Maleformed eMail
May 10, 2022, 12:50:13 PM
Hi!

Can you check Configuration->Notification channels, properties of SMTP-Text. There should be parameter FromName=, most probably it should be fixed.
#831
General Support / Re: Telegram channel Issue
May 06, 2022, 05:46:07 PM
And what there is in the log with debug level to 6 for tag ncd.telegram?
#832
Created an issue for that, you can follow it in the bug tracker
https://track.radensolutions.com/issue/NX-2258
#833
Не, вручную не стоит, у нас есть шаблоны (Templates) и лучше все делать через них.

В дереве объектов правый клик на Templates, Create, Template, дать ему какое-нибудь имя. Он появится под Templates. На нем правой кнопкой, Data Collection Configuration. Там опять-таки нужно создать DCI со всеми свойствами (или можно на том DCI что был создан на ноде сделать Copy to another node и указать имя шаблона).
Дальше нужно шаблон назначить на ноды. Правой кнопкой по шаблону, Apply. Там можно выбирать несколько нод сразу (с помощью shift или ctrl), или можно выбрать сразу контейнер.

Еще шаблоны умеют накладываться автоматом - там может быть скрипт, который решает, нужен ли этот шаблон на этой ноде. Примеры можно посмотреть в шаблонах, которые идут "из коробки" - Templates->Operating systems например.
#834
Да, получается что в этом списке может быть еще тот юзер, что залогинен на Console и он может быть пустой. И список может быть в любом порядке. Тогда такой скрипт, он соберет всех юзеров через запятую, если имя юзера не пустое:


list = $node->readAgentList("System.ActiveUserSessions");
loggedUsers = %();
for (l : list)
{
  username = SplitString(l, "\"")[1];
  if (username != "") loggedUsers->append(username);
}
loggedUsersStr = ArrayToString(loggedUsers, ",");
$node->setCustomAttribute("currentlyLoggedUser", loggedUsersStr);
#835
А custom attribute "currentlyLoggedUser" вы добавили вручную, или он автоматически добавился?

Если автоматически, то выглядит, что скрипт возвращает пустое значение. Если на ноде сделать Execute server script и там запустить вот это, то что оно напечатает?:

list = $node->readAgentList("System.ActiveUserSessions");
println("=" . list . "=");
currentlyLoggedUser = SplitString(list[0], "\"")[1];
println("=" . currentlyLoggedUser . "=");
#836
General Support / Re: Telegram channel Issue
May 05, 2022, 12:36:54 PM
Channel configuration looks fine.

The Utelred_bot that you specify as recipient - is it the same bot that you use for notification sending (the AuthToken is from that bot?).

If it's a different bot, I am not sure, if one bot can send messages to another. But generally recipient should be a name of either a group, channel or username. Or, second option, recipient could be numeric ID of group, channel or chat.

Try to send a message to your telegram account. For this in your telegram profile you need to set a username. Then you need to send a message from yourself to the bot (bots can not initiate dialogs). And then try to send notification to your username (without @) from NetXMS.

#837
General Support / Re: Telegram channel Issue
May 04, 2022, 07:12:17 PM
In Driver configuration we should only have configuration parameters for the driver in name=value format. So for Telegram only these parameters are allowed:

• AuthToken
• DisableIPv4 - true to disable IPv4 usage
• DisableIPv6 - true to disable IPv6 usage
• ParseMode - Text formatting style: Markdown, HTML or MarkdownV2. See Telegram API documentation on formatting syntax: https://core.telegram.org/bots/api#formatting-options
• Proxy - proxy url or ip or full configuration if format [scheme]://[login:password]@IP:[PORT]
• ProxyPort - proxy port
• ProxyType - proxy type: http, https, socks4, socks4a, socks5 or socks5h
• ProxyUser - proxy user name
• ProxyPassword - proxy user password

So just remove
Utelred_bot
Hi.

lines and it should work.
The text of the message is defined in properties of specific action that is used for notification.
#838
Давайте начнем потихнечку. Судя по скриншотам ноды в системе у вас уже заведены (ну там SRV003 и все остальные).
На ноде нажимаем правую кнопку мыши, там есть Data Collection Configuration. Заходим. Это место, где конфигурируется сбор данных с ноды. Там список, каждая строка в этом списке это Data Collection Item - элемент сбора данных.
На списке правую кнопку мыши - New parameter. Там-то и ставим Origin "Internal", Parameter "Dummy". Dummy - это просто штука, которая всегда возвращает 0 - здесь значение нам не нужно, потому что мы его будет в transformation script добывать.
Слева в этом диалоге выбираем Transformation (третий пункт сверху). Там пишем код:

list = $node->readAgentList("System.ActiveUserSessions");
currentlyLoggedUser = SplitString(list[0], "\"")[1];
$node->setCustomAttribute("currentlyLoggedUser", currentlyLoggedUser);

Код получает с агента на ноде список залогиненных юзеров. Из этого списка мы просто берем первого. И сохраняем в custom attribute на ноде.
Нажимаем Apply and Close. Ждем пока данные соберутся.
На ноде нажимаем правую кнопку мыши, Properties, там слева Custom attributes. Если все хорошо, то там в списке должен быть currentlyLoggedUser с именем юзера.

Пишите, что получилось, что нет.



#839
General Support / Re: Telegram channel Issue
May 04, 2022, 01:30:50 PM
Can you show screenshot of notification driver properties (specifically Driver Configuration there).
#840
Forced poll is described here: https://www.netxms.org/documentation/javadoc/stable/org/netxms/client/NXCSession.html#pollObject(long,org.netxms.client.constants.ObjectPollType,org.netxms.client.TextOutputListener)

For Cambium - the fastest way to debug might be if you can provide remote access to a Cambium device for our developers. Is it possible?