Hi,
Code below is checking the status of the website from few location.Each location has own IP address. Its working properly, but when i dont got any logs from specyfic location the rectangle is dissapering. How to add additional text with information that i dont got any logs from specific location.
I would be greaftull for help
{
$schema: https://vega.github.io/schema/vega-lite/v5.json
data: {
url: {
index: logs-*
// Aggregate data by the time field into time buckets, counting the number of documents in each bucket.
body: {
"_source": ["@timestamp","syslog_hostname", "syslog_ip_address", "syslog_url", "syslog_status"]
// Speed up the response by only including aggregation results
size: 200
}
}
format: {property: "hits.hits"}
}
"concat": [
{
"columns": 13,
"facet": {
"field": "_source.syslog_hostname",
"title": "",
},
"spec": {
"layer": [
{
"mark": {
"type": "rect"
},
"width": 60,
"height": 40,
"encoding": {
"href": {"field": "_source.syslog_url"},
"color": {
"condition":{"test": "datum._source.syslog_status == 200", "value" : "green"},
"value": "red"
}
}
},
{
"mark": {
"type": "text"
},
"encoding": {
"text": {
"condition": {"test": "datum._source.syslog_status == 200", "value" : "OK"},
"value": "Problem"
},
"color": {
"value": "white"
}
}
}
]
}
}
]
}