Install Multiple Copies of an Integration
Install multiple copies of the same integration
Polarity supports installing multiple copies of the same integration. This guide walks through installing a second copy of an integration and renaming it.
If you are modifying the name, acronym, or description of an integration that is already installed, please see the relevant guide here:
Modifying Integration Name & AcronymGeneral Steps
Integrations are tracked based on the name of the directory the integration is installed into. If you'd like to install a second copy of the same integration, simply install it into a different directory name.
Install the integration into a new directory ensuring the new directory name is meaningful (i.e., <integration>_<descriptor>). An example might be
splunk_firewall
.Modify the integration's
name
andacronym
by editing thename
andacronym
property found in the integration'sconfig/config.js
file. The config file can be found at the following path:/app/polarity-server/integration/INTEGRATION_NAME/config/config.js
Save your changes to the
config.js
fileRestart the polarity process using
systemctl restart polarityd
For a complete example of the required steps see below.
Example
As an example, suppose you want to install two copies of Splunk and the existing copy of the integration is installed at /app/polarity-server/integrations/splunk
.
Install Copy into New Directory
To install a second Splunk integration, (e.g., for searching firewall logs) you can install the integration into a directory called splunk_firewall
. If you are installing the integration via git
you can use the following command:
cd /app/polarity-server/integrations
git clone https://github.com/polarityio/splunk splunk_firewall
This command checks out the splunk
repository and places it into a new directory called splunk_firewall
. The name of the directory is descriptive of what the integration is meant to do (in this case search our firewall logs in Splunk).
Install Integration Dependencies
Next we want to install our dependencies using npm install
and change ownership of the files so that they are owned by the polarityd
user. These are the normal integration installation steps you are familiar with.
cd /app/polarity-server/integrations/splunk_firewall
npm install
chown -R polarityd: .
Our integration is now installed.
Modify Integration Name and Acronym
You will now want to modify the Name and Acronym of the integration so it's easy to tell the integrations apart in the Polarity interface. To do this, open the new integration's config.js
file to modify the name
and acronym
properties.
cd /app/polarity-server/integrations/splunk_firewall
vi config/config.js
Once the file is open you will see the name
and acronym
properties near the top.
module.exports = {
name: 'Splunk',
acronym: 'SPLNK',
description: 'Splunk allows you to aggregate, analyze and get answers from your machine data with the help of machine learning and real-time visibility.',
...
}
Modify the name
, acronym
, and optionally the description
to your new values. For the name
property we generally recommend appending a descriptor to the base name of the integration. For the acronym
property we recommend using all caps and keeping it short. Here is an example of a modified config.js
file for our second Splunk integration:
module.exports = {
name: 'Splunk - Firewall',
acronym: 'SPLNK-FW',
description: 'Search firewall logs in Splunk.',
...
}
Save the file after making your edits.
Restart the Polarity Server Process
Since this is the first time the integration has been installed on the server, you will now need to restart the Polarity server process so the server can register your new integration.
systemctl restart polarityd
After the server process restarts you should see your newly installed integration with an updated name, acronym, and optionally description on the Polarity integration page.
Last updated