Linux Agent Install & Configuration
A Cimitra Agent is deployed to any of the Linux computers you want to run commands or scripts on. Cimitra Agents are deployed after you have implemented a Cimitra Server.
Select A Topic Below
1. Overview
2. Define Agent
3. Download Agent
4. Install Agent
5. Start Agent
6. Agent Control Commands
7. Keeping The Agent Up
8. Troubleshooting
9. Advanced Topics
Select A Topic Below
1. Overview
Cimitra Linux Agent Setup Overview
- Define the Cimitra Agent in the Cimitra Web Client
- Download the Cimitra Agent Binary file (cimagent)
- Get the cimagent binary file to the Linux computer
- Install the Cimitra Agent
2. Define Agent
Defining a Cimitra Agent for Linux
- Log into the Cimitra Web Client as an admin-level user
- Choose Agents
- Add Agent
- Name the agent and choose the Linux Platform
- Click the Create button
3. Download Agent
Download The Cimitra Agent Installation File
- Click on the newly created Cimitra Agent for Linux
- Download the Agent installation file (cimagent) and get it to the Linux computer
4. Install Agent
Cimitra Agent Install
- Make the cimagent file executable (see below)
- Make sure to sudo su (see below)
- Install the Cimitra Agent with the setup switch “c” (see below)
sudo su
chmod +x ./cimagent
./cimagent c
SYSTEMD Configuration
By default the install creates the Cimitra Agent as an init.d process. To install the Cimitra Agent as a systemd process, add the systemd switch (see below)
./cimagent c systemd
After the Cimitra Agent is installed as a systemd process, make sure to enable the Cimitra Agent to start if the Linux computer restarts with the system control command (see below)
systemctl enable cimitra-agent
Install Results
The installation routine copies the cimagent binary file to the /usr/bin directory. A “cimitra” Bash shell script is also created for easy control of the Cimitra Agent.
5. Start Agent
Start Cimitra Agent
The Cimitra Installation does not start the Cimitra Agent. To start the Cimitra Agent for Linux use the “cimitra start” command (see below).
cimitra start
6. Agent Control Commands
Agent Control Commands
The Cimitra Agent is controlled by the “cimitra” command (see below)
cimitra
cimitra start
cimitra stop
cimitra restart
cimitra status
Once you have deployed a Cimitra Agent, you will rarely have occasion to stop the Cimitra Agent. For troubleshooting purposes, it is sometimes useful to stop and start the Cimitra Agent in a console so you can observe what the Cimitra Agent is doing.
cimitra start
cimitra stop
cimitra restart
cimitra status
Once you have deployed a Cimitra Agent, you will rarely have occasion to stop the Cimitra Agent. For troubleshooting purposes, it is sometimes useful to stop and start the Cimitra Agent in a console so you can observe what the Cimitra Agent is doing.
7. Keeping The Agent Up
Keeping The Cimitra Agent for Linux Up
There are a variety of Linux platforms, so the method for keeping a Cimitra Agent for Linux up and running might vary based on your flavor of Linux.
Other platforms such as Windows and Mac have built-in methods of running the Cimitra Agent as a service. This way if a Cimitra Agent has an unforeseen crash event, the Cimitra Agent is restarted automatically.
Other platforms such as Windows and Mac have built-in methods of running the Cimitra Agent as a service. This way if a Cimitra Agent has an unforeseen crash event, the Cimitra Agent is restarted automatically.
The Cimitra Agent on Linux has a special module you can install to assure the Cimitra Agent is persistent and recovers from unforeseen crash events. It’s called the “agent module“. To get the Cimitra agent module, type in the command “cimitra get agent” (see below)
cimitra get agent
Once the agent module is installed, the help screen is available with the command “cimitra agent” (see below)
cimitra agent
The agent module has a “checkup” command that can be incorporated into a Cron routine on a Linux computer. The command to add is:
cimitra agent checkup
The “cimitra agent checkup” command checks to see if the Cimitra Agent is running. If the Cimitra Agent is running the command runs without any output, outside of an exit code of 0. If the Cimitra Agent is not running, then the “cimitra agent checkup” command will load the Cimitra Agent.
8. Troubleshooting
Troubleshooting – Running in Foreground Mode
The Cimitra Agent can be run in the foreground for troubleshooting purposes. To run the Cimitra Agent in the foreground follow these steps
- Stop the Cimitra Agent : cimitra stop
- From the directory where the Cimitra Agent binary file is, run the cimagent binary file with the “s” (service) and “–verbose switches” (see below)
cimitra stop
cd /usr/bin
./cimagent s –verbose
cd /usr/bin
./cimagent s –verbose
Now try and run a Cimitra App associated with the Cimitra Agent to observe the behavior of the Cimitra Agent.
Example Output:
9. Advanced Topics
Advanced Topics
Running remote commands on a Linux computer using an “Agentless” method via SSH Key exchange.