I have been working for a week on this and have not figured it out. What I want is to have an alert fire from a SQL query.
It is for my CallManager. I have found everything that shows me the number of calls. I am wanting to have SolarWinds send an alert when the number of calls reaches a certain number or higher.
What I have is a Custom SQL Alert. Here is what I have typed in the box:
where custompollerassignmentid = 'e9XXXX2f-0XX8-4XX4-9e07-cXXXXebb32bb' and rowid = '20'
It returns one value in SQL, and I want to find out how to make the Alert system fire when the number returned is 50 or higher.
Can you show us a screenshot of the results of this query?
SELECT * FROM CustomPollerStatusTable WHERE CustomPollerAssignmentID = 'e9XXXX2f-0488-4XX4-9XX7-ca3eXXXXX2bb' AND RowID = '20'
OK, so you have 2 options:
1) as njoylif mentioned, you can just add your rate limitation to your current Custom SQL:
SELECT CustomPollerStatusTable.CustomPollerAssignmentID, CustomPollerStatusTable.CompressedRowID, CustomPollerStatusTable.FullLabel
WHERE CustomPollerAssignmentID = 'e9XXXX2f-0488-4XX4-9XX7-ca3eXXXXX2bb'
AND RowID = '20'
AND Rate >= '50'
2) You can use the GUI, following the screenshot I posted earlier, and get the same end result. (The GUI does nothing more than build the SQL query for you)
Either way you choose should result in the same alert conditions.
WHERE CustomPollerStatusTable.CustomPollerAssignmentID = 'e9XXXX2f-0488-4XX4-9XX7-ca3eXXXXX2bb'
AND CustomPollerStatusTable.RowID = '20'
AND CustomPollerStatusTable.Rate >= '50'
Can you past the full query which works in SQL Management studio? and then some sample rows for what you get as a result?
That would help.
SELECT CustomPollerStatusTable.CustomPollerAssignmentID, CustomPollerStatusTable.CompressedRowID, CustomPollerStatusTable.FullLabel FROM CustomPollerStatusTable
where custompollerassignmentid = 'e9XXXX2f-0488-4XX4-9XX7-ca3eXXXXX2bb' and rowid = '20'
But I just found out that it does not return what I thought. If I change the query to:
SELECT * FROM CustomPollerStatusTable
It returns the Rate field. But I cannot get the Rate field from the alert thingy because it defines the top portion of this email.
SolarWinds solutions are rooted in our deep connection to our user base in the THWACK® online community. More than 150,000 members are here to solve problems, share technology and best practices, and directly contribute to our product development process.