< All Topics
Print

Monitoring and Maintenance Tasks Usage and Governance CAT

Monitoring by Modality (via PA Monitor) – Not using this script

Modlaity can perform monitoring for customers by installing a monitoring agent on the Teamwork Analytics virtual machine.

Modality will proactively monitor the Teamwork Analytics Service and let you know if any issues are encountered. This is our recommended approach to monitoring.

Please reach out to software.support@nasstar.com to request this.

Custom Monitoring with a PowerShell Script (below)

If you do not want Modality to monitor your install, and require an ability to monitor with your own solutionData , you can base it on the following Powershell Script.

We would suggest you run the PowerShell script once daily, per scan (so you will need 4 instances of the script to cover all 4 scans). The scan it runs for can be configured by changing the “$ScanId” variable on the first line of the script. The scan IDs are as follows;

  • 0 – Main Graph Scan
  • 1 – Reports
  • 2 – Team Messages
  • 3 – Files

The script will alert if the a scan has not completed in the expected window (based on historical results so it may take a few scans to become accurate).

BEFORE RUNNING THE SCRIPT, and Administrator on the machine should create the event log source with this command in PowerShell

New-EventLog -LogName Application -Source “TWA Monitoring”

By default this script will output 55200 information event in the Windows Application event log for successful scans and 55404 Warning for an issue that support should look into.

# Set this to the correct scan ID for this instance of the script
$ScanId = 0

# SQL login details are collected from the Config File (note if you have installed in a non standard directory, edit this path)
$XMLfile = "C:\Program Files\Modality\GraphETL\Modality.Graph.Etl.SingleTenant.Service.exe.config"
[XML]$configXml = Get-Content $XMLfile

$connectionString = $configXml.configuration.connectionStrings.add.connectionString


$conn = New-Object System.Data.SQLClient.SQLConnection($connectionString)
$conn.Open()

$command = New-Object System.Data.SQLClient.SQLCommand
$command.Connection = $conn

$command.CommandText = "exec monitoring.SpGetScanStatus @ScanId, @ToleranceHours"
$command.Parameters.Add($(New-Object System.Data.SqlClient.SqlParameter("@ScanId ",$ScanId)))
$command.Parameters.Add($(New-Object System.Data.SqlClient.SqlParameter("@ToleranceHours ",24)))

$reader = $command.ExecuteReader()

$reader.Read()

$status = $reader["Status"] -as [int]
$statusMessage = $reader["StatusMessage"]

# If status is less than 0, thats bad, if the status is 0 or above, good

if($status -lt 0) 
{
    # Perform Custom Alerting Warning here via $statusMessage variable - e.g. send an email or write a windows event log event
    
    Write-EventLog -LogName Application -Source "TWA Monitoring" -EventID 55404 -Message "Scan $ScanId $statusMessage -  Scan has not completed, please check your system and if needed contact Modality support software.support@nasstar.com" -EntryType Warning

    write-host "Status Less than 0 Event Triggered"

}

if($status -ge 0) 
{
    # Perform Custom Alerting Warning here via $statusMessage variable - e.g. send an email or write a windows event log event
    
    Write-EventLog -LogName Application -Source "TWA Monitoring" -EventID 55200 -Message "Scan $ScanId $statusMessage - Scan completed successfully" -EntryType Information

    write-host "Status Greater than or equal to 0 Event Triggered"

}

This script assumes a standard deployment. If you have changged install directories or SQL configuration the script will need to be adapted

Teamwork Analytics Monitoring and Alerting

This page explains what customers should monitor and alert on when running Teamwork Analytics in the CAT (Customer Azure Tenant) model

To get a full understanding of the Architecture see documentation here.

Monitoring and Alerting on the Windows Virtual Machine that runs the Graph Collector

Please collect and report on the following metrics/events over time. If Windows performance appears to be constrained (persistently high CPU, IO or other metrics) please contact Modality Systems for sizing advice.

Windows virtual machine/Operating System Monitoring

Online / offline / reboot – alert on any unexpected/un planned reboot or VM offline

CPU Usage – alert when CPU usage persists over 80% for more than 1 hour

RAM Usage – alert when CPU usage persists over 80% for more than 1 hour

Disk IO

Disk size / % free – alert when less than 10% free disk space

Network IO

Event logs – for generic issues – ensure all events are keep for up to 30 days for historical troubleshooting

Teamwork Analytics Windows Service

TWA Collector Service running – alert if not running

TWA collector event log events – ensure all events are keep for up to 30 days for historical troubleshooting

Monitoring and Alerting of SQL

Monitor overall SQL performance. If SQL appears to be constrained (persistently high CPU, IO or other metrics) please contact Modality Systems for sizing advice.

Alert if SQL is offline

Azure Windows Virtual Machine

  • Ensure VM is running 24×7
  • VM Resources – We recommend no resource reduction to be made on VM from initial deployment. If reduction is made, please review PowerBI Apps/Reports to ensure data is still process as expected.
  • Network and/or Security Group changes – If any changes are made, please review PowerBI Apps/Reports to ensure data is still process as expected.
  • VM Backup – There is no need to backup this machine

Azure SQL

  • Backup the database to your usual schedule. At least weekly is recommended.

Windows OS

  • Modality Service – This service should always be running. If not running attempt Restart. If unable to start, please raise with Modality. Please provide local logs (Location – C:\Program Files\Modality\Graph.ETL\Logs)
  • Disk Space Monitor – Please ensure minimum 10% disk space is available.
  • Bot Scheduled Tasks – Scheduled tasks are deployed to manage Bot notifications. If disabled, Bot functionality will stop. Please review with Service Owner before enabling or disabling tasks

Power BI

  • App refresh failures to be reviewed
  • On 1st failure, manually refresh dataset
  • On 2nd failure, Issue to be raised with Modality – Refresh history and error to be provided to Modality

PowerBI App Update

  • Follow guidance located here
  • Note: Configuration information will be needed during upgrade process
Table of Contents