cancel
Showing results for 
Search instead for 
Did you mean: 
Create Post
Level 10

seum alerting

Jump to solution

ok onto my alerting phase and I'm having trouble replicating some alerting behavior we currently have into SEUM.

so test transaction is 4 steps playing from 4 locations.

I can fire step down, transaction or location down. All that is fine.

What I want to do is to only trigger alerts when a step or transaction is down from 2 or more locations to eliminate 1 off issues with a single player.

Is this possible with the current alerting system?

 

Thanks

Tags (2)
0 Kudos
1 Solution
Level 14

Hello Andrew,
you can use "Custom SQL Alert" for this. Just select "Custom SQL Alert" in "Type of property to monitor" on "Trigger Condition", select "SEUM: Transaction" as object and enter following query to alert:

WHERE (SEUM_TransactionsAlertsData.RecordingId IN 
        (
                SELECT r.RecordingId
                FROM SEUM_Recordings r JOIN SEUM_TransactionsAlertsData t
                  ON r.RecordingId = t.RecordingId
                WHERE t.Status = 2
                GROUP BY r.RecordingId
                HAVING (COUNT(t.TransactionId) >= 2)
        )
        AND SEUM_TransactionsAlertsData.Status = 2
)

When you want to setup alert for steps, select "SEUM: Step" as object and enter following query to alert:

WHERE (SEUM_TransactionStepsAlertsData.StepId IN 
	(
		SELECT r.StepId
		FROM SEUM_RecordingSteps r JOIN SEUM_TransactionStepsAlertsData t
		  ON r.StepId = t.StepId
		WHERE t.Status = 2
		GROUP BY r.StepId
		HAVING (COUNT(t.TransactionStepId) >= 2)
	)
	AND SEUM_TransactionStepsAlertsData.Status = 2
)

View solution in original post

0 Kudos
8 Replies
Level 14

Hello Andrew,
you can use "Custom SQL Alert" for this. Just select "Custom SQL Alert" in "Type of property to monitor" on "Trigger Condition", select "SEUM: Transaction" as object and enter following query to alert:

WHERE (SEUM_TransactionsAlertsData.RecordingId IN 
        (
                SELECT r.RecordingId
                FROM SEUM_Recordings r JOIN SEUM_TransactionsAlertsData t
                  ON r.RecordingId = t.RecordingId
                WHERE t.Status = 2
                GROUP BY r.RecordingId
                HAVING (COUNT(t.TransactionId) >= 2)
        )
        AND SEUM_TransactionsAlertsData.Status = 2
)

When you want to setup alert for steps, select "SEUM: Step" as object and enter following query to alert:

WHERE (SEUM_TransactionStepsAlertsData.StepId IN 
	(
		SELECT r.StepId
		FROM SEUM_RecordingSteps r JOIN SEUM_TransactionStepsAlertsData t
		  ON r.StepId = t.StepId
		WHERE t.Status = 2
		GROUP BY r.StepId
		HAVING (COUNT(t.TransactionStepId) >= 2)
	)
	AND SEUM_TransactionStepsAlertsData.Status = 2
)

View solution in original post

0 Kudos

Thanks Jiri

 

As always you are very helpful.

Looking at this I realize now how much I'll need configurable parameters on my recordings. I've had to use separate logins for each location I'm running which required a unique transaction id and now it looks like i wont be able to alert them by the same id!

0 Kudos

If you are willing to create separate alert for each group of similar recordings, you can try:

WHERE SEUM_TransactionsAlertsData.TransactionId = (
                SELECT MAX(t.TransactionId)
                FROM SEUM_TransactionsAlertsData t
                WHERE t.Status = 2 AND t.RecordingId IN (REC_ID_1, REC_ID_2,...)
                HAVING COUNT(t.TransactionId) >= 2
        )

where REC_ID_1 etc. is set of all recording ids that are in fact the same transaction just having different credentials.

You would need to create this alert for each transaction having multiple recordings and alert will be fired only for last of down instances of particular transaction ( max(t.TransactionId)).

If you want to use different status than down (2), you can use warning (3), critical (14), unknown (0) or up (1).

For steps you can use:

WHERE SEUM_TransactionStepsAlertsData.TransactionStepId = (
                SELECT MAX(t.TransactionStepId)
                FROM SEUM_TransactionStepsAlertsData t
                WHERE t.Status = 2 AND t.StepId IN (STEP_ID_1, STEP_ID_2,...)
                HAVING COUNT(t.TransactionStepId) >= 2
        )

the same way as for transactions.

0 Kudos

SEUM guys, 

I know Jiri is on vacation so maybe someone else can help me out on alerting.

I am using Jiris query from above to tell me when 2 or more remote playbacks fail on a defined set of Transaction Ids

 

WHERE SEUM_TransactionsAlertsData.TransactionId = (

                SELECT MAX(t.TransactionId)

                FROM SEUM_TransactionsAlertsData t

                WHERE t.Status = 2 AND t.RecordingId IN (33,34,35)

                HAVING COUNT(t.TransactionId) >= 2

The good news is the alerts are triggered correctly it seems but now of course people want to know which playbacks are failing in the body text.

I tried a variation on the above to return status 2,3,14 and tried to the body of the alert to tell us which playbacks had which status that caused the alert to send.

${SQL:select  case status when 2 then ' Down' WHEN 3 THEN ' Warning' WHEN 14 Then ' Critical' END as status, SEUM_TransactionsAlertsData.Name}

When I tried to insert the above I get this in the message body. 

MACRO SQL ERROR - Invalid column name 'status'.
Invalid column name 'status'.
Invalid column name 'status'.
The multi-part identifier "SEUM_TransactionsAlertsData.Name" could not be bound.

 

Perhaps I am using this incorrectly?

0 Kudos

Hello Andrew,

the query you're using returns one alert message: For the last transaction from all transactions for defined set of recordings where at least two of those transactions are down.

For example: If you have 3 recordings, one of them has no "down" transaction a the other two both have one "down" transaction the result will be one alert message - for the last "down" transaction (by the date of last playback). In that alert message you can show information only about that last transaction. I'm afraid that there is no an easy way how to show information about more than one transaction in one alert message.

If you want to get alert messages for each down transactions for defined set of recordings which have at least two transactions down you can use previous Jirka's condition with filter to specified recording IDs:

 

WHERE (SEUM_TransactionsAlertsData.RecordingId IN 
        (
                SELECT r.RecordingId
                FROM SEUM_Recordings r JOIN SEUM_TransactionsAlertsData t
                  ON r.RecordingId = t.RecordingId AND r.RecordingId in (REC_1, REC_2...)
                WHERE t.Status = 2
                GROUP BY r.RecordingId
                HAVING (COUNT(t.TransactionId) >= 2)
        )
AND SEUM_TransactionsAlertsData.Status = 2 
)
Then you can build your own alert message in Trigger Action tab where you add a new action and enter
an action message using predefined variables (button Insert variables). You don't need to use CASE to
transform status ID to status name. You can use ${StatusDescription} variable instead.
0 Kudos

Thanks logic seems to make sense to me I'll give it an attempt and see how it turns out.

Any non binding thoughts on when the ability to change parameters within a recording will hit the product? v2? sooner?

Any thought on adding precanned alerting to only alert if say 50% of a recordings playbacks have gone bad?

Just trying to judge how much work I should put into creating custom alerts. Everytime I do that you guys end up adding it in as a feature not long after

0 Kudos

Hello Andrew,
I can't provide any estimates for this because all features and changes must go through a process to approve them.

Being you I would setup SEUM to make it work as you require with custom SQL for now. Even if this kind of alert is in some future version, having SEUM not doing what you want seems to be worse for me than recreating alerts later.

0 Kudos

i knew that would be the answer but i always continue to ask. I'll learn one of these days

0 Kudos