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

#196
There are multiple ways to achieve that.
If it's ok for you to query data multiple times - just extract common code into a script in the library, then use it in the transformation / wrapper scripts:


// Library script "lib1"
function collect() {
  // collect data and return as array of records
}

// transformation script on the DCI or source script:
records = lib1::collect();
return records[0]; // add logic here

// for tables:
records = lib1::collect();
t = Table(); // or use $1 if it's transformation script
t->addColumn("col1"); // required only when creating table from scratch
t->addColumn("col2");
for (r : records) { // add logic here
   row = t->addRow();
   t->set(row, 0, r[0]);
   t->set(row, 1, r[1]);
}


Another option is to create table DCI, then use this DCI as data source for any other, e.g.:


// GetDCIValue() and GetDCIValueByDescription() might be usefull (see https://www.netxms.org/documentation/nxsl-latest/#_data_collection)
t = GetDCIValueByName($node, "My.Table.DCI"); // result will be either String or Table object
return t->findRowByInstance("peer1")->get("col1"); // you can use  either column names or indexes in get()
#197
Hello.

You can parse https://github.com/netxms/changelog/blob/master/ChangeLog. It's updated before the official release is announced, but once X.Y-CURRENT is changed to full version X.Y.Z - it's frozen.
#198
Hello.

Seems fine on my system. (Big Sur 11.2.3 (20D91) on MacBook Pro (15-inch, 2018))
#199
Hello.

It depends on your setup.
How many nodes do you monitor? How many DCIs and how often they are collected? How many events / alarms per day? Do you collect syslog?
#200
General Support / Re: Change or regenerate agent ID
March 18, 2021, 02:46:32 PM
I just realized that there is a simpler way to do that - run agent with "-T" argument:

(nx-stable) ➜  netxms-stable git:(stable-3.8) nxagentd -h
Usage: nxagentd [options]
Where valid options are:
   ...
   -T         : Reset agent identity
   ...


Agent will exit after reseting ID, so you can do this as Action (define in nxagentd.conf):


Action=Agent.ResetID=C:\NetXMS\bin\nxagentd -T


Then execute Agent.ResetID either using object tools, or with "nxaction" command (e.g. "nxaction -o IP Agent.ResetID").
Once ID reset - restart agent (also, you can do this either with object tools, or by using "nxaction IP Agent.Restart")
#201
General Support / Re: Object Access Control
March 13, 2021, 01:08:16 PM
Unlock user "system", relogin as "system" and fix permissions. Once done - lock this user again (there are no access control for this user, so it's better to keep it disabled).
#202
General Support / Re: Change or regenerate agent ID
March 12, 2021, 10:53:34 AM
Hello.

Remove file "nxagentd.db" from data directory. Data directory location is logged on startup, something like this:
2020.12.14 12:34:48.558 *I* [                   ] Data directory: /opt/netxms/stable/var/lib/netxms

Out of curiosity: are you using our ATM monitoring solution, or made your own based on the NetXMS?
#203
General Support / Re: Reading a Windows registry key
March 08, 2021, 03:11:02 PM
Yes, you can use standard command line registry editor for that:

ExternalParameter=RegQuery:reg query HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /f NetXMSSessionAgent /t REG_SZ /v /e
ExternalList=RegQuery:reg query HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /s


Adjust name of the parameter and arguments.

You can also do that with actions (but select "produce output" checkbox in object tool configuration):
Action=RegQuery:reg query HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /s
#204
General Support / Re: Syslog Monitoring
March 04, 2021, 09:48:52 PM
It's in the database, table config_clob.
You can query it with:
SELECT var_value FROM config_clob WHERE var_name='SyslogParser'
#205
скриптом в Hook::CreateInterface (в Scripting Library).

Хук вызывается перед созданием интерфеса, и получает $1 - объект Interface и $node - объект Node.

что-то типа:

if (...) {
  $1->setExpectedState(2);
}
return true; //  важно
#206
General Support / Re: Microsoft Teams notification
February 19, 2021, 07:01:25 PM
Enable level 6 debugging for tag ncd.msteams and check server log (after attempt to send).

You can change debug level in runtime with
nxadm -c "debug ncd.msteams 6"
#207
Check alarm key in EPP rule which creates them. Also doubleclick on alarm and check key there.
Most likely key is either too narrow or unset (with empty key new alarm will be created even is similar already exists)
#208
All components with the same major.minor versions (e.g. 3.7) are compatible. Latest build of the management console is 144 (https://netxms.org/download/releases/3.7/nxmc-3.7.144-linux-gtk-x64.tar.gz), and you should use it with the .145 server.
#209
Upgrades are incremental, so you can safely go directly to the latest version, "nxdbmgr upgrade" will handle all steps correctly.
Should be safe, but I'd backup first anyway.

EDIT: I tried upgrade from empty 1.2.17 database and found a small bug with the upgrade. Either wait for next release, or apply https://github.com/netxms/netxms/commit/b30dfa64644c639d177f4367bc6de13ff4708311 and rebuild.

Another option will be upgrading to some intermediate version, but I'm not sure which will work correctly (2.x something should work, but it will be trial and error).
#210
General Support / Re: Nxmc management console
February 02, 2021, 01:12:22 PM
Hello.

You need to upgrade Java to version 11 or newer.