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 - Benjamin Dill

#1
We have some issues with ExternalMetricProvider:
As some scripts need more time to run for collecting data, we query them by ExternalMetricProvider instead of ExternalMetric. This works ok, but these metrics switch to "Unsupported" from time to time, if the server queries the metric immediently after a system restart and the scripts from ExternalMetricProvider have not yet finished after NetXMS agent start. If script has finished the first time after agent startup, the metrics can be pulled without error and it works fine. 

Is there a workaround to prevent this issue? I tried to switch the DCI to "Cached mode", but it looks like this does not make any difference.
#2
Is it possible to use the Web API for requesting an adhoc summary table for a Table DCI?
https://netxms.org/documentation/adminguide/rest-api.html#adhoc-summary-table

If yes, how?
If no, what is the best way to export multiple Table DCI values to a CSV file automatically (meaning, by script)?
#3
General Support / Server crash 5.1.3
January 31, 2025, 10:14:02 AM
I experienced some server crashes recently with version 5.1.3 on Windows. At the moment the server is up and running, but can you take a look at the crash dump?
I suspected it has something to do with user support notifications, as we started using them the day before the crashed started.
#4
General Support / Correlate events using EPP?
November 24, 2024, 09:12:08 PM
I saw a method "[correlateTo(eventId) ⇒ void" for events in the NXSL documentation.
Can I use this method in the Event Processing Policy to correlate events "manually" ? I can imagine a few scenarios for which this would be very useful.
Thanks in advance.
#5
General / mariadb.h missing?
November 24, 2024, 09:01:25 PM
I'm building from source and I'm failing at the MariaDB database driver, because I can't find "mariadb.h". There is a comment about "your own wrapper header", thus I'm assuming this is not part of the MariaDB library.
Is this file missing in the repo? 

https://github.com/netxms/netxms/blob/1d3c9de01bf9df8a07189aebc4b5973c679dd206/src/db/dbdrv/mariadb/mariadbdrv.h#L50C11-L50C20
#6
General Support / Thresholds on table metrics
September 22, 2024, 11:07:01 AM
I'm using table metrics extensively for collecting data which changes frequently, like running processes or some kind information on user sessions on a terminal server (instead of using instance discovery which I use for metrics which stay unchanged most of the time).

I have an issue with table thresholds and I'm not sure if this is expected behavior:
  • Let'say, I'm monitoring the expiration date of TLS certificates with a table metric.
  • At some point the expiration date reaches the threshold and an event is generated.
  • On the system, the certificate is replaced with a new one and the old (expired) one is removed. This means, the table metric will drop the row for the expired certificate. 
  • The issue is: The table metric still displays that the threshold has been reached, even if this row has disappeared.

I understand that this is sometimes useful, but in this case the "row" for the expired certificate will never appear again and the threshold on the table metric is reached indefinitely. Even clearing the collected data won't reset this state.

Is there some workaroud for this situation? If no, I would request a new option for table metrics to trigger the threshold "Deactivation event" for disappearing rows.
  
#7
See here Source node override with templates (netxms.org)

With the new Collector object class I think this will be even more useful.
#8
General Support / Bug in WebApi for zone objects?
September 19, 2024, 02:27:00 PM
We are using the WebApi for creating different objects. Creating new nodes or containers works without problems, but the API returns an error when creating a new zone. We are sending this JSON:

{
    objectType: 6
    name: "NewZone"
    parentId: 1
}
We are setting parentId = 1, because the object "Entire Network" has object id 1. This returns an "Internal error" with code 46.

I did take a look at the code and it seems impossible to create a node with parentId = 1.
https://github.com/netxms/netxms/blob/62c5f9ec1837c93023a40a71781ea2c73037b4c9/src/client/nxapisrv/java/src/main/java/org/netxms/websvc/handlers/Objects.java#L377

Can you check this?
#9
General Support / New object class "Collector"
September 14, 2024, 11:48:47 AM
Can you explain what this class is for? It looks like a mixture of node and a container?
#10
General Support / Server crash on "Supported actions"
September 06, 2024, 02:54:45 PM
I'm getting a server crash on object tool "Supported actions". It is the pre-defined object tool.
I first noticed it in 5.0.7 and it still happens on 5.0.8. Server is running on Windows, agent is also on 5.0.8, but it seems the agent version does not make any difference.
#11
Currently files can be easily delived by agent policy. It would be nice to have an option to remove/delete a specific file from a remote system, defined in the File Delivery policy.
#12

I recently upgraded to NetXMS 5.0.6 (from 4.5.6) and it seems there is a problem with "ExternalMetricProvider" on the agent: I'm calling a few PowerShell-scripts with different execution intervals. After restart of the agent service everything seems fine and the scripts are executed as expected, but on the second call it is behaving strange: PowerShell stops executing in the middle of the script and in the agent log I find that the external command is killed because of ExternalMetricProviderTimeout, but actually the PowerShell process is still running in the background. The external command is not exected again after that.
I downgraded the agent to 4.5.6 and it is working as expected again.

#13
General Support / Icon color in new console
March 18, 2024, 08:06:15 AM
Hi, the icons on the left navigation have a strange color on my systems. I tested it on two different computers and I'm pretty sure I did not make any special configuration.
I'm on Windows 11.
#14
It would be nice to have custom actions for the user agent which runs in every user session. Especially for terminal servers an option "Logoff user session" would be helpful but I can think of many others.
These custom actions could be called then on the "User Sessions" view using a new type of Object tool.
#15
Feature Requests / Node.js subagent
March 17, 2024, 10:11:26 PM
Recently I implemented a solution for monitoring various external APIs using oauth authentication with multiple different credentials (for different customers). This solution is implemented on a single NetXMS agent for data collection and customer nodes in NetXMS console can query their metrics using "source node" of the DCI with this single agent.

First I started implementing the solution using PowerShell scripts for ExternalMetric and ExternalTable. This implementation had several problems, the main issue was performance: Some metrics are requested every 30 seconds, for several hundred different parameter values. Calling the PowerShell runtime for every requested metric caused a huge load on the central agent's system. Also, some metrics / external APIs do not return their value immediently and need some time for response, which does not work very well for ExternalMetric.

So I consolidated some of the metrics and wrote scripts for ExternalMetricProvider which did improve the system load, but I still had no solution for ExternalTable as this do not have a provider option.

Finally I dropped everything I had and re-implemented the PowerShell scripts as JavaScript and started running all of them in a single Node.js instance. The system load dropped to an insignificant level as the gathering of the metrics and tables is not very CPU intensive and Node.js handles asychronous calls to external APIs very well. Also, the single Node.js process is running continously in contrast to frequently starting and terminating PowerShell runtime processes.
The collected metrics and tables are stored in a SQLite database. This way the NetXMS agent can query the metrics and tables using the built-in SQLite driver and the DBQUERY subagent which is also very lightweight and super-fast without any significant load on the CPU. This works a bit similar to Push parameters using the local cache.

All in all, everything is running pretty smoothly at the moment but is quite cumbersome to set up. This can be considered as an idea for a subagent which embeds scripting ability within the NetXMS agent using Node.js and extends the function of ExternalMetric, ExternalTable and ExternalMetricProvider.
#16
General Support / Source node override with templates
November 07, 2023, 07:59:02 PM
Is it possible to assign the source node override of some DCI differently on nodes with the same template? I could not find anything about thr DCI's source node in NXSL.
I can imagine setting the DCI's origin to "Script" and query the DCI from a different node by script but maybe there is an easier way?
#17
Following situation: We have nodes which are only a few minutes online every day, used for running a few scripts. These scripts are deployed by templates in NetXMS and are updated from time to time, but as these nodes are virtually never online for a configuration poll and updated files from the templates get never deployed.

Is there a way to trigger a configuration poll of these nodes by script, using one of the hooks? I studied the NXSL reference but I found nothing helpful.

Thank you!
#18
General Support / nxaevent with object id
September 21, 2023, 12:29:50 AM
I'm trying to send events from one agent in behalf of some other nodes using the nxaevent.exe tool, specifying the node id by --object command line option.
Is this function is broken? I checked the servers source code and it seems that the node id within the message is never extracted and instead the node id of the tunnel is always used.
https://github.com/netxms/netxms/blob/8934498acae116f32ada3ecc439255dd75ae5fb9/src/server/core/agent.cpp#L94

Thanks in advance,
Ben
#19
I'm running a NetXMS server at version 3.9.178 with multiple zones for our customers, one zone has a single proxy node configured. Whenever I try to update to a newer build the server service starts up but the "Poll Manager" goes to "not responding" within a few seconds. I am able to connect with the console right after the service start, if I'm fast, afterwards any new connection hangs after supplying the login credentials.

I'm not sure but I suspect it has to do with this item from the changelog:
*
* 3.9.229
*
[...]
- Fixed server deadlock related to multi-zone configuration
[...]


What is the best way to analyse this problem? I tried raising the debug level but I'm not sure what I should look for, there are many nodes configured and many connections are happening after server start.
The server runs on Windows Server 2019 with MySQL as database.
#20
General Support / Windows event log -> NX-1258
May 27, 2018, 10:53:40 AM
Hi,
I've read in the changelog for 2.2.3 that parameters of Windows event log can be passed to the server. Is there an example how to do that?
I checked the code but my c++ is a bit rusty... I've seen that "EventData" is parsed, so can I match against these parameters in a parser rule? That would be quite useful!

Greetings,
Ben