# Install Multiple Copies of an 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:

{% content-ref url="/pages/AD3tBEBSu6syIL2unbSN" %}
[Modifying Integration Name & Acronym](/polarity-admin-guide/GGQxi8U7L785oCyu5JjE/integrations/modifying-integration-name-and-acronym.md)
{% endcontent-ref %}

## 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. &#x20;

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`. &#x20;

### 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).&#x20;

{% hint style="info" %}
Replace Splunk with the name of the repository for the integration you are installing and name the directory accordingly.
{% endhint %}

### 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. &#x20;

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

{% code overflow="wrap" %}

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

{% endcode %}

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:

```javascript
module.exports = {
  name: 'Splunk - Firewall',
  acronym: 'SPLNK-FW',
  description: 'Search firewall logs in Splunk.',
  ...
}
```

{% hint style="info" %}
Ensure the values you use remain enclosed within single quotes and that the end of each line maintains the trailing comma.
{% endhint %}

Save the file after making your edits. &#x20;

### 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. &#x20;

```bash
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.

{% hint style="info" %}
If you are modifying the name, acronym, or description for an already installed integration see the documentation on [Modifying Integration Name & Acronym](/polarity-admin-guide/GGQxi8U7L785oCyu5JjE/integrations/modifying-integration-name-and-acronym.md)which contains additional required steps.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.polarity.io/polarity-admin-guide/GGQxi8U7L785oCyu5JjE/integrations/install-multiple-copies-of-an-integration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
