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

Topics - twenrich

#1
General Support / Restart Agent 3.9.334 on CentOS 7
November 15, 2021, 12:53:15 PM
During the last days, I upgraded our 2.2.12 NetXMS to 3.9.334 (mostly painless).
I also upgraded the agents on most of our servers (with the exception of some CentOS6 machines).

However, I was used to restart the agent from the console (Node=>Tools=>Restart agent).
With the 3.9 agent, this works only on the Windows servers.

On CentOS7, this stops the agent (and requires manual restart on the target machine).

Do I miss some configuration option ?

Regards,

Thomas
#2
General Support / Windows Console nxmc.exe not starting
February 06, 2019, 05:18:41 PM
Hi,

on one of out workstations nxmc refuses to start.
We are not aware of any changes to this specific system (the console runs fine on other similar Windows installations).

This is an installation including the Java Runtime.

We tried
- nxmc.exe -clean
- reinstalling console (including the embedded JRE)
- rebooting the system (several times)

Do you have any hints in this regard ?

Please find below an excerpt from the logfiles (complete logs are attached).

Thank you very much,

Thomas


!SESSION 2019-02-06 12:00:24.329 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.8.0_144
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en
Command-line arguments:  -os win32 -ws win32 -arch x86_64 -data @user.home/.nxmc/data

!ENTRY org.eclipse.osgi 4 0 2019-02-06 12:00:27.036
!MESSAGE An error occurred while automatically activating bundle org.netxms.ui.eclipse.console (296).
!STACK 0
org.osgi.framework.BundleException: Exception in org.netxms.ui.eclipse.console.Activator.start() of bundle org.netxms.ui.eclipse.console.
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:734)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:683)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381)
...
Caused by: java.lang.UnsatisfiedLinkError: org.eclipse.swt.internal.C.PTR_sizeof()I
at org.eclipse.swt.internal.C.PTR_sizeof(Native Method)
at org.eclipse.swt.internal.C.<clinit>(C.java:24)
at org.eclipse.swt.widgets.Display.<clinit>(Display.java:138)
at org.eclipse.jface.resource.ImageDescriptor.createImage(ImageDescriptor.java:227)
....
Root exception:
java.lang.UnsatisfiedLinkError: org.eclipse.swt.internal.C.PTR_sizeof()I
at org.eclipse.swt.internal.C.PTR_sizeof(Native Method)
at org.eclipse.swt.internal.C.<clinit>(C.java:24)
at org.eclipse.swt.widgets.Display.<clinit>(Display.java:138)
at org.eclipse.jface.resource.ImageDescriptor.createImage(ImageDescriptor.java:227)
at org.eclipse.jface.resource.ImageDescriptor.createImage(ImageDescriptor.java:205)
at org.netxms.ui.eclipse.console.resources.SharedIcons.init(SharedIcons.java:152)
at org.netxms.ui.eclipse.console.Activator.start(Activator.java:61)
....
#3
Hi all,

we just found is a small inconsistency in the "Alarm summary" email, where we find a "Node Down" event for a node we deleted a few days ago.
The alarm is not visible in the F8 Alarm browser.
This might be related to an update (we updated from 2.1 to 2.10 around time when the node was removed).

Both Config entries "DeleteAlarmsOfDeletedObject" and "DeleteEventsOfDeletedObject" are set to 1 (default).

I will apply https://wiki.netxms.org/wiki/Reseting_state_of_all_alarms_and_node_statuses to resolve the issue.

Kind regards,
Thomas
#4
Hi,

I'm currently trying to get an external parameter on a Windows host working.
NetXMS Version as well as the Agent version is 2.1.

The Agent Policy

ExternalParameter=Ext.grep_count(*):powershell.exe -command "Select-String -Path \"$1\" -Pattern \"$2\" | Measure-Object | Foreach-Object { echo $_.Count }"

gets called, but reports "_.Count" as value of the Parameter.

I assume that the "$_.Count" gets replaced by NetXMS somewhere by "_.Count", so the echo returns this string only.

Is there a way to escape "$" in the Agent Policy ? I already tried to "\$_.Count" (returning \.Count as value).

Kind regards,

Thomas
PS: as the External parameter is called, I think you can cancel https://track.radensolutions.com/issue/NX-1233
#5
Hi,

installing a policy containing german Umlauts might truncate my policy file.

I just added a comment like below:
Query = Query.smv01.Sync.CountExpQError:smv01:3600:SELECT count(*) FROM AKMSync.dbo.expandedqueue with (nolock) WHERE status = 'ERROR'
Query = Query.smv01.Sync.CountSyncQError:smv01:3600:SELECT count(*) FROM AKMSync.dbo.synchronizationqueue with (nolock) WHERE status = 'ERROR'

# Überwachung Backups

Query = Query.TEST_Folio01.Backup.CountNoFull:test_folio01:3600:SELECT count(*) FROM sys.sysdatabases db WHERE db.name != 'tempdb' AND not exists(SELECT 1 FROM msdb.dbo.backupset bck WHERE bck.database_name = db.name AND bck.backup_finish_date > dateadd(DAY, -8, current_timestamp) AND bck.type = 'D')
Query = Query.TEST_Folio02.Backup.CountNoFull:test_folio02:3600:SELECT count(*) FROM sys.sysdatabases db WHERE db.name != 'tempdb' AND not exists(SELECT 1 FROM msdb.dbo.backupset bck WHERE bck.database_name = db.name AND bck.backup_finish_date > dateadd(DAY, -8, current_timestamp) AND bck.type = 'D')
Query = Query.Folio01.Backup.CountNoFull:prod_folio01:3600:SELECT count(*) FROM sys.sysdatabases db WHERE db.name != 'tempdb' AND not exists(SELECT 1 FROM msdb.dbo.backupset bck WHERE bck.database_name = db.name AND bck.backup_finish_date > dateadd(DAY, -8, current_timestamp) AND bck.type = 'D')
Query = Query.Folio02.Backup.CountNoFull:prod_folio02:3600:SELECT count(*) FROM sys.sysdatabases db WHERE db.name != 'tempdb' AND not exists(SELECT 1 FROM msdb.dbo.backupset bck WHERE bck.database_name = db.name AND bck.backup_finish_date > dateadd(DAY, -8, current_timestamp) AND bck.type = 'D')
# Query = Query.TEST_Folio02.Backup.CountNoFull:test_folio02:3600:SELECT count(*) FROM sys.sysdatabases db WHERE db.name != 'tempdb' AND not exists(SELECT 1 FROM msdb.dbo.backupset bck WHERE bck.database_name = db.name AND bck.backup_finish_date > dateadd(DAY, -8, current_timestamp) AND bck.type = 'D')
# Query = Query.TEST_Folio02.Backup.CountNoFull:test_folio02:3600:SELECT count(*) FROM sys.sysdatabases db WHERE db.name != 'tempdb' AND not exists(SELECT 1 FROM msdb.dbo.backupset bck WHERE bck.database_name = db.name AND bck.backup_finish_date > dateadd(DAY, -8, current_timestamp) AND bck.type = 'D')
# Query = Query.TEST_Folio02.Backup.CountNoFull:test_folio02:3600:SELECT count(*) FROM sys.sysdatabases db WHERE db.name != 'tempdb' AND not exists(SELECT 1 FROM msdb.dbo.backupset bck WHERE bck.database_name = db.name AND bck.backup_finish_date > dateadd(DAY, -8, current_timestamp) AND bck.type = 'D')


The resulting file in /usr/local/var/lib/netxms/config_ap looks like

...
Query = Query.smv01.Sync.CountSyncQError:smv01:3600:SELECT count(*) FROM AKMSync.dbo.synchronizationqueue with (nolock) WHERE status = 'ERROR'

# berwachung Backups

Query = Query.TEST_Folio01.Backup.CountNoFull:test_folio01:3600:SELECT count(*) FROM sys.sysdatabases db WHERE db.name != 'tempdb' AND not exists(SELECT 1 FROM msdb.dbo.backupset bck WHERE bck.dat


Removing the Umlaut in the comment transfers the entire file.

Kind regards,
Thomas
#6
Hi,

I'm using some agent policies to add a bunch of external Parameters for Windows and Linux hosts.

This works well on Linux - policy files get saved in /usr/local/var/lib/netxms/config_ap/, Parameters become visible after Agent restart and Config poll.

On Windows, the policy files appear in C:\Windows\System32\config\systemprofile\AppData\Local\nxagentd\config_ap\, but the Parameters contained here do not show up after restart/config poll.
However, adding the very same Parameters to nxagentd.conf works as expected.

Setting FileStore in nxagentd.conf has no effect.

Agent was installed using the nxagent-2.1-M2-x64.exe file.

Is this a bug or do I miss something ?

Kind regards,
Thomas

#7
General Support / Instance discovery method: script
March 16, 2017, 01:23:27 PM
Hi,

I'm having troubles to get the instance-discovery by script working.

I have:
- Instance Discovery Method: Script
- a Filter script (in the moment just tracing)

However, the filter script doesn't get called - I assume the array returned by list_attributes_by_key() does not find it's way to the instance discovery.
When running the script via "Execute server script", I get the debugs (trace, println) printed.

Can someone point out my error with this ?

Kind regards,
Thomas

edited: this is NetXMS 2.1M2

Script "list_attributes_like_http"

// Works!
// array a;
// a[0] = "Entry 1";
// a[1] = "Entry 2";
// return a;

use list_attributes;

a = list_attributes_by_key("http:.*");
foreach (entry: a)
{
msg = "like http: " . $node->name . " " . entry;
trace(1, msg);
println "P " . msg;
}
return a;


"list_attributes"

// list_attributes
//
// retrieving attribute values.
//
//
// Parameter:
// $1: regex to check the attribute key for.
//
// Returns:
// List of all attributes matching the attribute

sub list_attributes_by_key(pattern)
{
array r;
if (pattern == null)
{
msg = $node->name .  " list_attribute_by_key: no pattern!";
println msg;
trace(1, msg);
return a;
}
test = "http://12345.678/";
if (test match pattern)
println "pattern: ". pattern . " test matched OK".

r_i = 0;
attr = $node->customAttributes;
foreach (key: attr->keys)
{
println a;
if (key ~= pattern)
{
println $node->name . " return key=" . key;
r[r_i++] = key;
}
else
{
println $node->name . " no match for " . key . ". pattern=". pattern;
}
}
return r;
}

#8
Hi,

the problem I have is with with a fresh installation of NetXMS 2.0.8 (also tried 2.0.7 and 2.1-M1).

Changes to templates are fine as long netxmsd is running, but disappear when netxmsd is stopped/started.

I tried NetXMS 2.0.7 and 2.1-M1 with sqlite and postgresql databases.

With the postgres backend I get some SQL errors (below), the sqlite backend does not show any SQL errors.

Is there something I miss ?

Kind regards,

Thomas

[05-Jan-2017 13:22:52.347] [ERROR] SQL query failed (Query = "SELECT event_name FROM event_cfg WHERE event_name='?'"): 08P01 ERROR:  bind message supplies 1 parameters, but prepared statement "netxms_stmt_0x1efaf00_93" requires 0
[05-Jan-2017 13:22:52.351] [ERROR] SQL query failed (Query = "SELECT event_name FROM event_cfg WHERE event_name='?'"): 08P01 ERROR:  bind message supplies 1 parameters, but prepared statement "netxms_stmt_0x1f004f0_95" requires 0



---------------------------------------------------------------------
                         Configure results
---------------------------------------------------------------------

Prefix                  : /usr/local
Platform                : Linux
Shared library suffix   : .so
IPv6 support            : YES
Build Server            : YES
Server libs             : -lldap -llber
LDAP support            : YES
XMPP support            : YES
ZeroMQ support          : YES
Encryption enabled      : YES
Build DB-Drivers        : pgsql sqlite odbc
Build Clients           : NO
Build Agent             : YES
Subagents list          : linux ds18x20
Build Static Agent      : NO
UNICODE build           : NO
Use internal libexpat   : YES
Use internal libtre     : YES
Use internal libjansson : YES
Use internal sqlite     : NO
Use internal zlib       : NO
Force 32bit build       : NO
C compiler              : gcc
C++ compiler            : g++
CPPFLAGS                :  -D_THREAD_SAFE -DTRE_WCHAR=1 -I/opt/openssl/include -D_GNU_SOURCE -O2 -Wformat -Wno-unused-result -Werror=return-type -I/usr/local/include -DPREFIX=\"${prefix}\" -DDATADIR=\"${pkgdatadir}\" -DBINDIR=\"${bindir}\" -DLIBDIR=\"${libdir}\" -DPKGLIBDIR=\"${pkglibdir}\" -DSTATEDIR=\"${localstatedir}/lib/netxms\" -DNDEBUG
CXXFLAGS                : -g -O2 -fno-rtti -fno-exceptions
CFLAGS                  : -g -O2
LDFLAGS                 :   -L/usr/local/lib -L/opt/openssl/lib -L/usr/local/lib
LIBS                    : -lm -lz -lresolv -ldl  -lpthread -lssl -lcrypto
PostgreSQL CPPFLAGS     : -I/usr/include/pgsql
PostgreSQL LDFLAGS      : -L/usr/lib64/pgsql
PostgreSQL LIBS         : -lpq
ODBC LIBS               : -lodbc