This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

SAM - SQL Alert Trigger Action and Reset Action

Hi All

Hopefully you guys can steer me in the right direction ?

I have created a custom component monitor which queries a SQL database table and then calculates a return value of the below

>= 80% return value of 1

>= 60 % and <80 return value 2

else return value 0

0 : OK

1 : Critical

2 : Warning

This is working fine with the component monitor showing the correct status

However it now has come time to alert / trigger actions and reset actions

What i would like for the alert to do is

If the component name is equal to the 'sql component name'

AND the component status is Critical

then Trigger

A SQL stored procedure on the on the same sql server to update a table column to 0

on Reset

Another SQL stored procedure on the same sql to update the same table column to 1

We have tested both stored procedures and they work fine

However there is nothing in the Alert Actions or Reset Actions to run a SQL 'Native' to Solarwinds like the Alert

What i have figured is i have to 'Run an External Program' which is essentially a batch script to kick start the stored procedure.

Now this would work if i have a few components per component i need to monitor

BUT i need to monitor over 1000 'custom compnents' which would mean i have 2000 batch scripts

Can someone advise of another way ?

Thanks

  • I have found a solution which is adequate but would have preferred a native Sql script

    I have installed SQLCMD ie SSMS on the main poller and then

    Run an External Program

    then run sqlcmd in the command line which executes the stored procedure on the server