What can cause computers on a reporting server to be set to a non-Active status, such as Retired, during the Inventory Forwarding process?

book

Article ID: 181608

calendar_today

Updated On:

Products

Management Platform (Formerly known as Notification Server)

Issue/Introduction

 

Resolution

Question
What can cause computers on a reporting server to be set to a non-Active status, such as Retired, during the Inventory Forwarding process?

Answer

When you create an inventory forwarding rule, a scheduled task is created on the source notification server which forwards resource data classes to the destination (reporting) server. In addition, a replication task - NS.Replication.Resources <ServerName> - is created on the destination server which pulls resource association data from the source server.

Both of these tasks are collection based. Normally, collections do not contain resources that have a status other than active. However, between collection update intervals, collection membership can become outdated. For example, if you retire a resource, the status will change in the database, but its collection membership stays the same until the next time the 'NS.Always Refresh Collection Update Schedule' runs.

Some customers want all non-Active statuses to replicate to their reporting server, and some do not. This article will show how to ensure consistency with either approach.

To illustrate, in the sequence below non-Active statuses on the source server will overwrite statuses on the destination server for resources that had been forwarded:

  • A forwarded computer gets retired on the source server (or set to some other non-Active status)
  • Before the collection update task runs, the replication schedule runs on the destination server

Because of timing issues, it is possible that some resources' non-Active statuses may be replicated, and not others. (If a computer is set back to Active on the source server, this status will always overwrite the status on the destination server.*)

  • To ensure that computers' Retired statuses - along with all other association data - are replicated, follow the steps in the example below. The resource type and child status GUIDs in the SQL can be replaced with other resource type GUIDs and/or status GUIDs to accommodate other scenarios:
    1. Create a custom collection with the following SQL (this collection will indicate that it has no members in the console interface, this is normal):

      SELECT GUID
      FROM ItemResource ir JOIN ResourceAssociation ra
       ON ir.Guid = ra.ParentResourceGuid
      WHERE ResourceTypeGuid = '493435F7-3B17-4C4C-B07F-C23E7AB7781F'
       AND ra.ChildResourceGuid = '492C463B-AFA2-4DD6-AE73-6FD2C7B0E489'

      Where the ChildResourceGuid is the GUID for the status type, which can be found in Configuration > Resources > Other Resources > Fixed Asset Status Types. Edit any of the status types here to see its GUID in the URL. Copy this and replace the ChildResourceGuid from the above query.

      Note: If the status is anything but Active, the collection will display "This collection has no members." This is working as designed; the collection is correctly populated, as its Test button will indicate.
    2. Click the Update Membership icon on the toolbar of the new collection
    3. Create a new Inventory Forwarding Rule, assign the new collection to this rule, select a single inventory data class, such as AeX AC Identification, and set the schedule
    4. Run the replication scheduled task associated with this new forwarding rule on the destination server
  • To prevent non-Active statuses, and other association data from being replicated, ensure that the 'NS.Always Refresh Collection Update Schedule' is able to complete its run on your source server before your replication tasks are scheduled to run on your destination server.


*NOTE: The 'Active' status has two behaviors related to this topic. If no status has been specifically set for a resource on the source NS, it is listed as 'Active' throughout its NS and no status association will be present in the ResourceAssociation table. In this case, any status set on the destination server once the resource has been forwarded will always take precedence.

In order for 'Active' to override another status on the destination server, you must actually set the resource's status to 'Active'. For example, right-click the computer, go to Set Asset Status and pick 'Active'. The resource will appear the same as before throughout the NS, but will now have a status association record in the ResourceAssociation table.