BookmarkSubscribeRSS Feed
shirishkamath
Obsidian | Level 7

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?

 

Thanks,

SK

1 REPLY 1
JuanS_OCS
Amethyst | Level 16

Hello @shirishkamath,

 

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

http://support.sas.com/documentation/cdl/en/evug/69029/HTML/default/viewer.htm#p0w29qwnyqous0n0zfcuf...

 

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.

https://guide.blazemeter.com/hc/en-us/articles/207421705-How-to-use-JMeter-for-Login-Authentication

https://sqa.stackexchange.com/questions/13967/how-to-login-to-a-web-application-using-jmeter

 

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:

http://support.loadimpact.com/knowledgebase/articles/174255-how-do-i-test-a-site-where-you-need-to-l...

https://askubuntu.com/questions/183786/bash-script-to-login-to-webpage

https://social.technet.microsoft.com/Forums/ie/en-US/be3afe83-4a7e-48a0-b2e7-95fd081a7571/login-to-w...

https://gallery.technet.microsoft.com/scriptcenter/Open-Internet-Explorer-e4f8ae4b

https://kb.paessler.com/en/topic/64415-how-can-i-check-if-the-login-authentication-for-a-webpage-wor...

 

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:

https://communities.sas.com/t5/SAS-Visual-Analytics/How-to-config-Web-Application-for-URL-authentica...

http://documentation.sas.com/?docsetId=bimtag&docsetTarget=n1bhp608f0hsoen10i1vi0p9l5f7.htm&docsetVe...

 

suga badge.PNGThe SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment. 

Join SUGA 

CLI in SAS Viya

Learn how to install the SAS Viya CLI and a few commands you may find useful in this video by SAS’ Darrell Barton.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 1119 views
  • 2 likes
  • 2 in conversation