Advertisement
Guest User

Untitled

a guest
Feb 25th, 2017
229
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 20.81 KB | None | 0 0
  1. /scripts/github-apply 5558
  2. <stdin>:59: trailing whitespace.
  3.  
  4. <stdin>:68: trailing whitespace.
  5.  
  6. <stdin>:440: trailing whitespace.
  7.  
  8. Checking patch includes/discovery/sensors/current/apc.inc.php...
  9. error: while searching for:
  10. if (empty($oids)) {
  11. $oids = snmp_walk($device, 'rPDULoadPhaseConfigIndex', '-OsqnU', 'PowerNet-MIB');
  12. }
  13.  
  14. if ($oids) {
  15. d_echo($oids."\n");
  16.  
  17.  
  18. error: patch failed: includes/discovery/sensors/current/apc.inc.php:7
  19. error: includes/discovery/sensors/current/apc.inc.php: patch does not apply
  20. Checking patch includes/discovery/sensors/load/apc.inc.php...
  21. error: while searching for:
  22. if ($device['os'] == 'apc') {
  23. echo 'APC Load ';
  24. // UPS
  25. $oid_array = array(
  26. array(
  27. 'HighPrecOid' => 'upsHighPrecOutputLoad',
  28. 'AdvOid' => 'upsAdvOutputLoad',
  29. 'type' => 'apc',
  30. 'index' => 0,
  31. 'descr' => 'Load',
  32. 'divisor' => 10,
  33. 'mib' => '+PowerNet-MIB',
  34. ),
  35. );
  36. foreach ($oid_array as $item) {
  37. $oids = snmp_get($device, $item['HighPrecOid'].'.'.$item['index'], '-OsqnU', $item['mib']);
  38. if (empty($oids)) {
  39. $oids = snmp_get($device, $item['AdvOid'].'.'.$item['index'], '-OsqnU', $item['mib']);
  40. $current_oid = '.1.3.6.1.4.1.318.1.1.1.4.3.3';
  41. $current = $oids;
  42. $item['divisor'] = 1;
  43. } else {
  44. $current_oid = '.1.3.6.1.4.1.318.1.1.1.4.3.3';
  45. $value = explode(" ", $oids);
  46. $current = $value[1]/$item['divisor'];
  47. }
  48.  
  49. if (!empty($oids)) {
  50. d_echo($oids);
  51.  
  52. $oids = trim($oids);
  53. if ($oids) {
  54. echo $item['type'].' '.$item['mib'].' UPS';
  55. }
  56.  
  57. discover_sensor($valid['sensor'], 'load', $device, $current_oid.'.'.$item['index'], $current_oid.'.'.$item['index'], $item['type'], $item['descr'], $item['divisor'], 1, null, null, null, null, $current);
  58. }
  59. }//end foreach
  60. }//end if
  61.  
  62. error: patch failed: includes/discovery/sensors/load/apc.inc.php:4
  63. error: includes/discovery/sensors/load/apc.inc.php: patch does not apply
  64. Checking patch includes/discovery/sensors/voltages/apc.inc.php...
  65. error: while searching for:
  66.  
  67. // APC Voltages
  68. if ($device['os'] == 'apc') {
  69. $oids = snmp_walk($device, '.1.3.6.1.4.1.318.1.1.8.5.3.3.1.3', '-OsqnU');
  70. d_echo($oids."\n");
  71.  
  72. if ($oids) {
  73. echo 'APC In ';
  74. }
  75.  
  76. $divisor = 1;
  77. $type = 'apc';
  78. foreach (explode("\n", $oids) as $data) {
  79. $data = trim($data);
  80. if ($data) {
  81. list($oid,$current) = explode(' ', $data, 2);
  82. $split_oid = explode('.', $oid);
  83. $index = $split_oid[(count($split_oid) - 3)];
  84. $oid = '.1.3.6.1.4.1.318.1.1.8.5.3.3.1.3.'.$index.'.1.1';
  85. $descr = 'Input Feed '.chr(64 + $index);
  86.  
  87. discover_sensor($valid['sensor'], 'voltage', $device, $oid, "3.3.1.3.$index", $type, $descr, $divisor, '1', null, null, null, null, $current);
  88. }
  89. }
  90.  
  91. $oids = snmp_walk($device, '.1.3.6.1.4.1.318.1.1.8.5.4.3.1.3', '-OsqnU');
  92. d_echo($oids."\n");
  93.  
  94. if ($oids) {
  95. echo ' APC Out ';
  96. }
  97.  
  98. $divisor = 1;
  99. $type = 'apc';
  100. foreach (explode("\n", $oids) as $data) {
  101. $data = trim($data);
  102. if ($data) {
  103. list($oid,$current) = explode(' ', $data, 2);
  104. $split_oid = explode('.', $oid);
  105. $index = $split_oid[(count($split_oid) - 3)];
  106. $oid = '.1.3.6.1.4.1.318.1.1.8.5.4.3.1.3.'.$index.'.1.1';
  107. $descr = 'Output Feed';
  108. if (count(explode("\n", $oids)) > 1) {
  109. $descr .= " $index";
  110. }
  111.  
  112. discover_sensor($valid['sensor'], 'voltage', $device, $oid, "4.3.1.3.$index", $type, $descr, $divisor, '1', null, null, null, null, $current);
  113. }
  114. }
  115.  
  116. $oids = snmp_get($device, '.1.3.6.1.4.1.318.1.1.1.3.2.1.0', '-OsqnU');
  117. d_echo($oids."\n");
  118.  
  119. if ($oids) {
  120. echo ' APC In ';
  121. list($oid,$current) = explode(' ', $oids);
  122. $divisor = 1;
  123. $type = 'apc';
  124. $index = '3.2.1.0';
  125. $descr = 'Input';
  126.  
  127. discover_sensor($valid['sensor'], 'voltage', $device, $oid, $index, $type, $descr, $divisor, '1', null, null, null, null, $current);
  128. }
  129.  
  130. $oids = snmp_get($device, '.1.3.6.1.4.1.318.1.1.1.4.2.1.0', '-OsqnU');
  131. d_echo($oids."\n");
  132.  
  133. if ($oids) {
  134. echo ' APC Out ';
  135. list($oid,$current) = explode(' ', $oids);
  136. $divisor = 1;
  137. $type = 'apc';
  138. $index = '4.2.1.0';
  139. $descr = 'Output';
  140.  
  141. discover_sensor($valid['sensor'], 'voltage', $device, $oid, $index, $type, $descr, $divisor, '1', null, null, null, null, $current);
  142. }
  143.  
  144. // rPDUIdentDeviceLinetoLineVoltage
  145. $oids = snmp_get($device, ".1.3.6.1.4.1.318.1.1.12.1.15.0", "-OsqnU");
  146. d_echo($oids."\n");
  147.  
  148. if ($oids) {
  149. echo ' Voltage In ';
  150. list($oid,$current) = explode(' ', $oids);
  151. if ($current >= 0) { // Newer units using rPDU2 can return the following rPDUIdentDeviceLinetoLineVoltage.0; Value (Integer): -1 hence this check.
  152. $divisor = 1;
  153. $type = 'apc';
  154. $index = '1';
  155.  
  156. error: patch failed: includes/discovery/sensors/voltages/apc.inc.php:2
  157. error: includes/discovery/sensors/voltages/apc.inc.php: patch does not apply
  158. Checking patch includes/discovery/sensors/current/apc.inc.php...
  159. error: while searching for:
  160.  
  161. discover_sensor($valid['sensor'], 'current', $device, $current_oid, $index, $type, $descr, '10', '1', $lowlimit, null, $warnlimit, $limit, $current);
  162. }
  163.  
  164. unset($oids);
  165.  
  166. // UPS
  167. $three_phase = snmp_get($device, 'upsBasicOutputPhase.0', '-OsqvU', 'PowerNet-MIB');
  168. echo $three_phase;
  169. if ($three_phase == 3) {
  170. $phase_divisor = 10;// 3 Phase UPS has x10 current for some reason
  171. for ($ph_in = 1; $ph_in <= 3;) { // Input Current 3Phase
  172. $rawincurrent = snmp_get($device, 'upsPhaseInputCurrent.1.1.'.$ph_in, '-OsqvU', 'PowerNet-MIB');
  173. $phincurrent = $rawincurrent / $phase_divisor ;
  174. $phin_oid = '.1.3.6.1.4.1.318.1.1.1.9.2.3.1.6.1.1';
  175.  
  176. discover_sensor($valid['sensor'], 'current', $device, $phin_oid.'.'.$ph_in, $phin_oid.'.'.$ph_in, apc, 'Phase '. $ph_in .' Input Current', $phase_divisor, 1, null, null, null, null, $phincurrent);
  177. $ph_in++;
  178. }
  179. for ($ph_out = 1; $ph_out <= 3;) { // Output Current 3Phase
  180.  
  181. $rawoutcurrent = snmp_get($device, 'upsPhaseOutputCurrent.1.1.'.$ph_out, '-OsqvU', 'PowerNet-MIB');
  182. $phoutcurrent = $rawoutcurrent / $phase_divisor ;
  183. $phout_oid = '.1.3.6.1.4.1.318.1.1.1.9.3.3.1.4.1.1';
  184.  
  185. discover_sensor($valid['sensor'], 'current', $device, $phout_oid.'.'.$ph_out, $phout_oid.'.'.$ph_out, apc, 'Phase '. $ph_out .' Output Current', $phase_divisor, 1, null, null, null, null, $phoutcurrent);
  186. $ph_out++;
  187. }
  188. } else {
  189. $oid_array = array(
  190. array(
  191. 'HighPrecOid' => 'upsHighPrecOutputCurrent',
  192. 'AdvOid' => 'upsAdvOutputCurrent',
  193. 'type' => 'apc',
  194. 'index' => 0,
  195. 'descr' => 'Current Drawn',
  196. 'divisor' => 10,
  197. 'mib' => '+PowerNet-MIB',
  198. ),
  199. );
  200.  
  201. foreach ($oid_array as $item) {
  202. $oids = snmp_get($device, $item['HighPrecOid'].'.'.$item['index'], '-OsqnU', $item['mib']);
  203. if (empty($oids)) {
  204. $oids = snmp_get($device, $item['AdvOid'].'.'.$item['index'], '-OsqnU', $item['mib']);
  205. $current_oid = '.1.3.6.1.4.1.318.1.1.1.4.2.4';
  206. $current = $oids;
  207. $item['divisor'] = 1;
  208. } else {
  209. $current_oid = '.1.3.6.1.4.1.318.1.1.1.4.3.4';
  210. $value = explode(" ", $oids);
  211. $current = $value[1]/$item['divisor'];
  212. }
  213.  
  214. if (!empty($oids)) {
  215. d_echo($oids."\n");
  216.  
  217. $oids = trim($oids);
  218. if ($oids) {
  219. echo $item['type'].' '.$item['mib'].' UPS';
  220. }
  221.  
  222. discover_sensor($valid['sensor'], 'current', $device, $current_oid.'.'.$item['index'], $current_oid.'.'.$item['index'], $item['type'], $item['descr'], $item['divisor'], 1, null, null, null, null, $current);
  223. }
  224. }
  225. }
  226.  
  227. error: patch failed: includes/discovery/sensors/current/apc.inc.php:202
  228. error: includes/discovery/sensors/current/apc.inc.php: patch does not apply
  229. Checking patch includes/discovery/sensors/load/apc.inc.php...
  230. error: while searching for:
  231. if ($device['os'] == 'apc') {
  232. echo 'APC Load ';
  233. // UPS
  234. $three_phase = snmp_get($device, 'upsBasicOutputPhase.0', '-OsqvU', 'PowerNet-MIB');
  235. echo $three_phase;
  236. if ($three_phase == 3) {
  237. for ($ph_ld = 1; $ph_ld <= 3;) { // Input Current 3Phase
  238. $ph_load = snmp_get($device, 'upsPhaseOutputPercentLoad.1.1.'.$ph_ld, '-OsqvU', 'PowerNet-MIB');
  239. $phld_oid = '.1.3.6.1.4.1.318.1.1.1.9.3.3.1.10.1.1';
  240.  
  241. discover_sensor($valid['sensor'], 'load', $device, $phld_oid.'.'.$ph_ld, $phld_oid.'.'.$ph_ld, apc, 'Phase '. $ph_ld .' Output Load', 1, 1, null, null, null, null, $ph_load);
  242. $ph_ld++;
  243. }
  244. } else {
  245. $oid_array = array(
  246. array(
  247.  
  248. error: patch failed: includes/discovery/sensors/load/apc.inc.php:4
  249. error: includes/discovery/sensors/load/apc.inc.php: patch does not apply
  250. Checking patch includes/discovery/sensors/voltages/apc.inc.php...
  251. error: while searching for:
  252. <?php
  253.  
  254. // APC Voltages
  255. if ($device['os'] == 'apc') {
  256. $three_phase = snmp_get($device, 'upsBasicOutputPhase.0', '-OsqvU', 'PowerNet-MIB');
  257. if ($three_phase == 3) {
  258. $phase_divisor = 1;
  259. for ($ph_vlin = 1; $ph_vlin <= 3;) {
  260. $phinvoltage = snmp_get($device, 'upsPhaseOutputVoltage.1.1.'.$ph_vlin, '-OsqvU', 'PowerNet-MIB');
  261. $phvlin_oid = '.1.3.6.1.4.1.318.1.1.1.9.2.3.1.3.1.1';
  262. discover_sensor($valid['sensor'], 'voltage', $device, $phvlin_oid.'.'.$ph_vlin, $phvlin_oid.'.'.$ph_vlin, apc, 'Phase '. $ph_vlin .' Input Voltage', $phase_divisor, 1, null, null, null, null, $phinvoltage);
  263. $ph_vlin++;
  264. }
  265. for ($ph_vlout = 1; $ph_vlout <= 3;) {
  266. $phoutvoltage = snmp_get($device, 'upsPhaseInputVoltage.1.1.'.$ph_vlout, '-OsqvU', 'PowerNet-MIB');
  267. $phvlout_oid = '.1.3.6.1.4.1.318.1.1.1.9.3.3.1.3.1.1';
  268. discover_sensor($valid['sensor'], 'voltage', $device, $phvlout_oid.'.'.$ph_vlout, $phvlout_oid.'.'.$ph_vlout, apc, 'Phase '. $ph_vlout .' Output Voltage', $phase_divisor, 1, null, null, null, null, $phoutvoltage);
  269. $ph_vlout++;
  270. }
  271. } else {
  272. $oids = snmp_walk($device, '.1.3.6.1.4.1.318.1.1.8.5.3.3.1.3', '-OsqnU');
  273. d_echo($oids."\n");
  274.  
  275. if ($oids) {
  276. echo 'APC In ';
  277. }
  278.  
  279. $divisor = 1;
  280. $type = 'apc';
  281. foreach (explode("\n", $oids) as $data) {
  282. $data = trim($data);
  283. if ($data) {
  284. list($oid,$current) = explode(' ', $data, 2);
  285. $split_oid = explode('.', $oid);
  286. $index = $split_oid[(count($split_oid) - 3)];
  287. $oid = '.1.3.6.1.4.1.318.1.1.8.5.3.3.1.3.'.$index.'.1.1';
  288. $descr = 'Input Feed '.chr(64 + $index);
  289.  
  290. discover_sensor($valid['sensor'], 'voltage', $device, $oid, "3.3.1.3.$index", $type, $descr, $divisor, '1', null, null, null, null, $current);
  291. }
  292. }
  293.  
  294. $oids = snmp_walk($device, '.1.3.6.1.4.1.318.1.1.8.5.4.3.1.3', '-OsqnU');
  295. d_echo($oids."\n");
  296.  
  297. if ($oids) {
  298. echo ' APC Out ';
  299. }
  300.  
  301. $divisor = 1;
  302. $type = 'apc';
  303. foreach (explode("\n", $oids) as $data) {
  304. $data = trim($data);
  305. if ($data) {
  306. list($oid,$current) = explode(' ', $data, 2);
  307. $split_oid = explode('.', $oid);
  308. $index = $split_oid[(count($split_oid) - 3)];
  309. $oid = '.1.3.6.1.4.1.318.1.1.8.5.4.3.1.3.'.$index.'.1.1';
  310. $descr = 'Output Feed';
  311. if (count(explode("\n", $oids)) > 1) {
  312. $descr .= " $index";
  313. }
  314.  
  315. discover_sensor($valid['sensor'], 'voltage', $device, $oid, "4.3.1.3.$index", $type, $descr, $divisor, '1', null, null, null, null, $current);
  316. }
  317. }
  318.  
  319. $oids = snmp_get($device, '.1.3.6.1.4.1.318.1.1.1.3.2.1.0', '-OsqnU');
  320. d_echo($oids."\n");
  321.  
  322. if ($oids) {
  323. echo ' APC In ';
  324. list($oid,$current) = explode(' ', $oids);
  325. $divisor = 1;
  326. $type = 'apc';
  327. $index = '3.2.1.0';
  328. $descr = 'Input';
  329.  
  330. discover_sensor($valid['sensor'], 'voltage', $device, $oid, $index, $type, $descr, $divisor, '1', null, null, null, null, $current);
  331. }
  332.  
  333. $oids = snmp_get($device, '.1.3.6.1.4.1.318.1.1.1.4.2.1.0', '-OsqnU');
  334. d_echo($oids."\n");
  335.  
  336. if ($oids) {
  337. echo ' APC Out ';
  338. list($oid,$current) = explode(' ', $oids);
  339. $divisor = 1;
  340. $type = 'apc';
  341. $index = '4.2.1.0';
  342. $descr = 'Output';
  343.  
  344. discover_sensor($valid['sensor'], 'voltage', $device, $oid, $index, $type, $descr, $divisor, '1', null, null, null, null, $current);
  345.  
  346. error: patch failed: includes/discovery/sensors/voltages/apc.inc.php:1
  347. error: includes/discovery/sensors/voltages/apc.inc.php: patch does not apply
  348. Checking patch includes/discovery/sensors/current/apc.inc.php...
  349. error: while searching for:
  350. }
  351. unset($oids);
  352.  
  353. $phasecount = snmp_get($device, 'upsBasicOutputPhase.0', '-OsqvU', 'PowerNet-MIB');
  354.  
  355. if ($phasecount > 1) {
  356. $oids = snmpwalk_cache_oid($device, 'upsPhaseOutputCurrent', $oids, 'PowerNet-MIB');
  357.  
  358. error: patch failed: includes/discovery/sensors/current/apc.inc.php:204
  359. error: includes/discovery/sensors/current/apc.inc.php: patch does not apply
  360. Checking patch includes/discovery/sensors/load/apc.inc.php...
  361. error: while searching for:
  362. if ($device['os'] == 'apc') {
  363. echo 'APC Load ';
  364. // UPS
  365. $phasecount = snmp_get($device, 'upsBasicOutputPhase.0', '-OsqvU', 'PowerNet-MIB');
  366. if ($phasecount > 1) {
  367. $oids = snmpwalk_cache_oid($device, 'upsPhaseOutputPercentLoad', array(), 'PowerNet-MIB');
  368. foreach ($oids as $index => $data) {
  369.  
  370. error: patch failed: includes/discovery/sensors/load/apc.inc.php:4
  371. error: includes/discovery/sensors/load/apc.inc.php: patch does not apply
  372. Checking patch includes/discovery/sensors/voltages/apc.inc.php...
  373. error: while searching for:
  374. if ($device['os'] == 'apc') {
  375. echo 'APC ';
  376.  
  377. $phasecount = snmp_get($device, 'upsBasicOutputPhase.0', '-OsqvU', 'PowerNet-MIB');
  378. // Check for three phase UPS devices - else skip to normal discovery
  379. if ($phasecount > 1) {
  380. $oids = snmpwalk_cache_oid($device, 'upsPhaseOutputVoltage', $oids, 'PowerNet-MIB');
  381.  
  382. error: patch failed: includes/discovery/sensors/voltages/apc.inc.php:3
  383. error: includes/discovery/sensors/voltages/apc.inc.php: patch does not apply
  384. Checking patch includes/discovery/sensors/current/apc.inc.php...
  385. error: while searching for:
  386. $divisor = 10;
  387. $current = $data['upsPhaseOutputCurrent'] / $divisor;
  388. }
  389. discover_sensor($valid['sensor'], 'current', $device, $current_oid, $index, $type, $descr, $divisor, 1, null, null, null, null, $current);
  390. }
  391. unset($index);
  392. unset($data);
  393.  
  394. error: patch failed: includes/discovery/sensors/current/apc.inc.php:225
  395. error: includes/discovery/sensors/current/apc.inc.php: patch does not apply
  396. Checking patch includes/discovery/sensors/load/apc.inc.php...
  397. error: while searching for:
  398. $phasecount = snmp_get($device, 'upsPhaseNumInputPhases.1', '-OsqvU', 'PowerNet-MIB');
  399. if ($phasecount > 1) {
  400. $oids = snmpwalk_cache_oid($device, 'upsPhaseOutputPercentLoad', array(), 'PowerNet-MIB');
  401. foreach ($oids as $index => $data) {
  402. $type = 'apcUPS';
  403. $descr = 'Phase ' . substr($index, -1);
  404. $load_oid = '.1.3.6.1.4.1.318.1.1.1.9.3.3.1.10.1.' . $index;
  405. $divisor = 1;
  406. $load = $data['upsPhaseOutputPercentLoad'] / $divisor;
  407. discover_sensor($valid['sensor'], 'load', $device, $load_oid, $index, $type, $descr, $divisor, 1, null, null, null, null, $load);
  408. }
  409. unset($oids);
  410. } else {
  411.  
  412. error: patch failed: includes/discovery/sensors/load/apc.inc.php:7
  413. error: includes/discovery/sensors/load/apc.inc.php: patch does not apply
  414. Checking patch includes/discovery/sensors/voltages/apc.inc.php...
  415. error: while searching for:
  416. $voltage_oid = '.1.3.6.1.4.1.318.1.1.1.9.3.3.1.3.' . $index;
  417. $divisor = 1;
  418. $voltage = $data['upsPhaseOutputVoltage'] / $divisor;
  419.  
  420. discover_sensor($valid['sensor'], 'voltage', $device, $voltage_oid, $index, $type, $descr, $divisor, 1, null, null, null, null, $voltage);
  421. }
  422. unset($index);
  423. unset($data);
  424.  
  425. error: patch failed: includes/discovery/sensors/voltages/apc.inc.php:15
  426. error: includes/discovery/sensors/voltages/apc.inc.php: patch does not apply
  427. Checking patch includes/discovery/sensors/current/apc.inc.php...
  428. error: while searching for:
  429. }
  430. unset($oids);
  431.  
  432. $phasecount = snmp_get($device, 'upsPhaseNumInputPhases.1', '-OsqvU', 'PowerNet-MIB');
  433.  
  434. if ($phasecount > 1) {
  435. $oids = snmpwalk_cache_oid($device, 'upsPhaseOutputCurrent', $oids, 'PowerNet-MIB');
  436.  
  437. error: patch failed: includes/discovery/sensors/current/apc.inc.php:204
  438. error: includes/discovery/sensors/current/apc.inc.php: patch does not apply
  439. Checking patch includes/discovery/sensors/load/apc.inc.php...
  440. error: while searching for:
  441. if ($device['os'] == 'apc') {
  442. echo 'APC Load ';
  443. // UPS
  444. $phasecount = snmp_get($device, 'upsPhaseNumInputPhases.1', '-OsqvU', 'PowerNet-MIB');
  445. if ($phasecount > 1) {
  446. $oids = snmpwalk_cache_oid($device, 'upsPhaseOutputPercentLoad', array(), 'PowerNet-MIB');
  447. d_echo($oids);
  448.  
  449. error: patch failed: includes/discovery/sensors/load/apc.inc.php:4
  450. error: includes/discovery/sensors/load/apc.inc.php: patch does not apply
  451. Checking patch includes/discovery/sensors/voltages/apc.inc.php...
  452. error: while searching for:
  453. if ($device['os'] == 'apc') {
  454. echo 'APC ';
  455.  
  456. $phasecount = snmp_get($device, 'upsPhaseNumInputPhases.1', '-OsqvU', 'PowerNet-MIB');
  457. // Check for three phase UPS devices - else skip to normal discovery
  458. if ($phasecount > 1) {
  459. $oids = snmpwalk_cache_oid($device, 'upsPhaseOutputVoltage', $oids, 'PowerNet-MIB');
  460.  
  461. error: patch failed: includes/discovery/sensors/voltages/apc.inc.php:3
  462. error: includes/discovery/sensors/voltages/apc.inc.php: patch does not apply
  463. Checking patch includes/discovery/sensors/current/apc.inc.php...
  464. error: while searching for:
  465. $divisor = 10;
  466. $current = $data['upsPhaseOutputCurrent'] / $divisor;
  467. }
  468. if ($current >= 0) {
  469. discover_sensor($valid['sensor'], 'current', $device, $current_oid, $index, $type, $descr, $divisor, 1, null, null, null, null, $current);
  470. }
  471. }
  472.  
  473. error: patch failed: includes/discovery/sensors/current/apc.inc.php:225
  474. error: includes/discovery/sensors/current/apc.inc.php: patch does not apply
  475. Checking patch includes/definitions/apc.yaml...
  476. Checking patch includes/discovery/sensors/current/apc.inc.php...
  477. error: while searching for:
  478. discover_sensor($valid['sensor'], 'current', $device, $current_oid, $index, $type, $descr, '10', '1', $lowlimit, null, $warnlimit, $limit, $current);
  479. }
  480. unset($oids);
  481.  
  482. $phasecount = snmp_get($device, 'upsBasicInputPhase.0', '-OsqvU', 'PowerNet-MIB');
  483.  
  484. if ($phasecount > 1) {
  485. $oids = snmpwalk_cache_oid($device, 'upsPhaseOutputCurrent', $oids, 'PowerNet-MIB');
  486. $in_oids = snmpwalk_cache_oid($device, 'upsPhaseInputCurrent', $in_oids, 'PowerNet-MIB');
  487.  
  488. error: patch failed: includes/discovery/sensors/current/apc.inc.php:203
  489. error: includes/discovery/sensors/current/apc.inc.php: patch does not apply
  490. [root@NCAERoDC01gra01 librenms]#
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement