[ 
https://issues.apache.org/jira/browse/AMBARI-21633?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16119681#comment-16119681
 ] 

Doroszlai, Attila commented on AMBARI-21633:
--------------------------------------------

Hi [~simon.heeg],

{{get_tokens()}} should return a tuple.  [Here's an 
example|https://github.com/apache/ambari/blob/branch-2.4/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/alerts/alert_flume_agent_status.py#L35-L40]
 of requesting one configuration parameter:

{noformat:title=alert_flume_agent_status.py}
def get_tokens():
  """
  Returns a tuple of tokens in the format {{site/property}} that will be used
  to build the dictionary passed into execute
  """
  return (FLUME_CONF_DIR_KEY,)
{noformat}

> Ambari alerts not able to pass only one configuration parameter
> ---------------------------------------------------------------
>
>                 Key: AMBARI-21633
>                 URL: https://issues.apache.org/jira/browse/AMBARI-21633
>             Project: Ambari
>          Issue Type: Bug
>          Components: alerts
>    Affects Versions: 2.4.2
>         Environment: Ubuntu 14.04
>            Reporter: Simon Heeg
>            Priority: Minor
>              Labels: alerts, newbie
>
> Ambari Alerts will call the *get_tokens():* functions in an alert script to 
> populate the *configurations* dictionary. However, if *get_tokens():* only 
> requests one configuration parameter, the dictionary will look like this:
> {"a": "a", "o": "o", "e": "e", "i": "i", "h": "h", "-": "-", "m": "m", "/": 
> "/", ".": ".", "s": "s", "r": "r", "u": "u", "t": "t", "v": "v"}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to