# Use datadog to gain insight in performance and server load

**URL:** <https://community.novulo.com/t/use-datadog-to-gain-insight-in-performance-and-server-load/550>\
**Category:** Wiki\
**Created:** [November 12, 2024, 6:49am UTC](https://community.novulo.com/t/use-datadog-to-gain-insight-in-performance-and-server-load/550 "2024-11-12T06:49:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Joost](https://yyz2.discourse-cdn.com/flex008/user_avatar/community.novulo.com/joost/32/87_2.png) [@Joost](https://community.novulo.com/u/Joost)\
**Post date:** [November 12, 2024, 6:49am UTC](https://community.novulo.com/t/use-datadog-to-gain-insight-in-performance-and-server-load/550/1 "2024-11-12T06:49:55Z")

</div>

Various software exists to gain insight in server load, database load and application performance. As Novulo’s applications are generated to regular C# code and run with MSSQL Server databases, analytics software that supports this Microsoft stack can be used for Novulo, including [Datadog](https://www.datadoghq.com/).

This post shares best practices for using Datadog for Novulo applications.

# Datadog products and apps

This post describes using the following Datadog products and apps for Novulo applications:

1. Product: [Infrastructure Pro](https://www.datadoghq.com/pricing/?product=infrastructure#products) or Infrastructure Enterprise with apps
  1. System
  2. IIS
  3. NTP
  4. When on Azure: Azure

2. [Database monitoring](https://www.datadoghq.com/pricing/?product=database-monitoring#products)
  1. SQL Server

# Infrastructure list

For the infrastructure in your account, go to Infrastructure \> Hosts

 ![image](https://canada1.discourse-cdn.com/flex008/uploads/novulo/original/2X/9/9b33269e83dcfe8e4748cd5e434a440c5e02cbef.png)

Here you will see the hosts, including the apps that are installed.

 ![image](https://canada1.discourse-cdn.com/flex008/uploads/novulo/original/2X/6/6be77a9710929da90a3f508b848ea1fb9027267f.png)

In this screenshot, you see the host ws101 to be a host serving both IIS and SQLServer.

The other two hosts are a typical example for a split host. One is hosting IIS, the other is hosting SQL-server.

# Analyse end point performance

Datadog IIS log visualization makes it easy to analyze the performance of [REST endpoints that are configured in Novulo](https://community.novulo.com/t/best-practices-and-tips-tricks-for-novulo-rest-end-points/84), as endpoints all have their specific recognizable URL-structure. (Novulo actions in the back-end are all handled through default.aspx; for these requests, Datadog IIS doesn’t offer much specific insights).

To do so, go to Logs:

 ![image](https://canada1.discourse-cdn.com/flex008/uploads/novulo/original/2X/5/52537134345e3508a63b48eef4f7058e9f929153.png)

Here, you’ll see all IIS logs. To gain insight in the performance, we typically add the `@duration` column here:

 ![image](https://canada1.discourse-cdn.com/flex008/uploads/novulo/original/2X/a/a96de8d0c8da1690b7d8dbbf36456209c65cafbf.png)

By searching a specific path, you can see all requests for that specific path-structure. The \* works as a wild-card. For example, the search path belows search for all requests to the cmsurl endpoint, irrespective of the path.

`service:iis @http.url:/*/rest/hcms/cmsurl*`

This will give a list-based overview of all requests to that specific endpoint and the duration. Clicking on the logs will provide your more insight.

 ![image](https://canada1.discourse-cdn.com/flex008/uploads/novulo/original/2X/9/9d6106fb990447e761b3ea3a6d58e4c73df21938.png)

Now, we typically want to show the performance on a dashboard. To do so, we typically first change the visualization to Time series. This will show the number of requests per time frame:

 ![image](https://canada1.discourse-cdn.com/flex008/uploads/novulo/original/2X/7/7d72df22cb5934526e3e009b4bcc8c70b1e92245.png)

Click on save to dashboard:

![image](https://canada1.discourse-cdn.com/flex008/uploads/novulo/original/2X/1/1ef4c0df14711bde75967feed077c9b90fec5dd3.png)

Which will then show this chart on the dashboard:

 ![image](https://canada1.discourse-cdn.com/flex008/uploads/novulo/original/2X/3/3437a4c91d7284c3a69e3ccda2f90d35e972b01c.png)

Now, if you want to change visualization, you can edit your chart. If you want to visualize duration (Average, Max, p75, p95), select Duration here:

 ![image](https://canada1.discourse-cdn.com/flex008/uploads/novulo/original/2X/d/dd221583778e838233cd3de27231257bdae42888.png)

Then, give it a nice name and you have your dashboard:

 ![image](https://canada1.discourse-cdn.com/flex008/uploads/novulo/original/2X/6/6d9e21fea0adf3f725a56dda00c30c4c9b631cb4.png)

# Using Database monitoring

Using the database app gives you insight in individual queries and their load. To go here, navigate to APM \> Database monitoring:

 ![image](https://canada1.discourse-cdn.com/flex008/uploads/novulo/original/2X/0/02a45aaf0341bd8c36770092dd9866168bf5d6bd.png)

Here, you see the databases that are being monitored. ln this example, the first one is SQL server installed on Windows, the second is AzureSQL:

 ![image](https://canada1.discourse-cdn.com/flex008/uploads/novulo/original/2X/7/73e27e555e939bc2cf82dc597cb1474b82ae8b78.png)

Clicking on the host will show you the consolidated queries that are being executed and their load on the server. This should act as a starting point for analysis and optimization.

 ![image](https://canada1.discourse-cdn.com/flex008/uploads/novulo/original/2X/4/4d315fe13c6e77f9d3d40f1f8b3819c5ff6bbbc6.png)

## Database query patterns to watch out for

There are several patterns to watch out for:

**Queries for records in a lock**

When you see this pattern, it means there are queries executed during record locks, which can’t be optimized. See [Novulo Record Locks, the Lock Warning Triangle and the impact on database queries](https://community.novulo.com/t/novulo-record-locks-the-lock-warning-triangle-and-the-impact-on-database-queries/558#p-1384-when-will-it-become-a-performance-issue-2) for more information and solutions.

```auto
CASE q0t1.id
WHEN ?
	THEN ?
ELSE q0t1.field_name
END =

```
