How to Visualize 1 as Yes and 0 as No

Hi,
I'm new to Kibana.

I'm on kibana 6.0.
I have some fields (total 8 fields) which are either 1 or 0 which basically means Yes or No. How can i display this type of data in Kibana as Yes/No or UP/Down accordingly .

Should i be using JSON input to write any IF statements? Kindly help.

Thanks,
Sahadev

Hey @sahadevgd a Scripted Field is your best bet.

Hi @sahadevgd, if you have quite a big amount of data, scripting may reduce the speed of your queries. If you are feeding data via logstash, you can index those documents already with desired fields and values.

Hi @emil.mirzayev Thanks for your reply. We are feeding the data via logstash. The first method we tried is by sending the data to Kibana as Up and Down instead of 1 and 0. But we were unable to find the right way to visualize this type of data hence converted it to 1 and 0 and feeding it.

Kindly suggest how to visualize Text and show Up as Green and Down as Red with respect to timestamp.

Hi @Brandon_Kobel, thanks, i'll have a look at this.

@sahadevgd if you're just wanting to do this for a few visualizations, you can also use the Filter aggregation to do something similar to:

@Brandon_Kobel I was able to get this using the Goal type but when the value is 0, i'm unable to display it. I've tried the range as 0-1 and also 0-0 but still when the value is 0, the graph doesn't show up.

I have certain env's for which i need to show Up/Down like given in the below snapshow, qa1 & qa3 are Up, qa2 is Down.

@sahadevgd Kibana's Visualizations are based off of "aggregates" of values, and they generally don't represent individual documents in Elasticsearch. Can you share a screenshot of your full Visualization configuration?

Hi @Brandon_Kobel, Sorry for the delay in getting back to you. I have a couple of queries, could you please clarify. I'll provide you my data which I'm feeding via logstash.

Data:

ETime,OverAllStatus,Env,Host,Port,DiskSpaceStatus,ScriptStatus,DBStatus,TotalDiskSpace,FreeDiskSpace
2018-03-12 10:20:24.516Z,1,qa1,abc.xyz.com,8080,1,1,1,315683848,178826512
2018-03-12 10:20:49.123Z,1,qa2,abc.xyz.com,8080,1,1,1,315683848,178826222

So as you can see OverAllStatus,DiskSpaceStatus,ScriptStatus,DBStatus are getting data as 1's or 0's based on the Up/Down status.

How can I display this data as Up and Down or say Green or Red based on 1 and 0. Which visualization type should be used to have a better picture of this type of data.

If i have to convert this type of data to text, how can text be used to display. I am attaching a sample format.

Untitled

Instead of Log API, Log Transformer etc, i would be having QA1, QA2 etc.
Please help.

Hi @Brandon_Kobel, Scripted Field worked for us.
Thanks much.