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 - Victor Kirhenshtein

#3841
Hi!

If you can disable SNMP (by setting appropriate bit flag), then you can enable it back by clearing same bit flag. If you show me the code I probably will be able to suggest how to change it so it will work.

Newly discovered nodes comes with all communication channels enabled. They are checked on each configuration poll to detect any changes. System cannot predict why SNMP is not responding for example - vecause it is not enabled and never will, or because of misconfiguration, or it will e enabled next day.

With latest patches (that will be part of 1.2.14 release) it is also possible to disable let say SNMP for each new discovered node using NXSL script called on SYS_NODE_ADDED event.

Best regards,
Victor
#3842
Маленькое дополнение - в 1.2.13 починили HTTPS в portcheck субагенте, теперь ServiceCheck.HTTPS тоже будет работать.
#3843
А можно включить debug 6 (не останавливая сервер) и прислать мне кусок лога за минут 5-10. Плюс результат команд на дебаг консоли сервера

sh q

sh po
#3844
Выложил еще одну версию по тому-же адресу - попробуйте.
#3845
Пришлите пожалуйста результат SQL запроса

SELECT transformation FROM items WHERE transformation is not null AND transformation<>'';
#3846
General Support / Re: show object details
March 26, 2014, 12:19:35 PM
Hi!

Just test it and got object details for map itself (which is also wrong but in a different way). Will check it later.

Best regards,
Victor
#3847
Currently this is very limited. You can use macros in templates - these macros will be expanded when template applied to nodes. This can be useful if you create template and need to pass IP address or node name to parameter after it was applied to node. Here is short description for template macros: https://www.netxms.org/documentation/adminguide/data-collection.html#macros-in-template-items

Best regards,
Victor
#3848
Если скрипт вызван из политики, то у него будут две переменных выставлены - $node и $event. Описания классов здесь: http://wiki.netxms.org/wiki/NXSL:Node и http://wiki.netxms.org/wiki/NXSL:Event.
#3850
С добавлением метода enableAgent можно повесить скрипт на SYS_NODE_ADDED и отключать агентов с его помощью.
#3851
Добавил новые методы в класс Node: enableAgent, enableConfigurationPoll, enableIcmp, enableSnmp, enableStatusPoll, enableTopologyPoll.
Теперь в скрипте можно написать

o->enableAgent(false);

#3852
Можно добавить функции или методы в NXSL класс для изменения конкретных флажков или аттрибутов (как сделано например сейчас с ManageObject или RenameObject).
#3853
Строка

o->flags += 33554432;

дает ошибку компиляции, а поскольку команда exec ищет только скомпилированные скрипты, то выдается несколько нелогичное сообщение "script not found".

Ошибка компиляции на самом деле из-за бага в интерпретаторе NXSL - он не понимает += для аттрибутов объектов.

o->flags = o->flags + 33554432;

скомпилируется без ошибок. Кстати, дла выставления и проверки флагов надо использовать битовые операции:

o->flags = o->flags | 33554432;

тогда можно не проверять на текущее значение flags.

Однако главная проблема в том, что сейчас флаги объекта из скриптов менять нельзя (и вообще ничего нельзя) - в NXSL класс Node read-only. Я могу это поменять, но это уже будет в следующем релизе (ну или со снапшота собрать можно будет).
#3854
Вроде нашел возможную причину. Я могу выложить версию с исправлениями - в каком формате лучше?
#3855
This is mostly for historical reasons. Initially we create network services as separate objects with two goals in mind: so they affect node status and so configuration will be a bit easier. Then service check DCIs was added for greater flexibility, but services as objects remains to maintain compatibility and because some people prefers to see them as objects (mostly in small installations). So I would say currently there are no advantages over DCIs.

Best regard,
Victor