Thread: Get SRP Status
View Single Post
Old 02-06-2007, 07:02 PM   #6 (permalink)
zerofill
Knows Where the Search Button Is
 
Join Date: Jul 2005
Model: 8300
Carrier: AT&T
Posts: 27
Post Thanks: 1
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by blubyu
snmp would be your best bet. Here is how I am doing it with php:

PHP Code:
$besSysHealthSrpConnectedStatexxx91;0xxx93; = snmpget(DBHOSTSNMPCOMMUNITY"1.3.6.1.4.1.3530.5.25.1.10.1"); 
This will return a 1 (connected) or 0 (disconnected). If you download a free snmp browser you will see all the things that you can query. Since you are doing vb you could probably also right in some snmp traps and have it alert you when the connection goes down.

I should add that I only have one BES server so the query above is kinda hard coded for that server. If you have more then one BES server to query then you will need to mod the snmp string above.
Hi blubyu,

Would you be able to give me a proof of concept in getting snmp working properly with php? When I try to do
Code:
snmpget('localhost', 'public', "1.3.6.1.4.1.3530.5.25.1.10.1");
It gives me the following error
Code:
Warning: snmpget() [function.snmpget]: Error in packet: (noSuchName) There is no such variable name in this MIB. in D:\Domains\bestools3.lennar.com\public_html\snmp.php on line 4

Warning: snmpget() [function.snmpget]: This name does not exist: system.sysUpTime.6.1.4.1.3530.5.25.1.10.1 in D:\Domains\bestools3.lennar.com\public_html\snmp.php on line 4
I've also tried private and a bunch of other guesses for the community as this is my first attempt with SNMP.

I did copy the blackBerryServer.mib to the mibs directory under the php dir, added blackBerryServer.mib to .index, and restarted apache.

Thanks!

Last edited by zerofill : 02-06-2007 at 07:05 PM.
Offline