ambari-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Hurley <jhur...@hortonworks.com>
Subject Re: Ambari 2.1.0-snap: Alert configuration location
Date Thu, 18 Jun 2015 14:53:05 GMT
You can update the values, but you’ll need to us the APIs to do this. When sending a new
“source” element, you need to include all fields - it will not merge omitted source child
elements in with the existing source:

PUT api/v1/clusters/<cluster-name>/alert_definitions/<definition-id>

{
  "AlertDefinition" : {
    "source" : {
      "type": "SCRIPT",
      "path": "alert_disk_space.py",
      "parameters": [
        {
          "name": "minimum.free.space",
          "display_name": "Minimum Free Space",
          "value": 5000000000,
          "type": "NUMERIC",
          "description": "The overall amount of free disk space left before an alert is triggered.",
          "units": "bytes",
          "threshold": "WARNING"
        },
        {
          "name": "percent.used.space.warning.threshold",
          "display_name": "Warning",
          "value": 0.5,
          "type": "PERCENT",
          "description": "The percent of disk space consumed before a warning is triggered.",
          "units": "%",
          "threshold": "WARNING"
        },
        {
          "name": "percent.free.space.critical.threshold",
          "display_name": "Critical",
          "value": 0.8,
          "type": "PERCENT",
          "description": "The percent of disk space consumed before a critical alert is triggered.",
          "units": "%",
          "threshold": "CRITICAL"
       }
     ]
  }
}



On Jun 18, 2015, at 10:05 AM, Sumit Mohanty <smohanty@hortonworks.com<mailto:smohanty@hortonworks.com>>
wrote:

Does this have the details you need?
https://github.com/apache/ambari/blob/branch-2.0.0/ambari-server/docs/api/v1/alert-definitions.md

-Sumit
________________________________________
From: Eirik Thorsnes <eirik.thorsnes@uni.no>
Sent: Thursday, June 18, 2015 2:58 AM
To: user@ambari.apache.org
Subject: Ambari 2.1.0-snap: Alert configuration location

Hi,

I'm looking at Ambari 2.1.0 compiled from git.
In JIRA AMBARI-10816 it was added the possibility to use configuration
instead of hard-coded values for alerts (as I understand it).

Where do I set these configurations?
For e.g.: the configuration percent.used.space.warning.threshold in the
alert_disk_space.py script.

Thanks,
Eirik

--
Eirik Thorsnes



Mime
View raw message