Skip to content

SPWebAppHttpThrottlingMonitor

dscbot edited this page Mar 17, 2023 · 4 revisions

SPWebAppHttpThrottlingMonitor

Parameters

Parameter Attribute DataType Description Allowed Values
WebAppUrl Key String The URL of the web app to set the throttling monitor for
Category Required String Specifies the name of the performance counter category
Counter Required String Specifies the name of the performance counter
HealthScoreBuckets Write UInt32Array[] Specifies bucket ranges to use in determining the calculation of the server Health Score for this counter
CounterInstance Write String Specifies the instance of the performance counter
IsDescending Write Boolean Specifies that this counter is interpreted in descending order
Ensure Write String Present if the throttling monitor should exist, absent if it should not Present, Absent

Description

Type: Distributed Requires CredSSP: No

This resource is responsible for managing the web application request throttling settings. The desired web application is specified through the URL property, and then any combination of settings can be applied. Any settings not included will be left as the default (or whatever they have been manually changed to within SharePoint).

More information about the Request Throttling functionality can be found here: https://docs.microsoft.com/en-us/previous-versions/office/developer/sharepoint-2010/ff407390(v=office.14)

Examples

Example 1

This example shows how to configure the Memory counter to the Throttling Settings of the specified web app

Configuration Example
{
    param
    (
        [Parameter(Mandatory = $true)]
        [PSCredential]
        $SetupAccount
    )

    Import-DscResource -ModuleName SharePointDsc

    node localhost
    {
        SPWebAppHttpThrottlingMonitor PrimaryWebAppHTTPThrottlingSettings
        {
            WebAppUrl            = 'http://example.contoso.local'
            Category             = 'Memory'
            Counter              = 'Available Mbytes'
            HealthScoreBuckets   = @(1000, 500, 400, 300, 200, 100, 80, 60, 40, 20)
            IsDescending         = $true
            Ensure               = 'Present'
            PsDscRunAsCredential = $SetupAccount
        }
    }
}

Example 2

This example shows how to configure the Processor counter to the Throttling Settings of the specified web app

Configuration Example
{
    param
    (
        [Parameter(Mandatory = $true)]
        [PSCredential]
        $SetupAccount
    )

    Import-DscResource -ModuleName SharePointDsc

    node localhost
    {
        SPWebAppHttpThrottlingMonitor PrimaryWebAppHTTPThrottlingSettings
        {
            WebAppUrl            = 'http://example.contoso.local'
            Category             = 'Processor'
            Counter              = '% Processor Time'
            CounterInstance      = '_Total'
            HealthScoreBuckets   = @(10, 20, 30, 40, 50, 60, 70, 80, 90, 100)
            Ensure               = 'Present'
            PsDscRunAsCredential = $SetupAccount
        }
    }
}
Clone this wiki locally