<?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 Parse an API call results and alert if the value is other than &amp;quot;true&amp;quot; in Open Q&amp;A</title>
    <link>https://community.dynatrace.com/t5/Open-Q-A/Parse-an-API-call-results-and-alert-if-the-value-is-other-than/m-p/207245#M25190</link>
    <description>&lt;P&gt;Hello:&lt;/P&gt;
&lt;P&gt;There is a server that I can make a call to using API that returns that status of that Applications agents.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;The format of the call is:&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;lt;server&amp;gt;:8088/ae/api/v1/&amp;lt;client&amp;gt;/system/agents&lt;/P&gt;
&lt;P&gt;I am then prompted for username and password.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;The results are in JSON format&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;(&lt;EM&gt;&lt;STRONG&gt;The data in example was scrubbed except for the part in red I need to alert on&lt;/STRONG&gt;&lt;/EM&gt;.)&lt;/P&gt;
&lt;P&gt;{&lt;BR /&gt;"data" : [ {&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;"active" : true,&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;"data1" : "value1",&lt;BR /&gt;"data2" : "value2",&lt;BR /&gt;"data3" : "value3",&lt;BR /&gt;"data4" : value4,&lt;BR /&gt;"data5" : "value5",&lt;BR /&gt;"data6" : "value6",&lt;BR /&gt;"data7" : "value7",&lt;BR /&gt;"data8" : value8,&lt;BR /&gt;"data9" : "value9",&lt;BR /&gt;"data10" : value10,&lt;BR /&gt;"data11" : value11&lt;BR /&gt;} ],&lt;BR /&gt;"hasmore" : false&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;My question are as follows: &lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;How do I set up something in Dynatrace to go out and do a query, parse the results, and the alert on some of the fields if I get a value other than true?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is synthetic transaction able to do all of that (parse the results and trigger on certain values)?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Would it be easier to do in with Dynatrace and something such as PowerShell? Such as a PowerShell script incorporated with Dyantrace?&lt;/P&gt;
&lt;P&gt;How is that done?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please advise and thank you for your insight on this matter &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;-C&lt;/P&gt;</description>
    <pubDate>Mon, 20 Mar 2023 14:04:31 GMT</pubDate>
    <dc:creator>runatyr</dc:creator>
    <dc:date>2023-03-20T14:04:31Z</dc:date>
    <item>
      <title>Parse an API call results and alert if the value is other than "true"</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/Parse-an-API-call-results-and-alert-if-the-value-is-other-than/m-p/207245#M25190</link>
      <description>&lt;P&gt;Hello:&lt;/P&gt;
&lt;P&gt;There is a server that I can make a call to using API that returns that status of that Applications agents.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;The format of the call is:&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;lt;server&amp;gt;:8088/ae/api/v1/&amp;lt;client&amp;gt;/system/agents&lt;/P&gt;
&lt;P&gt;I am then prompted for username and password.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;The results are in JSON format&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;(&lt;EM&gt;&lt;STRONG&gt;The data in example was scrubbed except for the part in red I need to alert on&lt;/STRONG&gt;&lt;/EM&gt;.)&lt;/P&gt;
&lt;P&gt;{&lt;BR /&gt;"data" : [ {&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;"active" : true,&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;"data1" : "value1",&lt;BR /&gt;"data2" : "value2",&lt;BR /&gt;"data3" : "value3",&lt;BR /&gt;"data4" : value4,&lt;BR /&gt;"data5" : "value5",&lt;BR /&gt;"data6" : "value6",&lt;BR /&gt;"data7" : "value7",&lt;BR /&gt;"data8" : value8,&lt;BR /&gt;"data9" : "value9",&lt;BR /&gt;"data10" : value10,&lt;BR /&gt;"data11" : value11&lt;BR /&gt;} ],&lt;BR /&gt;"hasmore" : false&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;My question are as follows: &lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;How do I set up something in Dynatrace to go out and do a query, parse the results, and the alert on some of the fields if I get a value other than true?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is synthetic transaction able to do all of that (parse the results and trigger on certain values)?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Would it be easier to do in with Dynatrace and something such as PowerShell? Such as a PowerShell script incorporated with Dyantrace?&lt;/P&gt;
&lt;P&gt;How is that done?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please advise and thank you for your insight on this matter &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;-C&lt;/P&gt;</description>
      <pubDate>Mon, 20 Mar 2023 14:04:31 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/Parse-an-API-call-results-and-alert-if-the-value-is-other-than/m-p/207245#M25190</guid>
      <dc:creator>runatyr</dc:creator>
      <dc:date>2023-03-20T14:04:31Z</dc:date>
    </item>
    <item>
      <title>Re: Best way to have Dynatrace parse an  API call results</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/Parse-an-API-call-results-and-alert-if-the-value-is-other-than/m-p/207273#M25199</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Looks like a useCase to be used in Synthetics, you can parse a JSON and get values you want. You have an example in&amp;nbsp;&lt;A title="other post" href="https://community.dynatrace.com/t5/Synthetic-Monitoring/JSON-parse-with-http-monitor/m-p/186384" target="_blank" rel="noopener"&gt;other post&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can ingest values from scripts using OneAgent integration or API but I would choose Synthetics for this scenario.&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;</description>
      <pubDate>Fri, 17 Mar 2023 07:58:46 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/Parse-an-API-call-results-and-alert-if-the-value-is-other-than/m-p/207273#M25199</guid>
      <dc:creator>AntonPineiro</dc:creator>
      <dc:date>2023-03-17T07:58:46Z</dc:date>
    </item>
    <item>
      <title>Re: Parse an API call results and alert if the value is other than "true"</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/Parse-an-API-call-results-and-alert-if-the-value-is-other-than/m-p/208751#M25481</link>
      <description>&lt;P&gt;Hi, I see two possible solutions for that:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Set up a synthetic test that calls the endpoint and check the actual result&lt;/LI&gt;&lt;LI&gt;build an active gate extension that polls the endpoint, parses it and writes a custom metric or creates a custom device in which storing it&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Of course solution 1 is faster, solution 2 is better if we have several endpoints to be polled and you want to manage them together.&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;</description>
      <pubDate>Fri, 31 Mar 2023 10:23:08 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/Parse-an-API-call-results-and-alert-if-the-value-is-other-than/m-p/208751#M25481</guid>
      <dc:creator>paolo_fumanelli</dc:creator>
      <dc:date>2023-03-31T10:23:08Z</dc:date>
    </item>
  </channel>
</rss>

