Polarity v4 Admin Guide
Polarity v5 Admin Guide
  • Sever Requirements
    • Deployment Methods
      • Deploying Polarity Server on AWS with RDS and Elasticache
      • Deploying Polarity Server Virtual Machine on Azure
      • Deploying via OVA
      • Deploying via RPM
      • Polarity Server BYOL AMI
  • Guides
    • Installing License
    • Authentication
      • SAML
        • Azure ADFS
        • Okta
        • SAML Troublshooting
      • LDAP Troubleshooting
    • Installing Private Certificate Authority
    • Installing SSL Certificate
      • Installing LetsEncrypt SSL Certificate on Polarity Server
    • Configuring a Proxy
    • Migrating Polarity Servers
      • Upgrade PostgreSQL to v13
    • Enabling SMTP
    • Server Environment Variables
    • File System Layout
    • Configuring a FQDN
    • Enabling Source Analytics
      • Elasticsearch
        • Configuring Source Analytics on Elasticsearch
        • Source Analytics Integration with Elasticsearch
    • v5 Server Pre-Flight Upgrade Check
  • Integrations
    • Auto Subscribe CLI Tool
    • Installation
    • Install Multiple Copies of an Integration
    • Modifying Integration Name & Acronym
    • Add Custom Entity Types
Powered by GitBook
On this page
  • General Steps
  • Example
  • Install Copy into New Directory
  • Install Integration Dependencies
  • Modify Integration Name and Acronym
  • Restart the Polarity Server Process
  1. Integrations

Install Multiple Copies of an Integration

Install multiple copies of the same integration

PreviousInstallationNextModifying Integration Name & Acronym

Last updated 2 years ago

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:

General 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.

  1. Install the integration into a new directory ensuring the new directory name is meaningful (i.e., <integration>_<descriptor>). An example might be splunk_firewall.

  2. Modify the integration's name and acronym by editing the name and acronym property found in the integration's config/config.js file. The config file can be found at the following path: /app/polarity-server/integration/INTEGRATION_NAME/config/config.js

  3. Save your changes to the config.js file

  4. Restart 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).

Replace Splunk with the name of the repository for the integration you are installing and name the directory accordingly.

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.',
  ...
}

Ensure the values you use remain enclosed within single quotes and that the end of each line maintains the trailing comma.

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.

If you are modifying the name, acronym, or description for an already installed integration see the documentation on Modifying Integration Name & Acronymwhich contains additional required steps.

Modifying Integration Name & Acronym