If there is anyone active on this mailing list I hope they can answer me on
this question.
So down to business:
I need to know how I can set multiple parameter values with snmpset for my
commands?
I have implemented my commands as simple scalars, but lately I was thinking
perhaps I needed to implement them as tables since they can have multiple
parameters. When setting/triggering such a command with snmpset, the choice is
either no parameters, one parameter or multiple parameters.
Given the following example MIB for such a table. Lets say it is one of my
commands. Apparently write-only is no longer allowed in SMIv2, so I have used
not-accessible. These commands are not to be accessed by snmpget.
netSnmpHostsTable OBJECT-TYPE
SYNTAX SEQUENCE OF NetSnmpHostsEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"An example table that implements a wrapper around the
/etc/hosts file on a machine using the iterator helper API."
::= { meos 3 }
netSnmpHostsEntry OBJECT-TYPE
SYNTAX NetSnmpHostsEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"A host name mapped to an ip address"
INDEX { netSnmpHostName }
::= { netSnmpHostsTable 1 }
NetSnmpHostsEntry ::= SEQUENCE {
netSnmpHostName OCTET STRING,
netSnmpHostAddressType OCTET STRING,
netSnmpHostAddress OCTET STRING
}
netSnmpHostName OBJECT-TYPE
SYNTAX OCTET STRING (SIZE(0..64))
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"A host name that exists in the /etc/hosts (unix) file."
::= { netSnmpHostsEntry 1 }
netSnmpHostAddressType OBJECT-TYPE
SYNTAX OCTET STRING (SIZE(0..64))
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"The address type of then given host."
::= { netSnmpHostsEntry 2 }
netSnmpHostAddress OBJECT-TYPE
SYNTAX OCTET STRING (SIZE(0..64))
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"The address of then given host."
::= { netSnmpHostsEntry 3 }
Calling with no parameters
snmpset netSnmpHostsTable.0
or calling with 3 parameters
snmpset netSnmpHostsTable.1 something netSnmpHostsTable.2 something else
netSnmpHostsTable.3 something more
Is that possible with snmpset? When setting multiple rows with snmpset will it
process it as one request or multiple requests?
CONFIDENTIALITY
This e-mail and any attachment contain KONGSBERG information which may be
proprietary, confidential or subject to export regulations, and is only meant
for the intended recipient(s). Any disclosure, copying, distribution or use is
prohibited, if not otherwise explicitly agreed with KONGSBERG. If received in
error, please delete it immediately from your system and notify the sender
properly.
------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users