Is there any method to show specific host into one single chart in the dashboard?

I am trying to build the dashboard right now and able to show the CPU/memory usage by single specific host as below.

example1

however, I would like to group some specific hostnames (just like uat servers or app servers) to show into one single chart.

Is there any method to let me do that? I tried to use "add filter" but seems unable to do that. May I ask if anyone could guide me to do that please?

Thank you.

Hi @afan,

how is your data structured?

The first option it comes to mind would be to use Lens filtered metric (either via quick function or via formula):

I've built them via the Filter by advanced option:


And one by Formula:

I've built this example using the logs sample data.

If I try to use your suggestion way, I found that if I input host.hostname, it just returns to "equal" or "exists" for looking my hostname. Seems like I couldn't use something like "contain" to select multiple specific hostname for my graph.

I'd say then that you have two options here:

  • if you know all the names of the hostnames involved in a group you could create a KQL query joining them via the OR operator: host.hostname : "A" OR host.hostname: "B" ...etc
  • alternatively if you can express it via regex you could use a Lucene query with a RegExp - note that there are some limitations here, see the notes here

You can click on the KQL button in the popup to switch to Lucene.

Thank you Marco and I managed to plot such graph just like this as below. Thanks so much. :slight_smile:

pic3

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