[prev in list] [next in list] [prev in thread] [next in thread] 

List:       net-snmp-users
Subject:    Re: writing a subagent -- newbie help
From:       Matt Flanzer <mattflanzer () gmail ! com>
Date:       2010-09-30 2:29:07
Message-ID: AANLkTindBCuQHJLUKyBw3PXp3vHTiZhZO1S=EDbN9n9V () mail ! gmail ! com
[Download RAW message or body]

Following up... I got the example subagent working. (yay!)

The issue is with macports, not net-snmp. The current macports
distribution is net-snmp 5.5 but the master agent (snmpd) is 4.5. The
generated subagents do not like to play well.

Within the macports distribution the net-snmp config file
(specifically the Portfile file) disables rebuilding the master agent
(specifying --disable-agent). I tried enabling the agent build but it
fails because the current net-snmp distribution does not specify a
darwin10.h system configuration file for MacOS X 10.6. Maybe I should
make write a note to the net-snmp-coders list?

My next step was to again modify the Portfile to specify a target os
for darwin9 (--build=i386-mac-darwin9). From there, the build worked
and it the subagent now communicates with the master as well.

Incidentally, if anyone else perhaps searches for it, I rebuilt the
macports distribution (after modifying the Portfile) with port -n
upgrade --force net-snmp

So from here, I'll see if I can get my custom subagent working, but
there's no reason to think that it won't... wish me luck.

Cheers,
Matt




On Mon, Sep 27, 2010 at 5:51 PM, Matt Flanzer <mattflanzer@gmail.com> wrote:
> Thanks everyone for your initial responses.
> I think if I can get the example subagent code working, I could get mine to
> as well. Using the -Dagentx flag doesn't produce any additional output on
> the example subagent. On the master agent (snmpd) it does print some extra
> lines, but nothing new is produced when I run that example subagent. Does
> this mean that they are not connecting at all?
> Here are the command lines for each:
> master:
> %sudo snmpd -Le -m+NET-SNMP-TUTORIAL-MIB -M+. -Dverbose -Dagentx -f
> localhost
> sub:
> %sudo ./mysubagent -Le -m+NET-SNMP-TUTORIAL-MIB -M+. -f -Dverbose -Dagentx
> Attached are the output from each.
> Any thoughts on where I can go from here?
> The example subagent came from the wiki tutorial as I mentioned...
> http://net-snmp.sourceforge.net/wiki/index.php/TUT:Writing_a_Subagent
> Best,
> Matt
>
>
>
> On Mon, Sep 27, 2010 at 2:07 PM, Wes Hardaker
> <hardaker@users.sourceforge.net> wrote:
>>
>> >>>>> On Fri, 24 Sep 2010 16:53:15 -0700, Matt Flanzer
>> >>>>> <mattflanzer@gmail.com> said:
>>
>> MF> Basically, no matter what I've tried I get the response:
>> MF> No Such Object available on this agent at this OID
>>
>> One thing worth doing is running both the subagent and the master agent
>> with debugging output.  You can do this with the master agent using the
>> -Dagentx flag which should show whether it is getting and accepting the
>> traffic from the subagent when it tries to connect.  If you start the
>> subagent and the master agent doesn't produce any output with that flag,
>> then something is wrong with where the master and subagent are trying to
>> connect over.
>>
>> (By default, this is /var/agentx/master if you're using a unix based
>> machine, which Mac OSX should be doing).
>>
>> Note that you likely need to run the master and subagent both as root to
>> get that to work properly.
>> --
>> Wes Hardaker
>> Cobham Analytic Solutions
>
>

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic