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 - mashedpotatorocket

#1
Hello.

I'm trying to collect data from a web service. The xml data has this format:

<?xml version="1.0" encoding="UTF-8"?>
<Result>
<UserStatus Status="2" StatusFrom="230904080005" ClientType="13,16" Device="tel:0123456789" TerminalCapabilities="1" DeviceStatusFrom="231204092543" OfficeDeviceStatusFrom="230918121327" MobileDeviceStatusFrom="231204092543" ServerTime="231204155632" DisplayName="Full Name">[email protected]</UserStatus>
</Result>

When using DCI parameter WebService1:/Result/UserStatus, I get [email protected] returned.
When trying to collect the value of an attribute, for example WebService1:/Result/UserStatus/Status, I get <<ERROR>> instead of the value 2.

Is the XML parser in NetXMS compliant with the XML standard?
When testing on xmlvalidation.com it says No errors were found, and this PowerShell oneliner demonstrates it should work:

([xml]'<Result><UserStatus Status="2"/></Result>').Result.UserStatus.Status


Thanks in advance.
#2
We recently tried enabling user certificate login with a simple openssl-generated self-signed CA, it worked like a charm. But when changing the TrustedCertificate to our Microsoft Windows Server Issuing CA and using Group Policy-enrolled user certificates we only get Access Denied.

I notice two odd things in netxmsd.log with debuglevel 3:
1. The full Subject is not displayed
2. There's no log entry saying "validation failed"

In more detail, the Subject of my openssl cert is:
C=SE,ST=X,L=City,O=Company,OU=OrgUnit,CN=My Name
When trying to logon with the TrustedCertificate set to Microsoft CA, this is what is logged:
2023.03.29 18:06:41.788 *D* [crypto.cert        ] Validating certificate "C=SE,ST=X,L=City,O=Company,OU=OrgUnit,CN=My Name" for user user1
2023.03.29 18:06:41.788 *D* [crypto.cert        ] Certificate "C=SE,ST=X,L=City,O=Company,OU=OrgUnit,CN=My Name" for user user1 - validation failed

which seems alright.

The subject of my Microsoft cert is:
DC=se,DC=companyname,DC=companydomain,OU=OrgUnit1,OU=OrgUnit2,CN=My Name,[email protected]
This is the only thing that gets logged:
2023.03.29 18:04:10.242 *D* [crypto.cert        ] Validating certificate "OU=OrgUnit1,CN=My Name" for user user1
No log entry saying "validation failed", and the subject string is both cropped and showing the OU part in the wrong place.

This makes me think that there's something failing when parsing the subject string from the Microsoft certificate. There's no funny characters in the subject.

I have tried lot's of variants on certificate mapping methods, no difference.
Is there any way to get this working?

Best regards.
#3
I'm trying to connect to an MS SQL Server for some application monitoring. This is my agent conf:

SubAgent = dbquery.nsm

*DBQUERY
Database = id=db1;driver=mssql.ddr;server=SQLSERVER;dbname=master;login=DOMAIN\Svc_User;password=secretpassword
Query = ProcessMemory:db1:600:SELECT physical_memory_in_use_kb*1024 AS sql_physical_memory_in_use_MB FROM sys.dm_os_process_memory

This is the error I get in agent log:

DBQUERY: cannot connect to database db1 ([Microsoft][SQL Server Native Client 11.0][SQL Server]Login failed for user 'DOMAIN\Svc_User'.)

And this is the error I see in the SQL Server log:

Login failed for user 'DOMAIN\Svc_User'. Reason: Attempting to use an NT account name with SQL Server Authentication. [CLIENT: <local machine>]

The SQL Server is set to "SQL Server and Windows Authentication mode", but I get the feeling nxagent tries to connect using an SQL account rather than an AD account.

Is it possible to connect with a domain user or do I have to use a local sql account?

(Using nxagent 4.2.461)
#4
General Support / Generic HTTP Notification Channel
December 15, 2022, 01:54:51 PM
Hello.

My SMS provider is not listed among the available Notification Channels in NetXMS. They have a very simple http API, the documentation gives this HTTP GET example:

https://smsprovider/sms.php?
username=myusername&password=mypassword&destination=00447920110000&type=text&charset=UTF8&text=Testing123&originatortype=alpha&originator=mycompany

Would it be possible to include a generic HTTP Notification Channel in NetXMS where I can specify an URL with some custom variables/macros in the DriverConfiguration?


Best regards,
#5
Hello.

I'd like to share an observation on the new DCI setting Save only changed values.

Let's say we track the size of a database file, polling once a day. It is 10 GB, and it doesn't change from day to day, so only the first value is stored. The DCI timestamp is updated each day (this is important).

One month later the file size suddenly increases from 10 to 30 GB. The new DCI value is stored. Let's take a look att the historical values:

Day 1: 10 GB
Day 30: 30 GB

Now, imagine we plot a graph. It would be a straight line increasing each day, even though we know that the file size is 10 GB up until day 30. What I would like to see is the same graph we would have if we polled each day with "Save only changed values" disabled, a graph that shows that the file size was 10 GB on day 29 and 30 GB on day 30.

I suppose it could be done this way:
On day 30, when we detect that the file size is different from the previous poll, store *both* the old value (10 GB) with the last timestamp (Day 29), and the new value (30 GB) with the current timestamp (Day 30). The historic values would look like this:

Day 1: 10 GB
Day 29: 10 GB
Day 30: 30 GB

When plotting a graph, if would correctly show that the file size is constant up until day 30.
#6
Hi there.

It seems that after upgrading from 4.1 to 4.2 we no longer have historical values on DCI Table values.
When right clicking on a value and selecting History all historical values are either blank (for strings) or 0 (for integers).
The key column is still in bold.

Is this a known issue or has something else happened in our installation?


Best regards
#7
General Support / Windows event parser stopped working
October 31, 2022, 06:18:22 PM
Windows event parser suddenly stopped parsing my rules. I even tried to wipe all rules and just create the most simple rule (below), but no NetXMS Events are created. I still see the log entries in Windows Event Log (in NetXMS).

What might have happened, or how can I debug this to find a resolution?

Using NetXMS 4.2.395.

Best regards


<parser name="ParserNEW">
  <macros/>
  <rules>
      <rule name="">
        <match repeatInterval="0" reset="false">.*</match>
        <event>TEST_EVENT</event>
        <agentAction action=""></agentAction>
      </rule>
  </rules>
</parser>

#8
Hi.

I have a log parser for TeamViewer's "Connections_incoming.txt". Example file attached.
It works when i manually add a new line with a trailing newline (CRLF), but TeamViewer doesn't add a newline at the end of new log entries, it's added at the beginning (which means the log file has an empty row at the top).

How can I make NetXMS notice new log entries when they doesn't end with CRLF?


While I'm at it, if I use named captures, how do I reference them by name in the Event Message?

(?<ID>.*?)\t(?<RemoteClient>.*?)\t(?<StartTime>.*?)\t(?<EndTime>.*?)\t(?<LoggedonUser>.*?)\t(?<Action>.*?)\t(?<GUID>.*?)\t
#9
Just upgraded NetXMS from 4.1 to 4.2. We also upgraded WebUI by replace the war files with:
netxms-websvc-4.2.395.war
nxmc-legacy-4.2.395.war

When restarting the Windows service nxWebUI it takes at least a few minutes until it starts responding on port 80. nxwebui.log doesn't show any obvious errors:

2022-10-24 16:45:31.934:INFO:oejs.ServerConnector:ShutdownMonitor: Stopped ServerConnector@57aa341b{HTTP/1.1}{0.0.0.0:80}
2022-10-24 16:45:31.943:INFO:oejsh.ContextHandler:ShutdownMonitor: Stopped o.e.j.w.WebAppContext@1725dc0f{/api,file:/C:/NetXMS-WebUI/base/api/webapp/,UNAVAILABLE}{C:\NetXMS-WebUI\webapps\api.war}
2022-10-24 16:45:32.070:INFO:oejsh.ContextHandler:ShutdownMonitor: Stopped o.e.j.w.WebAppContext@31368b99{/,file:/C:/NetXMS-WebUI/base/nxmc/webapp/,UNAVAILABLE}{C:\NetXMS-WebUI\webapps\nxmc.war}

2022-10-24 16:45:33 Apache Commons Daemon procrun stderr initialized.
2022-10-24 16:45:34.215:INFO::main: Logging initialized @219ms
2022-10-24 16:45:34.282:INFO:oejr.Runner:main: Runner
2022-10-24 16:45:34.469:INFO:oejs.Server:main: jetty-9.2.19.v20160908
org.w3c.css.sac.CSSException: Failed to read property cursor: Invalid value for cursor: hand
org.w3c.css.sac.CSSException: Failed to read property cursor: Invalid value for cursor: hand
2022-10-24 16:45:41.005:INFO:oejsh.ContextHandler:main: Started o.e.j.w.WebAppContext@31368b99{/,file:/C:/NetXMS-WebUI/base/nxmc/webapp/,AVAILABLE}{C:\NetXMS-WebUI\webapps\nxmc.war}
2022-10-24 16:45:41.513:INFO:oejsh.ContextHandler:main: Started o.e.j.w.WebAppContext@1725dc0f{/api,file:/C:/NetXMS-WebUI/base/api/webapp/,AVAILABLE}{C:\NetXMS-WebUI\webapps\api.war}
2022-10-24 16:45:41.514:WARN:oejsh.RequestLogHandler:main: !RequestLog
2022-10-24 16:45:41.534:INFO:oejs.ServerConnector:main: Started ServerConnector@2d08304a{HTTP/1.1}{0.0.0.0:80}
2022-10-24 16:45:41.535:INFO:oejs.Server:main: Started @7546ms
2022-10-24 16:46:05.520:INFO:oejs.ServerConnector:ShutdownMonitor: Stopped ServerConnector@2d08304a{HTTP/1.1}{0.0.0.0:80}
2022-10-24 16:46:05.531:INFO:oejsh.ContextHandler:ShutdownMonitor: Stopped o.e.j.w.WebAppContext@1725dc0f{/api,file:/C:/NetXMS-WebUI/base/api/webapp/,UNAVAILABLE}{C:\NetXMS-WebUI\webapps\api.war}
2022-10-24 16:46:05.891:INFO:oejsh.ContextHandler:ShutdownMonitor: Stopped o.e.j.w.WebAppContext@31368b99{/,file:/C:/NetXMS-WebUI/base/nxmc/webapp/,UNAVAILABLE}{C:\NetXMS-WebUI\webapps\nxmc.war}

2022-10-24 16:46:07 Apache Commons Daemon procrun stderr initialized.
2022-10-24 16:46:07.771:INFO::main: Logging initialized @218ms
2022-10-24 16:46:07.830:INFO:oejr.Runner:main: Runner
2022-10-24 16:46:08.006:INFO:oejs.Server:main: jetty-9.2.19.v20160908
2022-10-24 16:48:14.726:INFO:oejsh.ContextHandler:main: Started o.e.j.w.WebAppContext@31368b99{/,file:/C:/NetXMS-WebUI/base/nxmc/webapp/,AVAILABLE}{C:\NetXMS-WebUI\webapps\nxmc.war}
2022-10-24 16:48:15.232:INFO:oejsh.ContextHandler:main: Started o.e.j.w.WebAppContext@1725dc0f{/api,file:/C:/NetXMS-WebUI/base/api/webapp/,AVAILABLE}{C:\NetXMS-WebUI\webapps\api.war}
2022-10-24 16:48:15.232:WARN:oejsh.RequestLogHandler:main: !RequestLog
2022-10-24 16:48:15.247:INFO:oejs.ServerConnector:main: Started ServerConnector@3e7e297b{HTTP/1.1}{0.0.0.0:80}
2022-10-24 16:48:15.248:INFO:oejs.Server:main: Started @127700ms


Opening up the webpage however gives me a 404 error:

$ curl -v http://netxms.domain.com
*  Trying 10.1.0.40:80...
* Connected to netxms.domain.com (10.1.0.40) port 80 (#0)
> GET / HTTP/1.1
> Host: netxms.domain.com
> User-Agent: curl/7.83.1
> Accept: */*
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 404 ProxyServlet: /
< Date: Mon, 24 Oct 2022 14:37:18 GMT
< X-Frame-Options: SAMEORIGIN
< Content-Type: text/html; charset=ISO-8859-1
< Cache-Control: must-revalidate,no-cache,no-store
< Content-Length: 296
< Server: Jetty(9.2.19.v20160908)
<
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>Error 404 ProxyServlet: /</title>
</head>
<body><h2>HTTP ERROR 404</h2>
<p>Problem accessing /. Reason:
<pre>    ProxyServlet: /</pre></p><hr><i><small>Powered by Jetty://</small></i><hr/>

</body>
</html>
* Connection #0 to host netxms.domain.com left intact


I've also tried the new WebUI (nxmc-4.2.395.war), which loads in seconds instead of minutes, and gives me a working webpage. But when trying to open up a dashboard I get:



and in nxwebui-stderr:

Exception occurred
java.lang.RuntimeException: Failed to register resource: generated/a316538a.png
 at org.eclipse.rap.rwt.internal.resources.ResourceManagerImpl.internalRegister(ResourceManagerImpl.java:146)
[snip because long post]
 ... 41 more


Any ideas on what's going on here?
I also tried using the WebUI installer, which gave me the same 404 error.

Thanks in advance.
#10
Hello.

I've installed nxmc-4.1.380 on Raspbian bullseye. I use this command to launch a dashboard:
./nxmc -auto -server=myserver -login=guest -fullscreen-dashboard=mydashboard
The fullscreen dashboard opens up, but has the NetXMS main window *in front* of it.
I want the fullscreen dashboard to be the top most window. How can I change this?

Best regards
#11
Running Management Console 4.0.2111 (Legacy).
Viewing Event Log or Windows Event Log. Clicking Add column and selecting Time.

Switching from BETWEEN to TODAY makes the Date selectors disappear. That's correct.
Switching back to AFTER or BEFORE, the Date selectors are still hidden. That's not correct.
Switching back to BETWEEN makes the *second* Date selector reappear only. That's also not correct.
The only way to show the Date selectors again is closing the Condition (the red X) and adding it again.

/Andreas
#12
Hi.

I'm trying to set the community name (snmpAuthName) on a node via the web api, using PowerShell, but the response is: "Variable not found"
Other attributes works fine, I can set snmpPort and snmpVersion, just not snmpAuthName.

When googling I stumpled on a previous bugfix (NX-2150) that pretty much reminds of this problem, however that was for version 3.9.334, and I'm on 4.0.2092.

Any ideas on what might be the problem?


Best regards,

Andreas