Overview
This article provides instructions on how to generate an OpsCenter Diagnostics Report for a specific node or group of nodes.
Applies to
- OpsCenter 5.2.x or newer
Background
In some instances such as in a cluster with 50 or more nodes, it may not always be practical to generate a full Diagnostics Report from OpsCenter.
This article provides the steps for generating a Diagnostics for a specific node in the cluster, or a small number of nodes.
Prerequisites
This procedure only works on nodes where the DataStax OpsCenter agent is installed.
The simplest way of installing the agent is via the tarball installation since it does not require root
access.
Procedure
Follow these steps to generate a Diagnostics for a node.
Step 1 - Logon to the node and switch to the user running the DataStax OpsCenter agent, most commonly as the cassandra
user:
$ sudo su - <agent_user_ID>
NOTE - Ensure that the user has the right permissions to /tmp
since the agent will create files in that location.
Step 2 - Startup the agent if it is not running and confirm operation as per the following examples:
$ ps -ef | grep datastax-agent 106 7053 1 0 Nov06 ? 01:50:15 /usr/lib/jvm/jdk1.7.0_45/bin/java -Xmx128M -Djclouds.mpu.parts.magnitude=100000 -Djclouds.mpu.parts.size=16777216 -Dopscenter.ssl.trustStore=/var/lib/datastax-agent/ssl/agentKeyStore -Dopscenter.ssl.keyStore=/var/lib/datastax-agent/ssl/agentKeyStore -Dopscenter.ssl.keyStorePassword=opscenter -Dagent-pidfile=/var/run/datastax-agent/datastax-agent.pid -Dlog4j.configuration=file:/etc/datastax-agent/log4j.properties -Djava.security.auth.login.config=/etc/datastax-agent/kerberos.config -jar datastax-agent-5.2.0-standalone.jar /var/lib/datastax-agent/conf/address.yaml
$ sudo lsof -i -n | grep LISTEN | grep 61621 java 7053 cassandra 17u IPv4 20189 0t0 TCP *:61621 (LISTEN)
Step 3a - For OpsCenter 6.1 or newer, generate the Diagnostics as follows:
$ curl -L http://<node_IP>:61621/v1/diagnostics > diagnostics-`hostname -i`.tar.gz
This command will generate a zipped tarball in the directory that it is run.
For OpsCenter 6.1 nodes with SSL encryption enabled, supply the SSL certificate and password as follows:
$ curl -k --cert /var/lib/opscenter/ssl/opscenter.pem --key /var/lib/opscenter/ssl/opscenter.key \ -L https://<node_IP>:61621/v1/diagnostics > diagnostics-`hostname -i`.tar.gz
Step 3b - For older versions of OpsCenter 6.1, generate the Diagnostics as follows:
$ curl -L http://<node_IP>:61621/diagnostics > diagnostics-`hostname -i`.tar.gz
For older OpsCenter versions where SSL encryption is enabled, supply the SSL certificate and password as follows:
$ curl -k --cert /var/lib/opscenter/ssl/opscenter.pem --key /var/lib/opscenter/ssl/opscenter.key \ -L https://<node_IP>:61621/diagnostics > diagnostics-`hostname -i`.tar.gz
CLEANUP - The agent will have written files in the /tmp/opsc-*
directory. Once complete, delete this directory since it will not be cleaned up automatically.
Repeat the steps above on other nodes as appropriate.