Skip to content

Commit

Permalink
Monitor metrics alerts: Support custom namespace. Add guidance for us…
Browse files Browse the repository at this point in the history
…ing ANTLR code-gen. (#10108)

* Fix #9460. Add guidance for using ANTLR code-gen.

* Code review feedback.

* Code review feedback.
  • Loading branch information
tjprescott authored Aug 5, 2019
1 parent 983399f commit 5789e2e
Show file tree
Hide file tree
Showing 7 changed files with 151 additions and 81 deletions.
4 changes: 4 additions & 0 deletions src/azure-cli/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ Release History
* Fixed issue where `az functionapp create` does not accept Standard_RAGRS storage account type.
* Fixed an issue where az webapp up would fail if run using older versions of python

**Monitor**

* `metrics alert create`: Allow '/' and '.' characters in namespace name to support custom metrics.

**Network**

* network nic ip-config add: Fixes #9861 where --ids was inadvertently exposed but did not work.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ expression : aggregation (namespace '.')* (QUOTE metric QUOTE WHITESPAC

aggregation : WORD WHITESPACE ;

namespace : WORD ;
namespace : (WORD | '/' | '.')+;

metric : (WORD | WHITESPACE | '.' | '/' | '_' | '\\' | ':' | '%')+;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@

# pylint: disable=all

# Generated from MetricAlertCondition.g4 by ANTLR 4.7.1
# Generated from MetricAlertCondition.g4 by ANTLR 4.7.2
# encoding: utf-8
from __future__ import print_function
from antlr4 import *
from io import StringIO
import sys



def serializedATN():
with StringIO() as buf:
buf.write(u"\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\2")
Expand Down Expand Up @@ -154,7 +155,7 @@ class MetricAlertConditionLexer(Lexer):

def __init__(self, input=None, output=sys.stdout):
super(MetricAlertConditionLexer, self).__init__(input, output=output)
self.checkVersion("4.7.1")
self.checkVersion("4.7.2")
self._interp = LexerATNSimulator(self, self.atn, self.decisionsToDFA, PredictionContextCache())
self._actions = None
self._predicates = None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

# pylint: disable=all

# Generated from MetricAlertCondition.g4 by ANTLR 4.7.1
# Generated from MetricAlertCondition.g4 by ANTLR 4.7.2
from antlr4 import *

# This class defines a complete listener for a parse tree produced by MetricAlertConditionParser.
Expand Down
Loading

0 comments on commit 5789e2e

Please sign in to comment.