Hi,

I'm trying to build a net-snmp subagent to monitor the proper operation of an 
ETL system.  Things I would like to monitor include new lines added by the 
process to an Oracle 11g table. Since there seem to be several different ways 
of doing this, I would like to get feedback from the community as to which 
approach to chose.

My idea is to extend the net-snmp agent using the Perl NetSNMP::agent library. 
I notice however that the examples provided in the documentation 
(http://search.cpan.org/~hardaker/NetSNMP-agent-5.0401/agent.pm) do not work 
well, both have the agent lock. It works better when one removes the loops, as 
is done in the tutorial 
(http://www.net-snmp.org/wiki/index.php/Tut:Extending_snmpd_using_perl), the 
offending lines being the following:

--------------------------------
       my $running = 1;
        while($running) {
                $agent->agent_check_and_process(1);
        }

        $agent->shutdown();
--------------------------------
and 
--------------------------------
    $agent->main_loop();
--------------------------------
However this is surprising, is the documentation out of date?

And then if these lines are removed the only difference remaining between the 
two code examples is the 'AgentX' => 1 parameter in new NetSNMP::agent call. Is 
this sufficient indeed to create an AgentX subagent? What difference does it 
make precisely?

Besides now if I don't have a loop I can't figure how to do what I want, namely:
 1) Have a Perl sub-agent monitor at regular time interval (eg every 15 min) 
and keep in cache some aspects of the system, among them the number of new 
lines in the Oracle table, probably obtained using JDBC;
 2) Answer SNMP GET requests on a specific branch (netSnmpPlaypen to start with)
 3) Emit SNMP traps when certain conditions is met (eg, the number of new lines 
is less than x)
 4) Avoid to start a new process and database connection for each update, i.e., 
use a long-running subagent and SQL prepared statements.

Can somebody help me with this?

Thanks a lot,
Chris
------------------------------------------------------------------------------
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

Reply via email to