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 - Filipp Sudanov

#1531
You can use the following macro in threshold value field: %{custom_attribute_name:default_value}. With that you can specify actual threshold value on the node itself in a custom attribute. Nodes, that do not have such attribute will use the default_value.

If you want more customization you can use %[script_name] macro that will be calling a script to calculate the threshold value.

As for disabling thresholds for particular DCIs - you can use the same macro as above and put some huge value to the custom attribute, that will never get reached. Or you can put node into maintenance - then DCIs are collected, but no events are generated.

#1532
Общие вопросы / Re: Карта сети
December 09, 2019, 04:14:24 PM
Баг удается повторить, сделали тикет: https://track.radensolutions.com/issue/NX-1729
#1533
General Support / Re: v3 templates alerts
December 04, 2019, 10:45:03 PM
Templates are matched on guid.
#1534
General Support / Re: netxmsd 3.1 crashing on startup
December 04, 2019, 06:11:03 PM
What version are you using? Is it from packages, downloaded from netxms web site or you compiled it yourself? What Linux version are you using?

Does it segfaults all the time, or it happened only once?

If segfaults repeat, can you set DebugLevel=9 in server config, launch the server and attach the resulting log file?


#1535
Hi!

Do I understand correctly, that you are running NetXMS server on raspberry Pi? A few questions on that matter, would be good if you can provide some info.
How reliable that works? Do you monitor many devices? What database are you using? Is the database working in raspbery Pi? Is raspberry running from SD card or it has SSD connected?

Currently the only way to get netxms on raspberry is to compile yourself. Below is instruction I used to compile netxms agent, to compile the server you need to modify ./configure command.

apt update
apt install automake libssl-dev libcurl4-openssl-dev libssh-dev libmosquitto-dev libpcre3-dev postgresql-client libpq-dev unixodbc-dev

PCRE:
wget https://ftp.pcre.org/pub/pcre/pcre-8.43.tar.gz
tar zxvf pcre-8.43.tar.gz pcre-8.43/
cd pcre-8.43/
./configure --prefix=/opt/pcre --enable-pcre32 --disable-cpp --enable-utf --disable-stack-for-recursion --enable-unicode-properties --disable-dependency-tracking
make
make install

OpenSSL:
wget https://www.openssl.org/source/openssl-1.1.1d.tar.gz
tar zxvf openssl-1.1.1d.tar.gz
cd openssl-1.1.1d
./config --prefix=/opt/openssl no-comp threads
make
make install

bcm2835 which is needed for --with-rpi-agent
apt-get install html-xml-utils
mkdir -p bcm2835 && (wget -qO - `curl -sL http://www.airspayce.com/mikem/bcm2835 | hxnormalize -x -e | hxselect -s '\n' -c "div.textblock>p:nth-child(4)>a:nth-child(1)"` | tar xz --strip-components=1 -C bcm2835 )
cd bcm2835
./configure
make
make install

NetXMS Agent:
./configure --prefix=/opt/netxms --with-agent --with-internal-libexpat --with-internal-sqlite --with-internal-zlib --with-internal-libjansson --with-mariadb --with-odbc --with-pgsql --with-sqlite --with-openssl=/opt/openssl --with-pcre=/opt/pcre --with-rpi-agent
make
make install
#1536
General Support / Re: netxmsd not working after Update
December 03, 2019, 05:18:11 PM
Hi!

Can you share the output of dpkg -l | grep netxms and the contents of /etc/netxmsd.conf

#1537
Timer cancellations are related to server actions that are launched when an event happens. In event processing policy you can configure an action that is executed and set execution delay (in seconds). When event happens, the action will be scheduled. To be able to cancel this particular action we need to mark it somehow. This is done with timer key. This field can have macro fields in it, so e.g. for every node or node-dci combination, etc this field can be unique.

Then we can have another record in event processing policy that can have timer cancellation action. It has the same timer key. If that happens before the timeout goes out, the scheduled action will be cancelled. If not, the action will happen.
#1538
Hi!

NetXMS has a tool called nxdbmgr that has an option for database migration. It is launched like this:
nxdbmgr migrate old.configuration.file
The idea is that this tool is launched on the system you are migrating to. In the regular netxms configuration file on that system you have all the configuration for the new database. And you have another configuration file that has connection parameters to the database you are migrating from - that file name is given to nxdbmgr as parameter.
Before migration you have to initialize the new database by running nxdbmgr init.
netxms server should be stopped so no new data appears in the database during migration.
Migration is only supported on the same version of the database. So you can install 2.2.17 on the new system, do the migration and the do the upgrade.
A more recommended way is to upgrade first and migrate then (in that case you would use newer nxdbmgr that possibly has some bugs fixed) - but for that you would need to compile libprce32, so I would try the above approach first.
#1539
General Support / Re: WMI query returns codes
November 11, 2019, 12:30:19 PM
Support for WMI queries returning lists or tables will be made available in 3.1 version.
#1540
General Support / Re: WMI query returns codes
November 06, 2019, 05:15:57 PM
Currently WMI subagent does not support data presentation as table or list, it just takes first from received values. We are planning to implement this at some point of time.

Capabilities are stored as a bitfield in that long integer, here you can find which bit represents what capability: https://www.netxms.org/documentation/datadictionary-3.0/#t-nodes
#1541
General Support / Re: WMI query returns codes
November 04, 2019, 06:46:35 PM
So, transformation scripts, as well as other scripts in NetXMS are written in NXSL - custom scripting language. It's syntax is resembling C language syntax. Language documentation can be seen here: https://www.netxms.org/documentation/nxsl-3.0/

Here's a sample script:

if ($1 == 9) {
  return "x64";
}
else if ($1 == 0)
{
  return "x86";
}
else
{
  return "unknown: ".$1;
}


$1 is the raw value (after step 1 of transformation), so in this case it's either 0 or 9. Other variables are also available in the script, e.g. $node in the node object to which the DCI belongs to. $node->name would be the name of the node.

You can use trace function to print debug information to server's log file, first parameter of trace is debug level on which the information is printed
trace(0, $node->name)

P.S. For me only the following syntax of the parameter worked on Win7:
WMI.Query(root\CIMV2,SELECT * FROM Win32_Processor, Architecture)


#1542
В 3.0 у events добавлены теги, по ним можно фильтровать список events.
#1543
In the SQL query output that you sent above you can see lines like this:
<formatString>%*s</formatString>
%*s should be replaced to some other format, where letter comes right after % character.

NetXMS server should be stopped when editing the database.
Care should be taken when editing the database, it's recommended to do database backup prior to editing.

Alternatively you can wait when NetXMS 3.1 will be out - hopefully this will happen by the end of next week.
#1544
General Support / Re: v3 templates alerts
October 25, 2019, 05:45:50 PM
In Server configuration parameters there's a parameter called ImportConfigurationOnStartup. By default it's set to "Only missing elements". In this mode, server imports default templates only if such template is not present in the system. Import happens on each server startup. If template is present, server does not overwrite it.
This means that you can modify the template and it will not get overwritten. If you delete it, it will get recreated on next server startup.
#1545
Currently $dci is not supported when a script is called from event processing. For SYS_THRESHOLD_EVENTs DCI ID is passed as 5-th parameter of $event:

trace(1, "Script on SYS_THRESHOLD_EVENT: DCI ID: ".$event->parameters[5]+0);
trace(1, "Script on SYS_THRESHOLD_EVENT: DCI name: ".GetDCIObject($node,($event->parameters[5]))->name);
trace(1, "Script on SYS_THRESHOLD_EVENT: Interface name: ".GetDCIObject($node,($event->parameters[5]))->relatedObject->name);