Table of Contents

Manual Pull in EMS

Anna Dowling 2018/05/03 04:43

Introduction

As part of IDMS-2390 a feature was requested by ATC to allow certain users to start the file sync retrieval and processing on demand from inside the EMS application. This follows a similar look and feel to our other sync processes but is only available on the EMS overview panel to users with visibility assigned to their accounts. If the user has the correct permissions they will see a new Sync menu display with the option Remote Database Sync.

Permissions

The permissions needed in order to use this sync functionality are assigned through the Global Admin Tool from the EMS Permissions options. The name of the permission needed is “Perform Remote Database Sync”

Processing

The task which is run when this process is kicked off is called RemoteFileRequestTask. When the perform sync button is clicked and the process started this task is directly from the class RemoteFileSyncActionHandler as opposed to being called via a schedule.

The task performs the following functions:

  1. Performs an sftp GET on the RemoteFileHost to retrieve the RemoteFile.
  2. Runs any associated RemoteFileDiscoveryConfiguration scripts associated with the RemoteFile.
  3. In this case the script which is run parses the csv file retrieved and updates any “Asset” data (element data) that has changed in Polaris in order to propagate that change into the SnmpManager database.
  4. The task will run in the background if the broswer window is closed as the task can take 15 to 30 minutes to complete depending on the volume of updates parsed in the file. This is indicated to the user as show below:

  1. Once the process is finished an entry is created in the GeneralDiscoverySyncHistory which will display in the Sync history table associated with the task run as demonstrated below. If a failure occurs during the file retrieval this will display to the user in this table:

Concurrency

The syncs cannot run concurrently, so if a second user tries to perform a sync while the first one is still in progress they will be notified that this action is not possible: