Oracle Enterprise Manager (GridControl) can be installed in a server with pre-existing databases (and listeners). We might want to reuse and configure existing listener and not use the one provided/installed by OEM.

However we might run into an inconvenience when we start receiving multiple emails warning that ‘The listener is down‘, like:

Target Name=LISTENER_servidor
Target Type=Listener
Metric Value=0
Timestamp=Jun 17, 2009 6:39:10 PM MEST
Message=The listener is down: Although a Listener with name “LISTENER”, is running on this host at port: “1521″, it was not started using this target’s “LISTENER.ORA” file. CORRECTIVE ACTION: To monitor this “EM Listener Target” with its present configuration, you must stop the currently running listener process, and start it again using the Listener Parameter file: /oem/db10g/network/admin/listener.ora . Alternatively, you can update this target’s “LISTENER.ORA Location” parameter with the location of the currently running Listener, which was started using: /oracle/10.2/network/admin/listener.ora.
Notification Rule Name=Listener Availability
Notification Rule Owner=SYSMAN
Notification Count=1

As explained in this forum post we can reconfigure Grid agent to use the existing listener and not the one provided by Grid software. This is done editing file /oem/agent10g/sysman/emd/targets.xml y and change ListenerOraDir:

<Target TYPE=”oracle_listener” NAME=”LISTENER_oracle″>
<Property NAME=”ListenerOraDir” VALUE=”/oracle/10.2/network/admin“/>
<Property NAME=”LsnrName” VALUE=”LISTENER”/>
<Property NAME=”Machine” VALUE=”oracle″/>
<Property NAME=”OracleHome” VALUE=”/oem/db10g”/>
<Property NAME=”Port” VALUE=”1521″/>

After restarting the agent, no more messages should be sent.