Hi all ... i've been working on this for 3 days now searching all the web with no luck ...
I need to pull an SNMP info from a device using snmpget() function (or whatever valid function) and that device is having it's own third-party MIB library/file ...
let me give you som exampels:
$mysnmp = snmpget("11.22.33.44", "plubic", "system.sysDescr.0");
echo $mysnmp;
it returns the sysDescr value perfectly ...
now my reall OID is this :
.iso.org.dod.internet.private.enterprises.clarent.mgt.callmanager.cCMStatus.cmPortInUseCount
Or this:
.1.3.6.1.4.1.2858.100.40.1.1
whenever i try to give the folowing code i get an error:
$mysnmp = snmpget("11.22.33.44", "plubic", ".1.3.6.1.4.1.2858.100.40.1.1");
echo $mysnmp;
the MIB file is called CALLMGR-MIB.mib ...
here is the begining of the file:
CALLMGR-MIB DEFINITIONS ::= BEGIN
IMPORTS
IpAddress, Gauge, TimeTicks
FROM RFC1155-SMI
DisplayString
FROM RFC1213-MIB
OBJECT-TYPE
FROM RFC-1212
TRAP-TYPE
FROM RFC-1215;
clarent OBJECT IDENTIFIER ::= { enterprises 2858 }
mgt OBJECT IDENTIFIER ::= { clarent 100 }
callmanager OBJECT IDENTIFIER ::= { mgt 40 }
cCMStatus OBJECT IDENTIFIER ::= { callmanager 1 }
cCMConfig OBJECT IDENTIFIER ::= { callmanager 2 }
cCMSystem OBJECT IDENTIFIER ::= { callmanager 3 }
cCMTrapParms OBJECT IDENTIFIER ::= { callmanager 4 }
cCMPorts OBJECT IDENTIFIER ::= { callmanager 5 }
cCMPortStatus OBJECT IDENTIFIER ::= { cCMPorts 4 }
cCMPortControl OBJECT IDENTIFIER ::= { cCMPorts 5 }
cCMStatsTotals OBJECT IDENTIFIER ::= { callmanager 6 }
cCMClass4 OBJECT IDENTIFIER ::= { callmanager 7 }
cCMBlades OBJECT IDENTIFIER ::= { cCMClass4 1 }
cCMSpans OBJECT IDENTIFIER ::= { cCMClass4 2 }
cGIFLinkStatus OBJECT IDENTIFIER ::= { callmanager 8 }
clarent-cmtraps OBJECT IDENTIFIER ::= { callmanager 100 }
cmPortInUseCount OBJECT-TYPE
SYNTAX INTEGER
ACCESS read-only
STATUS mandatory
DESCRIPTION
"Number of ports currently in use"
::= { cCMStatus 1 }
i need to pull the info for this object: cmPortInUseCount
So my question is:
How can i write the correct snmpget() code to retrive this OID ?
Any help please ?
thanks a lot ..