Templating and _type value in elastic search

Hi,

I want to make a variable of _type in elastic search and then use that variable in query that i write to plot some graphs. can some one assist me how to do this? The sample data is below

“_index” : “region_summary”,
"_type" : “CLDIN_ETZ_C_VM02_Summary”,
"_id" : “20170701011623779220_CLDIN_ETZ_C_VM02”,
"_score" : 1.0,
"_source" : {
“region_name” : “CLDIN_ETZ_C_VM02”,
“vmsandvols_count” : 384,
“start_time” : 10717004547,
“active_ips” : 368,
“subnet_1” : {
“name” : “ETZ_C_9.113.36”,
“ipcount” : 476
…}}

Just use this in the Query field of your template variable (Type Query):

{"find": "terms", "field": "_type"} 

@torkel Thanks mate …it worked

I have grafana enabled with ldap logins. My users log into grafana with email id as the logins.

I have data in elastic search that have a field, user_email:emailid@email.com.

Now, I want to create a table where, if a given user logs into system, the table should only show the document fields that where the logged in user id is tagged in user_email field. Is this possible?

Example:

Just like a bank account example, all users data is in elastic search …but the the logged in user gets to see a particular graph where only his records are queried.

Not currently possible

Any feature requests on this line?

there already is one

1 Like