Author Topic: DCI last values don't store history data  (Read 606 times)

xelander

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: DCI last values don't store history data
« Reply #15 on: August 07, 2020, 01:42:27 pm »
Today I also tried on Linux CentOS 8, (nxmc-3.4.284-linux-gtk-x64.tar.gz) but nothing changed: no historical data.This is so strange that now I wonder if I'm doing something wrong...


Filipp Sudanov

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 285
    • View Profile
Re: DCI last values don't store history data
« Reply #16 on: August 07, 2020, 02:22:48 pm »
Does it happen that there are no historical data for all DCIs in system, or just for some DCIs?

xelander

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: DCI last values don't store history data
« Reply #17 on: August 07, 2020, 03:01:27 pm »
I've not configured many DCIs yet, but it seems no DCI shows historical data.
I've added a couple of other DCI on a different switch (3Com vs CISCO), but still no historical data in the GUI.

Even default DCIs for the NetXMS server itself show no historical data (see attachments).
The only strange thing I'm noticing now, is the <<ERROR>> value for the only DCI coming from the NetXMS agent on the server.
« Last Edit: August 07, 2020, 03:03:00 pm by xelander »

Filipp Sudanov

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 285
    • View Profile
Re: DCI last values don't store history data
« Reply #18 on: August 07, 2020, 06:38:09 pm »
One more thing to have a look at - console writes it's own log file in user's home folder in \.nxmc\data\.metadata
Can you share what you have there?

xelander

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: DCI last values don't store history data
« Reply #19 on: August 07, 2020, 07:14:01 pm »
Here they are.

Filipp Sudanov

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 285
    • View Profile
Re: DCI last values don't store history data
« Reply #20 on: August 08, 2020, 02:04:18 am »
Did you try to open the dci graph / history during the duration of that log?

xelander

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: DCI last values don't store history data
« Reply #21 on: August 08, 2020, 08:01:43 pm »
Yes, of course.

Filipp Sudanov

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 285
    • View Profile
Re: DCI last values don't store history data
« Reply #22 on: August 10, 2020, 04:57:36 pm »
Let's try to get historical data from java API using nxshell - this way we could see if the issue is with the server or the GUI.

You will need to recompile to get nxshell, for that please run
Code: [Select]
export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64add then run your ./configure command with the following keys added:
Code: [Select]
--with-jdk=/usr/lib/jvm/java-11-openjdk-amd64 --with-client
make & make install should produce nxshell executable in your bin folder.

Then make a file, say collected_data.py
Code: [Select]
from java.util import Date
data = s.getCollectedData(200, 2000, Date(Date().time - 60 * 60 * 1000), Date(), 100, HistoricalDataType.valueOf('PROCESSED'))
print data
for v in data.values:
    print v.timestamp.toString() + " = " + str(v.value)
replace 200 with a node ID and 2000 with a DCI ID.

Then run the following (-u username, same as in management console and -P is the password):
Code: [Select]
nxshell -H 127.0.0.1 -u admin -P ""  collected_data.pyand share the output. This script script should return datapoints for a give DCI for last hour.


xelander

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: DCI last values don't store history data
« Reply #23 on: August 11, 2020, 11:23:25 am »
Hi, here they are.
Node 2069, DCI 682
Code: [Select]
nxshell -H 127.0.0.1 -u admin -P XXXX collected_data.py
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.python.core.PySystemState (file:/usr/local/lib/netxms/nxshell.jar) to method java.io.Console.encoding()
WARNING: Please consider reporting this to the maintainers of org.python.core.PySystemState
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
DciData [nodeId=2069, dciId=682, dataType=INT32, valuesSize=0]
Node 2069, DCI 683
Code: [Select]
nxshell -H 127.0.0.1 -u admin -P XXXX collected_data.py
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.python.core.PySystemState (file:/usr/local/lib/netxms/nxshell.jar) to method java.io.Console.encoding()
WARNING: Please consider reporting this to the maintainers of org.python.core.PySystemState
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
DciData [nodeId=2069, dciId=683, dataType=INT32, valuesSize=0]

It seems nxshell doesn't get any data too  :(

Filipp Sudanov

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 285
    • View Profile
Re: DCI last values don't store history data
« Reply #24 on: August 11, 2020, 12:07:31 pm »
Can we possible get remote access to your netxms server? If yes, please send a message to support@radensolutions.com

If no, please collect server log at debuglevel = 8. Start console during the log and open the graph and history of a DCI.
You can change debut level on the fly:
nxadm -c "debug 8"
will change it

nxadm -c "debug"
will print current debug level

xelander

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: DCI last values don't store history data
« Reply #25 on: August 11, 2020, 12:41:29 pm »
Yes, I can set up a remote access for you, thank you very much.
I have to setup some port forwarding on our firewall: do you only need SSH or also port 4701 for the console?
Can you tell me the public IP address you will be using to connect?

In the meanwhile, I changed the debug level and opened the history and graph of DCI 682 and 683 of node 2069, see attached log.I think they are at line 5744, timestamp 2020.08.11 11:21:55.828


Filipp Sudanov

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 285
    • View Profile
Re: DCI last values don't store history data
« Reply #26 on: August 11, 2020, 01:53:10 pm »
Sent you a PM.

Meanwhile - it's recommended to check netxms log for *E* and *W* messages - there is one SQL query error, which is not related to issue discussed here, we will have a look. And there's also a warning about autobind script.

xelander

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: DCI last values don't store history data
« Reply #27 on: August 11, 2020, 03:55:13 pm »
The SQL errors are related to two new groups I was creating (see screenshot), perhaps I made something wrong.
About the autobind script, I don't know, I'm new to NetXMS and I'm still exploring all its features.
I remember opening the script library, perhaps I unvoluntarily tampered with the scripts.


Filipp Sudanov

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 285
    • View Profile
Re: DCI last values don't store history data
« Reply #28 on: August 11, 2020, 05:20:23 pm »
There was one thing we missed - after recompiling --with-mariadb --with-mariadb-compat-headers, database driver in netxmsd.conf should have been updated, but mysql.ddr was left there.
The correct configuration is:

DBDriver = mariadb.ddr

P.S. pls disable system user in netxms - it's currently enabled.


xelander

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: DCI last values don't store history data
« Reply #29 on: August 11, 2020, 05:44:26 pm »
Oh! I'm really sorry, I completely missed this step  :-[ .
Thank you very, very much for your support and for your time.
P.S. I disabled the system user, thank you.