<?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: How to export all the output/error logs for a Bulk operation e.g. Start all Service in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/How-to-export-all-the-output-error-logs-for-a-Bulk-operation/m-p/97754#M60925</link>
    <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/48/pankajsingh.html" nodeid="48"&gt;@pankaj singh&lt;/A&gt; Another option would be to get the log files directly from the individual nodes.&lt;/P&gt;&lt;P&gt;For example, use the following request to get all the task information for a request:&lt;/P&gt;&lt;PRE&gt;&lt;A href="http://horton01.example.com:8080/api/v1/clusters/bigdata/requests/111?fields=*,tasks/Tasks/request_id,tasks/Tasks/command,tasks/Tasks/command_detail,tasks/Tasks/host_name,tasks/Tasks/id,tasks/Tasks/role,tasks/Tasks/status&amp;amp;minimal_response=true" target="_blank"&gt;http://horton01.example.com:8080/api/v1/clusters/bigdata/requests/111?fields=*,tasks/Tasks/request_id,tasks/Tasks/command,tasks/Tasks/command_detail,tasks/Tasks/host_name,tasks/Tasks/id,tasks/Tasks/role,tasks/Tasks/status&amp;amp;minimal_response=true&lt;/A&gt;&lt;/PRE&gt;&lt;P&gt;The response looks something like this =&amp;gt;&lt;/P&gt;&lt;PRE&gt;"tasks" : [
    {
      "Tasks" : {
        "command" : "CUSTOM_COMMAND",
        "command_detail" : "RESTART MAPREDUCE2/MAPREDUCE2_CLIENT",
        "host_name" : "horton01.example.com",
        "id" : 1157,
        "request_id" : 111,
        "role" : "MAPREDUCE2_CLIENT",
        "status" : "COMPLETED"
      }
    },
    {
      "Tasks" : {
        "command" : "CUSTOM_COMMAND",
        "command_detail" : "RESTART MAPREDUCE2/HISTORYSERVER",
        "host_name" : "horton02.example.com",
        "id" : 1158,
        "request_id" : 111,
        "role" : "HISTORYSERVER",
        "status" : "COMPLETED"
      }
    },&lt;/PRE&gt;&lt;P&gt;The import parts are the &lt;STRONG&gt;id&lt;/STRONG&gt; and the &lt;STRONG&gt;host_name&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Now you can log into the host and retrieve the error and output logfile from:&lt;/P&gt;&lt;UL&gt;
&lt;LI&gt;error: /var/lib/ambari-agent/data/errors-&amp;lt;id&amp;gt;.txt&lt;/LI&gt;&lt;LI&gt;output: /var/lib/ambari-agent/data/output-&amp;lt;id&amp;gt;.txt&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;For Example on host horton02.example.com:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;error log: /var/lib/ambari-agent/data/errors-1158.txt&lt;/LI&gt;&lt;LI&gt;output log: /var/lib/ambari-agent/data/output-1158.txt&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;EM&gt;Note: You might also be able to get the request and tasks ids from the Ambari Database.&lt;/EM&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 01 Dec 2015 17:15:28 GMT</pubDate>
    <dc:creator>jstraub</dc:creator>
    <dc:date>2015-12-01T17:15:28Z</dc:date>
    <item>
      <title>How to export all the output/error logs for a Bulk operation e.g. Start all Service</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-export-all-the-output-error-logs-for-a-Bulk-operation/m-p/97751#M60922</link>
      <description>&lt;P&gt;Suppose executed a bulk operation through Amabri UI e.g. "Start All Services" .&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The requirement is&lt;/STRONG&gt; - &lt;/P&gt;&lt;P&gt;I want to export the complete log of this operation for further analysis&lt;/P&gt;&lt;P&gt;One way is to find all hosts impacted by this operation , get the sub tasks executed on each hosts and then loop through them and get the logs and merge them &lt;/P&gt;&lt;P&gt;Is there a more simple way of getting all logs for a bulk operation done through ambari&lt;/P&gt;</description>
      <pubDate>Tue, 01 Dec 2015 15:09:57 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-export-all-the-output-error-logs-for-a-Bulk-operation/m-p/97751#M60922</guid>
      <dc:creator>pankaj_singh</dc:creator>
      <dc:date>2015-12-01T15:09:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to export all the output/error logs for a Bulk operation e.g. Start all Service</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-export-all-the-output-error-logs-for-a-Bulk-operation/m-p/97752#M60923</link>
      <description>&lt;P&gt;+ &lt;A rel="user" href="https://community.cloudera.com/users/32/paul.html" nodeid="32"&gt;@Paul Codding&lt;/A&gt; and &lt;A rel="user" href="https://community.cloudera.com/users/229/bdurai.html" nodeid="229"&gt;@bdurai&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Once Logsearch is available you should be able to do this pretty easily from Logsearch UI because you can view all log messages across all components for the specific time window you are interested in (and filter by error level, include/exclude substrings etc). You can try a development version of it using steps &lt;A href="https://github.com/abajwa-hw/logsearch-service"&gt;here&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Dec 2015 16:24:11 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-export-all-the-output-error-logs-for-a-Bulk-operation/m-p/97752#M60923</guid>
      <dc:creator>abajwa</dc:creator>
      <dc:date>2015-12-01T16:24:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to export all the output/error logs for a Bulk operation e.g. Start all Service</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-export-all-the-output-error-logs-for-a-Bulk-operation/m-p/97753#M60924</link>
      <description>&lt;P&gt;Awesome project &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Dec 2015 16:58:03 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-export-all-the-output-error-logs-for-a-Bulk-operation/m-p/97753#M60924</guid>
      <dc:creator>jstraub</dc:creator>
      <dc:date>2015-12-01T16:58:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to export all the output/error logs for a Bulk operation e.g. Start all Service</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-export-all-the-output-error-logs-for-a-Bulk-operation/m-p/97754#M60925</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/48/pankajsingh.html" nodeid="48"&gt;@pankaj singh&lt;/A&gt; Another option would be to get the log files directly from the individual nodes.&lt;/P&gt;&lt;P&gt;For example, use the following request to get all the task information for a request:&lt;/P&gt;&lt;PRE&gt;&lt;A href="http://horton01.example.com:8080/api/v1/clusters/bigdata/requests/111?fields=*,tasks/Tasks/request_id,tasks/Tasks/command,tasks/Tasks/command_detail,tasks/Tasks/host_name,tasks/Tasks/id,tasks/Tasks/role,tasks/Tasks/status&amp;amp;minimal_response=true" target="_blank"&gt;http://horton01.example.com:8080/api/v1/clusters/bigdata/requests/111?fields=*,tasks/Tasks/request_id,tasks/Tasks/command,tasks/Tasks/command_detail,tasks/Tasks/host_name,tasks/Tasks/id,tasks/Tasks/role,tasks/Tasks/status&amp;amp;minimal_response=true&lt;/A&gt;&lt;/PRE&gt;&lt;P&gt;The response looks something like this =&amp;gt;&lt;/P&gt;&lt;PRE&gt;"tasks" : [
    {
      "Tasks" : {
        "command" : "CUSTOM_COMMAND",
        "command_detail" : "RESTART MAPREDUCE2/MAPREDUCE2_CLIENT",
        "host_name" : "horton01.example.com",
        "id" : 1157,
        "request_id" : 111,
        "role" : "MAPREDUCE2_CLIENT",
        "status" : "COMPLETED"
      }
    },
    {
      "Tasks" : {
        "command" : "CUSTOM_COMMAND",
        "command_detail" : "RESTART MAPREDUCE2/HISTORYSERVER",
        "host_name" : "horton02.example.com",
        "id" : 1158,
        "request_id" : 111,
        "role" : "HISTORYSERVER",
        "status" : "COMPLETED"
      }
    },&lt;/PRE&gt;&lt;P&gt;The import parts are the &lt;STRONG&gt;id&lt;/STRONG&gt; and the &lt;STRONG&gt;host_name&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Now you can log into the host and retrieve the error and output logfile from:&lt;/P&gt;&lt;UL&gt;
&lt;LI&gt;error: /var/lib/ambari-agent/data/errors-&amp;lt;id&amp;gt;.txt&lt;/LI&gt;&lt;LI&gt;output: /var/lib/ambari-agent/data/output-&amp;lt;id&amp;gt;.txt&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;For Example on host horton02.example.com:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;error log: /var/lib/ambari-agent/data/errors-1158.txt&lt;/LI&gt;&lt;LI&gt;output log: /var/lib/ambari-agent/data/output-1158.txt&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;EM&gt;Note: You might also be able to get the request and tasks ids from the Ambari Database.&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Dec 2015 17:15:28 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-export-all-the-output-error-logs-for-a-Bulk-operation/m-p/97754#M60925</guid>
      <dc:creator>jstraub</dc:creator>
      <dc:date>2015-12-01T17:15:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to export all the output/error logs for a Bulk operation e.g. Start all Service</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-export-all-the-output-error-logs-for-a-Bulk-operation/m-p/97755#M60926</link>
      <description>&lt;P&gt;It is helpful. &lt;/P&gt;</description>
      <pubDate>Tue, 01 Dec 2015 18:12:27 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-export-all-the-output-error-logs-for-a-Bulk-operation/m-p/97755#M60926</guid>
      <dc:creator>pankaj_singh</dc:creator>
      <dc:date>2015-12-01T18:12:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to export all the output/error logs for a Bulk operation e.g. Start all Service</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-export-all-the-output-error-logs-for-a-Bulk-operation/m-p/97756#M60927</link>
      <description>&lt;P&gt;Thanks for sharing. So this would allow users to access the same output/errors available via ambari when you start/stop a service...but its possible that the actual root cause would only be available in the service's log, right?&lt;/P&gt;</description>
      <pubDate>Wed, 02 Dec 2015 02:20:46 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-export-all-the-output-error-logs-for-a-Bulk-operation/m-p/97756#M60927</guid>
      <dc:creator>abajwa</dc:creator>
      <dc:date>2015-12-02T02:20:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to export all the output/error logs for a Bulk operation e.g. Start all Service</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-export-all-the-output-error-logs-for-a-Bulk-operation/m-p/97757#M60928</link>
      <description>&lt;P&gt;exactly, its basically the content of these two fields from ambari UI =&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="599-screen-shot-2015-12-01-at-74659-pm.png" style="width: 1834px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/23943iBCB7901A378ED893/image-size/medium?v=v2&amp;amp;px=400" role="button" title="599-screen-shot-2015-12-01-at-74659-pm.png" alt="599-screen-shot-2015-12-01-at-74659-pm.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;As you pointed out, the actual root cause is usually available in the individual service log -&amp;gt; &lt;EM&gt;/var/log/...&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2019 12:45:03 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-export-all-the-output-error-logs-for-a-Bulk-operation/m-p/97757#M60928</guid>
      <dc:creator>jstraub</dc:creator>
      <dc:date>2019-08-19T12:45:03Z</dc:date>
    </item>
  </channel>
</rss>

