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

#406
You can remove this dependency if you are not using custom java data sources.

Most likely you'll need to add groovy-all dependency (it's used for packaging):

        <dependency>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy-all</artifactId>
            <version>2.4.4</version>
        </dependency>
#407
Try to remove "Defaults requiretty" from /etc/sudoers
#408
General Support / Re: Configure Netxms to use Gmail
August 11, 2016, 04:21:34 PM
You tried "mail" (or mailx, or sendmail) command - or SMTP?
If you are sure that SMTP is working - increase debug to 6 and look for entries with tag "SMTP"
#409
General Support / Re: Configure Netxms to use Gmail
August 11, 2016, 02:11:21 PM
Verify that you can send mail  using local postfix.

Connect using telnet or netcat:

telnet 127.0.0.1 25
nc 127.0.0.1 25


Sample session (my input in bold, change email address accordingly):

alk@mail:~$ nc 127.0.0.1 25
220 mail.netxms.org ESMTP Postfix
ehlo netxms
250-mail.netxms.org
250-PIPELINING
250-SIZE 134217728
250-ETRN
250-STARTTLS
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
mail from: [email protected]
250 2.1.0 Ok
rcpt to: [email protected]
250 2.1.5 Ok
data
354 End data with <CR><LF>.<CR><LF>
From: [email protected]
To: [email protected]
Subject: test mail

test body
.

250 2.0.0 Ok: queued as 7F9202019B
quit
221 2.0.0 Bye
#410
There is a set of tables for each node ("%d" is replaced with node id, you  can query it from table nodes and table object_properties):

idata_%d - single item DCIs
tdata_%d - table DCIs
tdata_records_%d
tdata_rows_%d
#411
General / Re: Help with Java API
August 09, 2016, 02:26:31 PM
Something like this:


final NXCObjectModificationData md = new NXCObjectModificationData(object.getObjectId());
GeoLocation location = GeoLocation.parseGeoLocation(latitude.getText(), longitude.getText());
md.setGeolocation(location);

final NXCSession session = (NXCSession)ConsoleSharedData.getSession();
session.modifyObject(md);
#412
General Support / Re: NetXMS video tutorial series
August 04, 2016, 04:37:00 PM
Please show apt sources.list
#413
А ODBC connection сделал глобальным, или для конкретного юзера (сервис NetXMS Corer стартует из под Local System)?
#414
Вариантов много, например:

* 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)
#415
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-комрессию для файла. Сервер после замены тоже не требуется перезапускать - достаточно переподключиться консолью.
#416
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.
#417
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.
#418
Модуль 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;
#419
Добавьте юзера в User management, затем дайте ему права в свойствах объекта (или ветки).
По умолчанию доступа нет. Учтите, что доступ на  дешборд или карту не дает автоматически доступа на все объекты, которые там используются.

https://www.netxms.org/documentation/adminguide/user-management.html
https://www.netxms.org/documentation/adminguide/object-management.html#access-control
#420
Выставить EnableSNMPTraps в 0 и рестартануть netxmsd