|###
Background
I want use the reReplaceAll in alerting annotation
Because I have a timestamp in scientific notation, be used for part of URL.
Example:
timestamp: 1.6613856e+12
* ```
URL: http://myhost?param=1.6613856e**%2B**12
As you see, I need escape “+” to “%2B”
So that I found template function reReplaceAll.
But the reReplaceAll didn’t work as expected.
We get the value from ES data source
$values.E0.Value is 1.6613856e+12
What you expected to happen:
Below values should be :
Test_fixed: 1.6613352e%2B12
Test_single_value: 1.6613352e
Test_single_value_fixed: 1.6613352e
Test_v2: 1.6613352e12
Test_v3: 1.6613352e+12
Test_v3_fixed_value: 1.6613352e+12
How to reproduce it (as minimally and precisely as possible):
- setup an ES data source.
- setup an alerting rule, use above data source.
- config annotations in alerting, such as above image.
- waiting alert email…
Anything else we need to know?:
None
Environment:
- Grafana version: 9.0.6, build based on “grafana/grafana:9.0.6-ubuntu”. ubuntu.Dockerfile
- Data source type & version: ElasticSearch
- OS Grafana is installed on: ubuntu
- User OS & Browser: MAC OS, chrome
- Grafana plugins: none
- Others:|