---
title: "Remote Collector Management"
description: ""
url: "https://docs.itrsgroup.com/docs/opsview/current/configuration/remote-collector-management/index.html"
---
## Overview

Remote Collector Management enables clusters of monitoring collectors in a multi-site deployment to be managed remotely and independent of the Master Monitoring Server. You can also delegate the responsibility of managing the cluster to an administrator local to the cluster.

### Supported operating systems

Please refer to the list of supported [operating systems](https://docs.itrsgroup.com/docs/opsview/current/prerequisites/compatibility-matrix/supported-os/index.html).

### Required ports

Please see the following list for the required ports.

- [Collectors to the Orchestrator Ports](https://docs.itrsgroup.com/docs/opsview/current/prerequisites/ports/index.html#collectors-to-the-orchestrator)
- [Collector Cluster Ports](https://docs.itrsgroup.com/docs/opsview/current/prerequisites/ports/index.html#collector-clusters)
- Any ports listed in the [All Required Ports](https://docs.itrsgroup.com/docs/opsview/current/prerequisites/ports/index.html#list-of-all-ports) section with a location of **All servers** or **Collector servers**.

## Remotely Managed Collector installation and registration

### Permissions

Two Roles are involved in the setup of Remotely Managed Collectors.

  - The first Role creates the cluster and requires the [CONFIGUREREMOTECLUSTER](https://docs.itrsgroup.com/docs/opsview/current/configuration/users-and-roles/roles/index.html#access-configureremotecluster) permission.
  - The second Role installs, registers, and updates Remotely Managed Collectors within the cluster. This role requires a number of permissions, including the [REMOTELYMANAGEDCLUSTERS](https://docs.itrsgroup.com/docs/opsview/current/configuration/users-and-roles/roles/index.html#access-remotelymanagedclusters) permission. A template role has been created with this set of permissions. This role can be cloned and modified to meet specific needs. For example, the role can be given permission to manage collectors within a specific cluster.

  
**Note**


The second Role does not include the [CONFIGUREREMOTECLUSTER](https://docs.itrsgroup.com/docs/opsview/current/configuration/users-and-roles/roles/index.html#access-configureremotecluster) permission intentionally.



### Create the cluster

This requires the [CONFIGUREREMOTECLUSTER](https://docs.itrsgroup.com/docs/opsview/current/configuration/users-and-roles/roles/index.html#access-configureremotecluster) permission.


**Note**


You can skip this step if the remote administrator has the [CONFIGUREREMOTECLUSTER](https://docs.itrsgroup.com/docs/opsview/current/configuration/users-and-roles/roles/index.html#access-configureremotecluster) permission.



1. Navigate to **Configuration > Collector Management**.
2. Click the **+** button to add a new Remotely Managed Cluster.

    ![New remotely managed cluster](https://docscdn.itrsgroup.com/opsview/images/config-remote-collector-create.gif)

### Enable access to the new cluster

The remote administrator Role can be given permission to access the new cluster.

1. Navigate to **Configuration > Users and Roles > Roles**.
2. Clone the existing **Remote Collector Manager** role and edit the new role.

    ![Clone existing role](https://docscdn.itrsgroup.com/opsview/images/config-remote-collector-clone-existing.png)

3. On the **Configuration** tab, ensure the new cluster is selected under **Monitoring Clusters**.

    ![New role cloned Monitoring Clusters](https://docscdn.itrsgroup.com/opsview/images/config-remote-collector-clone-monitoring-clusters.png)

4. On the **Administration** tab, ensure the new cluster is selected under **Remotely Managed Clusters**.

    ![New role cloned Remotely Managed Clusters](https://docscdn.itrsgroup.com/opsview/images/config-remote-collector-administration.png)

5. Submit changes and apply your changes by clicking **Configuration > [Apply Changes](https://docs.itrsgroup.com/docs/opsview/current/configuration/apply-changes/index.html)**.

## Install and register the first collector

### Collector prerequisites

Before a collector can be registered, the fully qualified domain name (FQDN) of the collector must be the first name that appears in the `/etc/hosts` file on the collector.

For example:

```
127.0.0.1 collector123.example.com collector123
127.0.0.1 localhost
::1 localhost
```

For RHEL 7/8/9 systems, ensure the subscription manager is configured to allow system repositories. Verify that the `disable_system_repos` option is set to `0` in the `/etc/dnf/plugins/subscription-manager.conf` file on each system.

Additionally, the `root` user must be able to run `sudo` without a password.

### Registration

Installation and registration of the new collector are performed on the command line of the collector itself.

1. To commence the installation, run:

    ```
    curl -sSLo - https://ORCHESTRATOR/downloads/deploy-collector | sudo bash -s -- --username USERNAME --orchestrator ORCHESTRATOR --cluster "CLUSTER"
    ```

    - `ORCHESTRATOR` — replace this with the address of the Master Monitoring Server.
    - `--username` — name of the remote administrator.
    - `--orchestrator` — address of the Master Monitoring Server.
    - `--cluster` — the cluster name. It should match the name of the cluster added in the previous section. This must be enclosed in quotes. If the cluster does not already exist and the remote administrator has the [CONFIGUREREMOTECLUSTER](https://docs.itrsgroup.com/docs/opsview/current/configuration/users-and-roles/roles/index.html#access-configureremotecluster) permission, then the cluster will be created as part of the installation and registration process.
    - `--insecure` — do not perform server certificate checks when connecting to the ORCHESTRATOR, see below for reference.
    - `--ssh-tunnel` — configure an SSH tunnel from the collector to the Master Monitoring Server, see below for reference.
    
**Note**

If you have [rehomed](https://docs.itrsgroup.com/docs/opsview/current/administration/customization/index.html#re-homing) your application, update the URL appropriately.


    To learn about all the options available, you can use the help option:

    ```
    curl -sSLo - https://ORCHESTRATOR/downloads/deploy-collector | sudo bash -s -- --help
    ```

2. Enter the password for the remote administrator when prompted.
3. If certificate checking is to be disabled, add `-k` and `--insecure` to the command line:

    ```
    curl -k -sSLo - https://ORCHESTRATOR/downloads/deploy-collector | sudo bash -s -- --username USERNAME --orchestrator ORCHESTRATOR --cluster "CLUSTER" --insecure
    ```

    The installation and registration should take a few minutes.

    If succesful the following message will be displayed on the collector:

    ```
    Installation complete. Contact your administrator on ORCHESTRATOR and ask them to Apply Changes.
    ```

5. After the installation has run successfully, the registration can be completed by applying the changes in **Configuration > [Apply Changes](https://docs.itrsgroup.com/docs/opsview/current/configuration/apply-changes/index.html)**.

### Add more collectors to the remotely managed cluster

To add additional collectors to the cluster, wait until the first collector has fully registered. Then, log on to the collector to be added and enter the same command that was used to register the first collector. Do not register any further collectors in the same cluster until the first new collector has fully registered.

If you register additional Collectors without running Apply Changes, some checks may fail with a `CRITICAL "no such file or directory"` error.

### Problems with installation

If you encounter any problems during the installation, you can safely run the command again.

## SSH Tunnels

Remotely managed collectors can be configured to route all connections to the Master Monitoring Server via SSH tunnels. This is especially useful when the Master or Collectors are behind restrictive firewalls.

If an SSH tunnel is required from the collector to the orchestrator, then the `--ssh-tunnel` option should be used when running the registration command:

  ```
  curl -sSLo - https://ORCHESTRATOR/downloads/deploy-collector | sudo bash -s -- --username USERNAME --orchestrator ORCHESTRATOR --cluster "CLUSTER" --ssh-tunnel
  ```


**Note**


All collectors in the same cluster must be configured with the same option (either all use SSH tunnels or none of them).




## Upgrading Remotely Managed Collectors


**Warning**


It's recommended to upgrade Remotely Managed Collectors soon after upgrading the Opsview orchestrator.
ITRS Opsview doesn't support running Remotely Managed Collectors on a version of Opsview older than the orchestrator for extended periods.



The user performing the upgrade must have the [REMOTELYMANAGEDCLUSTERS](https://docs.itrsgroup.com/docs/opsview/current/configuration/users-and-roles/roles/index.html#access-remotelymanagedclusters) permission for the cluster.

### Upgrading via the collector command line

1. Run the command line below. This can be performed on any of the collectors in the remotely managed cluster.

    ```
    sudo /opt/opsview/scheduler/bin/collectorupgrader --username USERNAME
    ```

2. Enter the password when prompted.
3. If server certificate checking is to be disabled, add `--insecure` flag to the command line:

    ```
    sudo /opt/opsview/scheduler/bin/collectorupgrader --username USERNAME --insecure
    ```

### Upgrading via web

1. Navigate to **Configuration > Collector Management**.
2. Select the clusters to upgrade and then click **Upgrade selected**.

    ![Upgrade clusters](https://docscdn.itrsgroup.com/opsview/images/config-remote-cluster-upgrade-via-web-6-10-1.png)

    The **Upgrade cluster** screen displays the selected collectors to be upgraded, their current version, and their potential version after upgrading. This also indicates any collectors that cannot be upgraded, providing an explanation in a tooltip.

    ![Upgrade clusters modal](https://docscdn.itrsgroup.com/opsview/images/config-remote-cluster-upgrade-via-web-modal.png)

3. Click **Upgrade** to start the upgrade process for all listed upgradable collectors.


**Note**


If a new version is unavailable (when the listed current version and potential version are the same), upgrading a cluster will still run through the standard upgrade process and reapply configuration, but no Opsview packages will be updated.




**Warning**


If the upgrade fails due to a communication or timeout issue when contacting the collector, use the collector command line to upgrade instead.



## Deleting Remotely Managed Clusters

To delete a cluster, you must have the [REMOTELYMANAGEDCLUSTERS](https://docs.itrsgroup.com/docs/opsview/current/configuration/users-and-roles/roles/index.html#access-remotelymanagedclusters) permission.

### Deleting the entire cluster using the collector command line

Ensure that there are no Hosts currently being monitored by the Cluster.

This command can be performed on any of the collectors in the remotely managed cluster:

```
sudo /opt/opsview/scheduler/bin/collectordeleter --username USERNAME
```

When prompted, enter your password to proceed.

If server certificate checking is to be disabled, add the `--insecure` option on the command line:

```
sudo /opt/opsview/scheduler/bin/collectordeleter --username USERNAME --insecure
```

## Managing monitoring scripts

Monitoring scripts (plugins, notification scripts, and event handlers) are distributed to all Remotely Managed Clusters as part of the [Apply Changes](https://docs.itrsgroup.com/docs/opsview/current/configuration/apply-changes/index.html#distributing-uploaded-monitoring-scripts) process.

## Troubleshooting

When running commands on the collector command line, a basic error report should be displayed on the screen. For security reasons, only minimal information should be shown to the remote user.

The **Configuration > Collector Management** web page will also show the status of registrations and upgrades.

Click the status pill in the **Last Upgrade** column to view additional registration or upgrade information.

![Upgrade status](https://docscdn.itrsgroup.com/opsview/images/config-remote-cluster-upgrade-success.png)

### Audit Log

The **Configuration > Audit Log** web page also records remote collector management configuration activities.

### Log files

If you encounter any issues with Remote Collector Management, please view the system logs in the `/var/log/opsview/opsview.log` file on the Master Monitoring Server.


