If I create a custom alert for DB2, how do I get the actual Database Name (not the Instance) returned with the results?
A DB2 Instance can have multiple databases defined (especially in our Test Regions) so knowing which database the alert is for is important.
I can create a Custom SQL Alert - Single Numeric Return with Execute Against Monitored Database and it will run, but the output does not identify which database the result is from.
e.g.
SELECT COUNT(*) FROM SYSIBMADM.MON_LOCKWAITS
If I test this, I get this output which is not very helpful.
Status "Database Instance" "Alert Value" "Description"
INFO MYSERVER:50000 2
Yet, if you look at the Administrative Alert for Tablespace Freespace then you get the Database name shown in the Alert Value:
Status "Database Instance" "Alert Value" "Description"
INFO MYSERVER:50000 MYDB.SYSTOOLSPACE 97 %
INFO MYSERVER:50000 YOURDB.SYSTOOLSPACE 97 %
The DPA/Ignite doco is rather sparse in this area (that's a hint, by the way ).