Hello Dave,

        i have found following:

                if i put this line to snmpd.conf the snmpd dosn't work anymore 
(snmpwalk / snmpget becomes timeout):

                        perl do '/usr/lib/net-snmp/agents/mysql_agent.pl';

                Wenn i start the agent (snmpd) via the '-X' argument i have the 
same problem as above.


                The next i have found is with the /tmp/shtest that is 
configured in the snmpd.conf via this line:

                        exec enterprises.ucdavis.50.100.1 /bin/sh /tmp/shtest

                as you can see the OID is running at 
enterprises.ucdavis.50.100.1, but if i make an snmpwalk i become an 
errormessage:

                        [EMAIL PROTECTED]:/etc/snmp# snmpwalk localhost -c 
public -v2c enterprises.ucdavis.50.100.1
                        UCD-SNMP-MIB::ucdavis.50.100.1 = No Such Object 
available on this agent at this OID


                        [EMAIL PROTECTED]:/etc/snmp# cat /tmp/shtest
                        #!/bin/sh
                        echo hello world
                        echo hi there
                        exit 35


                with an snmpwalk at enterprises.ucdavis i find following 
entries in the table:

                        UCD-SNMP-MIB::extIndex.1 = INTEGER: 1
                        UCD-SNMP-MIB::extIndex.2 = INTEGER: 2
                        UCD-SNMP-MIB::extNames.1 = STRING: 
enterprises.ucdavis.50.100.1
                        UCD-SNMP-MIB::extNames.2 = STRING: 
enterprises.ucdavis.50.100.1
                        UCD-SNMP-MIB::extCommand.1 = STRING: /bin/sh /tmp/shtest
                        UCD-SNMP-MIB::extCommand.2 = STRING: /bin/sh /tmp/shtest
                        UCD-SNMP-MIB::extResult.1 = INTEGER: 35
                        UCD-SNMP-MIB::extResult.2 = INTEGER: 35
                        UCD-SNMP-MIB::extOutput.1 = STRING: hello world
                        hi there
                        UCD-SNMP-MIB::extOutput.2 = STRING: hello world
                        hi there
                        UCD-SNMP-MIB::extErrFix.1 = INTEGER: noError(0)
                        UCD-SNMP-MIB::extErrFix.2 = INTEGER: noError(0)
                        UCD-SNMP-MIB::extErrFixCmd.1 = STRING:
                        UCD-SNMP-MIB::extErrFixCmd.2 = STRING:

                It's seams that no extension is make to the table :-(

        Is this right, that the subagent must start before the agent is startet 
?

                Like this:
                        /usr/lib/net-snmp/agents/mysql_agent.pl &
                        `which snmpd` -Ls DAEMON -Lf /var/log/snmpd.log -u root 
-p /var/run/snmpd.pid -X -x localhost:705 -c /etc/snmp/snmpd.conf


        

        Sorry i have forgotten to tell you that i work on an Linux Ubuntu 6.06 
Server :-)

        I have attached the actual snmpd.conf.

Regards 
Stefan


-----Ursprüngliche Nachricht-----
Von: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Auftrag von
Stefan Mikuszeit
Gesendet: Dienstag, 3. Juli 2007 12:38
An: Dave Shield
Cc: net-snmp-users@lists.sourceforge.net
Betreff: AW: SNMP AgentX Problem <LONG MAIL>


Hello Dave,

        thx for your help :-)


        This is the code for set the new Value to the OID, it's included in the 
Script ;-)

      if ($next ne "") {
        $value = $global_status{$next}{'value'};

        $request->setOID($next);
        $request->setValue(ASN_OCTET_STR, "$value");


        The Debugging Info you will find at the attachment.

Regards
Stefan

-----Ursprüngliche Nachricht-----
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Auftrag von Dave Shield
Gesendet: Dienstag, 3. Juli 2007 10:40
An: Stefan Mikuszeit
Cc: net-snmp-users@lists.sourceforge.net
Betreff: Re: SNMP AgentX Problem <LONG MAIL>


On 02/07/07, Stefan Mikuszeit <[EMAIL PROTECTED]> wrote:
> The problem is that the subagent dos not submit the collected data's
> to the snmp agent, but i don't no why :(

Try activating the debugging code in your subagent.
What does that show?

What are the exact commands you are trying?


I haven't looked through the whole of your code, but:


> My Subagent Perlscript
>
> <-- SNIP -->
>
> #!/usr/bin/perl --

> sub mysql_snmp_handler {

>     if ($mode == MODE_GET) {
            [snip]
>     }
>
>     if ($mode == MODE_GETNEXT) {
            [snip]
>     }
>   }
>   #print STDERR "- finished processing\n" if ($debugging);
> }

This handler doesn't seem to include and code to support SET
requests - just GET and GETNEXT.   So it's not too surprising
that SET requests aren't working :-)


Dave

PS:  Please don't include so much in-line information.
If you've got various additional code, MIB and config files,
it's probably better to include them as attachments.

Attachment: snmpd.conf
Description: snmpd.conf

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
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