Other/Node.js Agent Install & Configuration
The Other/Node.js Cimitra Agent was created so that if you have a non-X86 platform or some other platform that the Windows, Linux or MacOS agent cannot run on, if the device/computer supports Node.js, then you can get the Other/Node.js Cimitra Agent on that platform. An example is a Raspberry Pi, which uses an ARM processor. 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
Select A Topic Below
1. Overview
Cimitra Other/Node.js Agent Setup Overview
- Define the Cimitra Agent in the Cimitra Web Client
- Download the Cimitra Agent Node.js (JavaScript) file (cimagent.js)
- Get the cimagent.js file to the device/computer that has Node.js installed on it
- Install the Cimitra Agent
2. Define Agent
Defining an Other/Node.js Cimitra Agent
- Log into the Cimitra Web Client as an admin-level user
- Choose Agents
- Add Agent
- Name the agent and choose the Other Platform
- Click the Create button
3. Download Agent
Download The Cimitra Agent Installation File
- Click on the newly created “Other” Cimitra Agent
- Download the Agent installation JavaScript file (cimagent.js) and get it to the computer/device where you will install the Cimitra Agent
4. Install Agent
Cimitra Node.js Agent Install
PREREQUISITE: First install the Node.js package (or it is often called “node”) on your computer/device. You need to determine how to do this for your particular computer/device. Once you have done so, then you can proceed to do the installation of the Node.js compatible Cimitra Agent.
- In a terminal session to the device or computer, get to the directory where the cimagent.js file is located
- Make sure to sudo su if this is a *NIX type computer (see below)
- Install the Cimitra Agent with the config switch “c” (see below)
sudo su
node ./cimagent.js c
Install Results
node ./cimagent.js c
Install Results
The installation routine copies the cimagent.js JavaScript file to a directory it creates “/cimitra”. 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 on *NIX platforms, use the “cimitra start” command (see below).
cimitra start
If the “cimitra start” command didn’t successfully install, then you will need to create a method for starting the Node.js Cimitra Agent. The command to start the Cimitra Agent is:
node <path to cimagent.js> s &
EXAMPLE:
node /cimitra/cimagent.js s &
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
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 Node.js Cimitra Agent Up
When we have deployed the Cimitra Agent on the Raspberry Pi platform, it has a mechanism for starting the Cimitra Agent on startup. Adding the Cimitra Agent “checkup” command to the /etc/crontab is a way to assure the Cimitra Agent is always running. This way if a Cimitra Agent has an unforeseen crash event, the Cimitra Agent is restarted automatically.
So if the “cimitra” command works on your device, then make sure to add it to a Cron job method of some sort (see below). Or devise your own method that will assure that if the Cimitra Agent comes down, it recovers.
So if the “cimitra” command works on your device, then make sure to add it to a Cron job method of some sort (see below). Or devise your own method that will assure that if the Cimitra Agent comes down, it recovers.
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
- Run the Cimitra Agent JavaScript file with the “s” (service) and “–verbose” switches (see below)
node <path to cimagent.js> s –verbose
EXAMPLE:
node /cimitra/cimagent.js s –verbose
Now try and run a Cimitra App associated with the Cimitra Agent to observe the behavior of the Cimitra Agent.