BookmarkSubscribeRSS Feed

Code for YouTube video: "Viewing Logs with SAS Viya Monitoring for Kubernetes: Changing Log Levels"

Started ‎03-30-2022 by
Modified ‎03-30-2022 by
Views 1,081

Hello! I just recorded a video for the SAS Technical Insights and Expertise Series channel on YouTube:


Viewing Logs with SAS Viya Monitoring for Kubernetes: Changing Log Levels



In the video, I show the full process of troubleshooting an example configuration issue in a SAS Viya deployment. In order to diagnose the problem, we adjust the SAS Viya identities service’s logging level to produce more detailed log messages, which is done using both SAS Environment Manager and the sas-viya CLI. During the rest of the troubleshooting process, we explore those log messages in Kibana, the main web interface in the log monitoring stack of the open-source SAS Viya Monitoring for Kubernetes project in GitHub:


The video features two small bash code snippets, which I wanted to share here.


1. CLI command shown in the video to delete the identities logging.level configuration – assumes ansi-colors-enabled is false in your current CLI profile, and assumes you have successfully authenticated in the CLI as a user in the SAS Administrators group:

sas-viya --output text configuration configurations delete --id $(sas-viya --output text configuration configurations list | grep identities | grep logging.level | awk '{print $1}')

2. CLI commands to create a configuration instance to set the logging.level for the identities service to TRACE:

tee /tmp/identities.logging.level.trace.json > /dev/null << EOF
    "version": 2,
    "accept": "application/",
    "count": 1,
    "name": "configurations",
    "items": [
            "metadata": {
                "isDefault": false,
                "mediaType": "application/;version=1",
                "services": [
            "version": 1,
            "level": "TRACE",
            "name": ""

sas-viya configuration configurations create --file /tmp/identities.logging.level.trace.json

Hopefully sharing them here saves some typing.


See you next time!


Find more articles from SAS Global Enablement and Learning here.


A colleague just kindly suggested another way to use the CLI, this time to update the value of a logging level configuration instance using sas-viya configuration configurations update:


tee /tmp/ > /dev/null << EOF
{ "version": 2, "accept": "application/", "count": 1, "name": "configurations", "items": [ { "metadata": { "isDefault": false, "mediaType": "application/;version=1", "services": [ "identities" ] }, "version": 1, "level": "TRACE", "name": "" } ] } EOF sas-viya configuration configurations update --file /tmp/

That also works. Thanks for the suggestion @BrunoMueller

Version history
Last update:
‎03-30-2022 12:00 PM
Updated by:



Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

Free course: Data Literacy Essentials

Data Literacy is for all, even absolute beginners. Jump on board with this free e-learning  and boost your career prospects.

Get Started

Article Tags