<?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>question Ambari Alert REST API to filter out services on maintenance mode in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Alert-REST-API-to-filter-out-services-on-maintenance/m-p/101825#M14475</link>
    <description>&lt;P&gt;we are using Ambari alerts Rest API to poll for components health. We would like to filter out the ones which are in Maintenance mode.  Any idea what how we can get that. The REST API call  throws all the services  that are critical- &lt;A href="http://&amp;lt;ambari" target="_blank"&gt;http://&amp;lt;ambari&lt;/A&gt; host&amp;gt;:8080/api/v1/clusters/tech_hdp/alerts?Alert/state=CRITICAL&lt;/P&gt;</description>
    <pubDate>Fri, 08 Jan 2016 00:00:48 GMT</pubDate>
    <dc:creator>grajagopal</dc:creator>
    <dc:date>2016-01-08T00:00:48Z</dc:date>
    <item>
      <title>Ambari Alert REST API to filter out services on maintenance mode</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Alert-REST-API-to-filter-out-services-on-maintenance/m-p/101825#M14475</link>
      <description>&lt;P&gt;we are using Ambari alerts Rest API to poll for components health. We would like to filter out the ones which are in Maintenance mode.  Any idea what how we can get that. The REST API call  throws all the services  that are critical- &lt;A href="http://&amp;lt;ambari" target="_blank"&gt;http://&amp;lt;ambari&lt;/A&gt; host&amp;gt;:8080/api/v1/clusters/tech_hdp/alerts?Alert/state=CRITICAL&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jan 2016 00:00:48 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Alert-REST-API-to-filter-out-services-on-maintenance/m-p/101825#M14475</guid>
      <dc:creator>grajagopal</dc:creator>
      <dc:date>2016-01-08T00:00:48Z</dc:date>
    </item>
    <item>
      <title>Re: Ambari Alert REST API to filter out services on maintenance mode</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Alert-REST-API-to-filter-out-services-on-maintenance/m-p/101826#M14476</link>
      <description>&lt;P&gt;
	Given your initial request that you had, you can expand the fields which are returned by adding &lt;/P&gt;&lt;PRE&gt;fields=*&lt;/PRE&gt;&lt;P&gt;This will add a new field called "maintenance_state". So then we have the request &lt;/P&gt;&lt;PRE&gt;/api/v1/clusters/tech_hdp/alerts?fields=*&amp;amp;Alert/state=CRITICAL&lt;/PRE&gt;&lt;P&gt;From here we can filter out the ones with a maintenance state of ON,  (returning only those with maintenance mode off)&lt;/P&gt;&lt;PRE&gt;/api/v1/clusters/tech_hdp/alerts?fields=*&amp;amp;Alert/state=CRITICAL&amp;amp;Alert/maintenance_state=OFF&lt;/PRE&gt;&lt;P&gt;I found this info on the API reference &lt;A href="https://github.com/apache/ambari/blob/trunk/ambari-server/docs/api/v1/alerts.md"&gt;https://github.com/apache/ambari/blob/trunk/ambari...&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jan 2016 00:22:05 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Alert-REST-API-to-filter-out-services-on-maintenance/m-p/101826#M14476</guid>
      <dc:creator>zblanco</dc:creator>
      <dc:date>2016-01-08T00:22:05Z</dc:date>
    </item>
    <item>
      <title>Re: Ambari Alert REST API to filter out services on maintenance mode</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Alert-REST-API-to-filter-out-services-on-maintenance/m-p/101827#M14477</link>
      <description>&lt;P&gt;Thank you very much &lt;A rel="user" href="https://community.cloudera.com/users/416/zblanco.html" nodeid="416"&gt;@zblanco&lt;/A&gt;. It worked perfectly fine. Also thank you very much for the reference API.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jan 2016 01:52:02 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Alert-REST-API-to-filter-out-services-on-maintenance/m-p/101827#M14477</guid>
      <dc:creator>grajagopal</dc:creator>
      <dc:date>2016-01-08T01:52:02Z</dc:date>
    </item>
  </channel>
</rss>

