<?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: YARN status become critical, warning, ok every 2 minute it being changes with below error from ambari? in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/YARN-status-become-critical-warning-ok-every-2-minute-it/m-p/171963#M134256</link>
    <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/3134/sanchinakishore.html" nodeid="3134"&gt;@kishore sanchina&lt;/A&gt;&lt;/P&gt;&lt;P&gt;For example when you will access the API:    &lt;/P&gt;&lt;P&gt;&lt;A href="http://erie1.example.com:8080/api/v1/clusters/ErieCluster/alert_definitions/33" target="_blank"&gt;http://erie1.example.com:8080/api/v1/clusters/ErieCluster/alert_definitions/33&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Then you might get the following kind of output:&lt;/P&gt;&lt;PRE&gt;{
  href: "http://erie1.example.com:8080/api/v1/clusters/ErieCluster/alert_definitions/33",
  AlertDefinition: {
    cluster_name: "ErieCluster",
    component_name: "APP_TIMELINE_SERVER",
    description: "This host-level alert is triggered if the App Timeline Server Web UI is unreachable.",
    enabled: true,
    help_url: null,
    id: 47,
    ignore_host: false,
    interval: 1,
    label: "App Timeline Web UI",
    name: "yarn_app_timeline_server_webui",
    repeat_tolerance: 1,
    repeat_tolerance_enabled: false,
    scope: "ANY",
    service_name: "YARN",
    source: {
      reporting: {
        ok: {
          text: "HTTP {0} response in {2:.3f}s"
        },
        warning: {
          text: "HTTP {0} response from {1} in {2:.3f}s ({3})"
        },
        critical: {
          text: "Connection failed to {1} ({3})"
        }
      },
      type: "WEB",
      uri: {
        http: "{{yarn-site/yarn.timeline-service.webapp.address}}/ws/v1/timeline",
        https: "{{yarn-site/yarn.timeline-service.webapp.https.address}}/ws/v1/timeline",
        https_property: "{{yarn-site/yarn.http.policy}}",
        https_property_value: "HTTPS_ONLY",
        kerberos_keytab: "{{yarn-site/yarn.timeline-service.http-authentication.kerberos.keytab}}",
        kerberos_principal: "{{yarn-site/yarn.timeline-service.http-authentication.kerberos.principal}}",
        default_port: 0,
        connection_timeout: 5
      }
    }
  }
}&lt;/PRE&gt;&lt;P&gt;- Then while putting the above edited JSON data back to ambari you should remove the second line from it ...which is following:&lt;/P&gt;&lt;PRE&gt;href: "http://erie1.example.com:8080/api/v1/clusters/ErieCluster/alert_definitions/33"&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;</description>
    <pubDate>Mon, 13 Feb 2017 18:09:54 GMT</pubDate>
    <dc:creator>jsensharma</dc:creator>
    <dc:date>2017-02-13T18:09:54Z</dc:date>
    <item>
      <title>YARN status become critical, warning, ok every 2 minute it being changes with below error from ambari?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/YARN-status-become-critical-warning-ok-every-2-minute-it/m-p/171961#M134254</link>
      <description>&lt;P&gt;i followed the below steps to resolve issue. but i'm getting error.&lt;/P&gt;&lt;P&gt;kindly provide the solution.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Steps:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1)
find the alert REST url&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;
curl -u
admin:$AMBARI_PASSWORD -H "X-Requested-by:ambari" -k -X GET  &lt;A href="http://$AMBARI_SERVER:8080/api/v1/clusters/$CLUSTER_NAME/alert_definitions?AlertDefiition/name=yarn_app_timeline_server_webui"&gt;http://$AMBARI_SERVER:8080/api/v1/clusters/$CLUSTER_NAME/alert_definitions?AlertDefiition/name=yarn_app_timeline_server_webui&lt;/A&gt;



you should get something like:

{

  "href" : "&lt;A href="http://$AMBARI_SERVER:8080/api/v1/clusters/$CLUSTER_NAME/alert_definitions?AlertDefinition/name=yarn_app_timeline_server_webui"&gt;http://$AMBARI_SERVER:8080/api/v1/clusters/$CLUSTER_NAME/alert_definitions?AlertDefinition/name=yarn_app_timeline_server_webui&lt;/A&gt;",

  "items" : [

  {

  "href" :
"&lt;A href="http://$AMBARI_SERVER:8080/api/v1/clusters/$CLUSTER_NAME/alert_definitions/33"&gt;http://$AMBARI_SERVER:8080/api/v1/clusters/$CLUSTER_NAME/alert_definitions/33&lt;/A&gt;",

  "AlertDefinition" : {

  "cluster_name" :
"$CLUSTER_NAME",

  "id" : 33,

  "label" : "App
Timeline Web UI",

  "name" :
"yarn_app_timeline_server_webui"

  }

  }

  ]

}



&lt;STRONG&gt;2) Get the actual alert definition&lt;/STRONG&gt;

Take the inner "href" value (in red, above) and run a second GET
command to get the actual definition of the alert. Following  the example
above (note that the "id", which is 33 in the example, could be
different in your case):

curl -u admin:$AMBARI_PASSWORD
-H "X-Requested-by:ambari" -k -X GET &lt;A href="http://$AMBARI_SERVER:8080/api/v1/clusters/$CLUSTER_NAME/alert_definitions/33"&gt;http://$AMBARI_SERVER:8080/api/v1/clusters/$CLUSTER_NAME/alert_definitions/33&lt;/A&gt;
&amp;gt; app_def.json



the content of output file &lt;STRONG&gt;app_def.json&lt;/STRONG&gt;
should look similar to:

{

  "href" : "&lt;A href="http://$AMBARI_SERVER:8080/api/v1/clusters/$CLUSTER_NAME/alert_definitions/33"&gt;http://$AMBARI_SERVER:8080/api/v1/clusters/$CLUSTER_NAME/alert_definitions/33&lt;/A&gt;",

  "AlertDefinition" : {

  "cluster_name" : "$CLUSTER_NAME",

  "component_name" :
"APP_TIMELINE_SERVER",

  "description" : "This host-level alert is
triggered if the App Timeline Server Web UI is unreachable.",

  "enabled" : true,

  "id" : 33,

  "ignore_host" : false,

  "interval" : 1,

  "label" : "App Timeline Web UI",

  "name" :
"yarn_app_timeline_server_webui",

  "scope" : "ANY",

  "service_name" : "YARN",

  "source" : {

  "reporting" : {

  "critical" : {

  "text" :
"Connection failed to {1} ({3})"

  },

  "ok" : {

  "text" :
"HTTP {0} response in {2:.3f}s"

  },

  "warning" : {

  "text" :
"HTTP {0} response from {1} in {2:.3f}s ({3})"

  }

  },

  "type" : "WEB",

  "uri" : {

  "kerberos_principal" :
"{{yarn-site/yarn.timeline-service.http-authentication.kerberos.principal}}",

  "connection_timeout"
: 5.0,

  "kerberos_keytab" :
"{{yarn-site/yarn.timeline-service.http-authentication.kerberos.keytab}}",

  "http" :
"{{yarn-site/yarn.timeline-service.webapp.address}}",

  "https_property" :
"{{yarn-site/yarn.http.policy}}",

  "https_property_value" :
"HTTPS_ONLY",

  "default_port"
: 0.0,

  "https" :
"{{yarn-site/yarn.timeline-service.webapp.https.address}}"

  }

  }

  }

}


&lt;STRONG&gt;3) Change the timeout
value in the json file&lt;/STRONG&gt;



Edit the file &lt;STRONG&gt;app_def.json&lt;/STRONG&gt;
and to increase the timeout of the alert change the value (these are seconds)
from

 
"connection_timeout" : 5.0,

     

to, for example ,12.0:

 "connection_timeout" : 12.0,





====

There is a second important change to do the the json file to workaround an
issue with amabari and is to also change:

 "default_port" : 0.0,



to

 "default_port" : 0,&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;4)
Send back the new definition to Ambari&lt;/STRONG&gt;

Issue the command (as usual check that the url is the one found at point 1):

curl -u admin:$AMBARI_PASSWORD -H
"X-Requested-by:ambari" -k -X PUT -d @app_def.json &lt;A href="http://$AMBARI_SERVER:8080/api/v1/clusters/$CLUSTER_NAME/alert_definitions/33"&gt;http://$AMBARI_SERVER:8080/api/v1/clusters/$CLUSTER_NAME/alert_definitions/33&lt;/A&gt;&lt;/P&gt;&lt;P&gt;ERROR:&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;  "status" : 400,&lt;/P&gt;&lt;P&gt;  "message" : "org.apache.ambari.server.controller.spi.UnsupportedPropertyException:
The properties [href] specified in the request or predicate are
not supported for the resource type AlertDefinition."&lt;/P&gt;</description>
      <pubDate>Mon, 13 Feb 2017 15:22:34 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/YARN-status-become-critical-warning-ok-every-2-minute-it/m-p/171961#M134254</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-02-13T15:22:34Z</dc:date>
    </item>
    <item>
      <title>Re: YARN status become critical, warning, ok every 2 minute it being changes with below error from ambari?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/YARN-status-become-critical-warning-ok-every-2-minute-it/m-p/171962#M134255</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/3134/sanchinakishore.html" nodeid="3134"&gt;@kishore sanchina&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Before you do the "-X PUT" the "&lt;STRONG&gt;app_def.json&lt;/STRONG&gt;" you must delete the  "href" line from very second line of your json file.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Feb 2017 18:06:46 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/YARN-status-become-critical-warning-ok-every-2-minute-it/m-p/171962#M134255</guid>
      <dc:creator>jsensharma</dc:creator>
      <dc:date>2017-02-13T18:06:46Z</dc:date>
    </item>
    <item>
      <title>Re: YARN status become critical, warning, ok every 2 minute it being changes with below error from ambari?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/YARN-status-become-critical-warning-ok-every-2-minute-it/m-p/171963#M134256</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/3134/sanchinakishore.html" nodeid="3134"&gt;@kishore sanchina&lt;/A&gt;&lt;/P&gt;&lt;P&gt;For example when you will access the API:    &lt;/P&gt;&lt;P&gt;&lt;A href="http://erie1.example.com:8080/api/v1/clusters/ErieCluster/alert_definitions/33" target="_blank"&gt;http://erie1.example.com:8080/api/v1/clusters/ErieCluster/alert_definitions/33&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Then you might get the following kind of output:&lt;/P&gt;&lt;PRE&gt;{
  href: "http://erie1.example.com:8080/api/v1/clusters/ErieCluster/alert_definitions/33",
  AlertDefinition: {
    cluster_name: "ErieCluster",
    component_name: "APP_TIMELINE_SERVER",
    description: "This host-level alert is triggered if the App Timeline Server Web UI is unreachable.",
    enabled: true,
    help_url: null,
    id: 47,
    ignore_host: false,
    interval: 1,
    label: "App Timeline Web UI",
    name: "yarn_app_timeline_server_webui",
    repeat_tolerance: 1,
    repeat_tolerance_enabled: false,
    scope: "ANY",
    service_name: "YARN",
    source: {
      reporting: {
        ok: {
          text: "HTTP {0} response in {2:.3f}s"
        },
        warning: {
          text: "HTTP {0} response from {1} in {2:.3f}s ({3})"
        },
        critical: {
          text: "Connection failed to {1} ({3})"
        }
      },
      type: "WEB",
      uri: {
        http: "{{yarn-site/yarn.timeline-service.webapp.address}}/ws/v1/timeline",
        https: "{{yarn-site/yarn.timeline-service.webapp.https.address}}/ws/v1/timeline",
        https_property: "{{yarn-site/yarn.http.policy}}",
        https_property_value: "HTTPS_ONLY",
        kerberos_keytab: "{{yarn-site/yarn.timeline-service.http-authentication.kerberos.keytab}}",
        kerberos_principal: "{{yarn-site/yarn.timeline-service.http-authentication.kerberos.principal}}",
        default_port: 0,
        connection_timeout: 5
      }
    }
  }
}&lt;/PRE&gt;&lt;P&gt;- Then while putting the above edited JSON data back to ambari you should remove the second line from it ...which is following:&lt;/P&gt;&lt;PRE&gt;href: "http://erie1.example.com:8080/api/v1/clusters/ErieCluster/alert_definitions/33"&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Feb 2017 18:09:54 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/YARN-status-become-critical-warning-ok-every-2-minute-it/m-p/171963#M134256</guid>
      <dc:creator>jsensharma</dc:creator>
      <dc:date>2017-02-13T18:09:54Z</dc:date>
    </item>
    <item>
      <title>Re: YARN status become critical, warning, ok every 2 minute it being changes with below error from ambari?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/YARN-status-become-critical-warning-ok-every-2-minute-it/m-p/171964#M134257</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/3418/jsensharma.html" nodeid="3418"&gt;@Jay SenSharma&lt;/A&gt; thanks jay. now it is working fine and issue resolved.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Feb 2017 20:53:52 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/YARN-status-become-critical-warning-ok-every-2-minute-it/m-p/171964#M134257</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-02-13T20:53:52Z</dc:date>
    </item>
  </channel>
</rss>

