What TALES Expression are you using that is working in testing?  I have tried 
${dev/id} and that does not work.  I am not even sure of the TALES expression 
to retrieve zProperties.  There is a Error being sent via XML RPC when I sniff 
the port. (See below)

--------------XML RPC ERROR-----------------------
Observed via TCPDUMP when running zenjmx run –v 10

POST / HTTP/1.1
Content-Type: text/xml
User-Agent: Apache XML RPC 3.0 (Sun HTTP Transport)
Authorization: Basic YWRtaW46emVub3Nz
Content-Length: 187
Cache-Control: no-cache
Pragma: no-cache
Host: localhost:8081
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Connection: keep-alive

<?xml version="1.0" 
encoding="UTF-8"?><methodCall><methodName>getConfigs</methodName><params><param><value>localhost</value></param><param><value>JMX</value></param></params></methodCall
HTTP/1.1 200 OK
Date: Fri, 30 Nov 2007 17:13:39 GMT
Content-length: 263
Content-type: text/xml
Server: TwistedWeb/2.5.0

<?xml version='1.0'?>
<methodResponse>
<fault>
<value><struct>
<member>
<name>faultCode</name>
<value><int>8002</int></value>
</member>
<member>
<name>faultString</name>
<value><string>error</string></value>
</member>
</struct></value>
</fault>
</methodResponse>

 From looking at the code, the handling of the tales expression looks a little 
funny.  I have the python IQ of a 4th grader, but just from a programming 
syntax perspective, the parenthesis don't seem to match up.  Another 
possibility is that I don't understand TALES enough and that I am simply not 
using the right TALES expression, any help or pointers to what expression I 
could use to get the zJMXManagementPort would be greatly appreciated.  Also, 
why doesn't the line use the talesEvalStr function instead of the talesEval 
function.  I have bolded the part that seems strange and possibly a bug to me.

------------- XmlRpcService.py --------------------
    def xmlrpc_getConfigs(self, monitor, dstype):
        '''Return the performance configurations for the monitor name and data
        source provided. '''

        def toDict(device, ds, dps=[]):
            '''marshall the fields from the datasource into a dictionary and
            ignore everything that is not a primitive'''

            vals = {}
            vals['dps'] = []
            vals['dptypes'] = []
            for key, val in ds.__dict__.items():
                if type(val) in XmlRpcService.PRIMITIVES:
                    if (type(val) == types.StringType) and (val.find('$') >= 0):
                        val = talesEval('string:%s' % (val, ), device)
                    vals[key] = val

            for dp in dps:
                vals['dps'].append(dp.id)
                vals['dptypes'].append(dp.rrdtype)

            vals['device'] = device.id
            return vals


        result = []
        
        # get the performance conf (if it exists)
        conf = getattr(self.dmd.Monitors.Performance, monitor, None)
        if conf is None:
            return result

        # loop over devices that use the performance monitor
        for device in conf.devices():
            device = device.primaryAq()
            for template in device.getRRDTemplates():
                for ds in template.getRRDDataSources():
                    if ds.sourcetype == dstype:
                        result.append(toDict(device, ds, ds.datapoints()))

        return result




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

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

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



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

Reply via email to