Hi,
Premise:
I integrated your code on my Laravel 5.5 application to interface with a Zenoss 4.2.5 server.
In the application controller I call the getDeviceInfo () method after creating the zenoss object.
This is the code:
public function device_details(){ Log::info('ZenossController::device_details'); $zenoss = new Zenoss('10.xxx.xxx.xx'); $devicesDetails = $zenoss->getDeviceInfo('/zport/dmd/Devices/Server/Linux/devices/localhost'); }
The problem
I expect it to return the information passed in the keys argument in the getinfo () method of the JSON API invoked by the getDeviceInfo ($ deviceURI) method of your code.
That is:
$json_keys = array("uptime", "firstSeen", "lastChanged", "lastCollected", "locking", "memory", "name", "productionState", "priority", "tagNumber", "serialNumber", "rackSlot", "collector","hwManufacturer","hwModel","osManufacturer","osModel","systems", "groups","location","links","comments","snmpSysName","snmpLocation","snmpContact","snmpDescr","snmpCommunity","snmpVersion"); $json_data['keys'] = $json_keys;
But it returns the uid of localhost and that of another linux server:
[2020-11-23 16:34:49] local.INFO: [<Device at /zport/dmd/Devices/Server/Linux/devices/localhost>, <Device at /zport/dmd/Devices/Server/Linux/devices/xxxxxxxx>]
Question:
Where am I doing wrong?
Hi,
Premise:
I integrated your code on my Laravel 5.5 application to interface with a Zenoss 4.2.5 server.
In the application controller I call the getDeviceInfo () method after creating the zenoss object.
This is the code:
public function device_details(){ Log::info('ZenossController::device_details'); $zenoss = new Zenoss('10.xxx.xxx.xx'); $devicesDetails = $zenoss->getDeviceInfo('/zport/dmd/Devices/Server/Linux/devices/localhost'); }The problem
I expect it to return the information passed in the keys argument in the getinfo () method of the JSON API invoked by the getDeviceInfo ($ deviceURI) method of your code.
That is:
$json_keys = array("uptime", "firstSeen", "lastChanged", "lastCollected", "locking", "memory", "name", "productionState", "priority", "tagNumber", "serialNumber", "rackSlot", "collector","hwManufacturer","hwModel","osManufacturer","osModel","systems", "groups","location","links","comments","snmpSysName","snmpLocation","snmpContact","snmpDescr","snmpCommunity","snmpVersion"); $json_data['keys'] = $json_keys;But it returns the uid of localhost and that of another linux server:
Question:
Where am I doing wrong?