Installing and managing Linux connector
Install the connector to collect logs from Linux-based applications.
The following image shows the list of tasks that you perform with the connector:
Before you begin
- Ensure that the host computer on which you plan to install the connector has a 2-core CPU and 16 GB RAM.
- Download and install the connector only on the RHEL 8.x operating systems.
- Ensure that you have the sudo permissions to install the connector. Alternatively, use the root user.
- Confirm that the 24444 port is available on the Linux server from where logs will be collected.
To download and install the connector
- Click the Collection menu and select Connectors.
- On the Connectors page, click Create.
- Enter a unique name and description.
- In the Download Connector step, click Download.
- In the Tags step, add tags (in the form of key-value pair) to identify the connector; for example, name-windows, location-Pune, and so on.
Click + to add the tag.
Download the installation script, in the Download Install Script step, click Download.
- Click Save.
- Copy the installation script and tar.gz files to the '/opt' directory on the Linux (RHEL) server from where you want to collect logs.
- Extract the tar.gz file, from the /opt folder (command: cd /opt), and run the following command:
tar -xvf tdc-connector-linux-<build_id>-<version>.tar.gz
The connector file is extracted in the bmc-devtools folder. - Grant execute permission to the downloaded shell script, and then run the script.
For example, run the following commands:
chmod +x install-connector-my-bmc.sh
sudo ./install-connector-my-bmc.sh -u <user name>
The processes for the connector service (td-agent.service) are run with the user name that you provide. If you do not enter a user name, a user with td-agent user name is created and it is used to run the processes for the connector. If you use the root user, you do not need the keyword sudo in the command.
After installation, the bmc-devtools folder is deleted and the connector is installed in the td-agent folder. - Start the connector service by running the following command:
sudo systemctl start td-agent.service
To communicate with the connector through a proxy
- Open the /etc/systemd/system/td-agent.service file.
- Search for the following line: LimitNOFILE=65536.
- After this line, add the following entry:
Environment=HTTP_PROXY=http://<PROXY_HOST_OR_IP>:<PROXY_PORT> - Save the file.
To verify the connector installation
To verify the connector installation, go to the Collection menu, click Connectors, and look for the installed connector on the page. Connectors will be available in one of the following status:
- Created: The connector is installed successfully, but has not started sending heartbeats.
- Active: The connector is sending heartbeats.
- Suspended: The connector has not sent heartbeats for a pre-configured time. You can only delete a connector in this status.
To start and stop a connector
- To start a connector, run the following command:
systemctl start td-agent.service - To stop a connector, run the following command:
systemctl stop td-agent.service
To uninstall a connector
- Run the following commands (in the order that follows):
- systemctl stop td-agent.service
- systemctl disable td-agent.service
- rm -rf /etc/systemd/system/td-agent.service
- systemctl daemon-reload
- systemctl reset-failed
- Remove the td-agent directory by running the following command:
rm -rf /opt/td-agent
To delete a connector
- Ensure that the connector is not associated with a collection policy.
- Stop the connector and wait for 5 minutes.
When you stop the connector, its status changes to Suspended. - On the Connector page, for the required connector, click the Actions menu and select Delete.
- Confirm the deletion by clicking Yes.
Where to go from here
Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*