diff --git a/docs/install-satellite/install-satellite.md b/docs/install-satellite/install-satellite.md index 6ea280c8f..945b96d74 100644 --- a/docs/install-satellite/install-satellite.md +++ b/docs/install-satellite/install-satellite.md @@ -40,7 +40,7 @@ The Satellite uses an organization ID to authenticate incoming requests. ## 4. Follow instructions for your platform -- [Install on Kubernetes](satellite-kubernetes.md) +- [Install on Kubernetes](satellite-kubernetes.mdx) - [Install on Linux host via Docker Compose](satellite-docker.mdx) - [Install in AWS EC2 using Levo Satellite AMI](satellite-ami-aws-ec2.mdx) - [Install in AWS EKS](satellite-aws-eks.md) diff --git a/docs/install-satellite/satellite-aws-eks-fargate.md b/docs/install-satellite/satellite-aws-eks-fargate.md index 3bed380c9..50748a220 100644 --- a/docs/install-satellite/satellite-aws-eks-fargate.md +++ b/docs/install-satellite/satellite-aws-eks-fargate.md @@ -82,7 +82,7 @@ The `--role` argument sets the correct role and policies so that seemless access ### 4. Install the satellite -Please follow the instructions in the [Install on Kubernetes](satellite-kubernetes.md) section to install the Satellite. +Please follow the instructions in the [Install on Kubernetes](satellite-kubernetes.mdx) section to install the Satellite. Please ensure that you note down the address of the collector. diff --git a/docs/install-satellite/satellite-aws-eks.md b/docs/install-satellite/satellite-aws-eks.md index b75964b95..5c9677a61 100644 --- a/docs/install-satellite/satellite-aws-eks.md +++ b/docs/install-satellite/satellite-aws-eks.md @@ -166,7 +166,7 @@ eksctl create addon --name aws-ebs-csi-driver --cluster ${CLUSTER_NAME} --region ### 5. Install the satellite -Please follow the instructions in the [Install on Kubernetes](satellite-kubernetes.md) section to install the Satellite. +Please follow the instructions in the [Install on Kubernetes](satellite-kubernetes.mdx) section to install the Satellite. Please ensure that you note down the address of the collector. diff --git a/docs/install-satellite/satellite-kubernetes.md b/docs/install-satellite/satellite-kubernetes.mdx similarity index 94% rename from docs/install-satellite/satellite-kubernetes.md rename to docs/install-satellite/satellite-kubernetes.mdx index 2c04093d8..f670554c2 100644 --- a/docs/install-satellite/satellite-kubernetes.md +++ b/docs/install-satellite/satellite-kubernetes.mdx @@ -6,6 +6,18 @@ description: Install Levo.ai Satellite on Kubernetes. Follow our detailed guide # Satellite on Kubernetes +import BrowserOnly from '@docusaurus/BrowserOnly'; + +export function DownloadGetLogsScript() { + return ( + Loading...}> + {() => ( + download + )} + + ); +} + ## Setup ### Prerequisites @@ -336,5 +348,13 @@ kubectl -n levoai logs | grep "ConnectionRefusedError: [E If there are exception messages, Tagger is unable to connect to dependent services. It generally establishes connection after 3/4 retries. Please contact support@levo.ai for further assistance. -

+### Share Satellite logs with Levo Support + +Please script and execute following commands to collect logs from all Satellite components. This will create an archive as `/tmp/levoai_satellite_logs_%date-time%.tar.gz`. + +```bash +chmod +x get_levoai_satellite_logs.sh +./get_levoai_satellite_logs.sh +``` +

\ No newline at end of file diff --git a/docs/quickstart/quickstart-kubernetes.md b/docs/quickstart/quickstart-kubernetes.md index 1ca465394..1fba126c5 100644 --- a/docs/quickstart/quickstart-kubernetes.md +++ b/docs/quickstart/quickstart-kubernetes.md @@ -49,7 +49,7 @@ helm upgrade --install -n levoai --create-namespace \ :::info -Please refer to [install satellite in kubernetes](/../../install-satellite/satellite-kubernetes) for detailed instructions. +Please refer to [install satellite in kubernetes](/install-satellite/satellite-kubernetes.mdx) for detailed instructions. ::: diff --git a/static/artifacts/satellite/get_levoai_satellite_logs.sh b/static/artifacts/satellite/get_levoai_satellite_logs.sh new file mode 100755 index 000000000..1ed0525ae --- /dev/null +++ b/static/artifacts/satellite/get_levoai_satellite_logs.sh @@ -0,0 +1,52 @@ +#!/usr/bin/env bash + +# Check if kubectl is installed +if ! command -v kubectl &> /dev/null; then + echo "Error: kubectl is not installed or not found in your PATH. Please install kubectl and try again." + exit 1 +fi + +# Validate if there is an active Kubernetes context +CURRENT_CONTEXT=$(kubectl config current-context 2>/dev/null) + +if [ -z "$CURRENT_CONTEXT" ]; then + echo "Warning: No active Kubernetes context found. Please configure your kubeconfig and try again." + exit 1 +fi + +echo "Active Kubernetes context: $CURRENT_CONTEXT" + +# Set the namespace (default to "levoai" if not provided as an argument) +NAMESPACE=${1:-levoai} + +echo "Checking for pods in $NAMESPACE namespace.." + +# Check if the namespace exists and has pods +PODS=$(kubectl get pods -n "$NAMESPACE" --no-headers -o custom-columns=":metadata.name") + +if [ -z "$PODS" ]; then + echo "Warning: No pods found in namespace '$NAMESPACE' in the current context." + exit 1 +fi + +# Create a temporary directory to store logs +TEMP_DIR=$(mktemp -d) +echo "Temporary directory created: $TEMP_DIR" + +# Loop through each pod and save its logs into separate files +for POD in $PODS; do + LOG_FILE="$TEMP_DIR/${POD}.log" + echo "Collecting logs for pod: $POD" + kubectl logs "$POD" -n "$NAMESPACE" > "$LOG_FILE" 2>&1 +done + +# Create archive of current directory +TAR_FILE="/tmp/levoai_satellite_logs_$(date +%Y_%m_%d_%H_%M_%S).tar.gz" +tar -czf "$TAR_FILE" -C "$TEMP_DIR" . + +echo "Logs have been collected and archived at $TAR_FILE" + +# Clean up temporary directory +rm -rf "$TEMP_DIR" + +