Hi all,

We use Kaseya VSA for system monitoring.

As a DBA, I need to monitor the status of SQL databases, for example, Index Fragmentation statistics.

I would like to:

1, run SQL statement on SQL DMV daily (or twice a day) to gather the number of index fragmentation;

2, keep the history of the numbers;

3, get alerts once the number is over certain threshold.

Can you please advise how to get above implemented in Kaseya VSA?

My colleague suggested PowerSehll in "Agent Procedure". I can save the SQL query output into an OS flatfile via powershell, but how to read the file content in VSA and alert on the content?

Thank you.