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

Alex Agranov Alex.Agranov at audiocodes.com
Wed Apr 16 10:30:09 CEST 2008


Hi Frank,

Thank you very much for your response.

However I feel like I didn't explain myself clearly for my 2nd question. I'd like to make sure that my SNMP configuration in the persistent file is always up-to-date. So that when someone alters it (e.g. configures new entry in USM table) it will be automatically updated (similar to the way, for example, SNMP Research EMANATE agent updates /etc/srconf/agt/snmpd.cnf file). Does Agent++ take care of this on its own, or should I do it in my application?

If I need to do it in my application, I need some trigger that indicates that MIB data was changed and save() method must be called. Of course I can do this periodically - e.g. call save() each 1 min or so - but it's clearly much better if I get some trigger on the changes.

I realize that save() saves complete set - that's perfectly fine. I just want to understand when it should be called.

Cheers,
    Alex

-----Original Message-----
From: Frank Fock [mailto:fock at agentpp.com]
Sent: Wednesday, April 16, 2008 11:13
To: Alex Agranov
Cc: 'agentpp at agentpp.org'
Subject: Re: [AGENT++] Persistent storage of AGENT++ configuration

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



This email and any files transmitted with it are confidential material. They are intended solely for the use of the designated individual or entity to whom they are addressed. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, use, distribution or copying of this communication is strictly prohibited and may be unlawful.

If you have received this email in error please immediately notify the sender and delete or destroy any copy of this message



More information about the AGENTPP mailing list