Architecting, installing and maintaining your SAS environment

Looking for a custom SAS validation script with mail option

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 18
Accepted Solution

Looking for a custom SAS validation script with mail option

[ Edited ]

Hello all,

 

I'm looking for a script or something else what makes possible to validate all SAS services (status check) every hour and  send after each check a report.

 

Be example:

 

Day: 8/2/2018       Time:  15.15 

 

Status SAS services:

 

SAS Metadata                running

SAS Object Spawner    running

SAS Web Server            running

SAS Web App xx           running

 

etc.

 

We have also configured SAS environment Manager. But an overview of all sas services in a mail makes a lot easier.

 

Thanks in advance. 

 


Accepted Solutions
Solution
‎02-09-2018 07:40 AM
Occasional Contributor
Posts: 5

Re: Looking for a custom SAS validation script with mail option

@sergie89: You could create a simple shell script with something like this:

 

(date; echo; echo "Status SAS services:"; echo; /path/to/Lev1/sas.servers status) | mailx -s "SAS Status" your_name@yourcompany.com

 

Put that into a cron as the SAS Installer account to run every hour and you should be all set.

 

Cheers,

 

Spencer

View solution in original post


All Replies
Solution
‎02-09-2018 07:40 AM
Occasional Contributor
Posts: 5

Re: Looking for a custom SAS validation script with mail option

@sergie89: You could create a simple shell script with something like this:

 

(date; echo; echo "Status SAS services:"; echo; /path/to/Lev1/sas.servers status) | mailx -s "SAS Status" your_name@yourcompany.com

 

Put that into a cron as the SAS Installer account to run every hour and you should be all set.

 

Cheers,

 

Spencer

Occasional Contributor
Posts: 18

Re: Looking for a custom SAS validation script with mail option

Posted in reply to shayes_ccllc
@shayes_ccllc Thanks, it works fine! I will expand the shell script.
SAS Employee
Posts: 61

Re: Looking for a custom SAS validation script with mail option

Be mindful of alert fatigue with a setup like this. It doesnt take long until these emails will have a mail rule putting them in a folder and they go unread.

Consider setting up a job to email into a ticketing system when a fault is detected rather than just a status.
☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 231 views
  • 1 like
  • 3 in conversation