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

#646
Notification are most likely due to the fact that processing inside NetXMS is more or less stalled (due to heavy resource usage).

Heavy resource usage, however, is highly unexpected. Can you please provide more details about your setup? Amount of memory, number of cores, database engine (local / remote).
Please also setup memory consumption monitoring for processes "netxmsd.exe" and "nxagentd.exe" (DCIs "Process.VMSize(netxmsd)" and "Process.VMSize(nxagentd)") and post screenshot of line chart for last 24 hours.

2.0-M3 will be publicly available in the next few days, you might want to try that.
#647
At the moment you can't hide menu item.
However, unless your users have "Modify" permission on the object – they can't change anything (they can open configuration and play with it, but when they try to update it on server – they will get "Access Denied" error).
#649
General Support / Re: Install report server
April 07, 2015, 09:24:43 PM
Part 2 – report definitions.

On startup, reporting server scan workspace/definitions directory for *.jar files.
Each file is unpacked into it's own folder based on jar name (e.g. "report1.jar" will be unpacked into "report1").
Each archive should contain at least one file – "main.jrxml", which is main report definition.
It can also contain subreports, images – or anything else, supported by Jasper Reports. Any additional resources should be referenced using paths relative to root folder of unpacked report, which is set as addtional paramter "SUBREPORT_DIR" (e.g. "$P{SUBREPORT_DIR}/logo.png").

Archive can also contain java code, which will be used as data provider (instead of querying SQL database).
Reporting server will try to load class "report.DataSource", which should implement interface "com.radensolutions.reporting.custom.NXCLDataSource" (attached sample: Event Processing Policy). Query string language in jrxml should be set to "nxcl" (default - SQL).

Simplest way to create jar files are using Maven, empty project is provided in samples archive. Running "mvn package" will produce complete jar file in "target" directory.

Sample reports (attached):
"Data Collection Configuration" – list of data collection items configured on node(s), pure SQL.
"Event Processing Policy" – EPP in printable format, data is loaded using Java API directly from NetXMS. Please note that netxms user (as it was configured in "<netxms>" section) should have permissions for reading EPP.
"empty" – just a stub for your own reports: change name in "pom.xml", copy jrxml into src/main/resources, run "mvn package" – and you'll get jar file which can be deployed into workspace/definitions/.
#650
General Support / Re: Install report server
April 07, 2015, 08:51:10 PM
Hello.

Reporting module is still sort of work-in-progress, it will be finalised and fully documented with the 2.0 release.

In a meantime, I'll write some notes here.

Part 1 – setup

1) Enable support in netxms core, then restart netxmsd: nxdbmgr set EnableReportingServer 1

2) Unpack netxms-reporting-server-2.0-M2.zip into some folder, in this example - /opt/nxreporting

3) Create directory "conf"

4) Create logger configuration: conf/logback.xml (sample attached), detailed description here: http://logback.qos.ch/manual/configuration.html#syntax

5) Create configuration file for reporting server: conf/nxreporting.xml
<config>
  <workspace>/opt/nxreporting/workspace</workspace>
    <netxmsdConfig>/opt/netxms/etc/netxmsd.conf</netxmsdConfig>
    <datasources>
        <datasource>
            <id>secondary</id>
            <type>postgresql</type>
            <url>jdbc:postgresql://127.0.0.1/netxms</url>
            <username>netxms</username>
            <password>netxms</password>
        </datasource>
    </datasources>
    <smtp>
        <server>127.0.0.1</server>
        <from>[email protected]</from>
    </smtp>
    <netxms>
        <server>127.0.0.1</server>
        <login>admin</login>
        <password>netxms</password>
    </netxms>
</config>


In most cases (when reports are using only single datasource), setting "netxmsdConfig" is enough, database type and credentials will loaded automatically from netxmsd.conf.
"netxms" section of the config is required for reports, which load data not from SQL datasource, but using NetXMS API instead (connection is maintained by reporting server).

6) Create workspace directory (as set by "workspace" parameter), it will contain both report definitions and intermediate report data (in "output" directory).

7) Put report definition jars into workspace/definitions/:AirAlk:~() $ ls -al /opt/nxreporting/workspace/definitions/*.jar
-rw-r--r--  1 alk  wheel  3729 Mar 11 15:31 /opt/nxreporting/workspace/definitions/alarm-history-1.0.0.jar
-rw-r--r--  1 alk  wheel  5607 Mar 11 15:31 /opt/nxreporting/workspace/definitions/alarm-resolution-time-1.0.0.jar
-rw-r--r--  1 alk  wheel  4570 Mar 11 15:31 /opt/nxreporting/workspace/definitions/alarm-resolution-time-statistics-by-users-1.0.0.jar
-rw-r--r--  1 alk  wheel  4203 Mar 11 15:31 /opt/nxreporting/workspace/definitions/dci-1.0.0.jar
-rw-r--r--  1 alk  wheel  9968 Mar 11 15:31 /opt/nxreporting/workspace/definitions/epp-1.0.0.jar
...


8) Start reporting server:cd /opt/nxreporting
java -jar nxreporting-2.0-M2.jar


When started with "-jar" option, java will automatically find configuration files in conf/ and all libraries in lib/. However, you can run it differently (and omit "cd /opt/nxreporting"): java -cp /opt/nxreporting/lib/\*.jar:/opt/nxreporting/conf:/opt/nxreporting/nxreporting-2.0-M2.jar com.radensolutions.reporting.Launcher

or, if you are running windows: java -cp /opt/nxreporting/lib/\*.jar:/opt/nxreporting/conf:/opt/nxreporting/nxreporting-2.0-M2.jar com.radensolutions.reporting.Launcher


Resulting directory structure:/opt/nxreporting:
total 5728
drwxr-xr-x   6 alk  wheel      204 Apr  7 20:31 .
drwxr-xr-x  14 alk  wheel      476 Apr  3 20:07 ..
drwxr-xr-x   4 alk  wheel      136 Apr  7 20:31 conf
drwxr-xr-x  79 alk  wheel     2686 Jan 23 10:29 lib
-rw-r--r--   1 alk  wheel  2929061 Jan 23 10:29 nxreporting-2.0-M2.jar
drwxr-xr-x   4 alk  wheel      136 Mar 11 15:06 workspace

/opt/nxreporting/conf:
total 16
drwxr-xr-x  4 alk  wheel   136 Apr  7 20:31 .
drwxr-xr-x  6 alk  wheel   204 Apr  7 20:31 ..
-rw-r--r--  1 alk  wheel  1367 Apr  7 20:21 logback.xml
-rw-r--r--  1 alk  wheel   764 Apr  7 13:21 nxreporting.xml

/opt/nxreporting/lib:
total 109528
...

/opt/nxreporting/workspace:
total 0
drwxr-xr-x   4 alk  wheel   136 Mar 11 15:06 .
drwxr-xr-x   6 alk  wheel   204 Apr  7 20:31 ..
drwxr-xr-x  32 alk  wheel  1088 Mar 11 15:43 definitions
drwxr-xr-x   8 alk  wheel   272 Mar 11 15:42 output

/opt/nxreporting/workspace/definitions:
total 248
drwxr-xr-x  32 alk  wheel  1088 Mar 11 15:43 .
drwxr-xr-x   4 alk  wheel   136 Mar 11 15:06 ..
-rw-r--r--   1 alk  wheel  3729 Mar 11 15:31 alarm-history-1.0.0.jar
-rw-r--r--   1 alk  wheel  5607 Mar 11 15:31 alarm-resolution-time-1.0.0.jar
-rw-r--r--   1 alk  wheel  4570 Mar 11 15:31 alarm-resolution-time-statistics-by-users-1.0.0.jar
...

/opt/nxreporting/workspace/output:
total 0
drwxr-xr-x   8 alk  wheel  272 Mar 11 15:42 .
drwxr-xr-x   4 alk  wheel  136 Mar 11 15:06 ..
drwxr-xr-x   4 alk  wheel  136 Mar 11 15:44 01827cdb-cb23-4b06-b607-fd02c4279add
drwxr-xr-x   4 alk  wheel  136 Mar  7 22:04 52ce4398-a131-4a79-887e-672cc73d5d34
drwxr-xr-x   3 alk  wheel  102 Mar 11 15:44 8a7c025c-84c8-4914-b2bf-3b4cde27a224
...


You can download complete sample setup here (including two reports): https://www.dropbox.com/s/pcqtfqhnwnrseb9/nxreporting.tar.bz2?dl=0
#651
Похоже нашел проблему – она возникала только если юзер есть, но поле пароля не является валидным хешем (40 hex цифр).
Поправил, войдет в следующий релиз.
#652
Проверил ваш сценарий, всё выглядит хорошо:

AirAlk:core(develop) $ psql netxms
psql (9.4.1)
Type "help" for help.

netxms=# select id,name,password from users;
id | name  |                 password                 
----+-------+------------------------------------------
  0 | admin | 3A445C0072CD69D9030CC6644020E5C4576051B1
(1 row)

netxms=# delete from users;
DELETE 1
netxms=# \q

AirAlk:core(develop) $ netxmsd -D0 
Using configuration file "/opt/netxms/etc/netxmsd.conf"
[07-Apr-2015 19:37:57.111] [INFO ] Platform subagent "/opt/netxms/lib/netxms/darwin.nsm" successfully loaded
[07-Apr-2015 19:37:57.123] [INFO ] Database driver "pgsql.ddr" loaded and initialized successfully
...
[07-Apr-2015 19:37:58.129] [INFO ] NetXMS Server started

NetXMS Server V2.0-M3 Build 8010 (UNICODE) Ready
Enter "help" for command list or "down" for server shutdown
System Console

netxmsd: down
Proceeding with server shutdown...
[07-Apr-2015 19:38:00.073] [INFO ] NetXMS Server stopped

AirAlk:core(develop) $ psql netxms
psql (9.4.1)
Type "help" for help.

netxms=# select id,name,password from users;
id | name  |                 password                 
----+-------+------------------------------------------
  0 | admin | 3A445C0072CD69D9030CC6644020E5C4576051B1
(1 row)

netxms=#


Укажите пожалуйста базу, разрядность системы (32/64)  и тип сборки - Unicode/non-unicode
#653
А какой хеш был?

Сбросить можно было вот так (без работы с базой напрямую): nxdbmgr resetadmin
#654
Hello.

First of all, you don't have to match message for that. SYS_IF_UP (SYS_IF_DOWN is the same) have 5 parameters, and 3rd one is ip address (check description in event editor).

So you can change script to if ($3 == "0.0.0.0") {
  return true;
}
return false;
or even (if you don't have any other logic in the script) $3 == "0.0.0.0"

Then opposite script will be if ($3 != "0.0.0.0") {
  return true;
}
return false;
or $3 != "0.0.0.0"


Problem with your original script was invalid syntax, instead of if ($event->message !like "0.0.0.0/0.0.0.0"){
  return true; // Match rule
}


if should've been

if (!$event->message like "0.0.0.0/0.0.0.0"){
  return true; // Match rule
}
#655
Сервер собран с поддержкой уникода? Проверить можно так: AirAlk:netxms(develop) $ netxmsd -v
NetXMS Server Version 2.0-M2 Build 8008 (UNICODE)
#656
В аттаче темплейт для принтера, который должен поддерживать большинство вариантов
#657
Check that server's ip is in MasterServers in agent config.
#658
Hello.

There are no out of the box solution for that.
I'd write some kind of script which will connect to mikrotik (over ssh or telnet), parse "ip hostspot active" command and produce per-user output in format of external parameter provider (https://wiki.netxms.org/wiki/ExternalParametersProvider)
I also suggest to create second script, which will return only customer names, this way you'll be able to setup instance discovery (https://www.netxms.org/forum/configuration/create-agent-list-for-instance-discovery/)
#659
General Support / Re: Unable to visualize DCIs
March 19, 2015, 02:42:24 PM
Hello.

Sorry for late reply.

It's definitely an issue with database performance, queue size is way to high.
1) Check "EnableMultipleDBConnections" parameter (either in server settings or using "nxdbmgr get EnableMultipleDBConnections"), it should be set to "1"
2) Check "ConnectionPoolBaseSize" and "ConnectionPoolMaxSize". Server can be very slow if poll size is limited to 1.
2) Increase number of DB writers to at least 4 ("nxdbmgr set NumberOfDatabaseWriters 4")
3) Check I/O, enable slow query logging

Please note "nxdbmrg set" should be used only when server is stopped.