How to: Integrate Quota Server with the Reporting Interface

Summary

The purpose of this article is to describe the process of connecting quota policies with Northern's data management interface. A successful integration makes it possible for quota notifications to invite users to view and manage the content of a quota within a self-service, web-based interface.

The users will receive an instant insight in how much they're storing, how fast the allocated space is being exhausted, what the largest files are, the oldest files are, etc. This is an excellent way of spreading awareness and enabling users to efficiently manage their use of the space allocated to a specific file share.

Intended results & Pre-requisites

  1. The first integration is to synchronize Quota Server with the reporting interface so that the quota usage levels and events are displayed there as well.

    This requires that Windows Powershell 4.0 or later and the NSS Toolkit is installed on the server running the reporting interface (NSS Console). Read more on how to deploy the NSS Toolkit in KB-3150.  

  2. The second integration is to modify the Quota Server e-mail notification templates so that they include a link to the reporting interface, making it possible for the affected users to oversee the content of quota paths.


IMPORTANT:

A consistency in the path(s) configured in Quota Server and the Data Scan is mandatory for this integration to work as intended. The target path needs to be constructed in exactly the same way in both Quota Server and in the Data Scan configuration. In other words, a string match is required.

The screenshots below show an example of the said consistency where both features are configured to operate on the same path \\NSS-SRV2-LAB\HomeShares.

  • Auto Dir / Parent Quota (automatically creates a quota for all subdirectories):

    Quota Path 
  • A Data Scan on each individual subdirectory through the '1 level down'-configuration:

    Data Scan Configuration 


Ensure that both features have the paths configured in the same way before continuing with the integration configuration. Be wary of any differences such as share level vs. volume level (c$ vs C:\), UNC-paths vs. DFS-paths etc. Once you have confirmed that there is a consistency in how the paths are configured, proceed to the Step-by-step section below.

Step-by-step

This section explains in detail how to successfully integrate Quota Server with the reporting interface. A step-by-step procedure for each integration type can be found below.

Displaying Quota Information in the Reporting Interface (available from version 9.8)

Starting with version 9.8, NSS comes with a new service named the NSS Quota Update Service. This service is responsible for the synchronization of quota information in the reporting interface. The quota values displayed in the reporting interface are synchronized and updated every 5 minutes by default. Changes in locking states are immediately displayed.

In order to make the NSS Quota Update Service fully operational, certain parameters must be set using specifc commands within the NSS Toolkit. Follow the instructions below to successfully synchronize Quota Server with the reporting interface:

  1. Make sure that the NSS Toolkit has been successfully copied to the server and that the files aren't blocked by Windows. See KB-3150 for more information on how to deploy the toolkit.

  2. Open Windows Powershell ISE 4.0 as an Administrator, navigate to the NSS Toolkit directory and run the following commands:
    • Set-ExecutionPolicy -ExecutionPolicy Bypass (allows the necessary commands to run)
    • Import-Module 'C:\NSS-Utilities\NSSToolkit\NSSToolkit.psm1' (loads the NSS Toolkit module in Powershell)

  3. The Quota Server synchronization will now be configured using the Set-QSSyncConfiguration CmdLet from the Toolkit.

    Below is an example of how to make a standard configuration of Quota Server replication. For more advanced features, like changing the synchronization interval, configured ports and the protocol used, use the Get-Help Set-QSSyncConfiguration from PowerShell.


    This example string configures a test machine where the NSS Console, Quota Server and SQL database are all configured on the same machine (NSS-SRV2-LAB). Clarifications of each function can be found in the table below.

    • Set-QSSyncConfiguration -qsUpdateServer NSS-SRV2-LAB.northern-lab.net -redisServer NSS-SRV2-LAB.northern-lab.net -synchronizedQuotaServers NSS-SRV2-LAB.northern-lab.net -sqlServer NSS-SRV2-LAB\LAB -sqlDatabase NSS

    FUNCTION


    DESCRIPTION
    -qsUpdateServer

    The machine that is running NSS Quota Update Service. This is the machine where you have NSS Console installed. Use FQDN format. In the example string above, the parameter is set to NSS-SRV2-LAB.northern-lab.net

     

    -redisServer

    The machine that is running Redis database. By default this is the machine where you have NSS Console installed. Use FQDN format. This is also set to to NSS-SRV2-LAB.northern-lab.net in the example string.

     

    -synchronizedQuotaServers

    One or more servers (separated by a comma) that are running Quota Server and should be configured to store quota information to the database.

    In the example string above, the target Quota Server resides on the same server as the NSS Quota Update Service and the NSS Console; NSS-SRV2-LAB.northern-lab.net

     

    -sqlServer

    The ame of the server where the database resides. Do NOT use FQDN format. No special considerations need to be done for database instances. A database instance is used in the example string; NSS-SRV2-LAB\LAB

     

    -sqlDatabase

    Name of the database that will be used by Quota Server to replicate quotas to. In the example string, this is set to store everything into a database named NSS.

     

    -nssConsoleUrl

    Url to the NSS Console. By default it is set to http://qsUpdateServer/NSSConsole when synchronization configuration is saved.

    If you have not changed the default name of NSS Console or the IIS port, you do not need to provide this parameter.

    This parameter is stored as 'NSSConsoleLink' in the Windows Registry at

    HKEY_LOCAL_MACHINE\Software\Northern\Quota Server\Server.

     

    The parameter is used by Quota Server for the 'NSSCONSOLEPATH'-variable in the e-mail notification templates (for version 9.8 or later).


    Copy the example string above and change the parameter values so that they match the server and database names in your environment. Press Enter to run the command and to start the synchronization job.

  4. Go to the System\History-tab in Quota Server and verify that the settings put into the Powershell command are reflected in QS. It should look similar to this:

    QS Update Status

    It may take some minutes for the quota statuses to be initially synchronized. You can review the progress in the nssqsdbupd_trace.txt log stored at C:\Program Files\Northern\Tracefiles.

    A completed synchronization job will look similar to this:

    2017-04-04 10:45:22.2163|INFO|NSSQSDBUPD.EventLogMessages|NSSQSDBUPD.EventLogMessages.CompletedResend||Quota Server NSS-SRV2-LAB has completed sending 54 Quotas.|

  5. Visit the reporting interface and navigate to a path under a quota policy to verify that the synchronization was successful. It should look similar to the screenshot below. The quota size should be present both numerically and in the graph as a line.

    Events that occurred prior to the synchronization job will not be shown. It starts logging data from the moment where the synchronization is activated. E-mail notification events that have occurred after the synchronization started will be shown in the graph as clickable flags.

    The flags contain more information about the event in question, such as the date and time when it occurred, the e-mail address it was sent to and the reason for the notification. In the screenshot below the flag shows that the third threshold was exceeded. This is normally the 100%-mark, meaning that the user exceeded the quota size.


    Quota Usage Levels


Quota Server E-Mail Notification Integration

Before changing the Quota Server e-mail templates to direct the end-users to the reporting interface, make sure that each user has an Access Rule with a suitable Security Role defined. The reporting interface is secure and the level of access within it is determined by Access Rules and Security Roles. For more information about these two components, see KB-3120 & KB-3143.

For more information on creating and managing Quota Server e-mail notification templates, see KB-2920. Information on how to incorporate Quota Server variables in the notifications can be found in KB-2807.

For versions before 9.8:

Versions before 9.8 require that the link to the reporting interface is composed by combining a static hyperlink with a Quota Server variable. See the steps below:

  1. Open up Quota Server and click on the 'Notification Templates' button in the left-hand menu.

  2. Modify the existing templates or create completely new template groups dedicated to this implementation.

  3. Create the link to the reporting interface by combining a static link to the reporting interface on a 'path level' (http://nss-srv2-lab/NSSConsole/?Path=) along with a Quota Server variable ([DATA:'OBJECT']). The Quota Server variable retrieves the information from the 'Object'-field, which is the path for the quota in question:


    Data Object


    How it should look in the template:
    http://nss-srv2-lab/NSSConsole/?Path=[DATA:'OBJECT']  

    How it looks in action when reading the e-mail:
    http://nss-srv2-lab/NSSConsole/?Path=\\NSS-SRV2-LAB\HomeShares\Lisa.Karr

  4. When you're done configuring the template, save the changes.

  5. Test the new configuration by triggering an e-mail notification for a locked quota. This can be done by right-clicking on a locked quota (where you have access to the target mailbox for the notification) and selecting 'Refresh'. Verify that the new link works as intended. Make alterations if neccessary.

For version 9.8 or later:

Starting with version 9.8, Quota Server is now shipped with default NSS Console e-mail notification templates that include a link to the reporting interface, introducing the ability to use a complete variable ([DATA:'OBJECT',NSSCONSOLEPATH]) to automatically generate the link for each individual user. 

The NSSConsoleLink-parameter at HKEY_LOCAL_MACHINE\Software\Northern\Quota Server\Server must be correctly set before this variable can be used successfully.

  1. Navigate to HKEY_LOCAL_MACHINE\Software\Northern\Quota Server\Server and verify that NSSConsoleLink-parameter has the correct link to the reporting interface. This parameter can either be set manually or through the Set-QSSyncConfiguration cmdlet as explained in the previous section.

  2. Open up Quota Server and click on the 'Notification Templates'-button in the left-sided menu and review and/or Modify the existing 'StandardConsole'-template and make sure that the content in it suits your needs. This is what it looks like by default. Note how the [DATA:'OBJECT',NSSCONSOLEPATH]-variable is used: 
     

    Dear User,

    As you know, our organization is working to reduce waste in all areas - including use of our file service!

    You have now reached the upper limit of space we believe necessary for the folder [DATA:'OBJECT']. You are using [Data:'UsagePercent']% of the [Data:'QuotaSize', StyleAutoBytes] set aside.

    Please take a few minutes to review the content of this folder in our Data Analysis Portal: [DATA:'OBJECT',NSSCONSOLEPATH].
    (Use your Windows account to login.)

    Look for redundant, obsolete and trivial files that you could remove - some minutes spent cleaning up would be a great help in this drive for efficiency.

    Thank you,

    \IT Operations


  3. When you're done configuring the template, save the changes.

  4. Modify one quota and change the Notification group to 'StandardConsole'-group. Test the new configuration by triggering an e-mail notification for the changed quota. This can be done by right-clicking on a locked quota (where you have access to the target mailbox for the notification) and selecting 'Refresh'. Verify that the new link works as intended. Make alterations if necessary.

  5. Change the rest of the quotas to use the 'StandardConsole' template group. Select a large fraction of quotas through Shift + Right Click and then select 'Modify'. This will enable the options pane at the bottom of the screen.

    Click on the 'Settings'-tab and notice the 'Notify Template Group'-drop down menu to the right. Change it to 'StandardConsole' and apply the changes by pressing Enter. Repeat this process for all quotas that should use the new template (be sure to include any AutoDir quotas so new quotas will use the correct template group).

More Information

This configuration is advanced and you may require additional information or direct assistance. Please contact the Technical Support team at Northern (support@northern.net) if you find yourself in this position. We look forward to assisting you.

ADDITIONAL RESOURCES

  • KB3150 How to: Use the NSS PowerShell Toolkit
  • KB2920 How to: Create New Notification Template and Group
  • KB2919 How to: Modify Quota Server Notification Template
  • KB2807 How to: Using Variables in Quota Notification Templates
  • KB3120 How to: Configure Access Rules
  • KB3143 How to: Create & Manage Security Roles
  • KB3139 How to: Create Dashboards & Widgets
  • KB3176 What is/are: New in NSS 9.8 (Release Notes)
  • KB Article: 3275

    Updated: 4/5/2017

    • Category
      • Usage
    • Affected versions
      • NSS 9.8

    North America HQ

    NORTHERN Parklife, Inc.
    301Edgewater Place, Suite 100
    Wakefield, MA 01880
    USA

    Voice: 781.968.5424
    Fax: 781.968.5301

    salesUS@northern.net

     

    Additional Contact Information

    EMEA & APAC HQ

    NORTHERN Parklife AB
    St. Göransgatan 66
    112 33 Stockholm
    Sweden

    Voice: +46 8 457 50 00

    salesHQ@northern.net

    Northern Parklife



    ©2018 northern parklife

    privacy statement 
    terms of use