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

#511
А ODBC connection сделал глобальным, или для конкретного юзера (сервис NetXMS Corer стартует из под Local System)?
#512
Вариантов много, например:

* DCI PUSH через netxms-client (JAVA API)
*  Сделать свое расширение для java subagent (пример: https://git.netxms.org/public/netxms.git/tree/refs/heads/develop:/src/agent/subagents/java/sample?js=1)
* Складывать статистику в базу и вычитывать через DBQUERY
* Складывать статистику в файл и вычитывать через ExternalParameterProvider (https://wiki.netxms.org/wiki/ExternalParametersProvider)
#513
MIB файлы нужны только для MIB Browser.
Если DCI переходит в Unsupported - значит устройство отвечает ошибкой. Я бы начал с пробного snmp walk.
Судя по мибам - .1.3.6.1.4.1.890.1.6.22.1 - это ветка, на которую можно сделать walk, а не конечный OID.

P.S. при запуске nxmibc лучше добавлять ключ "-z", это включает zlib-комрессию для файла. Сервер после замены тоже не требуется перезапускать - достаточно переподключиться консолью.
#514
General Support / Re: CPU instance discovery
July 14, 2016, 11:54:11 AM
Yes, it's possible.

Create script which query System.CPU.Count from the node and return indexes it as array (e.g. 4 cpu == [0, 1, 2, 3]), then use this script in instance discovery.
#515
General Support / Re: API for Network Maps
July 12, 2016, 11:45:37 AM
Hello.

If you want to have custom map visualization - you'll need to fork management console and build it with custom plugin.
Check existing one: https://git.netxms.org/public/netxms.git/tree/refs/heads/develop:/src/java/netxms-eclipse/NetworkMaps?js=1

If you  are interested in creating maps (definitions) from your code, then you  can use netxms-client library for that.
#516
Модуль debug (в нужном скрипте "use debug;", потом можно использовать "dbgPrintTable(table)"):

sub dbgPaddingLeft(s, len) {
if (s == NULL) {
s = "";
}
padding = "";
for (i = 0; i < len - length(s); i++) {
padding .= " ";
}
return padding . s;
}

sub dbgPaddingRight(s, len) {
if (s == NULL) {
s = "";
}
padding = "";
for (i = 0; i < len - length(s); i++) {
padding .= " ";
}
return s . padding;
}

sub dbgPrintTable(t) {
if (t == NULL) {
return;
}

array columnLen;

for (i = 0; i < t->columnCount; i++) {
columnLen[i] = length(t->columns[i]->displayName);
}
for (i = 0; i < t->rowCount; i++) {
for (j = 0; j < t->columnCount; j++) {
val = t->get(i, j);
if (val == NULL) {
val = "";
}
columnLen[j] = max(columnLen[j], length(val));
}
}
for (i = 0; i < t->columnCount; i++) {
print(dbgPaddingRight(t->columns[i]->displayName, columnLen[i]) . " | ");
}
println;

for (i = 0; i < t->columnCount; i++) {
for (j = 0; j < columnLen[i]; j++) {
print("-");
}
print("-+-");
}

println;
for (i = 0; i < t->rowCount; i++) {
for (j = 0; j < t->columnCount; j++) {
print(dbgPaddingRight(t->get(i, j), columnLen[j]) . " | ");
}
println;
}

println;
}


Получение ячейки таблицы (по большей части для того, что бы использовать ячейку таблицы как DCI):

// Warning: this script works only on the same node
//
// $1 - Description
// $2 - column name
table = GetDCIValueByDescription($node, $1);
if (table != NULL) {
col = table->getColumnIndex($2);
if (col >= 0) {
return table->get(0, col);
}
}
return 0;
#517
Добавьте юзера в User management, затем дайте ему права в свойствах объекта (или ветки).
По умолчанию доступа нет. Учтите, что доступ на  дешборд или карту не дает автоматически доступа на все объекты, которые там используются.

https://www.netxms.org/documentation/adminguide/user-management.html
https://www.netxms.org/documentation/adminguide/object-management.html#access-control
#518
Выставить EnableSNMPTraps в 0 и рестартануть netxmsd
#519
General Support / Re: Controlling PDU
June 15, 2016, 06:20:13 PM
Yes, should be possible. If it supports SNMP - you can control it out of the box, just matter of the configuration.
If management is available over any other kind of proprietary protocol - you'll need to create some script for integration.
#520
https://wiki.netxms.org/wiki/NXSL:FindAllDCIs

Как-то так (код не проверял):

total = 0;
dciList = FindAllDCIs($node, "System.CPU.Usage(*)");
foreach (dci : dciList) {
  total += GetDCIValue($node, dci->id);
}
return total;

#521
APT will update installed packages.
Under normal circumstances netxmsd will shutdown properly and remove database lock - and will not require any manual intervention.
#522
добавить еще один DCI с source=Script.
Скрипт примерно такой:
v1=GetDCIValueByName($node, "TrafficDci1");
v2=GetDCIValueByName($node, "TrafficDci2");
v3=GetDCIValueByName($node, "TrafficDci3");
return v1 + v2 + v3;

Или без скрипта в library - source=Internal, DCI=Dummy, скрипт прописать прямо в Transformation script.
#523
Hello.

We had an issue with out build farm; Ubuntu packages will be available in couple of days.
#524
Да, мы обновим документацию в ближашие несколько дней.
#525
Update: %OBJECT_IP_ADDR% больше не поддерживается, вместо них - макросы как в Event Processing (%a). Список: https://wiki.netxms.org/wiki/UM:Event_Processing#Macros_for_Event_Processing