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

xelander

  • Newbie
  • *
  • Posts: 17
    • View Profile
DCI last values don't store history data
« on: July 29, 2020, 11:51:47 am »
Hello,
I'm new to NetXMS, I just installed it on a CentOS 8 VM with MariaDB 10.3.17 and it's working fine, but there is one thing I cannot understand.

I configured an internal DCI (ICMP.ResponseTime.Max) and an SNMP DCI (.1.3.6.1.2.1.2.2.1.11.1 - ifInUcastPkts) and they seem to work fine, since I can see the last values.
But when I try to see the History or a Chart for a value they are both empty (see attachments).

Can you help me? Am I doing something wrong?

Thanks,
Alessandro

Victor Kirhenshtein

  • Lead Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 7036
    • View Profile
Re: DCI last values don't store history data
« Reply #1 on: July 29, 2020, 02:30:17 pm »
Hi,

could be database issue or time zone issue. In database you should have table idata_nnn, where nnn is actual node object ID. Check if you have any records in that table. If yes, check that time on your server is correct and that time zone is correct as well. Internally server and client uses UTC timestamps, so even when time looks identical it may in fact be incorrect on one side when concerted to UTC. If there are no records in idata table then likely there is issue with storing data to database - in that case check server log for SQL errors.

Best regards,
Victor

xelander

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: DCI last values don't store history data
« Reply #2 on: July 29, 2020, 05:54:57 pm »
Hi,
thank you very much for your answer, I checked the DB and the data seems to be there (see screeshots).

Timestamps seem correct too: in the table they're UTC and on the server and client the time is CEST (UTC+1, +2 with daylight savings).
Even if they were wrong, shouldn't I at least see the values in the "History" view, albeit with wrong timestamps?

Thanks,
Alessandro

Filipp Sudanov

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 285
    • View Profile
Re: DCI last values don't store history data
« Reply #3 on: July 31, 2020, 05:19:05 pm »
This looks to be very strange. I would suggest to turn on debugging from the database side to see what exactly queries are generated when you request history / graph from the front-end. And then checking if such a query really returns any data.
Also, if it's fine for you to recreate the database you can try to move to Postgres - it's generally more tested because more netxms users are using it.

Filipp Sudanov

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 285
    • View Profile
Re: DCI last values don't store history data
« Reply #4 on: August 03, 2020, 12:42:50 pm »
Also - 3.4.284 is now available, it has a fix for one error that was also related to not displaying historic data, could be that it's the same error here. Please try this new version.

xelander

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: DCI last values don't store history data
« Reply #5 on: August 03, 2020, 03:29:45 pm »
Hello,
I enabled query logging on the DB and the query seems to be correct, and it returns valid data (see attachements):

Code: [Select]
SELECT idata_timestamp,idata_value,raw_value FROM idata_2069 WHERE item_id=682 ORDER BY idata_timestamp DESC LIMIT 4096
I'll try the new version as soon as possible, and I'll let you know.

Thanks,
Alessandro


xelander

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: DCI last values don't store history data
« Reply #6 on: August 04, 2020, 10:43:10 am »
Hi,
I upgraded to version 3.4.284, both the server and the management console, but unfortunately nothing changed.

The query is the same:
Code: [Select]
SELECT idata_timestamp,idata_value,raw_value FROM idata_2069 WHERE item_id=682 ORDER BY idata_timestamp DESC LIMIT 4096but still no data is displayed in the History view or in the Charts view, and I cannot find any error in MariaDB nor Netxms logs.

Is there anything alse I can try to debug the problem?

Thanks,
Alessandro


Victor Kirhenshtein

  • Lead Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 7036
    • View Profile
Re: DCI last values don't store history data
« Reply #7 on: August 04, 2020, 11:01:27 am »
Try to change DCI data type to "String" and request history - will it show something?

Best regards,
Victor

xelander

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: DCI last values don't store history data
« Reply #8 on: August 04, 2020, 11:12:10 am »
Nothing changed, sorry  :'(




Filipp Sudanov

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 285
    • View Profile
Re: DCI last values don't store history data
« Reply #9 on: August 05, 2020, 05:24:47 pm »
How did you compile netxms - can you show config.log file? Can you show the output of yum list installed

xelander

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: DCI last values don't store history data
« Reply #10 on: August 06, 2020, 09:18:36 am »
Hi,I followed the directions on the "NetXMS Administrator Guide, Release 3.4.178", chapter "3.6  Installing from sources", that is:
Code: [Select]
# ./configure --with-server --with-mysql --with-agent
# make
# make install
I'm attaching the config.log and the output of yum list installed.If you need anything else, please let me know.

Thank you,Alessandro


Filipp Sudanov

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 285
    • View Profile
Re: DCI last values don't store history data
« Reply #11 on: August 06, 2020, 03:00:32 pm »
As an experiment - can you try to a different configure command:

./configure prefix=/opt/netxms-master --with-server --with-mariadb --with-mariadb-compat-headers --with-agent

xelander

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: DCI last values don't store history data
« Reply #12 on: August 06, 2020, 05:04:37 pm »
I tried (see attached config.log), but the issue is still present.
The query is the same as before:
Code: [Select]
200806 15:54:06    266 Prepare  SELECT idata_timestamp,idata_value,raw_value FROM idata_2069 WHERE item_id=? ORDER BY idata_timestamp DESC LIMIT 4096
                   266 Execute  SELECT idata_timestamp,idata_value,raw_value FROM idata_2069 WHERE item_id=683 ORDER BY idata_timestamp DESC LIMIT 4096
                   266 Close stmt
I was wondering if it could be a client issue, instead of a server one.
After all, if the server had a problem SELECT'ing data from the DB, almost nothing would work...


Filipp Sudanov

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 285
    • View Profile
Re: DCI last values don't store history data
« Reply #13 on: August 06, 2020, 05:46:12 pm »
What's the operating system where the client is running? What's client version? Is it downloaded from netxms web site?
For testing - may be you could try the client on another machine, preferrably on a different OS.

xelander

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: DCI last values don't store history data
« Reply #14 on: August 06, 2020, 06:03:55 pm »
I tried the Windows client (nxmc-3.4.284-win32-x64.zip) both on Windows 7 and on Windows 10, but I also tried the web interface (nxmc-3.4.284.war), everything downloaded from the netxms website, so it seems the issue doesn't depend on the client OS.
I still have to try on Linux...