# Vega: text information when dont get logs

**URL:** <https://discuss.elastic.co/t/vega-text-information-when-dont-get-logs/334416>\
**Category:** Kibana\
**Tags:** vega\
**Created:** [May 26, 2023, 10:08am UTC](https://discuss.elastic.co/t/vega-text-information-when-dont-get-logs/334416 "2023-05-26T10:08:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![martinez061](https://avatars.discourse-cdn.com/v4/letter/m/b19c9b/32.png) [@martinez061](https://discuss.elastic.co/u/martinez061)\
**Post date:** [May 26, 2023, 10:08am UTC](https://discuss.elastic.co/t/vega-text-information-when-dont-get-logs/334416/1 "2023-05-26T10:08:21Z")

</div>

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

```auto
{
  $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"
                }
              }
            }
        ]
      }
    }
  ]
 
}

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 23, 2023, 10:09am UTC](https://discuss.elastic.co/t/vega-text-information-when-dont-get-logs/334416/2 "2023-06-23T10:09:07Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
