BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
idziemianczyk
Obsidian | Level 7

Hello,

we're using SAS Viya 3.5. I have a question regarding "Monitoring" tab.

 

 

The Monitoring tab enables you to view a table or a chart of jobs and job flows that are currently running and that have run at a specified time in the past. Link

 

Do you know where I can change "specified time in the past". The jobs disappearing from "Monitoring" after ~1 hour and then I can't see it any more in the environment manager. Doesn't matter if job finished successfully or failed, I can't see it in the Env Manager and need to check it in /var/log/..... 

 

It seems there is a parameter that cleans data after the run. I would like to find and change this parameter. Filters can filter only jobs we see(the jobs from ~1 last hour)

 

dandycomp_0-1627561601833.png

 

Regards,

Ivan

 

1 ACCEPTED SOLUTION

Accepted Solutions
gwootton
SAS Super FREQ

The "specified time in the past" refers to the Filter By drop down in the top right. This will display all the jobs with a date in the range specified by calling the /jobExecution/jobs endpoint with a filter on the date.

It sounds like in your case these jobs are no longer present at all. If you access the jobExecution/jobs endpoint directly from the browser, does the "count" only list the one job? You could also do this with curl and jq:

baseurl=https://viya.example.com
user=sasdemo
read -s -p "Enter password: " pass && echo
token=$(curl -s -L -X POST "$baseurl/SASLogon/oauth/token" -H 'Accept: application/json' -H 'Content-Type: application/x-www-form-urlencoded' -H 'Authorization: Basic c2FzLmNsaTo=' -d 'grant_type=password' -d "username=$user" -d "password=$pass" | sed "s/{.*\"access_token\":\"\([^\"]*\).*}/\1/g")
curl -s -L $baseurl/jobExecution/jobs -H "Authorization: Bearer $token" | jq -r '.count'

The result shows the total number of jobs defined:

$ curl -s -L $baseurl/jobExecution/jobs -H "Authorization: Bearer $token" | jq -r '.count'
748
--
Greg Wootton | Principal Systems Technical Support Engineer

View solution in original post

1 REPLY 1
gwootton
SAS Super FREQ

The "specified time in the past" refers to the Filter By drop down in the top right. This will display all the jobs with a date in the range specified by calling the /jobExecution/jobs endpoint with a filter on the date.

It sounds like in your case these jobs are no longer present at all. If you access the jobExecution/jobs endpoint directly from the browser, does the "count" only list the one job? You could also do this with curl and jq:

baseurl=https://viya.example.com
user=sasdemo
read -s -p "Enter password: " pass && echo
token=$(curl -s -L -X POST "$baseurl/SASLogon/oauth/token" -H 'Accept: application/json' -H 'Content-Type: application/x-www-form-urlencoded' -H 'Authorization: Basic c2FzLmNsaTo=' -d 'grant_type=password' -d "username=$user" -d "password=$pass" | sed "s/{.*\"access_token\":\"\([^\"]*\).*}/\1/g")
curl -s -L $baseurl/jobExecution/jobs -H "Authorization: Bearer $token" | jq -r '.count'

The result shows the total number of jobs defined:

$ curl -s -L $baseurl/jobExecution/jobs -H "Authorization: Bearer $token" | jq -r '.count'
748
--
Greg Wootton | Principal Systems Technical Support Engineer

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 

Get Started with SAS Information Catalog in SAS Viya

SAS technical trainer Erin Winters shows you how to explore assets, create new data discovery agents, schedule data discovery agents, and much more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 586 views
  • 0 likes
  • 2 in conversation