[AGENT++] Persistent storage of AGENT++ configuration

Frank Fock fock at agentpp.com
Wed Apr 16 10:12:53 CEST 2008


Hi Alex,

Alex Agranov wrote:
> Hi,
> 
> I'm trying to figure out how to make my AGENT++ based application to store its "basic configuration" (e.g. community strings, notification targets and USM/VACM tables) in a configuration file, so that it can be restored when I restart my application. I found save() and load() methods in the Mib class - however there are still a few points that are unclear to me:
> 1)     According to the documentation save() method "saves all persistent MIB objects"; but how do I know which objects are persistent and which are not? For example, according to the comments in examples usm_mib() is a persistent object - but I don't see this mentioned anywhere in the documentation...

Each MibEntry determines itself whether it is persistent
or not by returning its status by is_volatile().
In addition if a table is not volatile, the StorageType
determines per row whether it is persistent or not.

> 2)     Is it possible to somehow determine that one of the "persistent MIB objects" was changed and trigger call to save() method of Mib class? Or may be this functionality is already implemented by one of the AGENT++ classes?

The load() and save() methods store only complete sets - no deltas.

Best regards,
Frank





More information about the AGENTPP mailing list