Reference documentation and code samples for the Stackdriver Monitoring V3 Client class ContentMatcher.
Optional. Used to perform content matching. This allows matching based on
substrings and regular expressions, together with their negations. Only the
first 4 MB of an HTTP or HTTPS check's response (and the first
1 MB of a TCP check's response) are examined for purposes of content
matching.
Generated from protobuf message google.monitoring.v3.UptimeCheckConfig.ContentMatcher
Namespace
Google \ Cloud \ Monitoring \ V3 \ UptimeCheckConfig
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ content
string
String, regex or JSON content to match. Maximum 1024 bytes. An empty content string indicates no content matching is to be performed.
↳ matcher
int
The type of content matcher that will be applied to the server output, compared to the content string when the check is run.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Stackdriver Monitoring V3 Client - Class ContentMatcher (2.1.2)\n\nVersion latestkeyboard_arrow_down\n\n- [2.1.2 (latest)](/php/docs/reference/cloud-monitoring/latest/V3.UptimeCheckConfig.ContentMatcher)\n- [2.1.1](/php/docs/reference/cloud-monitoring/2.1.1/V3.UptimeCheckConfig.ContentMatcher)\n- [2.0.1](/php/docs/reference/cloud-monitoring/2.0.1/V3.UptimeCheckConfig.ContentMatcher)\n- [1.12.1](/php/docs/reference/cloud-monitoring/1.12.1/V3.UptimeCheckConfig.ContentMatcher)\n- [1.11.1](/php/docs/reference/cloud-monitoring/1.11.1/V3.UptimeCheckConfig.ContentMatcher)\n- [1.10.3](/php/docs/reference/cloud-monitoring/1.10.3/V3.UptimeCheckConfig.ContentMatcher)\n- [1.9.0](/php/docs/reference/cloud-monitoring/1.9.0/V3.UptimeCheckConfig.ContentMatcher)\n- [1.8.0](/php/docs/reference/cloud-monitoring/1.8.0/V3.UptimeCheckConfig.ContentMatcher)\n- [1.7.1](/php/docs/reference/cloud-monitoring/1.7.1/V3.UptimeCheckConfig.ContentMatcher)\n- [1.6.0](/php/docs/reference/cloud-monitoring/1.6.0/V3.UptimeCheckConfig.ContentMatcher)\n- [1.5.1](/php/docs/reference/cloud-monitoring/1.5.1/V3.UptimeCheckConfig.ContentMatcher)\n- [1.4.0](/php/docs/reference/cloud-monitoring/1.4.0/V3.UptimeCheckConfig.ContentMatcher)\n- [1.3.2](/php/docs/reference/cloud-monitoring/1.3.2/V3.UptimeCheckConfig.ContentMatcher)\n- [1.2.2](/php/docs/reference/cloud-monitoring/1.2.2/V3.UptimeCheckConfig.ContentMatcher) \nReference documentation and code samples for the Stackdriver Monitoring V3 Client class ContentMatcher.\n\nOptional. Used to perform content matching. This allows matching based on\nsubstrings and regular expressions, together with their negations. Only the\nfirst 4 MB of an HTTP or HTTPS check's response (and the first\n1 MB of a TCP check's response) are examined for purposes of content\nmatching.\n\nGenerated from protobuf message `google.monitoring.v3.UptimeCheckConfig.ContentMatcher`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Monitoring \\\\ V3 \\\\ UptimeCheckConfig\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getContent\n\nString, regex or JSON content to match. Maximum 1024 bytes. An empty\n`content` string indicates no content matching is to be performed.\n\n### setContent\n\nString, regex or JSON content to match. Maximum 1024 bytes. An empty\n`content` string indicates no content matching is to be performed.\n\n### getMatcher\n\nThe type of content matcher that will be applied to the server output,\ncompared to the `content` string when the check is run.\n\n### setMatcher\n\nThe type of content matcher that will be applied to the server output,\ncompared to the `content` string when the check is run.\n\n### getJsonPathMatcher\n\nMatcher information for `MATCHES_JSON_PATH` and `NOT_MATCHES_JSON_PATH`\n\n### hasJsonPathMatcher\n\n### setJsonPathMatcher\n\nMatcher information for `MATCHES_JSON_PATH` and `NOT_MATCHES_JSON_PATH`\n\n### getAdditionalMatcherInfo"]]