Discussion:
getting event "Cisco Temperature Sensor" for localhost
Andreas Schneider
2013-02-01 07:38:01 UTC
Permalink
Andreas Schneider [http://community.zenoss.org/people/Decent99] created the discussion

"getting event "Cisco Temperature Sensor" for localhost"

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

--------------------------------------------------------------
Hi,
everytime I add a cisco device(a switch for e.g.) I get an event for localhost! And I can't get rid of it!
The event is under the "Devices/Server/Linux/locahost" with "Error processing transform/mapping on Event Class /Status/CiscoTemperatureSensor"

I run the latest virtual appliance (Centos 5.4, Zenoss Core 4.2.3)
There is no "community.snmp.CiscoTemperatureSensorMap"-Modeler Plugin configured for localhost! I had a look at http://<zenoss-ip>:8080/zport/dmd/manage http://<zenoss-ip>:8080/zport/dmd/manage, but there is no temperature sensor defined for localhost. I also did "reindex() then commit()" under 'dmd', but no luck.

After I ack the event it shows up again a few minutes later... it also comes back when I restart zenoss or reboot the machine.
Any ideas how to solve this?

Kind regards!




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

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

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]
jmp242
2013-02-01 14:10:42 UTC
Permalink
jmp242 [http://community.zenoss.org/people/jmp242] created the discussion

"Re: getting event "Cisco Temperature Sensor" for localhost"

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

--------------------------------------------------------------
Go in and take a look at the event class  /Status/CiscoTemperatureSensor and go into the transform there, and delete it or fix it.

--
James Pulver
ZCA Member
LEPP Computer Group
Cornell University
--------------------------------------------------------------

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

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]
Andreas Schneider
2013-02-04 11:33:42 UTC
Permalink
Andreas Schneider [http://community.zenoss.org/people/Decent99] created the discussion

"Re: getting event "Cisco Temperature Sensor" for localhost"

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

--------------------------------------------------------------
Hi,
the transform looks like this:

status = float(evt.message.split()[-1])
state = {1:'normal',2:'warning',3:'critical',4:'shutdown',5:'notPresent',6:'notFunctioning'}.get(status, 'unknown')
evt.summary = "%s (%s)"%(evt.message, state)
evt.severity = {0:3,1:0,2:3,3:5,4:4,5:4,6:4}.get(status, 3)
if evt.firstTime == evt.lastTime:
    device.hw.temperaturesensors._getOb(evt.component).state = state
    txnCommit()



But I don't know what to change here, and why I get the event for the device localhost - there's no binding to localhost.

Kind regards!
Andreas
--------------------------------------------------------------

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

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]
Andreas Schneider
2013-02-20 06:51:35 UTC
Permalink
Andreas Schneider [http://community.zenoss.org/people/Decent99] created the discussion

"Re: getting event "Cisco Temperature Sensor" for localhost"

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

--------------------------------------------------------------
I'm still getting an CiscoTemperature-Event for the /linux/localhost Device.
The Event looks like this:
-----------------------------------------------------------------------------------------------------

| | agent | |
| component | /Status/CiscoTemperatureSensor |
| dedupid | /Status/CiscoTemperatureSensor|127.0.0.1 |
| eventClass | / (http://149.215.189.136:8080/zport/dmd/Events/) |
| eventClassKey | |
| eventClassMapping | |
| eventGroup | |
| eventKey | |
| eventState | New |
| evid | 00505600-0002-a6fd-11e2-7a7095e75de6 |
| facility | |
| message | Problem with line 471: |
| ntevid | |
| priority | |
| severity | 4 |
| summary | Error processing transform/mapping on Event Class /Status/CiscoTemperatureSensor |
|
| Device State... |
| | DeviceClass | /Server/Linux (http://149.215.189.136:8080/zport/dmd/Devices/Server/Linux) |
| DeviceGroups | |
| DevicePriority | Normal |
| Location | |
| Systems | |
| device | localhost (http://149.215.189.136:8080/zport/dmd/goto?guid=d3bca4e0-41e2-412d-babc-7963285a3df7) |
| ipAddress | 127.0.0.1 |
| monitor | |
| prodState | Production |
|
| Event Data... |
| | clearid | |
| count | 275 |
| firstTime | 2013-02-19 09:44:34 |
| lastTime | 2013-02-20 07:41:16 |
| owner | |
| stateChange | 2013-02-19 09:44:34 |
|
| Event Details... |
| | exception | AttributeError: firstTime |
| transform | 0 status = float(evt.message.split()[-1]) 1 state = {1:'normal',2:'warning',3:'critical',4:'shutdown',5:'notPresent',6:'notFunctioning'}.get(status, 'unknown') 2 evt.summary = "%s (%s)"%(evt.message, state) 3 evt.severity = {0:3,1:0,2:3,3:5,4:4,5:4,6:4}.get(status, 3) 4 if evt.firstTime == evt.lastTime: 5 device.hw.temperaturesensors._getOb(evt.component).state = state 6 txnCommit() |
| zenoss.device.device_class | /Server/Linux |
| zenoss.device.ip_address | 127.0.0.1 |
| zenoss.device.priority | 3 |
| zenoss.device.production_state | 1000 |
|

----


Any ideas?
It is really annoying, because there is no failure or Temperature sensor(it's a VM).
Kind regards!
--------------------------------------------------------------

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

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]
kb8u
2013-03-01 21:11:46 UTC
Permalink
kb8u [http://community.zenoss.org/people/kb8u] created the discussion

"Re: getting event "Cisco Temperature Sensor" for localhost"

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

--------------------------------------------------------------
The event is not reporting that there is a temperature sensor problem on localhost, it is reporting that there is a problem with an event transform on localhost.  What is happening is:

1. your cisco device is queried by SNMP using monitoring template CiscoTemperatureSensor in /Network/Router/Cisco .  The threshold TemperatureSensorStatus is exceeded.  The template is configured to generate an event in event class /Status/CiscoTemperatureSensor when this happens.

2. The event starts to get processed by the transform in the event class /Status/CiscoTemperatureSensor but it fails because the variable evt.firstTime does not exist.  At this point the cisco event can no longer be processed and a *+new+* event is generated on localhost (because that is where the transform is failing).

You need to remove evt.firstTime from the transform.  The author of the CiscoEnvMon ZenPack now has the following code in the event transform, it should fix your problem.  Also change it in Status/CiscoPowerSupply and Status/CiscoFan since it probably has the same problem.

status = evt.message.split()[-1]
if status.replace('.', '').isdigit():
    status = float(status)
else:
    status = 0
state = {0:'unknown',1:'normal',2:'warning',3:'critical',4:'shutdown',5:'notPresent',6:'notFunctioning'}.get(status, 'unknown')
evt.summary = "%s (%s)"%(evt.message, state)
evt.severity = {0:3,1:0,2:3,3:5,4:4,5:4,6:4}.get(status, 3)
component = device.hw.temperaturesensors._getOb(evt.component, None)
if component and getattr(component, 'state', state) != state:
    component.state = state
    txnCommit()
--------------------------------------------------------------

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

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...