News:

We really need your input in this questionnaire

Main Menu

Persistent Storage

Started by gmonk63, December 28, 2023, 07:37:45 PM

Previous topic - Next topic

gmonk63

What are the limits for PS ?  are there in guidelines of how many entries you can store and is this stored in a flat file on the local file system or do these also get put into the same database. 

Filipp Sudanov

It's stored in the DB, key max len is 255 and value len 2000.
https://www.netxms.org/documentation/datadictionary-latest/#t-persistent-storage

I will check, if data are cached in memory of server proceess.
How much data do you want to store there?

gmonk63

There could be a potential to store a few thousand entries.  I  have created an EPP  with a script that takes the SNMP interface down events and creates two entries (1) the source and original timestamp  (2) source and interface value  so if a switch is generating several down even traps within a 5min period I know the interface is flapping and generate an alarm.  Is there maybe a better way ?   I want to capture the events and soon as the happen I did not want to rely on having to increase polling rate.  In a Layer2 segment flapping interfaces can reek havoc with Spanning Tree TCN events being generated each time interfaces go up and down on uplink ports.


Thanks

Filipp Sudanov

Few thousands should not cause any problems. 

The other options could be to use custom attributes on corresponding nodes - this is a bit cleaner solutions, as when a node is deleted, custom attributes are deleted as well, while persistent storage might still have some remaining entries. If you go that way, it's better to use custom attributes with names starting from $ sign - it's a new feature added in 4.5.0 - these custom attributes are not being sent to GUI client.

You may want to keep several comma-separated timestamps in one persistent storage entry or custom attribute. It's convenient to do this by converting comma-separated values to array and back, e.g.:
s = "123,456,789";

a = s->split(",");
println(a);

s = ArrayToString(a, ",");
println(s);


P.S. There's a trick to temporarily change polling interval for a node - you script can add custom attribute named
SysConfig:Objects.ConfigurationPollingInterval
with new value of polling interval. More info here: https://www.netxms.org/documentation/adminguide/concepts.html#polling

gmonk63

I see..  Thanks for the info I will give the custom attributes a go as it does seem like a much cleaner solution appreciate it.