UPDATE:
OK, so the queries in your responses work great! Now, I've come across some less than desirable output. It appears in the log table there are sometimes multiple logs under the same evid. This causes the query to return multiple rows with the same event info. Is there a way to possible concatenate all the log.text with matching log.evid that way the output is limited to only the desired information?
I am trying to formulate a mysql query that will select certain columns from a table and compare them with certain columns from a different table on the same DB. I want to display only the rows with matching event IDs (evid). The two tables are named status
and log
The only columns I need from the events.log
table are named evid
and text
The query I came up with displays all active alerts in the Zenoss console:
SELECT device, component, summary, count, ownerid, evid
FROM events.status
WHERE severity >2;
Basically I need to figure out how to join events.status
and events.log
and only display rows that have a matching evid
I only have read access to this DB, but if write access is necessary, I could possibly sweet talk the right folks to gain access.
Your help is greatly appreciated, as I am a total DB noob.