Skip to content

Commit eb65672

Browse files
committed
What it collects?
1 parent 72ae402 commit eb65672

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

articles/operator-nexus/howto-kubernetes-cluster-log-collector-script.md

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,16 +61,15 @@ The log collector script is designed to comprehensively gather data across vario
6161

6262
## Prerequisite
6363

64-
Before proceeding, ensure that you have [SSH access to the Nexus Kubernetes cluster node](./howto-kubernetes-cluster-connect.md#azure-arc-for-servers).
64+
- Ensure that you have SSH access to the Nexus Kubernetes cluster node. If you have direct IP reachability to the node, establish an SSH connection directly. Otherwise, use Azure Arc for servers with the command `az ssh arc`. For more information about various connectivity methods, check out the [connect to the cluster](./howto-kubernetes-cluster-connect.md) article.
6565

66-
## Execution steps
66+
## Execution
6767

68-
- Connect to the Nexus Kubernetes cluster node using SSH.
69-
- Run the log collector script by executing the command `sudo /opt/log-collector/collect.sh`.
68+
Once you have SSH access to the node, run the log collector script by executing the command `sudo /opt/log-collector/collect.sh`.
7069

7170
Upon execution, you observe an output similar to:
7271

73-
```
72+
``` bash
7473
Trying to check for root...
7574
Trying to check for required utilities...
7675
Trying to create required directories...
@@ -92,6 +91,18 @@ Once the log file is generated, you can download the generated log file from you
9291

9392
This command should look familiar to you, as it is the same command used to SSH into the Nexus Kubernetes cluster node. To download the generated log file from the node to your local machine, simply use this command again, with the addition of the `cat` command at the end to copy the file.
9493

94+
``` bash
95+
RESOURCE_GROUP="myResourceGroup"
96+
CLUSTER_NAME="myNexusK8sCluster"
97+
SUBSCRIPTION_ID="<Subscription ID>"
98+
USER_NAME="azureuser"
99+
SSH_PRIVATE_KEY_FILE="<vm_ssh_id_rsa>"
100+
MANAGED_RESOURCE_GROUP=$(az networkcloud kubernetescluster show -n $CLUSTER_NAME -g $RESOURCE_GROUP --subscription $SUBSCRIPTION_ID --output tsv --query managedResourceGroupConfiguration.name)
101+
```
102+
103+
> [!NOTE]
104+
> Replace the placeholders variables with actual values relevant to your Azure environment and Nexus Kubernetes cluster.
105+
95106
```azurecli
96107
az ssh arc --subscription $SUBSCRIPTION_ID \
97108
--resource-group $MANAGED_RESOURCE_GROUP \

0 commit comments

Comments
 (0)