Get operations

Get operations obtain information from the probe.

There are two get operations for each version of SNMP. The snmpget form of the command uses the default port number to communicate with the probe, and the snmpget_p form of the command uses the port number specified by the Port property.

SNMP V1 and V2c

The get 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=getcommand hostname=hostname oid=oid type=type value=value community=community

Where getcommand takes one of the following values, depending on your version of SNMP:

  • SNMPGET
  • SNMPGET_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=getcommand hostname=hostname oid=oid type=type value=value community=community port=port

Where getcommand takes one of the following values, depending on your version of SNMP:

  • SNMPGET_P
  • SNMPGET_V2C_P

SNMP V3

The get 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=SNMPGET_V3 hostname=hostname userid= userid oid=oid type=type

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=SNMPGET_V3_P hostname=hostname userid=userid oid=oid type=type port=port

Examples

The following example retrieves the value of the sysDescr object in the SNMP agent. The command uses port 161 on the agent and SNMP V2c:

$OMNIHOME/bin/nco_probeeventfactory -host http://test28.example.com/probe/common -port 6789 snmpreq=SNMPGET_V2C_P hostname=probehost.example.com oid=1.3.6.1.2.1.1.1.0 community=private port=161

The following example also retrieves the value of the sysDescr object. However, it uses SNMP V3, the default port on the SNMP agent, and a user name of snmpadmin:

$OMNIHOME/bin/nco_probeeventfactory -host http://test28.example.com/probe/common -port 6789 snmpreq=SNMPGET_V3 hostname=probehost.example.com userid=snmpadmin oid=1.3.6.1.2.1.1.1.0