Create(Visualize) for below scenario

(Manju) #1

Hi,

I want create a visualize which displays the avg. duration for each client specific to a DB server.

ex : Database - 0065 it has approx 22 clients.
ex column names - entity_code , company_name ,db and duration_ms.

Please help on this.

(Joe Fleming) #2

If you are already logging the duration time, this should be pretty straightforward using the interface in Visualize.

Using the example fields you provided, the metric you want is the average of the duration_ms field. This will be at the top of the form on the left side, the aggregation you want is the average value, and the field is duration_ms.

Then you want to split that data into buckets to group the results by some dimensions. In this case, you want to split it up by company_name and db (I think, based on the field names you provided). The order of the buckets is important, as the data is split up in order. In your case, if you want to group the output by company (I think you may), then start with that one. Create a terms aggregation on the company_name field, and then create another terms aggregation ont he db field. If the resulting order is wrong, you can swap them in the interface by dragging the second one to the top.

I hope that explanation helps.

(Manju) #3

@Joe_Fleming thank you so much.
Capture1

I was able to pull the data which has columns like db,entity_code, count and duration_ms.
but i am unable to add the company name to visualize as i am no result found
image

Please help on this.:slight_smile:

(Joe Fleming) #4

Is the company name being stored in the document as well, or do you need to map it back from some other data (like entiry_code maybe)? If you need to map the name to some identifier, you'll have to do that enrichment as ingest time, since Elasticsearch is a document store and there's no way to do "joins" to other documents. What I mean by enrichment is that you'll need to do that ID to NAME lookup first, and add it to the document you write to Elasticsearch.

(system) closed #5

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