Hello Dave,

        Is there are any changes in the agentx that are not in the 
documentation ?

        I used the Hello World example from `perldoc NetSNMP::agent` and 
started the SNMP Agent via:
                /usr/sbin/snmpd -Ls DAEMON -Lf /var/log/snmpd.log -u root -p 
/var/run/snmpd.pid -x tcp:localhost:705 -c /etc/snmp/snmpd.conf

        and the subagent via:
                /usr/lib/net-snmp/agents/mysql_agent.pl

        The agent conf:
                cat /etc/snmp/snmp/my_agent_name.conf
agentxSocket tcp:localhost:705

        I will become this message:
                NET-SNMP version 5.4 AgentX subagent connected

        If i now start an snmpwalk, this will not work :-(
                snmpwalk localhost -c public -v2c 
.1.3.6.1.4.1.8072.9999.9999.7375.1.0

        Errormessage:
                NET-SNMP-MIB::netSnmpPlaypen.7375.1.0 = No Such Object 
available on this agent at this OID


        Where's the problem ?

Regards
Stefan

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


Hallo Dave,

        this will now work fine, thx again :-)

snmpwalk localhost -c public -v2c enterprises.ucdavis.50.100.1
UCD-SNMP-MIB::ucdavis.50.100.1.1.0 = INTEGER: 1
UCD-SNMP-MIB::ucdavis.50.100.1.2.1.2.4.84.101.115.116 = STRING: "/bin/sh"
UCD-SNMP-MIB::ucdavis.50.100.1.2.1.3.4.84.101.115.116 = STRING: "/tmp/shtest"
UCD-SNMP-MIB::ucdavis.50.100.1.2.1.4.4.84.101.115.116 = ""
UCD-SNMP-MIB::ucdavis.50.100.1.2.1.5.4.84.101.115.116 = INTEGER: 5
UCD-SNMP-MIB::ucdavis.50.100.1.2.1.6.4.84.101.115.116 = INTEGER: 1
UCD-SNMP-MIB::ucdavis.50.100.1.2.1.7.4.84.101.115.116 = INTEGER: 1
UCD-SNMP-MIB::ucdavis.50.100.1.2.1.20.4.84.101.115.116 = INTEGER: 4
UCD-SNMP-MIB::ucdavis.50.100.1.2.1.21.4.84.101.115.116 = INTEGER: 1
UCD-SNMP-MIB::ucdavis.50.100.1.3.1.1.4.84.101.115.116 = STRING: "hello world"
UCD-SNMP-MIB::ucdavis.50.100.1.3.1.2.4.84.101.115.116 = STRING: "hello world
hi there"
UCD-SNMP-MIB::ucdavis.50.100.1.3.1.3.4.84.101.115.116 = INTEGER: 2
UCD-SNMP-MIB::ucdavis.50.100.1.3.1.4.4.84.101.115.116 = INTEGER: 35
UCD-SNMP-MIB::ucdavis.50.100.1.4.1.2.4.84.101.115.116.1 = STRING: "hello world"
UCD-SNMP-MIB::ucdavis.50.100.1.4.1.2.4.84.101.115.116.2 = STRING: "hi there"

Regards
Stefan

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


On 03/07/07, Stefan Mikuszeit <[EMAIL PROTECTED]> wrote:
>                 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

Three problems.

Firstly, the "relocatable" forms of exec/sh (and extend) rely on the OID
being specified in the full numeric form.  The agent won't recognise
"enterprises...." as specifying the root OID for the output.
    So it's actually taking "enterprises.ucdavis.50.100.1" as the identifying
name for this entry.

We need to amend the documentation to clarify this.


Secondly, the syntax of this command is

       exec   ROOTOID     NAME    COMMAND

You don't seem to be specifying a NAME token.
So even if the ROOTOID was recognised correctly, the agent would then
take "/bin/sh" as the NAME value, and attempt to run "/tmp/shtest"
directly (which wouldn't work).


Thirdly, the 5.3.x release line marked the "exec OID NAME COMMAND"
syntax as deprecated (since the output format is technically invalid).
The 5.4 release then dropped it altogether.   If you'd been using the
numeric OID, then you'd see an error message:

   ..../snmpd.conf: line 3: Error: ERROR: This output format has been
               deprecated - Please use the 'extend' directive instead

Again, we need to amend the documentation to emphasise this.


Try
        extend   .1.3.6.1.4.1.2021.50.100.1   Test  /bin/sh /tmp/shtest

See NET-SNMP-EXTEND-MIB for a description of the structure of the
output.

Dave

-------------------------------------------------------------------------
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

-------------------------------------------------------------------------
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