Is there any way via alerting to have Orion email a copy of the screenshot of an error with the alert?
Is there any way via alerting to have Orion email a copy of the screenshot of an error with the alert?
Hello,
here is step-by-step guide how to include screenshots in your alert emails.
<html><body> Transaction '${Name}' is in '${StatusDescription}' state. <img src="http://YOUR_ORION_SERVER/Orion/SEUM/Controls/ScreenshotImage.ashx ?entity=Orion.SEUM.TransactionSteps &entityId=${SQL:SELECT TOP 1 TransactionStepId FROM SEUM_TransactionStepsAlertsData WHERE TransactionId = ${TransactionId} AND Status = 2} &useThumbnail=true&width=500& AccountID=admin&Password=" /> </body></html>
Now you should receive email with screenshot of failing step. Screenshot is still located on SEUM server and is accessed remotelly so your email client must be able to connect to SEUM server to download image.
I just realized that image URL that I provided in post above gives you latest image so if you look at email when transaction is back UP, you will see current UP image. To fix this just change <img src="..." /> to:
<img src="YOUR_ORION_SERVER/.../ScreenshotImage.ashx ?entity=Orion.SEUM.StepResponseTimeDetail &entityId=${SQL:SELECT TOP 1 TransactionStepId
FROM SEUM_TransactionStepsAlertsData WHERE TransactionId = ${TransactionId} AND Status = 2} &width=500&dateTime= ${SQL:SELECT CAST(DATEDIFF(n,'00010101 00:00:00',[LastPlayed]) AS bigint)*60*10000000 FROM SEUM_TransactionsAlertsData WHERE TransactionId = ${TransactionId}} &AccountID=admin&Password=" />
One difference is that "entity" is changed to "Orion.SEUM.StepResponseTimeDetail" which contains history of failed screenshots.
Second difference is that you need to specify "dateTime" parameter to define which screenshot you want. It's in "ticks" so that is why there is that complicated arithmetic expression.
Also notice that I removed "useThumbnail" parameter from URL so that you can get custom size of image defined by "width" parameter.
Let me know if you have any issues using this.
Thanks for the great info.
My concern at this point is embedding a userid and password into a url.
Is there any way to do this without including a password?
Unfortunately not. Screenshot image is served by SEUM and it requires authentication. I suggest creating some read-only quest account for this purpose and use it.
Would you be interested in feature when screenshots are available on some static URL also without authentication? Isn't is a security risk if anyone can see screenshots if they know specific URL?
I used URL
Your specific error is:
Entity ID for screenshot is invalid: ${SQL:SELECTTOP1TransactionStepIdFROMSEUM_TransactionStepsAlertsDataWHERETransactionId=${TransactionId}ANDStatus=2}
SolarWinds solutions are rooted in our deep connection to our user base in the THWACK® online community. More than 195,000 members are here to solve problems, share technology and best practices, and directly contribute to our product development process.