Hello,

I hope I could get some help. I have been trying for a while to perform the 
following task.

I have a subgroup called "infrastructure" and I would like to create a page 
template that goes through all devices in the subgroup and returns me the 
values of the following datapoints: 
- sum of ssCpuRawSystem + ssCpuRawUser + ssCpuRawWait
- memAvailReal
- ifInOctets of {device}/os/interfaces/eth0

Here is the code I use:


Code:

<tal:block tal:define="devices python:here.getDevices();">
  <tal:block tal:repeat="device devices">
  <span tal:define="memReal 
python:device.getRRDValue('memAvailReal_memAvailReal');">
    <span tal:content="device/id">Device ID</span>
    <span tal:content="memReal">MemReal</span>
  </span>
  </tal:block>
</tal:block> 




I use "here.getDevices()" to get the list of all devices in the subgroup.
When I call getRRDValue for memAvailReal on each device, nothing is returned, 
whereas if I call getRRDValue for a datapoint that I have created (ex: time), 
it will return a value. I have tried to use getRRDValue with REST and it 
returns a value for memAvailReal on each device of the subgroup.

Concerning the sum, I know I can sum integers like this "python:1+2+3"
but it seems I can not sum like this 
"python:device.getRRDValue('ssCpuRawSystem')+device.getRRDValue('ssCpuRawUser')+device.getRRDValue('ssCpuRawWait')"

Is there also a way to call getRRDValue on "{device}/os/interfaces/eth0" ?

Thank you again.




-------------------- m2f --------------------

Read this topic online here:
http://community.zenoss.com/forums/viewtopic.php?p=14270#14270

-------------------- m2f --------------------



_______________________________________________
zenoss-users mailing list
[email protected]
http://lists.zenoss.org/mailman/listinfo/zenoss-users

Reply via email to