<?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: Ambari rest API to control flume agent? in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-rest-API-to-control-flume-agent/m-p/134731#M39608</link>
    <description>&lt;P&gt;Thanks - what would be the URL for this &lt;A rel="user" href="https://community.cloudera.com/users/557/stoader.html" nodeid="557"&gt;@stoader&lt;/A&gt;. I tried with both the service and the component. e.g.&lt;/P&gt;&lt;P&gt;curl -u admin:admin -i -H 'X-Requested-By: ambari' -X PUT -d '{ "RequestInfo": { "context": "Stop Flume agent", "flume_handler": "agent", "operation_level": { "level": "HOST_COMPONENT", "cluster_name": "Cluster", "service_name" "FLUME", "host_name": "node5" } }, "Body": { "HostRoles": { "state": "INSTALLED" } } }' &lt;A href="http://node1:8080/api/v1/clusters/Cluster/services/FLUME" target="_blank"&gt;http://node1:8080/api/v1/clusters/Cluster/services/FLUME&lt;/A&gt;&lt;/P&gt;&lt;P&gt;and &lt;/P&gt;&lt;P&gt;curl -u admin:admin -i -H 'X-Requested-By: ambari' -X PUT -d '{ "RequestInfo": { "context": "Stop Flume agent", "flume_handler": "agent", "operation_level": { "level": "HOST_COMPONENT", "cluster_name": "Cluster", "service_name" "FLUME", "host_name": "node5" } }, "Body": { "HostRoles": { "state": "INSTALLED" } } }'  &lt;A href="http://node1:8080/api/v1/clusters/Cluster/hosts/node5/host_components/FLUME_HANDLER" target="_blank"&gt;http://node1:8080/api/v1/clusters/Cluster/hosts/node5/host_components/FLUME_HANDLER&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 06 Sep 2016 19:24:44 GMT</pubDate>
    <dc:creator>wasterw</dc:creator>
    <dc:date>2016-09-06T19:24:44Z</dc:date>
    <item>
      <title>Ambari rest API to control flume agent?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-rest-API-to-control-flume-agent/m-p/134729#M39606</link>
      <description>&lt;P&gt;I want to use the rest api to start / stop a specific flume agent rather than the whole flume service.&lt;/P&gt;&lt;P&gt;Working example: I have a 5 node cluster with Ambari on node1, flume agent running on node5.&lt;/P&gt;&lt;P&gt;I can get the URL for the flume agent with:&lt;/P&gt;&lt;PRE&gt;curl -u admin:admin -i -H 'X-Requested-By: ambari' -X  GET &lt;A href="http://node1:8080/api/v1/clusters/Cluster/hosts/node5/host_components" target="_blank"&gt;http://node1:8080/api/v1/clusters/Cluster/hosts/node5/host_components&lt;/A&gt;&lt;/PRE&gt;&lt;P&gt;This shows:&lt;/P&gt;&lt;PRE&gt;&lt;A href="http://node1:8080/api/v1/clusters/Cluster/hosts/node5/host_components/FLUME_HANDLER" target="_blank"&gt;http://node1:8080/api/v1/clusters/Cluster/hosts/node5/host_components/FLUME_HANDLER&lt;/A&gt;&lt;/PRE&gt;&lt;P&gt;However if you try to stop it, it stops the whole flume service not just the agent:&lt;/P&gt;&lt;PRE&gt;curl -u admin:admin -i -H 'X-Requested-By: ambari' -X PUT -d '{"HostRoles": {"state": "INSTALLED"}}'  &lt;A href="http://node1:8080/api/v1/clusters/Cluster/hosts/node5/host_components/FLUME_HANDLER" target="_blank"&gt;http://node1:8080/api/v1/clusters/Cluster/hosts/node5/host_components/FLUME_HANDLER&lt;/A&gt;&lt;/PRE&gt;&lt;P&gt;Is this possible using REST API?&lt;/P&gt;</description>
      <pubDate>Sat, 03 Sep 2016 04:30:49 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-rest-API-to-control-flume-agent/m-p/134729#M39606</guid>
      <dc:creator>wasterw</dc:creator>
      <dc:date>2016-09-03T04:30:49Z</dc:date>
    </item>
    <item>
      <title>Re: Ambari rest API to control flume agent?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-rest-API-to-control-flume-agent/m-p/134730#M39607</link>
      <description>&lt;P&gt;The passing the following:&lt;/P&gt;&lt;P&gt;{
  "RequestInfo": {
    "context": "Stop Flume agent",
    "flume_handler": "agent",
    "operation_level": {
      "level": "HOST_COMPONENT",
      "cluster_name": "Cluster",
      "service_name": "FLUME",
      "host_name": "node5"
    }
  },
  "Body": {
    "HostRoles": {
      "state": "INSTALLED"
    }
  }
}&lt;/P&gt;</description>
      <pubDate>Mon, 05 Sep 2016 15:33:29 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-rest-API-to-control-flume-agent/m-p/134730#M39607</guid>
      <dc:creator>stoader</dc:creator>
      <dc:date>2016-09-05T15:33:29Z</dc:date>
    </item>
    <item>
      <title>Re: Ambari rest API to control flume agent?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-rest-API-to-control-flume-agent/m-p/134731#M39608</link>
      <description>&lt;P&gt;Thanks - what would be the URL for this &lt;A rel="user" href="https://community.cloudera.com/users/557/stoader.html" nodeid="557"&gt;@stoader&lt;/A&gt;. I tried with both the service and the component. e.g.&lt;/P&gt;&lt;P&gt;curl -u admin:admin -i -H 'X-Requested-By: ambari' -X PUT -d '{ "RequestInfo": { "context": "Stop Flume agent", "flume_handler": "agent", "operation_level": { "level": "HOST_COMPONENT", "cluster_name": "Cluster", "service_name" "FLUME", "host_name": "node5" } }, "Body": { "HostRoles": { "state": "INSTALLED" } } }' &lt;A href="http://node1:8080/api/v1/clusters/Cluster/services/FLUME" target="_blank"&gt;http://node1:8080/api/v1/clusters/Cluster/services/FLUME&lt;/A&gt;&lt;/P&gt;&lt;P&gt;and &lt;/P&gt;&lt;P&gt;curl -u admin:admin -i -H 'X-Requested-By: ambari' -X PUT -d '{ "RequestInfo": { "context": "Stop Flume agent", "flume_handler": "agent", "operation_level": { "level": "HOST_COMPONENT", "cluster_name": "Cluster", "service_name" "FLUME", "host_name": "node5" } }, "Body": { "HostRoles": { "state": "INSTALLED" } } }'  &lt;A href="http://node1:8080/api/v1/clusters/Cluster/hosts/node5/host_components/FLUME_HANDLER" target="_blank"&gt;http://node1:8080/api/v1/clusters/Cluster/hosts/node5/host_components/FLUME_HANDLER&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Sep 2016 19:24:44 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-rest-API-to-control-flume-agent/m-p/134731#M39608</guid>
      <dc:creator>wasterw</dc:creator>
      <dc:date>2016-09-06T19:24:44Z</dc:date>
    </item>
    <item>
      <title>Re: Ambari rest API to control flume agent?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-rest-API-to-control-flume-agent/m-p/134732#M39609</link>
      <description>&lt;P&gt;Just tested the below in my local environment and worked fine:&lt;/P&gt;&lt;P&gt;curl -u admin:admin -H "X-Requested-By: ambari" -d '{"RequestInfo":{"context":"Stop Flume agent","flume_handler":"agent","operation_level":{"level":"HOST_COMPONENT","cluster_name":"Cluster","service_name":"FLUME","host_name":"node5"}},"Body":{"HostRoles":{"state":"INSTALLED"}}}' -X PUT "http://node1:8080/api/v1/clusters/Cluster/hosts/node5/host_components/FLUME_HANDLER"&lt;/P&gt;</description>
      <pubDate>Wed, 07 Sep 2016 20:12:51 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-rest-API-to-control-flume-agent/m-p/134732#M39609</guid>
      <dc:creator>stoader</dc:creator>
      <dc:date>2016-09-07T20:12:51Z</dc:date>
    </item>
  </channel>
</rss>

