URLGenie Scripted Monitor

URLGenie.URLGrabScripted.Monitor (UnitMonitor)

Default: Disabled. (If CertThumbprint exists, automatically enabled via override)

Knowledge Base article:

Summary

Default: Disabled.

This scripted monitor type uses a datasource that is designed to parse multiple values from the criteria parameters

based on this caret delimiter [^] in order to test a sequence of URLs (1 or more) with individual test criteria.

When multiple URLs are submitted (Example: www.abc.com^support.xyz.com^eStore.123.com ):

If only one value is submitted for a particular test criteria parameter (Example: ContentMatch [website,online] ),

then "website" AND "online" will be used as the ContentMatch test keywords for ALL URLs and is considered to be a single criteria value even though it consists of two keywords (comma separated).

If more than one value is submitted for a criteria (but less than the total number of URLs)

(Example: ContentMatch [fishing^bowling] ), this is considered two values which is more than 1 but less than the total number of URLs(3) and will result in a monitor failure and script exit.

This is so you can submit one parameter to act as a global setting for all URLs OR be explicit with each URL by submitting an equal number of values for the number of URLs.

In the example (for 3 URLs) above you would have to submit either one single value like the following: [contact us,login] or [login] or [contact us]

or you would have to submit 3 separate values separated by the caret: [fishing,pole^finance^shirt,pants] or [pickle^plum^bread].

You separate multiple string keywords with a comma. Example: [fishing,pole] will test a page for both "fishing" and "pole" but is considered to be a single parameter for the content match.

Example:

StatusThreshold=200

If number of URLs = 4, number of StatusThreshold values = 1, The StatusThreshold test will use that one value for all 4 URLs.

Example2:

StatusThreshold=200^200^504^403

If number of URLs = 4, number of StatusThreshold values = 4, The StatusThreshold test will use the individual values for each individual corresponding URL.

If number of URLs = 4, number of StatusThreshold values = 2 or 3, This will result in failure and script exit.

If a URL has the CertThumbprint property populated, this monitor will be automatically enabled by an override that is enabled for the ClientCert group.

Element properties:

TargetURLGenie.HttpRequest.Special
Parent MonitorURLGenie.Aggregate.Health.Monitor
CategoryAvailabilityHealth
EnabledFalse
Alert GenerateTrue
Alert SeverityMatchMonitorHealth
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeURLGenie.URLGrabScripted.MT
RemotableTrue
AccessibilityPublic
Alert Message
HTTP Monitor (type: scripted) Failed.
There is a problem with the site. See message below.

Monitor Status: {0}
Response Time: {1}

Monitor Message:

{2}
RunAsDefault

Source Code:

<UnitMonitor ID="URLGenie.URLGrabScripted.Monitor" Accessibility="Public" Enabled="false" Target="URLGenie.HttpRequest.Special" ParentMonitorID="URLGenie.Aggregate.Health.Monitor" Remotable="true" Priority="Normal" TypeID="URLGenie.URLGrabScripted.MT" ConfirmDelivery="true">
<Category>AvailabilityHealth</Category>
<AlertSettings AlertMessage="URLGenie.URLGrabScripted.Monitor.AlertMessage">
<AlertOnState>Warning</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>MatchMonitorHealth</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Data/Context/Property[@Name='Status']$</AlertParameter1>
<AlertParameter2>$Data/Context/Property[@Name='ResponseTimeSeconds']$</AlertParameter2>
<AlertParameter3>$Data/Context/Property[@Name='Message']$</AlertParameter3>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState ID="CriteriaOK" MonitorTypeStateID="CriteriaOK" HealthState="Success"/>
<OperationalState ID="CriteriaError" MonitorTypeStateID="CriteriaError" HealthState="Error"/>
<OperationalState ID="CriteriaWarning" MonitorTypeStateID="CriteriaWarning" HealthState="Warning"/>
</OperationalStates>
<Configuration>
<Body><Script>$Target/Property[Type="URLGenie.HttpRequest.Seed"]/Body$</Script></Body>
<CaseSensitive>false</CaseSensitive>
<CertDir>LocalMachine\My</CertDir>
<CertThumbprint>$Target/Property[Type="URLGenie.HttpRequest.Seed"]/CertThumbprint$</CertThumbprint>
<CheckErrorData>false</CheckErrorData>
<ContentMatch>$Target/Property[Type="URLGenie.HttpRequest.Seed"]/ContentMatch$</ContentMatch>
<ContentMatchRegExOperator>DoesNotContainSubstring</ContentMatchRegExOperator>
<ErrorTime>$Target/Property[Type="URLGenie.HttpRequest.Seed"]/ErrorTime$</ErrorTime>
<HeaderContentType>$Target/Property[Type="URLGenie.HttpRequest.Seed"]/HeaderContentType$</HeaderContentType>
<Header1Name>$Target/Property[Type="URLGenie.HttpRequest.Seed"]/Header1Name$</Header1Name>
<Header1Value>$Target/Property[Type="URLGenie.HttpRequest.Seed"]/Header1Value$</Header1Value>
<Header2Name>$Target/Property[Type="URLGenie.HttpRequest.Seed"]/Header2Name$</Header2Name>
<Header2Value>$Target/Property[Type="URLGenie.HttpRequest.Seed"]/Header2Value$</Header2Value>
<Header3Name>$Target/Property[Type="URLGenie.HttpRequest.Seed"]/Header3Name$</Header3Name>
<Header3Value>$Target/Property[Type="URLGenie.HttpRequest.Seed"]/Header3Value$</Header3Value>
<IntervalSeconds>$Target/Property[Type="URLGenie.HttpRequest.Seed"]/Interval$</IntervalSeconds>
<ProbeActionTimeoutSeconds>$Target/Property[Type="URLGenie.HttpRequest.Seed"]/ResponseTimeout$</ProbeActionTimeoutSeconds>
<ResponseTimeout>$Target/Property[Type="URLGenie.HttpRequest.Seed"]/ResponseTimeout$</ResponseTimeout>
<RetryCount>$Target/Property[Type="URLGenie.HttpRequest.Seed"]/RetryCount$</RetryCount>
<StatusThreshold>$Target/Property[Type="URLGenie.HttpRequest.Seed"]/StatusThreshold$</StatusThreshold>
<TLS_Version>1.2</TLS_Version>
<TrustAllRemoteSSLCertificates>true</TrustAllRemoteSSLCertificates>
<URL>$Target/Property[Type="URLGenie.HttpRequest.Seed"]/URL$</URL>
<UserAgent>$Target/Property[Type="URLGenie.HttpRequest.Seed"]/UserAgent$</UserAgent>
<Verb>$Target/Property[Type="URLGenie.HttpRequest.Seed"]/Verb$</Verb>
<VerbosityCharLimit>1024</VerbosityCharLimit>
<WarningTime>$Target/Property[Type="URLGenie.HttpRequest.Seed"]/WarningTime$</WarningTime>
<WriteToEventLog>false</WriteToEventLog>
</Configuration>
</UnitMonitor>