6. System monitor Installation


The Data Service Agent is a windows service that run on the web server, alongside the forecast listening service. The agent queries the AGR databases and system URL for the customer’s AGR system health and configuration data and posts it via HTTPS to an API hosted at AGR Dynamics.

Prerequisites

The web server, where the System Monitor Data Service Agent is installed, needs .Net Framework v4.6.1 to be able to install. If you can run the installer without problems, you don’t need to worry about this. If the installer reports that the server is missing the .NET Framework v4.6.1, please ask the customer’s IT person to install it.


Installation

Step 1

Download the AGRSystemMonitorServiceInstaller and run it on the customer’s web service machine

Step 2

Keep the default path and install the AGR System Monitor for “Just me”.

create

Step 3

In the Account Key input field, type the customer’s account key which can be found on Jira Tempo under Accounts.

create

Step 4

Under Connection information, fill out the following input fields:

  • SQL Server: the hostname or IP address of the SQL server machine.
  • AGR Production Database: The name of the AGR production database
  • AGR Staging Database: The name of the AGR staging database
  • URL to AGR system: A valid URL to the AGR system.

The URL must state the transfer protocol, i.e. start with http:// or https://. It varies between customers whether they use http:// or https:// so please make sure you test which one works.

Examples:

  • http://localhost:8080
  • https://192.168.101.15:8182

create

Step 5

During installation, the Set Service Login dialog box pops up. Input the username including domain that should run the service. This should be a user that has the appropriate rights on the web server to run a service and reading rights on the AGR production and staging databases.

Most of the time, the user that is already used for running the AGR forecast service can be used here.

create

Once the installation is finished, you should now see that AGR System Monitor service is running.

create

If the service doesn’t move to status = running and once you try and start it manually you get the error: The “service name” service on Local Computer started and then stopped. Some services stop automatically if they are not in use by other service or programs. This means that the service user(Log On As) doesn’t have the required rights to read from the config file. To fix this simply edit the rights for the folder C:\Program Files (x86)\AGR Dynamics. Give full control to the service user on this folder.


Configuration

The AGR System Monitor Data Service Agent can be configured in the AGRSysMonService.exe file in the AGR System Monitor folder.

This section is optional if the input to the installer was correct. The service will receive default settings.

create


Application settings

In the appSettings section, the configuration elements are the following:

  • accountKey: The customer’s account key. Should be the value that was input during installation.
  • runInterval: How frequently the Data Service Agent sends data over to the AGR System Monitor. Takes effect when the service is restarted.
  • firstRunTime: The time of the first run after the service is started. Default value is “now” which runs on the next whole minute. This can also be set to a specific time of day, e.g. “08:30”
  • daysBackForLogData: The Data Service Agent sends log data from AGR log tables. This determines the number of days to send each time.
  • initialLoadDaysBackForLogData: The number of days of log data to send in an initial load of the AGR System Monitor for the customer.
  • initialLoad: Determines whether the next batch of data should be an initial load or not. Upon installation, this has the value 1 and is automatically set to 0 after the initial load. If there is ever a reason to run the initial load again, this property can be set to 1 and the Dataservice agent will do an initial load next time and change the value back to 0 automatically.

create


Connection strings

In the connectionStrings section, the connection strings are:

  • AGRProdDatabase: The AGR production database. Automatically constructed from installer input field.
  • AGRStgDatabase: The AGR staging database. Automatically constructed from installer input field.
  • SystemURL: The AGR system URL. Automatically constructed from installer input field.
  • SysMonAPI: The AGR System Monitor Data Service API URL, hosted on a machine at AGR Dynamics. The Data Service Agent posts data to this API via HTTPS, which receives it and writes it into the AGR System Monitor database.

create

Data sent from customer

We fetch data from the following tables on the AGR databases:

agr5_prod:

  • Dbo.settings → Various settings in the AGR system, i.e. whether demand in stockout is seen as lost sale and similar cases.

  • Dbo.log_system_status and dbo.log_system_status_config → The tables that the status lights on the home page use to check and notify when the data transfer failed.
    Divides the nightly run into Data Transfer, Orders and Reports. Stores data from 30 days back.

  • Dbo.log_system_status_forecast → An additional table that the status lights use to check and notify if the forecasts failed.

  • We fetch information about the number of open item numbers, number of warehouses and number of suppliers from dbo.items and dbo.locations.

agr5_stg:

  • Log.transfer_log_steps → Logs all steps in the nightly run. It includes time of each step and the error message if appropriate and similar things regarding each step.

  • Ctr.data_transfer_settings → Keeps the name and version of the ERP, i.e. Navision 2015 and the name of the server that the ERP is stored on.

Other things:

  • AGR version, build number and build suffix.

  • The version of the Windows Server and the SQL Server on the AGR server.

  • Available space on each drive on the AGR server. Lack of space is often the cause of errors in the system.

  • The storage capacity of each drive on the AGR server.

  • For this to work, the Ole Automation Procedures need to be enabled. If not, this information is skipped and consultants only see how much space is left on the disk.