Can SCOM monitor an application which logs to a database

317 views Asked by At

I have a number of legacy .Net C# applications - mostly running as Windows services. When they encounter error conditions, they write log information to a SQL database. So, for visibility, one would have to query the table, for rows with a "severity" of "error", within a date range, and therein would lie all the exception data.

Is there a way we could use SCOM to monitor these tables, such that should a new record be created for an error, it would show up in the SCOM monitor ? The boxes with the service and/or the database all have the Monitoring Agent running on them.

Is SCOM a useful match for this, and if so, would that entail writing my own "Management Pack" which knows which database/table to look for ? How would it know what a "new" record looked like ?

If it were possible, would such a custom MP be able to query different tables (and/or SQL servers) ? I have many applications, they don't all write to the same log table/database, but conceptually they do the same thing.

1

There are 1 answers

0
Max On

In your case, this will be "developing my own custom management pack" situation. This will also depend on how DB is written, like is there a timestamp on events or incremental line index, what fields extract to alert, etc. In general there is no "tail DB table" standard probe. If you don't have MP authoring skills, you would need to contract someone to develop it for you.

BUT! If you can modify the application code (or, perhaps, there are log settings you can change without modifying the code), and make the applications write errors into text files, then SCOM can easily tail these files and trigger alerts from certain conditions. It has a standard wizard in Console application to set it up. Alternatively, you can put a trigger on insert (BE EXTRA CAUTION) on this table and copy each new table row into a file, then have SCOM read this file.