If your possible values are controlled you can just create a table and add metrics filtering for each status_tracking.type
value
I did a test as follows. First create some sample data and a dataview (next time you could provide this kind of sample data for faster resolution)
# Cleanup if necessary
DELETE discuss-357406
# Create the index with required fields
PUT discuss-357406
{
"mappings": {
"properties": {
"ts": { "type": "date" },
"top_id": { "type": "keyword" },
"status_tracking": {
"properties": {
"status": { "type": "keyword" },
"type": { "type": "keyword" }
}
}
}
}
}
# add some sample data varying the date, top_id
# and the status_tracking.type
POST discuss-357406/_bulk
{ "index": {}}
{"ts": "2024-04-27T18:00:00+0200", "top_id": "abc", "status_tracking": {"status": "ok", "type": "max" }}
{ "index": {}}
{"ts": "2024-04-27T18:00:00+0200", "top_id": "abc1", "status_tracking": {"status": "ok", "type": "max" }}
{ "index": {}}
{"ts": "2024-04-27T18:00:00+0200", "top_id": "abc12", "status_tracking": {"status": "ok", "type": "max" }}
{ "index": {}}
{"ts": "2024-04-27T18:00:00+0200", "top_id": "abc123", "status_tracking": {"status": "ok", "type": "max" }}
{ "index": {}}
{"ts": "2024-04-28T19:00:00+0200", "top_id": "abc", "status_tracking": {"status": "ok", "type": "min" }}
{ "index": {}}
{"ts": "2024-04-28T19:00:00+0200", "top_id": "abc1", "status_tracking": {"status": "ok", "type": "min" }}
{ "index": {}}
{"ts": "2024-04-28T19:00:00+0200", "top_id": "abc12", "status_tracking": {"status": "ok", "type": "min" }}
{ "index": {}}
{"ts": "2024-04-29T10:00:00+0200", "top_id": "abc", "status_tracking": {"status": "ok", "type": "mean" }}
{ "index": {}}
{"ts": "2024-04-29T10:00:00+0200", "top_id": "abc12", "status_tracking": {"status": "ok", "type": "mean" }}
{ "index": {}}
{"ts": "2024-04-29T10:00:00+0200", "top_id": "abc123", "status_tracking": {"status": "ok", "type": "mean" }}
# Create the data view
POST kbn:/api/data_views/data_view
{
"data_view": {
"title": "discuss-357406",
"timeFieldName": "ts"
}
}
With that data you can create a Lens table with rows per top values of the top_id
field and a different metrics
Where each metric has a custom filter