Is it possible to control NetXMS cache?

Started by Sch.Donat, December 02, 2019, 02:29:12 PM

Previous topic - Next topic

Sch.Donat

Hi!

I have a few questions regarding NetXMS database caching:

Is it possible to turn off caching and set it to write to database instead?
Is the cache flushing time based or data based? If it is time based, is it possible to set the interval?

I'm using custom attributes to store some user specified data, which I need to query from DB. I would like to avoid using the web API.

Best regards,
Sch. Donat

Tatjana Dubrovica

Hi,

It is not possible to turn off caching, but you can set synchronization interval by changing server configuration parameter: "SyncInterval".

Sch.Donat

Hi!

Thanks for the answer, it works great when I change the Custom Attribute from the NetXMS Management Console via the object properties. I can see the changes after the specified time (in SyncInterval).
Changing Custom Attributes from script, however, doesn't seem to work. I can see the change in the console, but the server doesn't write it to the database. If I restart the server, the change is completely lost (I can't see it in the console anymore).

I use the following script, maybe I'm missing something:

SetCustomAttribute($node, "operationalstatus", "status");

Best regards,
Sch.Donat

Tatjana Dubrovica

#3
Looks like a bug I'll check it.

What server version do you use?

Sch.Donat

#4
I tried it in the latest 3.0 version (I'll check the exact version in a few hours) and in 2.2.16, I haven't tried it in 3.1 yet.

Edit: server version: 3.0.2357-1 amd64
Client version:  3.0.2329

Best regards,
Sch.Donat

Tatjana Dubrovica

This bug is present in both 3.0 and current 3.1. It will be fixed in next patch release.

Sch.Donat