Tag Cloud to only show current value

I am reading data in from a machine tool and I would like to visualize the current status. My document looks like this

@timestamp Dec 9, 2020 @ 10:44:00.867
@version 1	
Events.Execution.@@data INTERRUPTED	
Events.Execution.name pexecution
_id wrJjSHYBNhsRe95vYMcn
_index mtconnect-demo
_score - 
_type _doc
componentId Mp1	
dataItemId Mpexecution	
deviceName OKUMA.MachiningCenterMA650-WEST
deviceUUID OKUMA.MachiningCenterMA650-WEST.188307
host mt-data-01
sequence 9,430,582
timestamp Dec 9, 2020 @ 10:41:18.000
type json

I would like the TAG cloud to show the latest Events.Execution.@@data How can I get my visualization to show just the latest one? Basically this will show the machine status so I just need the single latest value

If you just want to show the latest Events.Execution.@@data as a text on a dashboard, the "Metric" visualization in combination with the "top hits" aggregation is probably the right choice.

Thanks for the direction. When I do "Metric" with a "Top Hit" aggregation and add Buckets of Events.Execution.@@data.keyword I don't seem to get the "latest". Here are some screen grabs of my settings

This is not the "Metric" visualization type. Can you explain the chart you want to see? I thought it was just about showing the single latest value of Events.Execution.@@data

I think I figured it out. No need for the Buckets. Here is what I did to get the value I want.

Now is there anyway to change the color of the metric based on the word? Like Green for Active and RED for STOPPED?

Yes, that's what I meant.

Now is there anyway to change the color of the metric based on the word? Like Green for Active and RED for STOPPED?

You should be able to do this by going to the index pattern and configuring the "color" field formatter for the Events.Execution.@@data

Not sure how to do that but I will look into it (suggestions on where to start?). Thanks for the help

Go to Management > Index patterns > your index pattern > edit the Events.Execution.@@data field > pick the "color" formatter

1 Like

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