db/listner - install an agent and create dci that monitors service state.
alertlogs - you need to create an xml file {use the manual} that checks for the word error on the log file you want and send an event to the management server.on the server you need to create an event {use the manual} and an event processing rule.
those are the guide line for you to start working.