- namespace LibreNMS\OS;
- use LibreNMS\Device\Processor;
- use LibreNMS\Interfaces\Discovery\ProcessorDiscovery;
- use LibreNMS\OS;
- class Smartax extends OS implements ProcessorDiscovery
- {
- /**
- * Discover processors.
- * Returns an array of LibreNMS\Device\Processor objects that have been discovered
- *
- * @return array Processors
- */
- public function discoverProcessors()
- {
- $data = snmpwalk_group($this->getDevice(), '1.3.6.1.4.1.2011.2.6.7.1.1.2.1.5.0');
- //$proc_descr = snmpwalk_group($this->getDevice(), '1.3.6.1.4.1.2011.2.6.7.1.1.2.1.7.0');
- $processors = array();
- $count = 1;
- foreach ($data as $index => $entry) {
- if ($entry != -1) {
- $processors[] = Processor::discover(
- "smartax",
- $this->getDeviceId(),
- "$index",
- zeropad($count),
- "Unit $count processor",
- 1,
- $entry
- );
- }
- $count++;
- }
- return $processors;
- }
- }