Advertisement
Guest User

Untitled

a guest
Sep 29th, 2016
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. includes/polling/os/trango.inc.php
  2. -----------------------------------------
  3.  
  4. <?php
  5.  
  6. $version = trim(snmp_get($device, ".1.3.6.1.4.1.5454.1.80.1.1.2.0", "-OQv", "GIGA-PLUS-MIB"),'"');
  7. //$hardware = "Trango " . trim(snmp_get($device, ".1.3.6.1.2.1.1.1.0", "-OQv", "GIGA-PLUS-MIB"),'"');
  8. $hardware = "Trango Apex Lynx-2.0.2";
  9. //$hostname = trim(snmp_get($device, ".1.3.6.1.4.1.5454.1.80.1.6.0", "-OQv", "GIGA-PLUS-MIB"),'"');
  10.  
  11. if (strstr($hardware, 'Trango Apex Lynx-2.0.2')) {
  12. include 'includes/polling/wireless/trango-apexlynx.inc.php';
  13. }
  14.  
  15.  
  16. includes/polling/wireless/trango-apexlynx.inc.php
  17. -----------------------------------------
  18.  
  19. <?php
  20.  
  21. $rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/trango-rssi.rrd";
  22. $rssi = snmp_get($device, "GIGA-PLUS-MIB::rfRSSIInt.0", "-Ovqn", "GIGA-PLUS-MIB");
  23.  
  24.  
  25. if (is_numeric($rssi)) {
  26. if (!is_file($rrd_filename)) {
  27. rrdtool_create($rrd_filename, " --step 300 DS:rssi:GAUGE:600:-150:5000".$config['rrd_rra']);
  28. }
  29. $fields = array(
  30. 'rssi' => $rssi,
  31. );
  32. rrdtool_update($rrd_filename, $fields);
  33. $graphs['trango_rssi'] = TRUE;
  34. unset($rrd_filename,$rssi);
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement