Discussion:
TALES expression for Device Name in legend of a component multi-graph report
Richard Evans
2013-04-05 17:37:10 UTC
Permalink
Richard Evans [http://community.zenoss.org/people/Richard.evans%40schwab.com] created the discussion

"TALES expression for Device Name in legend of a component multi-graph report"

To view the discussion, visit: http://community.zenoss.org/message/72694#72694

--------------------------------------------------------------
I have created a multi-graph report with collection items which are OSprocesses (component instances on a device). And with a graph definition with the ps_cpu datapoint.

By default, the legend for that datapoint is:  "${here/name | here/id} ${graphPoint/id}", which when I view the report results in the component name (the name of the process) and the datapoint name.  For example: "syslog cpu" 

When I set the graph group to combine all devices on a single graph, they all have the same legend: "syslog cpu"; I can't tell which device that legend entry (color) belongs to.

In zendmd, I can see that a process (+p=dev.os.process()[10+]), does have the "device" method from which I can get the device id (+p.device().id+).

However, I can't seem to nail the syntax to do this in TALES:

${here/device} results in: "<device at {name}>"

but

${here/device/id}, ${here/device().id), ${here/device()/id}, all fail with "tales expression error".


Help!?!?!?
TIA!
Richard Evans
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/72694#72694]

Start a new discussion in zenoss-users at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Richard Evans
2013-04-05 17:40:04 UTC
Permalink
Richard Evans [http://community.zenoss.org/people/Richard.evans%40schwab.com] created the discussion

"Re: TALES expression for Device Name in legend of a component multi-graph report"

To view the discussion, visit: http://community.zenoss.org/message/72695#72695

--------------------------------------------------------------
Doh - found the answer (in: http://community.zenoss.org/message/47659#47659 http://community.zenoss.org/message/47659#47659):

"${here/getDeviceName} ${here/name | here/id} ${graphPoint/id}"

--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/72695#72695]

Start a new discussion in zenoss-users at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Loading...