Fix crash-loop in thresholder caused by floating point numbers used as dimension filter

Example: avg(some_timer{quantile=0.99}) > 0.1)

Changes:
* add DECIMAL (floating point value) to allowed tokens for dimensions

Without this fix, an alarm-definition like the above one once injected
through the Python API will break the Java-ORM layer because the
alarm-definition cannot be parsed by the generated ANTLR parser.
As a consequence the thresholder worker will terminate, leading to a
crash-cycle. I could not find a way to make the ORM-layer ignore
non-parseable alarm-definitions. So maybe this fix should be
complemented by an extension of the Python API that uses exactly the
same ANTLR grammar to validate incoming alarm-definitions.

Change-Id: Ibbd41e1b817ebadc74b1b4a677db898cfa173ccb
This commit is contained in:
Joachim Barheine 2016-11-28 15:33:39 +01:00
parent a9996fa39f
commit b988eb855c
1 changed files with 1 additions and 0 deletions

View File

@ -138,6 +138,7 @@ txt
: TXT
| keyword
| INTEGER
| DECIMAL
| STRING
;