Install the DataStax Agent automatically
A DataStax Agent must be installed on every managed node in a cluster and are necessary to perform most of the functionality within DSE OpsCenter. Installation is automatic or manual, depending on the deployment tool.
-
Using Lifecycle Manager (LCM) to create a new cluster automatically installs agents.
-
Using OpsCenter to add a new cluster offers a choice of automatically or manually installing agents.
If you add an existing cluster, OpsCenter determines whether agents are already properly installed and configured. If they are not, OpsCenter prompts you to check the status of the agents and install them from the Agents tab.
Use the Agents Status View to see what is already installed as well as to review the status of the agents that you are currently installing.
Prepare the infrastructure for automatic agent installation
-
Install OpsCenter:
-
Have root or sudo access to the machines where the agents are or will be installed.
-
Enable JMX connectivity on each node in the cluster.
-
Use the default SSH port (22) for node-agent communication, or configure the SSH port.
-
Make sure your OpsCenter and DataStax Enterprise (DSE) versions are compatible.
Configure your cluster for automatic agent installation
-
Start your DSE cluster and the OpsCenter daemon.
-
Connect to OpsCenter in a web browser at
http://opscenter-host:8888/. -
Click Manage Existing Cluster, and then click Get Started.
-
In Connect to Existing Cluster, enter one or more hostnames or IP addresses for the nodes in the cluster.
Private IP addresses are recommended.
-
Depending on your cluster configuration, change the port numbers and select connection security options as needed.
-
Click Next.
-
On the Set up agents dialog, click Next to use the default option: Install or start agents automatically.
-
Enter SSH credentials to connect to the nodes.
These credentials aren’t saved or stored after authenticating to the nodes.
-
For Username, enter the name of a user that has root or sudo privileges.
-
If you are using a sudo password for the specified user, enter the password in the Password field.
-
If you are using an SSH private key, enter the key in the Private Key field.
-
-
Click Submit to begin installing the agents.
Monitor agent installation
After you click Submit, the Agents tab shows the progress of the agent installations.
It is normal for DataStax Agent services to stop and start multiple times during the installation process.
Each installation deploys and configures an agent on each managed node in your DSE cluster. Monitor the process to ensure that all installations complete successfully.
Troubleshoot agent installation issues
If there are any issues with installing agents, a banner appears at the top of the OpsCenter workspace.
The banner cannot be dismissed until the agent issues are resolved, but the banner does not prevent you from using or navigating the OpsCenter UI.
Click the Show Details link in the banner to inspect the clusters that have issues with the agent and the number of problems currently detected by OpsCenter.
Click the # problems link to open the Agent Status tab where you can view more detailed information about agent status, troubleshooting suggestions, and use Set Up Agents to retry installing the agents.
If you are unable to install the agents automatically through the OpsCenter UI, then you must manually install them. Use the DataStax Agent installation procedure that matches each node’s DSE installation type:
Configure JAVA_HOME for the DataStax Agent
The DataStax Agent cannot find the current user’s environment variables by default. Therefore, if Java isn’t in the machine’s PATH, then the agent’s log shows an error on startup:
nohup: cannot run command 'java': No such file or directory
To avoid this error, you can set the JAVA_HOME environment variable on the nodes where the agents are installed:
-
Navigate to
/etc/default/, and then create a file nameddatastax-agent. -
In this file, set
JAVA_HOMEand any other custom environment variables that the agent might need:JAVA_HOME = /usr/lib/jvm/java-8-oracle -
Repeat for all nodes where the agent is installed and Java isn’t set in the PATH.