[
https://issues.apache.org/jira/browse/AMBARI-6915?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Alejandro Fernandez updated AMBARI-6915:
----------------------------------------
Fix Version/s: (was: 1.8.0)
2.0.0
> Alerts: Change AlertDefinition to Support a Reporting Member
> ------------------------------------------------------------
>
> Key: AMBARI-6915
> URL: https://issues.apache.org/jira/browse/AMBARI-6915
> Project: Ambari
> Issue Type: Task
> Affects Versions: 1.8.0
> Reporter: Jonathan Hurley
> Assignee: Jonathan Hurley
> Fix For: 2.0.0
>
>
> AlertDefinitions need to change slightly to allow an object-ified "reporting"
> structure.
> Example {{alerts.json}}
> {code}
> {
> "name": "namenode_cpu",
> "label": "NameNode host CPU Utilization",
> "scope": "host",
> "source": {
> "type": "METRIC",
> "jmx": "java.lang:type=OperatingSystem/SystemCpuLoad",
> "host": "{{hdfs-site/dfs.namenode.secondary.http-address}}",
> "reporting": {
> "ok": {
> "text": "System CPU Load is OK"
> },
> "warning": {
> "text": "System CPU Load is Nearing Critical",
> "value": 70
> },
> "critical": {
> "text": "System CPU Load is Critical",
> "value": 80
> }
> }
> }
> }
> {code}
> Example Heartbeat JSON:
> {code}
> {
> 'alertDefinitionCommands':[
> {
> 'alertDefinitions':[
> {
> 'componentName':'NAMENODE',
> 'enabled':True,
> 'interval':1,
> 'label':'HDFS Port Check',
> 'name':'HDFS-Port',
> 'serviceName':'HDFS',
> 'source':{
> 'port':0,
> 'reporting':{
> 'critical':{
> 'text':'TCP FAIL - {0:.4f} response on port {1}'
> },
> 'ok':{
> 'text':'TCP OK - {0:.4f} response on port {1}'
> }
> },
> 'type':'PORT'
> }
> }
> ],
> 'clusterName':'c1',
> 'commandType':'ALERT_DEFINITION_COMMAND',
> 'hash':'0b1000cc35c3daf1bca1504d126a71bd',
> 'hostName':'c6404.ambari.apache.org'
> }
> ],
> 'cancelCommands':[
> ],
> 'executionCommands':[
> ],
> 'hasMappedComponents':True,
> 'responseId':18,
> 'restartAgent':False,
> 'statusCommands':[
> ]
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)