You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A while ago we got a bug report with an unusual time format coming from AWS OpenSearch that wasn't readable by our histogram panel (or any other time-based vis plugin, most likely). The problem in this case is that the LogsVolumePanel is using moment.js to format this field, and encountering an unsupported string.
I suggested to the user to format the data on their end, but it seems like Elasticsearch plugin squad is implementing something that we could mirror and that might rid us of this problem without having to manually add support for each strange format.
...When we make the search-json-object, (at this point we do know what the timestamp-field’s name is), we do:
{
...
"fields": [{"field":"@timestamp", "format":"something-that-grafana-likes"}]
}
if we run the search like this, in the elastic-response, there will be the hits array, where every item contains the _source attribute with the full objects. but now it will also have a fields array. so, we now take the timestamp-field-value from teh fields part, and ignore it in the _source part.
at least this is our plan
i did a quick check, and that field is available in OpenSearch too: https://opensearch.org/docs/latest/api-reference/search/#request-body
I think that should be enough to start investigating, there's a bit more info in this thread
The text was updated successfully, but these errors were encountered:
idastambuk
changed the title
Make sure that the plugin returns a Grafana-readable format
Make sure that the plugin returns a Grafana-readable timestamp format
Jun 13, 2023
A while ago we got a bug report with an unusual time format coming from AWS OpenSearch that wasn't readable by our histogram panel (or any other time-based vis plugin, most likely). The problem in this case is that the LogsVolumePanel is using moment.js to format this field, and encountering an unsupported string.
I suggested to the user to format the data on their end, but it seems like Elasticsearch plugin squad is implementing something that we could mirror and that might rid us of this problem without having to manually add support for each strange format.
Quoting @gabor:
I think that should be enough to start investigating, there's a bit more info in this thread
The text was updated successfully, but these errors were encountered: