Discussion:
Zenoss events triggered
Nathan Harris
2012-03-22 12:28:49 UTC
Permalink
Nathan Harris [http://community.zenoss.org/people/nathan.harris] created the discussion

"Zenoss events triggered"

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

--------------------------------------------------------------
Hello there

I am looking for some direction on how evenst are actually created in the system.

For example we have an event that triggers that our database is down when we take the cold backups on an evening.

Could not fetch data (ORA-01034: ORACLE not available ORA-27101: shared memory realm does not exist SVR4 Error: 2: No such file or directory Process ID: 0 Session ID: 0 Serial number: 0 )

this is logged in /status/pyDBapi

I would like the event to clear automatically when the databases start agians but cannot work how I can do this.

Are the events part of the underlying python code in the SQL Data Source Zenpack? if so how would I go about picking up that this event was no longer causing an issue?

any advice pointers would be useful :-/
--------------------------------------------------------------

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

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
2012-03-22 13:35:30 UTC
Permalink
jmp242 [http://community.zenoss.org/people/jmp242] created the discussion

"Re: Zenoss events triggered"

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

--------------------------------------------------------------
That event looks like it is generated by the SQL datasource. However, I would actually expect it to auto clear if it can connect again... What you can do is look at the source and see why it isn't creating a clear event... Alternatively, you could use any other method to generate an event and make that new event clear the down event. See
http://www.skills-1st.co.uk/papers/jane/zenoss_event_management_paper.pdf http://www.skills-1st.co.uk/papers/jane/zenoss_event_management_paper.pdf
the event management paper for lots of details how events work in Zenoss...

--
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/65383#65383]

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]
Nathan Harris
2012-03-22 15:37:19 UTC
Permalink
Nathan Harris [http://community.zenoss.org/people/nathan.harris] created the discussion

"Re: Zenoss events triggered"

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

--------------------------------------------------------------
Ok I think I have found the source code relating to the issue, I don't understand Python, can any one give me any pointers here?

| | def _sendEvents(self, components): |
|     | """ |
|     | Sent Error and Clear events |
|     | """ |
|     | events = [] |
|     | errors = [] |
|     | for (comp, metaType), severity in components.iteritems(): |
|         | event = dict( |
|             | summary = "Could not fetch data", |
|             | message = "Could not fetch data", |
|             | eventClass = '/Status/%s' % metaType, |
|             | device = self._devId, |
|             | severity = severity, |
|             | agent = self._preferences.collectorName, |
|             | ) |
|         | if comp: event['component'] = comp |
|         | else: event['eventClass'] = '/Status/PyDBAPI' |
|         | if isinstance(severity, Failure): |
|             | event['message'] = severity.getErrorMessage() |
|             | event['severity'] = Error |
|             | errors.append(event) |
|         | else: |
|             | events.append(event) |
|     | if len(errors) == len(components) > 0: |
|         | event = errors[0] |
|         | del event['component'] |
|         | event['eventClass'] = '/Status/PyDBAPI' |
|         | events.append(event) |
|     | else: |
|         | events.extend(errors) |
|     | for event in events: |
|         | if event['eventClass'] == '/Status/': continue |
|         | self._eventService.sendEvent(event) |
--------------------------------------------------------------

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

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]
Nathan Harris
2012-03-27 14:19:39 UTC
Permalink
Nathan Harris [http://community.zenoss.org/people/nathan.harris] created the discussion

"Re: Zenoss events triggered"

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

--------------------------------------------------------------
Dear Egor

We are having an issue when we shutdown our oracle database down for a cold backup that an event is error logged in

/status/pydbapi

the issue appears to be that when the database is started that no events are logged and thus the event never clears itself. I have looked at the cource code in python in Zenperfsql.py but cannot work out how to change this. I notice it uses the twisted module but can't really work out whats going on.

Would you be able to give me some direction? I think others who do not use RMAN for backups would appreciatte the change.

:)
forum started here...

http://community.zenoss.org/65384#65384 http://community.zenoss.org/message/65384#65384
--------------------------------------------------------------

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

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