12-14-2017 12:05 PM
Dear SAS Community,
I know that there are lot of tools available that do the job of monitoring your applications. For instance, you have sitescope that can monitor SAS Studio URL availability as well as the login mechanism. But I want to know if we can implement a script that does the same job?
Something that does the following:
1) Open SAS Studio URL (<server>:<port>/SASStudio)
2) Enter credentials and login
3) Verify if the login is successful (either a HTTP 200 or by identifying the SAS Studio logo of the workspace etc.)
4) Log out
5) Verify whether the log out was successful (identify the "You have been signed out" message)
I know there are several ways to automate this, for example - use curl or java functions etc. But has someone implemented this? Can you please let me know how?
12-15-2017 03:34 AM - edited 12-15-2017 03:36 AM
yes, there are tools and scripts that can do this kind of job for you, free, not free, and can even do stress testing,
You might want to start working with the SAS Environment Manager (or your company's prefered monitoring tool) , which is perfect to monitor URLs
My initial best advise would be JMeter, java-based, cross-platform, etc. Lately I have seen people using Blazemeter, but I never user it before. Both should be possible to launch them on scripted way.
After this, there are plenty of scripts out there, on both bash, powershell, and other languages, that you can use. You only need to google your keeywords for a few seconds and you will get tons of good results. Some examples:
I would rather recognize the 200 code instead of other methods, though. However, consider a few things before:
- SAS web applications use callback URLs per definition, since SAS metadata and XMLs redirects your URL request to the response URL.
- if you have SSO, you will need to ensure either the SSO happening (quite hard on batch/script mode) or either you will need to use, instead, fallback URLs https://communities.sas.com/t5/SAS-Communities-Library/SAS-9-4-Middle-Tier-Fallback-Authentication-w...
- Perhaps you will need to recognize 302 or 304 messages, depending on how evolved your scripts are. If your authentication is perfect, you can monitor 200 responses. if it is not, you will get Authentication errors. However, this is a good start to monitor that, at least, your web application server is or could be UP.
All in all, these posts might be able to help you understanding: