[PHP] Kan switch niet uitlezen dmv SNMP

Pagina: 1
Acties:

Onderwerpen


Acties:
  • 0 Henk 'm!

  • Yucko
  • Registratie: Mei 2000
  • Laatst online: 10:25

Yucko

One clown to rule them all !

Topicstarter
Specs:

W2K3
Abyss Webserver X1
PHP 5.1.4
NET-SNMP
Baystack 350-24T switch

Eerst heb ik de switch uitgelezen voor de juiste OID info:
Afbeeldingslocatie: http://www.jajoah.nl/images/snmpwalk_small.jpg

Maar wanneer ik deze info gebruik vanuit PHP dan krijg ik het maar niet voor mekaar om iets simpels als een string uit te lezen. Ik krijg alsmaar de foutmelding:

"snmpget() [function.snmpget]: Invalid object identifier"


code:
1
2
3
4
5
<?php
  $host = '192.168.1.2';
  $community = 'public';
  $informatie = snmpget ($host, $community, "1.3.6.1.2.1.1.4.0");
?>


Nu heb ik eventjes gekeken op PHP.NET en heb al geprobeerd om "RFC1213-MIB::sysContact.0" te gebruiken ipv "1.3.6.1.2.1.1.4.0" maar dat mocht ook niet baten.

Google kon me ook niet echt verder helpen ;(

Kan iemand me vertellen wat ik hier fout doe ?

[ Voor 32% gewijzigd door Yucko op 05-06-2006 14:08 ]

 iPhone 15 Pro Max Titanium Black 256GB -  iPad Pro 2018 12.9" Space Gray 64GB -  AirPods Pro 3 -  Watch 5 Space Gray LTE -  TV 4K 128GB -  TV 4 64GB -  Wireless CarPlay


Acties:
  • 0 Henk 'm!

  • NMe
  • Registratie: Februari 2004
  • Laatst online: 09-09 13:58

NMe

Quia Ego Sic Dico.

Lees dit eens door, misschien heb je er wat aan.

'E's fighting in there!' he stuttered, grabbing the captain's arm.
'All by himself?' said the captain.
'No, with everyone!' shouted Nobby, hopping from one foot to the other.