<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Set success conditions for HTTP Monitor in Synthetic Monitoring</title>
    <link>https://community.dynatrace.com/t5/Synthetic-Monitoring/Set-success-conditions-for-HTTP-Monitor/m-p/193933#M1497</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;here is an http synthetic (not browser) I made.&lt;/P&gt;&lt;P&gt;I got two web sites (say A and B). My use case :&lt;/P&gt;&lt;P&gt;- I would like to get at least one 200, if A is 200, global status ok, skip B&lt;/P&gt;&lt;P&gt;- If A is anything than 200, I try B&lt;/P&gt;&lt;P&gt;- If B is anything than 200, global status KO.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It looks quite similar as your need.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{
	"version": "1.0",
	"requests": [
		{
			"description": "https://www.mywebsite.fr/",
			"url": "https://www.mywebsite.fr/",
			"method": "GET",
			"configuration": {
				"acceptAnyCertificate": false,
				"followRedirects": false
			},
			"postProcessingScript": "if (response.getStatusCode() == 200 ) { api.skipNextSyntheticRequest(); } else if ( response.getStatusCode() == 302 ) { api.setValue(\"redirected\",\"1\"); }",
			"requestTimeout": 60
		},
		{
			"description": "https://www.mywebsite.de/",
			"url": "https://www.mywebsite.de/",
			"method": "GET",
			"configuration": {
				"acceptAnyCertificate": true,
				"followRedirects": false
			},
			"postProcessingScript": "if (response.getStatusCode() == 200 ) { api.finish(); } else if ( response.getStatusCode() == 302 &amp;amp;&amp;amp; api.getValue(\"redirected\") == 1 ) { api.fail(\"Abnormal HTTP Redirect on two steps\");\n api.finish(); } else { api.fail(\"HTTP Failure on two steps\");\n api.finish(); }",
			"requestTimeout": 60
		}
	]
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 06 Sep 2022 08:46:36 GMT</pubDate>
    <dc:creator>NicolasT</dc:creator>
    <dc:date>2022-09-06T08:46:36Z</dc:date>
    <item>
      <title>Set success conditions for HTTP Monitor</title>
      <link>https://community.dynatrace.com/t5/Synthetic-Monitoring/Set-success-conditions-for-HTTP-Monitor/m-p/193859#M1496</link>
      <description>&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My client wants to regularly check whether some servers are running, so I set up HTTP Monitor to monitor, I only need to set IP: Port, if the status code returns 200, it is normal.&lt;/P&gt;&lt;P&gt;But I have a problem now. Our services are all configured with HA (High Availability), but one of the services has a special mechanism. If Service A is runnable, Service B will temporarily stop, so when I detect Service When B, the response Error code = 15 (Connection timeout).&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="截圖 2022-09-05 下午3.48.59.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/7433i9E24229978117050/image-size/medium?v=v2&amp;amp;px=400" role="button" title="截圖 2022-09-05 下午3.48.59.png" alt="截圖 2022-09-05 下午3.48.59.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any way to set the HTTP Monitor to one of Service A or B when the status code = 200, the HTTP monitor is considered successful?&lt;BR /&gt;I have tried using Script but can't seem to do the above?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Owen&lt;/P&gt;</description>
      <pubDate>Mon, 05 Sep 2022 07:52:29 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Synthetic-Monitoring/Set-success-conditions-for-HTTP-Monitor/m-p/193859#M1496</guid>
      <dc:creator>owen_chen</dc:creator>
      <dc:date>2022-09-05T07:52:29Z</dc:date>
    </item>
    <item>
      <title>Re: Set success conditions for HTTP Monitor</title>
      <link>https://community.dynatrace.com/t5/Synthetic-Monitoring/Set-success-conditions-for-HTTP-Monitor/m-p/193933#M1497</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;here is an http synthetic (not browser) I made.&lt;/P&gt;&lt;P&gt;I got two web sites (say A and B). My use case :&lt;/P&gt;&lt;P&gt;- I would like to get at least one 200, if A is 200, global status ok, skip B&lt;/P&gt;&lt;P&gt;- If A is anything than 200, I try B&lt;/P&gt;&lt;P&gt;- If B is anything than 200, global status KO.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It looks quite similar as your need.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{
	"version": "1.0",
	"requests": [
		{
			"description": "https://www.mywebsite.fr/",
			"url": "https://www.mywebsite.fr/",
			"method": "GET",
			"configuration": {
				"acceptAnyCertificate": false,
				"followRedirects": false
			},
			"postProcessingScript": "if (response.getStatusCode() == 200 ) { api.skipNextSyntheticRequest(); } else if ( response.getStatusCode() == 302 ) { api.setValue(\"redirected\",\"1\"); }",
			"requestTimeout": 60
		},
		{
			"description": "https://www.mywebsite.de/",
			"url": "https://www.mywebsite.de/",
			"method": "GET",
			"configuration": {
				"acceptAnyCertificate": true,
				"followRedirects": false
			},
			"postProcessingScript": "if (response.getStatusCode() == 200 ) { api.finish(); } else if ( response.getStatusCode() == 302 &amp;amp;&amp;amp; api.getValue(\"redirected\") == 1 ) { api.fail(\"Abnormal HTTP Redirect on two steps\");\n api.finish(); } else { api.fail(\"HTTP Failure on two steps\");\n api.finish(); }",
			"requestTimeout": 60
		}
	]
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Sep 2022 08:46:36 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Synthetic-Monitoring/Set-success-conditions-for-HTTP-Monitor/m-p/193933#M1497</guid>
      <dc:creator>NicolasT</dc:creator>
      <dc:date>2022-09-06T08:46:36Z</dc:date>
    </item>
    <item>
      <title>Re: Set success conditions for HTTP Monitor</title>
      <link>https://community.dynatrace.com/t5/Synthetic-Monitoring/Set-success-conditions-for-HTTP-Monitor/m-p/193935#M1498</link>
      <description>&lt;P&gt;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/40836"&gt;@NicolasT&lt;/a&gt;&amp;nbsp;Thank you for your reply.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;This is a good answer.&lt;BR /&gt;However, the result of my test should be because the return code=15 I got, it doesn't seem to be the status code, so I can't enter "response.getStatusCode() !=200".&lt;/P&gt;&lt;P&gt;Thanks again for your reply.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Sep 2022 09:30:00 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Synthetic-Monitoring/Set-success-conditions-for-HTTP-Monitor/m-p/193935#M1498</guid>
      <dc:creator>owen_chen</dc:creator>
      <dc:date>2022-09-06T09:30:00Z</dc:date>
    </item>
    <item>
      <title>Re: Set success conditions for HTTP Monitor</title>
      <link>https://community.dynatrace.com/t5/Synthetic-Monitoring/Set-success-conditions-for-HTTP-Monitor/m-p/193938#M1499</link>
      <description>&lt;P&gt;I don't get how to test the return code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But, if you got no response, then you got no status code, so it's null, or 0 or something different from 200 &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp; The test should to the job ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Sep 2022 09:45:35 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Synthetic-Monitoring/Set-success-conditions-for-HTTP-Monitor/m-p/193938#M1499</guid>
      <dc:creator>NicolasT</dc:creator>
      <dc:date>2022-09-06T09:45:35Z</dc:date>
    </item>
    <item>
      <title>Re: Set success conditions for HTTP Monitor</title>
      <link>https://community.dynatrace.com/t5/Synthetic-Monitoring/Set-success-conditions-for-HTTP-Monitor/m-p/193940#M1500</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/23144"&gt;@owen_chen&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If my understanding is correct, from user point of view it is OK when either service A returns 200 or service B returns 200, Is that correct? Going further, I assume that your end users are perhaps not even aware that there are two different services running in HA mode, they just can receive (or not) expected response&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If all above is true, how about totally different approach?&lt;/P&gt;
&lt;P&gt;Instead of monitoring your service A and service B, perhaps you should try to monitor service / URL which is exposed to your final users?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jacek&lt;/P&gt;</description>
      <pubDate>Tue, 06 Sep 2022 11:03:30 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Synthetic-Monitoring/Set-success-conditions-for-HTTP-Monitor/m-p/193940#M1500</guid>
      <dc:creator>Jacek_Janowicz</dc:creator>
      <dc:date>2022-09-06T11:03:30Z</dc:date>
    </item>
    <item>
      <title>Re: Set success conditions for HTTP Monitor</title>
      <link>https://community.dynatrace.com/t5/Synthetic-Monitoring/Set-success-conditions-for-HTTP-Monitor/m-p/193953#M1501</link>
      <description>&lt;P&gt;I agree with this pilosophy.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Rules for simple monitoring : What is the service furbished to the end users? Is it available or not , how do you simply monitor it?&lt;/P&gt;&lt;P&gt;They don't care at all about the infrastructure layer and if unavailable, in this case, the causation will be trivial to get.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Sep 2022 13:23:19 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Synthetic-Monitoring/Set-success-conditions-for-HTTP-Monitor/m-p/193953#M1501</guid>
      <dc:creator>NicolasT</dc:creator>
      <dc:date>2022-09-06T13:23:19Z</dc:date>
    </item>
    <item>
      <title>Re: Set success conditions for HTTP Monitor</title>
      <link>https://community.dynatrace.com/t5/Synthetic-Monitoring/Set-success-conditions-for-HTTP-Monitor/m-p/193990#M1502</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/23019"&gt;@Jacek_Janowicz&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your reply.&lt;/P&gt;&lt;P&gt;I agree and have thought about it.&lt;/P&gt;&lt;P&gt;However, when I proposed this idea to my client, he said that because the private network segment where ActiveGate is located does not pass through the DNS server, the Domain name cannot be recognized, which is why I have to detect the A and B servers separately.&lt;/P&gt;&lt;P&gt;However, maybe I should be able to make ActiveGate recognize this Domain name?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;Owen&lt;/P&gt;</description>
      <pubDate>Wed, 07 Sep 2022 01:38:58 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Synthetic-Monitoring/Set-success-conditions-for-HTTP-Monitor/m-p/193990#M1502</guid>
      <dc:creator>owen_chen</dc:creator>
      <dc:date>2022-09-07T01:38:58Z</dc:date>
    </item>
    <item>
      <title>Re: Set success conditions for HTTP Monitor</title>
      <link>https://community.dynatrace.com/t5/Synthetic-Monitoring/Set-success-conditions-for-HTTP-Monitor/m-p/193993#M1503</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/40836"&gt;@NicolasT&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your reply.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="截圖 2022-09-07 上午10.06.31.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/7474i70352B3D45337D48/image-size/medium?v=v2&amp;amp;px=400" role="button" title="截圖 2022-09-07 上午10.06.31.png" alt="截圖 2022-09-07 上午10.06.31.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I tried several conditional expressions with reference to the screenshot above, for example:&lt;BR /&gt;response.getStatusCode() is Null&lt;BR /&gt;response.getStatusCode() != 200&lt;BR /&gt;response.getStatusCode() == 0&lt;BR /&gt;But nothing seems to work.&lt;/P&gt;&lt;P&gt;I'm guessing that maybe "healthStatusCode" would be considered a failure if it were a few specific items.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Wed, 07 Sep 2022 02:15:32 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Synthetic-Monitoring/Set-success-conditions-for-HTTP-Monitor/m-p/193993#M1503</guid>
      <dc:creator>owen_chen</dc:creator>
      <dc:date>2022-09-07T02:15:32Z</dc:date>
    </item>
    <item>
      <title>Re: Set success conditions for HTTP Monitor</title>
      <link>https://community.dynatrace.com/t5/Synthetic-Monitoring/Set-success-conditions-for-HTTP-Monitor/m-p/194010#M1504</link>
      <description>&lt;P&gt;If this is a private internal website, you should think about a private activegate with correct access. That will solve your DNS issue.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Sep 2022 07:00:59 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Synthetic-Monitoring/Set-success-conditions-for-HTTP-Monitor/m-p/194010#M1504</guid>
      <dc:creator>NicolasT</dc:creator>
      <dc:date>2022-09-07T07:00:59Z</dc:date>
    </item>
    <item>
      <title>Re: Set success conditions for HTTP Monitor</title>
      <link>https://community.dynatrace.com/t5/Synthetic-Monitoring/Set-success-conditions-for-HTTP-Monitor/m-p/194030#M1505</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/23144"&gt;@owen_chen&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Adjusting AG, to be able to recognize domain name is one option of course.&lt;/P&gt;
&lt;P&gt;But this case sounds to me like an extra reason for deploying your private location within the same segment of network, as your users. Not only should it solve DNS related problem, but additionally, this way results of synthetic tests will be even more accurate and trustworthy (since tests are executed from the same "place" and with the same network conditions, as applications end users have)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jacek&lt;/P&gt;</description>
      <pubDate>Wed, 07 Sep 2022 09:55:59 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Synthetic-Monitoring/Set-success-conditions-for-HTTP-Monitor/m-p/194030#M1505</guid>
      <dc:creator>Jacek_Janowicz</dc:creator>
      <dc:date>2022-09-07T09:55:59Z</dc:date>
    </item>
  </channel>
</rss>

