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

#661
Hello.

It depends on what you want to achieve.
If you need that for notifications – you can use custom script to format message("%[ScriptName]" macro). Example:


And script ("CustomScript" in script library):if ($event->id == 17) { // SYS_THRESHOLD_REACHED, adjust to real event
if ($event->parameters[1] == "System.Memory.Physical.Used") { // $1 is "Parameter name" for SYS_THRESHOLD_REACHED
total = GetDCIValueByName($node, "System.Memory.Physical.Total");
return "Too much physical memory used (" . $event->parameters[4] . "), total: (" . total . ")"; // $4 is "Actual value"
}
}
return $event->message;


This is just an example, you need to adjust it to match your setup (e.g. if this action is used only for specific event in EPP, you can omit $event->id check the script).

A bit more about using scripts in actions: https://www.netxms.org/forum/configuration/actions-parameter/msg3178/#msg3178


If you need event with both values (e.g. for further processing), you can post custom event from transformation or threshold script (https://wiki.netxms.org/wiki/NXSL:PostEvent)
#662
Таблицу – только написав свой субагент.
Скриптами можно сделать List:ExternalList=TestList:ls /mnt/backup_201|grep SERVER
Который потом можно использовать в Instance Discovery.
#663
Hello.

Yes, it's known issue. We are rewriting documentation at the moment, it will include complete quick start guide.
While it's not available, please check these video tutorials from Tomas Kirnak: https://www.youtube.com/playlist?list=PLt3aE2eGS5P9L72H82S83MrKx2uz5x8gv

Components:
Server – collects data from agents and SNMP devices, process this data, react on threshold violations, etc.
Agent – daemon, which provide OS-specific metrics to server (e.c. CPU usage, file system information, process information, etc.). In SNMP-only environment agent is optional; however it's recommended to run agent alongside with netxmsd

Ports:

4700 – is used by the agent, server (or debug tools like nxget) connects to agent on this port.
4701 – is used by management console for connection to netxmsd.

Management console always connect only to the server, not to agents directly.
Server connect to agents.

"MasterServer" is a whitelist of the IP addresses, which are allowed to connect to the agent. You need to have at least netxmsd's IP in this list. If it's running on the same machine, I'd recommend to add "127.0.0.1" as well. List is separated by comma, you can also use CIDR notation to specify subnets (e.g. "MasterServers=127.0.0.1, 10.0.0.0/24").

Download link for management console is https://www.netxms.org/download/nxmc/nxmc-2.0-M2.dmg
If you using version 1.2.17, download link is https://www.netxms.org/download/archive/nxmc/nxmc-1.2.17.dmg
#664
Добрый день.

Это разные реализации Python. Модули поставлены в системный CPython, а nxshell основан на Jython.
Jython написан на джаве, и поддерживает только pure-python модули (без компилированных библиотек).

Внешние модули можно загрузить, добавив путь к ним в sys.path:
AirAlk:~() $ java -jar ~/.m2/repository/org/python/jython-standalone/2.7-b4/jython-standalone-2.7-b4.jar
Jython 2.7b4 (default:3672e624962a, Feb 13 2015, 04:59:14)
[Java HotSpot(TM) 64-Bit Server VM (Oracle Corporation)] on java1.8.0_25
Type "help", "copyright", "credits" or "license" for more information.
>>> import xlrd,xlwt
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named xlrd
>>> import sys
>>> sys.path.append('/Library/Python/2.7/site-packages')
>>> import xlrd,xlwt
>>> xlrd.__file__
'/Library/Python/2.7/site-packages/xlrd/__init__.py'
>>> xlwt.__file__
'/Library/Python/2.7/site-packages/xlwt/__init__.py'
>>>
#665
Add instance discovery script:

if ($1 ~= "^([0-9]+) .*")
{
   return %(true, $1);  // at this point $1 contains first matching group
}
return false;


It's required because this list return more data than interface index:
AirAlk:~() $ nxget -l 10.5.0.111 Net.InterfaceList
1 127.0.0.1/8 772 000000000000 lo
2 10.5.0.111/24 1 00163E000009 eth0


Instance discovery is performed on configuration poll.
#666
Общие вопросы / Re: nxshell
March 09, 2015, 09:22:40 PM
Добрый вечер

Выложил сборку: https://www.dropbox.com/s/wd8ag9ug6hl58iu/nxshell-1.2.17-jython-2.7-b4.jar?dl=0

Если хочется собрать самому, то как-то так:

git clone https://git.netxms.org/public/netxms.git
cd netxms
git checkout v1.2.17
patch -p1 < nxshell-new-jython.patch
cd src/java
./package.sh
cd nxshell
mvn package


Патч делает две вещи: меняет версию Jython с 2.7-b1 на 2.7-b4 и чинит ошибки сборки на слишком новом Jython-е.
Для сборки нужен Apache Maven и JDK.
#667
Пример, как настроить сбор данных по SNMP, есть тут: https://www.youtube.com/watch?v=fbWkkzI0XNA&list=PLt3aE2eGS5P9L72H82S83MrKx2uz5x8gv&index=8
#668
Похоже что у N12000 внутри обычный Linux сервер, и мониторится там всё через стандартные OID-ы. Какая-то информация есть тут: http://www.thg.ru/network/thecus_n12000/thecus_n12000-04.html

Qnap – судя по скриншоту на 159 странице документации, MIB файл можно скачать в админке устройства.
#669
Добрый день.

Судя по гуглу, оба устройства поддерживают SNMP.
http://eu1.qnap.com/Storage/Manual/QTS_user_manual_Home_eng_4.1.pdf - 159 страница
http://www.thecus.com/download/manual/N12000_N16000/N12000_N16000_UM_V1.0_EN.pdf - 32 страница

Для того, что бы OID-ы были видны в MIB Explorer-е, сложите MIB файлы от производителя в каталог /opt/netxm/share/netxms/mibs (там уже должно лежать много .txt файлов и файл netxms.mib), после чего запустите nxmibc -d /opt/netxms/share/netxms/mibs -o /opt/netxms/share/netxms/mibs/netxms.mib -z

"/opt/netxms/" – пример, путь к инсталяции NetXMS.
#670
General Support / Re: DCI Template
March 04, 2015, 11:03:51 AM
Just change template, it will be propagated to all applied nodes.
#671
Да, документация однозначно должна совпадать с консолью.
Я предлагаю делать так: брать за основу консоль, но когда термин выглядит странно – искать общепринятый вариант (у того же майкрософта) и править консоль.

Пример: Settings -> "Менеджер пользователей", должно быть "Управление пользователями" (следы гугл-транслейт)
#672
Подтвердил.
#673
Секция "*portCheck" в конфиге агента не нужна, достаточно "subagent=portcheck.nsm"

проверьте с netxms сервера при помощи nxget:

c:\netxms\bin\nxget "ServiceResponseTime.SSH(1.2.3.4,22,10000)"

У метрики ServiceResponseTime.SSH три параметра, обязательный только первый:

1) IP address
2) Port, 22 по умолчанию
3) Timeout, в ms, по умолчанию 3000мс. Можно поменять глобально параметром "Timeout=..." в секции "*portCheck"

Для рестарта агента достаточно перезапустить сервис, да.
#674
Quote from: vitabios on February 12, 2015, 09:55:46 PM
Какой ODBC драйвер использовать - 32-х или 64-х битный? ОС: Windows 2008 x64 R2?

Насколько я помню, битность драйвера должна совпадать с приложением, которое его использует. Если netxmsd 32bit – то и ODBC драйвер должен быть 32, аналогично с 64.
#675
Я залил структуру на transifex, можно попробовать переводить (а мы параллельно будем писать английскую версию).
Работает это примерно так:
1) Регистрируетесь на https://www.transifex.com, страница проекта: https://www.transifex.com/projects/p/netxms-admin-develop/
2) Нажимаете "Request language" и заполняете форму, мы подтверждаем запрос
3) можно переводить

Я для проверки перевел несколько ресурсов в glossary.
Всё кроме glossary сейчас лучше не трогать, там в ближайшие дни будет много изменений.

Термины я обычно ищу тут: http://www.microsoft.com/Language/
Часть терминов можно смотреть в русской версии консоли – но на мой взгляд там некоторые термины странные и на ними стоит подумать.