-
Type:
Problem report
-
Resolution: Unresolved
-
Priority:
Trivial
-
None
-
Affects Version/s: 8.0.0rc1
-
Component/s: API (A)
Using elasticsearch history provider, the "Monitoring > Latest data" does not show graph or range of values. Only last 500 values are shown.
Steps to reproduce:
- Create trapper item.
- Configure HistoryProvider=elasticsearch, seed data to item.
- Configure HistoryProvider=sql, seed same data.
- Open "Monitoring > Latest data", click on Graph/History for this item and select the range to see this data.
- Observe: chart or values shown.
- Only edit UI config and enable elasticseach history provider again. Then reload this page.
- Observe: no data shown.
- Expected: identical view as for sql history provider case.
Analysis:
Frontend is not sending the correct request for elasticsearch. Now the requested range is interpreted in millis at elasticsearch side, whilst frontend uses seconds, as a result, selected range is in distant past.
There are two approaches to solve this:
- cast the integer to string (will implicitly query ES for seconds again)
- add an explicit 'format' => 'epoch_second' to requests.
References: