[AGENT++] Best way to configure Agent++?

Glenn Puchtel gpuchtel at gplicity.com
Wed Jul 28 21:24:05 CEST 2004


Hello Mr. AWD & Jedja

	I was hoping to have more time to put together a detailed
response but I seem to be pressed for time, but I wanted to respond
anyway.  Basically, I had the same question when I developed my agents.
My solution was to create an XML schema and defined my agent
configuration in XML terms (see below).  I then used an XML parser to
pull out the relevant information and created the corresponding SNMP
table entries.

	A BETTER solution (and one that Frank and I have discussed) is
to define the associated MIB tables (for example the VACM and USM tables
along with your desired attribute/value pairs) as XML and create the
corresponding SNMP tables directly from that.  My solution requires
understanding of the proprietary schema I developed, but a XML schema
that is based on MIB's would be standardized can could lend themselves
to all sorts of other uses.  I'm currently in the process of redesigning
my configuration file to match this new approach.

	One problem however, for embedded systems the overhead of XML
parsing (and possible xsd validation) can be prohibitive.

An example on my configuration file follows (don't know how the
formatting will look, but here goes):

<?xml version="1.0" encoding="UTF-8"?><GpSNMP_engine version="1.0"
license="" xsi:noNamespaceSchemaLocation="C:\GpSNMP_engine.xsd">
<Users>
	<User name="v1v2"	security="public" model="SNMPv2c" 
		read="public"
		write="private"/>
	<User name="v3MD5" security="MD5" model="SNMPv3"
authPassword="v3MD5Password" 
		authProtocol="HMAC-MD5-96"/>
	<-- Others go here -->
</Users>
<Views>
	<Context name="GpSNMP_subagent"/>
		<Group name="v1v2" user="v1v2" model="SNMPv1"/>
		<Group name="v1v2" user="v1v2" model="SNMPv2"/>

		<Group name="v3MD5" user="v3MD5" model="USM"/>
		<Group name="v3MD5DES" user="v3MD5DES" model="USM"/>
		<Group name="v3SHA" user="v3SHA" model="USM"/>
		<Group name="v3SHADES" user="v3SHADES" model="USM"/>
		<Group name="v3" user="v3" model="USM"/>
		<Access group="v3MD5" contex="" model="USM"
read="internet" 			write="internet"
notify="internet"/>
		<Access group="v3MD5DES" contex="" model="USM"
read="internet" 			write="internet"
notify="internet"/>
		<Access group="v3SHA" contex="" model="USM"
read="internet" 			write="internet"
notify="internet"/>	
		<Access group="v3SHADES" contex="" model="USM"
read="internet" 			write="internet"
notify="internet"/>
		<Access group="v3" contex="" model="USM"
read="restricted" 				write=""
notify="restricted"/>		
		<Access group="v1v2" contex="" model="SNMPv1"
match="exact" 			read="internet" write="internet"
notify="internet"/>
		<Access group="v1v2" contex="" model="SNMPv2"
match="exact" 			read="internet" write="internet"
notify="internet"/>
		<View name="internet" subtree="1.3.6.1"/>
		<View name="restricted" subtree="1.3.6.1.2.1.1"/>
		<View name="restricted" subtree="1.3.6.1.2.1.11"/>
		<View name="restricted" subtree="1.3.6.1.2.1.11.2.1"/>
		<View name="restricted" subtree="1.3.6.1.6.3.10.2.1"/>
		<View name="restricted" subtree="1.3.6.1.6.3.11.2.1"/>
		<View name="restricted" subtree="1.3.6.1.6.3.15.1.1"/>
	</Views>
	<Targets>
		<Target name="Computer1" inbound="false"
address="172.0.0.1" 			port="162" user="v1v2"/>
		<Target name="Computer2" inbound="false"
address="172.0.0.1" 			port="162" user="v3MD5"/>
	</Targets>
</GpSNMP_engine>	

Hope this helps.

-----Original Message-----
From: agentpp-bounces at agentpp.org [mailto:agentpp-bounces at agentpp.org]
On Behalf Of Mr. AWD
Sent: Wednesday, July 28, 2004 1:44 PM
To: fock at agentpp.com
Cc: agentpp at agentpp.org
Subject: Re: [AGENT++] Best way to configure Agent++?


I see.

Well that mean that I will have to write some kind of parser for the
agent that I use. Would there be a benefit to add such feature to the
agent++ once it is done? 

Right now the plan is to have a file with all the necessary items in
there, which will be read at the startup of the agent. After reading
everything will be checked and wrong fields will be thrown out of it.
Then the file will be rewritten with a new content. The parser will most
like be written as a class object that will take care of all details.

My guess is that the most of the init code from the main.cpp will be
moved to the parser and read from the file. Is there anything that would
make sense to add to better fit to the agent++?

Fedja


--- On Fri 07/23, Frank Fock < fock at agentpp.com > wrote:
Hi Fedja,

currently, there is no "standard" way. I have thought about an XML
config format, but due to lack of resources (time) there is still no
implementation available. One of the problems that exists with
XML is the overhead for the parser. My objective is to have the XML
configuration ready this year (4th quarter).

So you will have to choose your way...

Best regards,
Frank

Mr. AWD wrote:

>Is my question out of line or there is just no one to help? :)
>
>Fedja
>
>--- On Wed 07/21, Mr. AWD < mrawd at excite.com > wrote:
>Hi there!
>
>I am using Snmp++ and Agent++ for both Linux and Windows platforms
(Linux has priority tough) and implemented most of the features from our
MIB. Now, I need to figure out how to configure the agent, so potential
customers could tweak it as they need to.
>
>What is the best way to do this?
>
>So far majority of my experience is with SRI agents and they used
configuration file for their task. Is there something similar for the
Agent++?
>
>Any help would be appreciated!
>
>Thanks
>
>
>Fedja


_______________________________________________
Join Excite! - http://www.excite.com
The most personalized portal on the Web!
_______________________________________________
AGENTPP mailing list
AGENTPP at agentpp.org
http://agentpp.org/mailman/listinfo/agentpp





More information about the AGENTPP mailing list