<?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 Re: Run service checks on each of ambari services in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Run-service-checks-on-each-of-ambari-services/m-p/180246#M73105</link>
    <description>&lt;P&gt; &lt;A rel="user" href="https://community.cloudera.com/users/26229/uribarih.html" nodeid="26229"&gt;@Michael Bronson&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;You can use these curl calls to run all the service checks and check the status&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;To run service checks &lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;curl -ivk -H "X-Requested-By: ambari" -u {ambari-username}:{ambari-password} -X POST -d @payload.txt &lt;A href="http://{ambari-server}:{ambari-port}/api/v1/clusters/{cluster-name}/request_schedules" target="_blank"&gt;http://{ambari-server}:{ambari-port}/api/v1/clusters/{cluster-name}/request_schedules&lt;/A&gt;


Sample response:

{
  "resources": [
    {
      "href": "http://&amp;lt;ambari-server&amp;gt;:8080/api/v1/clusters/&amp;lt;clustername&amp;gt;/request_schedules/68",
      "RequestSchedule": {
        "id": 68 // This is the request-schedule-id to be used for second call
      }
    }
  ]
}
&amp;lt;br&amp;gt;&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;Note: &lt;/STRONG&gt;Download the attached payload.txt to some folder and run the above command from the same folder.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;To get status of service checks&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;curl -ivk -H "X-Requested-By: ambari" -u {ambari-username}:{ambari-password} -X GET &lt;A href="http://{ambari-server}:{ambari-port}/api/v1/clusters/{cluster-name}/request_schedules/{request-schedule-id}" target="_blank"&gt;http://{ambari-server}:{ambari-port}/api/v1/clusters/{cluster-name}/request_schedules/{request-schedule-id}&lt;/A&gt;&lt;/PRE&gt;&lt;P&gt;To get the status of each service, iterate through batch_requests array in the response and look for 'request_status' inside each object. &lt;/P&gt;&lt;P&gt;COMPLETED is for passed, FAILED for failed, ABORTED if service check is aborted.&lt;A href="https://community.cloudera.com/legacyfs/online/attachments/47450-payload.txt"&gt;payload.txt&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Note&lt;/STRONG&gt;: request-schedule-id for the second curl call is obtained from the response of 1st call.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Aditya&lt;/P&gt;</description>
    <pubDate>Fri, 05 Jan 2018 02:31:44 GMT</pubDate>
    <dc:creator>asirna</dc:creator>
    <dc:date>2018-01-05T02:31:44Z</dc:date>
    <item>
      <title>Run service checks on each of ambari services</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Run-service-checks-on-each-of-ambari-services/m-p/180242#M73101</link>
      <description>&lt;P&gt;need advice about the following:&lt;/P&gt;&lt;P&gt;as all know we can do service check on each of the services in ambari cluster &lt;/P&gt;&lt;P&gt;what we need is a tool  or script or API  that will perform service check on all ambari services and will print the resulsts as ok or fail&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="47449-capture.png" style="width: 373px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/19315iAF987D5542256CD2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="47449-capture.png" alt="47449-capture.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Aug 2019 09:12:27 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Run-service-checks-on-each-of-ambari-services/m-p/180242#M73101</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2019-08-18T09:12:27Z</dc:date>
    </item>
    <item>
      <title>Re: Run service checks on each of ambari services</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Run-service-checks-on-each-of-ambari-services/m-p/180243#M73102</link>
      <description>&lt;P&gt; &lt;A rel="user" href="https://community.cloudera.com/users/26229/uribarih.html" nodeid="26229"&gt;@Michael Bronson&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;This article provides you the necessary steps in detail. Hope this helps&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.hortonworks.com/articles/11852/ambari-api-run-all-service-checks-bulk.html" target="_blank"&gt;https://community.hortonworks.com/articles/11852/ambari-api-run-all-service-checks-bulk.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://gist.github.com/mr-jstraub/0b55de318eeae6695c3f#payload-to-run-all-service-checks" target="_blank"&gt;https://gist.github.com/mr-jstraub/0b55de318eeae6695c3f#payload-to-run-all-service-checks&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Aditya&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jan 2018 00:51:04 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Run-service-checks-on-each-of-ambari-services/m-p/180243#M73102</guid>
      <dc:creator>asirna</dc:creator>
      <dc:date>2018-01-05T00:51:04Z</dc:date>
    </item>
    <item>
      <title>Re: Run service checks on each of ambari services</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Run-service-checks-on-each-of-ambari-services/m-p/180244#M73103</link>
      <description>&lt;P&gt;@Aditya , yes I already see that , but we want a tool that will do it more simple , because in the article need to make some configuration for each service , and maybe there is some ready tool that do the job without any addtional work &lt;/P&gt;</description>
      <pubDate>Fri, 05 Jan 2018 00:54:06 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Run-service-checks-on-each-of-ambari-services/m-p/180244#M73103</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2018-01-05T00:54:06Z</dc:date>
    </item>
    <item>
      <title>Re: Run service checks on each of ambari services</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Run-service-checks-on-each-of-ambari-services/m-p/180245#M73104</link>
      <description>&lt;P&gt;see the follwing example - &lt;A href="https://github.com/HariSekhon/pytools/blob/master/ambari_trigger_service_checks.py" target="_blank"&gt;https://github.com/HariSekhon/pytools/blob/master/ambari_trigger_service_checks.py&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.hortonworks.com/questions/11111/is-there-a-way-to-execute-ambari-service-checks-in.html" target="_blank"&gt;https://community.hortonworks.com/questions/11111/is-there-a-way-to-execute-ambari-service-checks-in.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jan 2018 01:04:58 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Run-service-checks-on-each-of-ambari-services/m-p/180245#M73104</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2018-01-05T01:04:58Z</dc:date>
    </item>
    <item>
      <title>Re: Run service checks on each of ambari services</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Run-service-checks-on-each-of-ambari-services/m-p/180246#M73105</link>
      <description>&lt;P&gt; &lt;A rel="user" href="https://community.cloudera.com/users/26229/uribarih.html" nodeid="26229"&gt;@Michael Bronson&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;You can use these curl calls to run all the service checks and check the status&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;To run service checks &lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;curl -ivk -H "X-Requested-By: ambari" -u {ambari-username}:{ambari-password} -X POST -d @payload.txt &lt;A href="http://{ambari-server}:{ambari-port}/api/v1/clusters/{cluster-name}/request_schedules" target="_blank"&gt;http://{ambari-server}:{ambari-port}/api/v1/clusters/{cluster-name}/request_schedules&lt;/A&gt;


Sample response:

{
  "resources": [
    {
      "href": "http://&amp;lt;ambari-server&amp;gt;:8080/api/v1/clusters/&amp;lt;clustername&amp;gt;/request_schedules/68",
      "RequestSchedule": {
        "id": 68 // This is the request-schedule-id to be used for second call
      }
    }
  ]
}
&amp;lt;br&amp;gt;&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;Note: &lt;/STRONG&gt;Download the attached payload.txt to some folder and run the above command from the same folder.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;To get status of service checks&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;curl -ivk -H "X-Requested-By: ambari" -u {ambari-username}:{ambari-password} -X GET &lt;A href="http://{ambari-server}:{ambari-port}/api/v1/clusters/{cluster-name}/request_schedules/{request-schedule-id}" target="_blank"&gt;http://{ambari-server}:{ambari-port}/api/v1/clusters/{cluster-name}/request_schedules/{request-schedule-id}&lt;/A&gt;&lt;/PRE&gt;&lt;P&gt;To get the status of each service, iterate through batch_requests array in the response and look for 'request_status' inside each object. &lt;/P&gt;&lt;P&gt;COMPLETED is for passed, FAILED for failed, ABORTED if service check is aborted.&lt;A href="https://community.cloudera.com/legacyfs/online/attachments/47450-payload.txt"&gt;payload.txt&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Note&lt;/STRONG&gt;: request-schedule-id for the second curl call is obtained from the response of 1st call.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Aditya&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jan 2018 02:31:44 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Run-service-checks-on-each-of-ambari-services/m-p/180246#M73105</guid>
      <dc:creator>asirna</dc:creator>
      <dc:date>2018-01-05T02:31:44Z</dc:date>
    </item>
  </channel>
</rss>

