Running an AGENT++ agent as a subagent on Solaris 2.6

Guy.HINDELL____opentrade.co.uk Guy.HINDELL____opentrade.co.uk
Thu Jan 18 16:53:07 CET 2001


You should see your subagent as a running process along with the other
subagents (mibiisa etc.). If you don't then either it's not being started up
correctly (probs with paths, shared libs etc.?) or it's exiting. Probably
you would see a row in subSubAgentTable, but perhaps some column values for
that row would timeout as they are established via a query to the subagent
which isn't running.

I think you can made the master agent run pretty much anything - try
substituting your subagent with a shell script which writes the supplied
port number to a temp file - that might give you some clues.

Otherwise I can only think that there is some glitch in your config - if you
want to mail the files to me I'll take a look.

guy

-----Original Message-----
From: Simpson, Gary [mailto:Gary.Simpson____primark.com]
Sent: 18 January 2001 15:18
To: 'Guy.HINDELL____opentrade.co.uk'; AGENT++ (E-mail)
Subject: RE: Running an AGENT++ agent as a subagent on Solaris 2.6


Hello Guy,

I have added the two files like you said and restarted SNMP.  I can see the
subagent appear in sunSubAgentTable but it doesn't seem to be responding to
requests.  Should the subagent be showing as a running process? or is it
started up on demand?  Because at the moment the subagent is not running.

When I do a get all subitems on 1.3.6.1.4.1.42.2.15.8, the following is the
result.  Although, when doing this 9 times out of 10 the request takes too
long to get all the information (I don't know whether or not the timeouts
are part of the problem).

sun.2.15.8.1.1.3	3	2	1
sun.2.15.8.1.2.3	1	1	1
sun.2.15.8.1.3.3	2000000	2000000	900000000
sun.2.15.8.1.4.3	32790	34576	161
sun.2.15.8.1.5.3	/etc/snmp/conf/mibiisa.reg
/etc/snmp/conf/globaltopic.reg	sun.2.15.8.1.5.1
sun.2.15.8.1.6.3	sun.2.15.8.1.6.2	sun.2.15.8.1.6.1
sun.2.15.8.1.7.3	"/usr/lib/snmp/mibiisa -p $PORT"
"/home/gary/current/agent $PORT"	sun.2.15.8.1.7.1
sun.2.15.8.1.8.3	sun.2.15.8.1.8.2	sun.2.15.8.1.8.1
sun.2.15.8.1.9.3	282	13028	13027
sun.2.15.8.1.10.3	snmpd	globaltopic	relay-agent
sun.2.15.8.1.11.3	0	23:26:42	0
sun.2.15.8.1.12.3	86400	86400	0

Thanks for your help,
Gary.

-----Original Message-----
From: Guy.HINDELL____opentrade.co.uk [mailto:Guy.HINDELL____opentrade.co.uk]
Sent: Thursday, January 18, 2001 12:13 PM
To: Gary.Simpson____primark.com; agentpp-dl____agentpp.com
Subject: RE: Running an AGENT++ agent as a subagent on Solaris 2.6


Hi Gary

The native agent on solaris doesn't implement (as far as I can tell) agentX
or SMUX - it proxies to other agents using SNMP - so all you need is a basic
SNMP agent which can run on another port (not 161). Setting this up isn't so
hard, but I struggled to find the right documentation to help me.

You'll need to add a couple of files to the /etc/snmp/conf directory (you'll
see it already has entries for the MIB2 subagent (mibiisa) -
<yoursubagent>.reg and <yoursubagent>.rsrc - something like this...

---- <yoursubagent>.reg
#
#  Configuration file for SNMP subagent
#  for Solstice Enterprise Agents
#


macros = {
	<yourmib> = <youroid>
#	eg.
#	foomib = 1.3.6.1.4.1.1234
}

##########
# agents #
##########

agents =
{
	{
		name = "<yoursubagent>"
		subtrees = { <yourmib> }
		timeout = 2000000
                watch-dog-time = 86400 
	}
}
----

---- <subagent>.rsrc ----
#  
#  Configuration file for SNMP subagent
#  for Solstice Enterprise Agents
#

resource =
{
        {
                registration_file = "/etc/snmp/conf/<yoursubagent>.reg"
                policy = "spawn"
                type = "legacy"
                command = "</your/subagent/path> -p $PORT"

        }

}
----


You must make sure your subagent has a command line method of setting its
SNMP port (usually this is done using a '-p' flag) as this is the mechanism
by which snmpd will assign it a port when it starts it (using the command
token in the .rsrc file), and know where to forward requests to.

By restarting the native agent your should see your agent started as a
subagent using a port number chosen by the native agent - you can check this
by looking at the proxy table of the native agent...

enterprises.sun.products.sunMasterAgent.sunSubAgentTable
1.3.6.1.4.1.42.2.15.8

I'm not sure how the trap system should work. My agent simple sends its
traps direct to the trap receiver hosts - I don't know whether it is
possible to route them via the native agent.

Hope this helps.

Guy Hindell
OpenTrade Technologies Ltd.
(guy.hindell at opentrade.co.uk)

-----Original Message-----
From: Simpson, Gary [mailto:Gary.Simpson____primark.com]
Sent: 18 January 2001 11:05
To: AGENT++ (E-mail)
Subject: Running an AGENT++ agent as a subagent on Solaris 2.6


Hello,

I have successfully built a simple SNMP agent in AGENT++.  However, in order
for it to work I have had to kill off the main snmpd process on the Solaris
box so that I can access port 161.

Do you know if there is any way I can run my SNMP agent as a subagent to the
snmpd process?  If I use AGENTX++ in the subagent, will this turn it into a
subagent without me having to create a master agent as well to replace
snmpd.  Or do you know if I should install and use Sun Solstice Enterprise
Agents beforehand?

Cheers, Gary.


This e-mail, its content and any files transmitted with it are intended
solely for the addressee(s) and are confidential and may be legally
privileged.  Access by any other party is unauthorised without the express
prior written permission of the sender.  If you have received this e-mail in
error you may not copy, disclose to any third party or use the contents,
attachments or information in any way.  Please destroy it and contact the
sender via the Thomson Financial switchboard on (44) 207 369 7000 or via
e-mail return.  Internet communications are not secure unless protected
using strong cryptography.  This e-mail has been prepared using information
believed by the author to be reliable and accurate, but Thomson Financial
does not accept responsibility for the timeliness, accuracy or completeness
of the information provided or for any changes to this e-mail, howsoever
made, after it was sent.  [The content of this e-mail and files transmitted
with it is  (c) TFSL - 2000] 


* ------------------------------------------------------------------------ *
 Privileged/Confidential Information may be contained in this 
 message. If you are not the addressee indicated in this      
 message (or responsible for delivery of the message to such  
 person), you may not copy or deliver this message to anyone. 
 In such case, you should destroy this message and kindly     
 notify the sender by reply e-mail. Please advise immediately 
 if you or your employer does not consent to Internet e-mail  
 for messages of this kind. Opinions, conclusions and other   
 information in this message that do not relate to the        
 official business of my Company shall be understood as       
 neither given or endorsed by it.                             
* ------------------------------------------------------------------------ *


* ------------------------------------------------------------------------ *
 Privileged/Confidential Information may be contained in this 
 message. If you are not the addressee indicated in this      
 message (or responsible for delivery of the message to such  
 person), you may not copy or deliver this message to anyone. 
 In such case, you should destroy this message and kindly     
 notify the sender by reply e-mail. Please advise immediately 
 if you or your employer does not consent to Internet e-mail  
 for messages of this kind. Opinions, conclusions and other   
 information in this message that do not relate to the        
 official business of my Company shall be understood as       
 neither given or endorsed by it.                             
* ------------------------------------------------------------------------ *





More information about the AGENTPP mailing list