Discussion:
Error processing transform/mapping on Event Class /Change/Set/Status
Andrew Rosenau
2012-11-27 19:42:50 UTC
Permalink
Andrew Rosenau [http://community.zenoss.org/people/arhub] created the discussion

"Error processing transform/mapping on Event Class /Change/Set/Status"

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

--------------------------------------------------------------
I'm monitoring my linux zenoss server itself and I am getting the following event. I'm not sure how to solve this or what the problem is. Some help would be greatly apreciated. Thanks

| Resource: | ds9.xxxxxxx.local (http://ds9.gfmhm.local:8080/zport/dmd/goto?guid=a422dc45-449d-411c-a117-5d78aa0a1d62) |
| Component: | /Change/Set/Status |
| Event Class: | / (http://ds9.gfmhm.local:8080/zport/dmd/Events/) |
| Status: | New |
| Message: | Problem with line 15: if comp.status == status: |




Here is my transform, as far as I am aware it is the default one. I am just getting Zenoss up and going so this is a little new to me.

if hasattr(evt, 'compClass') and hasattr(evt, 'compStatus'):
    compType = evt.compClass
    status = int(round(float(evt.compStatus)))
else:
    compType = None
    statusstr = evt.message.rsplit(' ', 1)[-1]
    status = not statusstr.replace('.','').isdigit() and 3 or int(round(float(statusstr)))
try: comp = component
except NameError:
    from ZODB.transact import transact
    for comp in device.getMonitoredComponents(type=compType):
        if comp.id == evt.component: break
    else:
        comp = None
if comp is not None:
    if comp.status == status:
        evt._action = 'drop'
    else:
        @transact
        def updateDb():
            comp.status = status
            if hasattr(comp, 'statusmap'):
                col,evt.severity,state = comp.statusmap.get(status) or (0,evt.severity,'Unknown')
                if hasattr(comp, 'state'):
                    comp.state = state
        updateDb()
--------------------------------------------------------------

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

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Chet Luther
2012-11-28 21:12:53 UTC
Permalink
Chet Luther [http://community.zenoss.org/people/cluther] created the discussion

"Re: Error processing transform/mapping on Event Class /Change/Set/Status"

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

--------------------------------------------------------------
I don't think comp has a status attribute. That comp.status is likely throwing an AttributeError.

You might want to do comp.getStatus() instead.
--------------------------------------------------------------

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

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