Skip to content
Merged
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# SAS Viya Monitoring for Kubernetes

## unreleased
* **Logging**
* [ANNOUNCEMENT] The [OpenDistro for Elasticsearch (ODFE) project](https://opendistro.github.io/for-elasticsearch/) reached end-of-line in May of 2022 and our project moved to
OpenSearch shorly thereafter. This release removes all remaining support for ODFE; including support for migration from ODFE
and ability to use utility scripts (e.g. change_internal_password.sh) with ealier ODFE-backed deployments.
* [REMOVAL] Remove support for migrating from an earlier deployment which included ODFE.
* [REMOVAL] Remove support for the `LOG_SEARCH_BACKEND` environment variable. Scripts will terminate with an ERROR message if
this environment variable is detected.
* [UPGRADE] OpenSearch and OpenSearch Dashboards upgraded from 2.19.1 to 2.19.2.
* [UPGRADE] OpenSearch Helm chart upgraded from 2.32.0 to 2.34.0.
* [UPGRADE] OpenSearch Dashboards Helm chart upgraded from 2.28.0 to 2.30.0
* [UPGRADE] Fluent Bit upgraded from 3.2.10 to 4.0.2
* [UPGRADE] Fluent Bit Helm chart upgraded from 0.48.6 to 0.49.0
* [UPGRADE] Elasticsearch Exporer upgraded from 1.8.0 to 1.9.0
* [UPGRADE] Elasticsearch Exporer Helm chart upgraded from 6.6.1 to 6.7.2
* [UPGRADE] OpenSearch Data Source Plugin to Grafana upgraded from 2.24.0 to 2.26.1


## Version 1.2.37 (13MAY2025)
* **Metrics**
* [UPGRADE] Kube-Prometheus Stack Helm chart has been upgraded from 68.3.0 to 70.8.0.
Expand Down
18 changes: 9 additions & 9 deletions component_versions.env
Original file line number Diff line number Diff line change
Expand Up @@ -11,28 +11,28 @@
#Elasticsearch Exporter
ESEXPORTER_HELM_CHART_REPO=prometheus-community
ESEXPORTER_HELM_CHART_NAME=prometheus-elasticsearch-exporter
ESEXPORTER_HELM_CHART_VERSION=6.6.1
ES_EXPORTER_FULL_IMAGE="quay.io/prometheuscommunity/elasticsearch-exporter:v1.8.0"
ESEXPORTER_HELM_CHART_VERSION=6.7.2
ES_EXPORTER_FULL_IMAGE="quay.io/prometheuscommunity/elasticsearch-exporter:v1.9.0"

#Fluent Bit
FLUENTBIT_HELM_CHART_REPO=fluent
FLUENTBIT_HELM_CHART_NAME=fluent-bit
FLUENTBIT_HELM_CHART_VERSION=0.48.9
FB_FULL_IMAGE="cr.fluentbit.io/fluent/fluent-bit:3.2.10"
FLUENTBIT_HELM_CHART_VERSION=0.49.0
FB_FULL_IMAGE="cr.fluentbit.io/fluent/fluent-bit:4.0.2"
FB_INITCONTAINER_FULL_IMAGE="docker.io/library/busybox:latest"

#OpenSearch
OPENSEARCH_HELM_CHART_REPO=opensearch
OPENSEARCH_HELM_CHART_NAME=opensearch
OPENSEARCH_HELM_CHART_VERSION=2.32.0
OS_FULL_IMAGE="docker.io/opensearchproject/opensearch:2.19.1"
OPENSEARCH_HELM_CHART_VERSION=2.34.0
OS_FULL_IMAGE="docker.io/opensearchproject/opensearch:2.19.2"
OS_SYSCTL_FULL_IMAGE="docker.io/library/busybox:latest"

#OpenSearch Dashboards
OSD_HELM_CHART_REPO=opensearch
OSD_HELM_CHART_NAME=opensearch-dashboards
OSD_HELM_CHART_VERSION=2.28.0
OSD_FULL_IMAGE="docker.io/opensearchproject/opensearch-dashboards:2.19.1"
OSD_HELM_CHART_VERSION=2.30.0
OSD_FULL_IMAGE="docker.io/opensearchproject/opensearch-dashboards:2.19.2"

#Grafana (when deployed on OpenShift)
OPENSHIFT_GRAFANA_CHART_REPO=grafana
Expand All @@ -43,7 +43,7 @@ OPENSHIFT_OAUTHPROXY_FULL_IMAGE="registry.redhat.io/openshift4/ose-oauth-proxy:l
#Grafana (everywhere)
GRAFANA_FULL_IMAGE="docker.io/grafana/grafana:11.6.1"
GRAFANA_SIDECAR_FULL_IMAGE="quay.io/kiwigrid/k8s-sidecar:1.30.0"
GRAFANA_DATASOURCE_PLUGIN_VERSION="2.24.0"
GRAFANA_DATASOURCE_PLUGIN_VERSION="2.26.1"

#Kube-Prometheus Stack
KUBE_PROM_STACK_CHART_REPO=prometheus-community
Expand Down
16 changes: 1 addition & 15 deletions logging/bin/apiaccess-include.sh
Original file line number Diff line number Diff line change
Expand Up @@ -168,13 +168,6 @@ function get_kb_api_url {
# Global vars: kb_api_url - URL to access KB API/service
# kbpfpid - process id of KB portforwarding

#NOTE: Use of args implemented to support migration of
# ODFE 1.7 Kibana content to OpenSearch Dashoards ONLY!
LOG_SEARCH_BACKEND=${1:-$LOG_SEARCH_BACKEND}
KB_SERVICENAME=${2:-$KB_SERVICENAME}
KB_SERVICEPORT=${3:-$KB_SERVICEPORT}
KB_INGRESSNAME=${4:-$KB_INGRESSNAME}
KB_TLS_ENABLED=${5}

if [ -n "$kb_api_url" ]; then
log_debug "Kibana API Endpoint already set [$kb_api_url]"
Expand All @@ -183,14 +176,7 @@ function get_kb_api_url {

pfPID=""

if [ -n "$KB_TLS_ENABLED" ]; then
tlsrequired="$KB_TLS_ENABLED"
log_debug "Kibana TLS setting [$KB_TLS_ENABLED] explicitly passed to get_kb_api_url"
elif [ "$LOG_SEARCH_BACKEND" != "OPENSEARCH" ]; then
tlsrequired="$(kubectl -n $LOG_NS get pod -l role=kibana -o=jsonpath='{.items[*].metadata.annotations.tls_required}')"
else
tlsrequired="$(kubectl -n $LOG_NS get secret v4m-osd-tls-enabled -o=jsonpath={.data.enable_tls} |base64 --decode)"
fi
tlsrequired="$(kubectl -n $LOG_NS get secret v4m-osd-tls-enabled -o=jsonpath={.data.enable_tls} |base64 --decode)"
log_debug "TLS required to connect to Kibana? [$tlsrequired]"

get_api_url "$KB_SERVICENAME" '{.spec.ports[?(@.name=="'${KB_SERVICEPORT}'")].port}' $tlsrequired $KB_INGRESSNAME
Expand Down
28 changes: 8 additions & 20 deletions logging/bin/change_internal_password.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,10 @@ function show_usage {
echo ""
}

if [ "$LOG_SEARCH_BACKEND" == "OPENSEARCH" ]; then
targetpod="v4m-search-0"
targetcontainer="opensearch"
toolsrootdir="/usr/share/opensearch/plugins/opensearch-security"
else
targetpod="v4m-es-master-0"
targetcontainer="elasticsearch"
toolsrootdir="/usr/share/elasticsearch/plugins/opendistro_security"
fi
# set vars used in curl commands
targetpod="v4m-search-0"
targetcontainer="opensearch"
toolsrootdir="/usr/share/opensearch/plugins/opensearch-security"

USER_NAME=${1}
NEW_PASSWD="${2}"
Expand Down Expand Up @@ -258,17 +253,10 @@ if [ "$success" == "true" ]; then
log_notice " *********** IMPORTANT NOTE *********** "
log_notice " "
log_notice " After changing the password for the [kibanaserver] user, you need to restart the "
if [ "$LOG_SEARCH_BACKEND" == "OPENSEARCH" ]; then
log_notice " OpenSearch Dashboards pod to ensure OpenSearch Dashboards can still be accessed and used. "
log_notice " "
log_notice " This can be done by submitting the following command: "
log_notice " kubectl -n $LOG_NS delete pods -l 'app=opensearch-dashboards'"
else
log_notice " Kibana pod to ensure Kibana can still be accessed and used."
log_notice ""
log_notice " This can be done by submitting the following command:"
log_notice " kubectl -n $LOG_NS delete pods -l 'app=v4m-es,role=kibana'"
fi
log_notice " OpenSearch Dashboards pod to ensure OpenSearch Dashboards can still be accessed and used. "
log_notice " "
log_notice " This can be done by submitting the following command: "
log_notice " kubectl -n $LOG_NS delete pods -l 'app=opensearch-dashboards'"
echo ""
;;
metricgetter)
Expand Down
53 changes: 16 additions & 37 deletions logging/bin/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,14 @@ if [ "$SAS_LOGGING_COMMON_SOURCED" = "" ]; then
fi
fi


function require_opensearch {
if [ "$LOG_SEARCH_BACKEND" != "OPENSEARCH" ]; then
log_error "This script is only appropriate for use with OpenSearch as the search back-end."
log_error "The LOG_SEARCH_BACKEND environment variable is currently set to [$LOG_SEARCH_BACKEND]"
exit 1
fi
}
export -f require_opensearch

#Check for obsolete env var
if [ -n "$LOG_SEARCH_BACKEND" ]; then
log_error "Support for the LOG_SEARCH_BACKEND environment variable has been removed."
log_error "This script is only appropriate for use with OpenSearch as the search back-end."
log_error "The LOG_SEARCH_BACKEND environment variable is currently set to [$LOG_SEARCH_BACKEND]"
exit 1
fi

export LOG_NS="${LOG_NS:-logging}"

#if TLS (w/in cluster; for all monitoring components) is requested, require TLS into OSD pod, too
Expand All @@ -35,33 +33,16 @@ if [ "$SAS_LOGGING_COMMON_SOURCED" = "" ]; then
# TLS is required for logging components so hard-code to 'true'
export TLS_ENABLE="true"

# OpenSearch or OpenDistro for Elasticsearch
export LOG_SEARCH_BACKEND="${LOG_SEARCH_BACKEND:-OPENSEARCH}"
log_debug "Search Backend set to [$LOG_SEARCH_BACKEND]"

if [ "$LOG_SEARCH_BACKEND" == "OPENSEARCH" ]; then
export ES_SERVICENAME="v4m-search"
export ES_INGRESSNAME="v4m-search"

export KB_SERVICENAME="v4m-osd"
export KB_INGRESSNAME="v4m-osd"
export KB_SERVICEPORT="http"
# set some OpenSearch/OSD env vars
export ES_SERVICENAME="v4m-search"
export ES_INGRESSNAME="v4m-search"

export ES_PLUGINS_DIR="_plugins"
export LOG_XSRF_HEADER="osd-xsrf:true"
else
export ES_SERVICENAME="v4m-es-client-service"
export ES_INGRESSNAME="v4m-es-client-service"

export KB_SERVICENAME="v4m-es-kibana-svc"
export KB_INGRESSNAME="v4m-es-kibana-ing"
export KB_SERVICEPORT="kibana-svc"


export ES_PLUGINS_DIR="_opendistro"
export LOG_XSRF_HEADER="kbn-xsrf: true"
fi
export KB_SERVICENAME="v4m-osd"
export KB_INGRESSNAME="v4m-osd"
export KB_SERVICEPORT="http"

export ES_PLUGINS_DIR="_plugins"
export LOG_XSRF_HEADER="osd-xsrf:true"

export V4M_NS=$LOG_NS

Expand All @@ -73,8 +54,6 @@ if [ "$SAS_LOGGING_COMMON_SOURCED" = "" ]; then

export SAS_LOGGING_COMMON_SOURCED=true

#Environment vars related to upgrading ODFE 1.7.0 to ODFE 1.13.x
export KB_GLOBAL_EXPORT_FILE=${KB_GLOBAL_EXPORT_FILE:-"$TMP_DIR/kibana_global_content.ndjson"}
fi
echo ""

3 changes: 0 additions & 3 deletions logging/bin/deploy_esexporter.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ fi

set -e

#Fail if not using OpenSearch back-end
require_opensearch

log_info "Deploying Elasticsearch metric exporter ..."

# check for pre-reqs
Expand Down
3 changes: 0 additions & 3 deletions logging/bin/deploy_fluentbit_k8sevents_opensearch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ fi

set -e

#Fail if not using OpenSearch back-end
require_opensearch

log_info "Deploying Fluent Bit for collecting Kubernetes Events..."

#TO DO: Check that OpenSearch is actually deployed and running?
Expand Down
3 changes: 0 additions & 3 deletions logging/bin/deploy_fluentbit_opensearch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ fi

set -e

#Fail if not using OpenSearch back-end
require_opensearch

log_info "Deploying Fluent Bit ..."

# check for pre-reqs
Expand Down
3 changes: 0 additions & 3 deletions logging/bin/deploy_logging.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ cd "$(dirname $BASH_SOURCE)/../.."
source logging/bin/common.sh
source bin/autogenerate-include.sh

#Fail if not using OpenSearch back-end
require_opensearch

# Confirm NOT on OpenShift
if [ "$OPENSHIFT_CLUSTER" == "true" ]; then
if [ "${CHECK_OPENSHIFT_CLUSTER:-true}" == "true" ]; then
Expand Down
6 changes: 0 additions & 6 deletions logging/bin/deploy_logging_openshift.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@
cd "$(dirname $BASH_SOURCE)/../.."
source logging/bin/common.sh

##################################
# Confirm using OpenSearch #
##################################
require_opensearch


##################################
# Confirm on OpenShift #
##################################
Expand Down
Loading