You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by "Jonathan Hurley (JIRA)" <ji...@apache.org> on 2015/04/29 05:52:06 UTC

[jira] [Updated] (AMBARI-10816) Expose Customizable Parameters For SCRIPT Alerts

     [ https://issues.apache.org/jira/browse/AMBARI-10816?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Hurley updated AMBARI-10816:
-------------------------------------
    Description: 
Ambari SCRIPT alerts currently do not expose any configurable properties or thresholds. 

Example: Ability to customize "timeout=30" in the Hive Metastore Process alert

https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_hive_metastore.py

{code:title=Parameters Defined In Definition JSON}
      {
        "name": "ambari_agent_disk_usage",
        "label": "Ambari Agent Disk Usage",
        "description": "This host-level alert is triggered if the amount of disk space used on a host goes above specific thresholds. The default values are 50% for WARNING and 80% for CRITICAL.",
        "interval": 1,
        "scope": "HOST",
        "enabled": true,
        "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"
            },
            {
            "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": "%"
            },
            {
            "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": "%"
            }
          ]
        }
      }
{code}

{code:title=Definition Returned From API}
      "AlertDefinition" : {
        "cluster_name" : "c1",
        "id" : 58,
        "label" : "Ambari Agent Disk Usage",
        "name" : "ambari_agent_disk_usage",
        "source" : {
          "parameters" : [
            {
              "display_name" : "Minimum Free Space",
              "description" : "The overall amount of free disk space left before an alert is triggered.",
              "name" : "minimum.free.space",
              "value" : "5.0E9",
              "type" : "NUMERIC",
              "units" : "bytes"
            },
            {
              "display_name" : "Warning",
              "description" : "The percent of disk space consumed before a warning is triggered.",
              "name" : "percent.used.space.warning.threshold",
              "value" : "0.5",
              "type" : "PERCENT",
              "units" : "%"
            },
            {
              "display_name" : "Critical",
              "description" : "The percent of disk space consumed before a critical alert is triggered.",
              "name" : "percent.free.space.critical.threshold",
              "value" : "0.8",
              "type" : "PERCENT",
              "units" : "%"
            }
          ],
          "path" : "alert_disk_space.py",
          "type" : "SCRIPT"
        }
      }
{code}

  was:
Ambari SCRIPT alerts currently do not expose any configurable properties or thresholds. 

Example: Ability to customize "timeout=30" in the Hive Metastore Process alert

https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_hive_metastore.py

{code:title=Parameters Defined In Definition JSON}
      {
        "name": "ambari_agent_disk_usage",
        "label": "Ambari Agent Disk Usage",
        "description": "This host-level alert is triggered if the amount of disk space used on a host goes above specific thresholds. The default values are 50% for WARNING and 80% for CRITICAL.",
        "interval": 1,
        "scope": "HOST",
        "enabled": true,
        "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"
            },
            {
            "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": "%"
            },
            {
            "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": "%"
            }
          ]
        }
      }
{code}

{code:title=Definition Returned From API}
      "AlertDefinition" : {
        "cluster_name" : "c1",
        "id" : 58,
        "label" : "Ambari Agent Disk Usage",
        "name" : "ambari_agent_disk_usage",
        "source" : {
          "parameters" : [
            {
              "display_name" : "Minimum Free Space",
              "description" : "The overall amount of free disk space left before an alert is triggered.",
              "name" : "minimum.free.space",
              "value" : "5.0E9",
              "type" : "NUMERIC",
              "units" : "bytes"
            },
            {
              "display_name" : "Warning",
              "description" : "The percent of disk space consumed before a warning is triggered.",
              "name" : "percent.used.space.warning.threshold",
              "value" : "0.02",
              "type" : "PERCENT",
              "units" : "%"
            },
            {
              "display_name" : "Critical",
              "description" : "The percent of disk space consumed before a critical alert is triggered.",
              "name" : "percent.free.space.critical.threshold",
              "value" : "0.01",
              "type" : "PERCENT",
              "units" : "%"
            }
          ],
          "path" : "alert_disk_space.py",
          "type" : "SCRIPT"
        }
      }
{code}


> Expose Customizable Parameters For SCRIPT Alerts
> ------------------------------------------------
>
>                 Key: AMBARI-10816
>                 URL: https://issues.apache.org/jira/browse/AMBARI-10816
>             Project: Ambari
>          Issue Type: Task
>          Components: ambari-agent, ambari-server
>    Affects Versions: 2.0.0
>            Reporter: Jonathan Hurley
>            Assignee: Jonathan Hurley
>            Priority: Critical
>             Fix For: 2.1.0
>
>
> Ambari SCRIPT alerts currently do not expose any configurable properties or thresholds. 
> Example: Ability to customize "timeout=30" in the Hive Metastore Process alert
> https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_hive_metastore.py
> {code:title=Parameters Defined In Definition JSON}
>       {
>         "name": "ambari_agent_disk_usage",
>         "label": "Ambari Agent Disk Usage",
>         "description": "This host-level alert is triggered if the amount of disk space used on a host goes above specific thresholds. The default values are 50% for WARNING and 80% for CRITICAL.",
>         "interval": 1,
>         "scope": "HOST",
>         "enabled": true,
>         "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"
>             },
>             {
>             "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": "%"
>             },
>             {
>             "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": "%"
>             }
>           ]
>         }
>       }
> {code}
> {code:title=Definition Returned From API}
>       "AlertDefinition" : {
>         "cluster_name" : "c1",
>         "id" : 58,
>         "label" : "Ambari Agent Disk Usage",
>         "name" : "ambari_agent_disk_usage",
>         "source" : {
>           "parameters" : [
>             {
>               "display_name" : "Minimum Free Space",
>               "description" : "The overall amount of free disk space left before an alert is triggered.",
>               "name" : "minimum.free.space",
>               "value" : "5.0E9",
>               "type" : "NUMERIC",
>               "units" : "bytes"
>             },
>             {
>               "display_name" : "Warning",
>               "description" : "The percent of disk space consumed before a warning is triggered.",
>               "name" : "percent.used.space.warning.threshold",
>               "value" : "0.5",
>               "type" : "PERCENT",
>               "units" : "%"
>             },
>             {
>               "display_name" : "Critical",
>               "description" : "The percent of disk space consumed before a critical alert is triggered.",
>               "name" : "percent.free.space.critical.threshold",
>               "value" : "0.8",
>               "type" : "PERCENT",
>               "units" : "%"
>             }
>           ],
>           "path" : "alert_disk_space.py",
>           "type" : "SCRIPT"
>         }
>       }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)