Set operations
Set operations set the value of data items in the SNMP agent.
SNMP V1 and V2c
The set operation for SNMP V1 and V2c that uses the default port on the SNMP agent has the following format:
$OMNIHOME/bin/nco_probeeventfactory
-host probehost -port probeport snmpreq=setcommand hostname=destinationhost oid=oid type=type value=value community=community
Where setcommand takes one of the following values, depending on your version of SNMP:
- SNMPSET
- SNMPSET_V2C
The operation that specifies the port to use on the SNMP agent has the following format:
$OMNIHOME/bin/nco_probeeventfactory
-host probehost -port probeport snmpreq=setcommand hostname=destinationhost oid=oid type=type value=value community=community port=port
Where setcommand takes one of the following values, depending on your version of SNMP:
- SNMPSET_P
- SNMPSET_P_V2C
SNMP V3
The set operation for SNMP V3 that uses the default port on the SNMP agent has the following format:
$OMNIHOME/bin/nco_probeeventfactory
-host probehost -port probeport snmpreq=SNMPSET_V3
hostname=destinationhost userid=userid oid=oid type=type value=value
The operation that specifies the port to use on the SNMP agent has the following format:
$OMNIHOME/bin/nco_probeeventfactory
-host probehost -port probeport snmpreq=SNMPSET_V3_P
hostname=destinationhost userid=userid oid=oid type=type value=value port=port
Examples
The following example sets the value of the sysLocation object
in the SNMP agent to First floor computer room
. The
command uses the default port on the agent and SNMP V1:
$OMNIHOME/bin/nco_probeeventfactory
-host http://test28.example.com/probe/common -port 6789 snmpreq=SNMPSET
hostname=probehost.example.com oid=1.3.6.1.2.1.1.6.0 type=s value="First
floor computer room" community=private
The following example also sets the value of sysLocation. However, it uses SNMP V3, port 4990 on the SNMP agent, and a user name of snmpadmin:
$OMNIHOME/bin/nco_probeeventfactory
-host http://test28.example.com/probe/common -port 6789 snmpreq=SNMPSET_V3_P
hostname=probehost.example.com userid=snmpadmin oid=1.3.6.1.2.1.1.6.0
type=s value="First floor computer room" port=4990