manu0417,
I know this thread is a little old now but, I wondered if you saw the reply from mandevil about finding these names in the XML. Also the custom metric name is in the GUI if you to to custom metrics and look in the upper corner of the metric it is displayed. As System ID: <name>
You can then find this in the database and write an alert off of that name. A good example is this one Custom Alert - Deadlocks this code is pulling from a custom metric Custom Metric - Deadlocks using the name in the where clause. as joined from the table CON_METRICS_NAMES_#DBID#
hope this helps.