My log file is:
I want a dashboard in which I can search for Service, User, Id.
I made three input fields with default="*".
My query is:
When I make the query I get only thee first row of the log.
I understood that it is related to fields not present in the log file.
How can I modify my dashboard/query to obtain alle the rows?
Thank you
Hi everybody,
I adopted this solution. I created a token using change/condition. In this scenario I changed the default value form "*" to blanck.
The input in the xml dashboard definition is:
the query is:
index=xxx $userToken$
what happens is:
1) if User is empty/blank the query is index=xxx
2) if User has a value the query is index=xxx User=value
Worked for me! Thanks
Try this
index=xxxx Service=$serviceToken$ Id=$idToken$ OR User=$userToken$
let me know if this helps!
Thank you for the reply.
It works if I leave * in all the inputs.
If I set User to ut1234 I want only two lines as response of the query (the row 1 and 3).
Thank you
Yes, you are right this will not work in that case. This is because you are searching User=ut1234 OR Id=*
In order to write correct search query, you would need to add only those fields which are available in all the events. OR else you would need to find a workaround
Try this
index=xxxx | fillnull value="NA" User |search Service=$serviceToken$ Id=$idToken$ User=$userToken$