Hi there,
I have a dashboard with several singles with a depends="$token_name$" to display info based on tokens. My understanding is that the "depends" is just for hiding or displaying data and no matter the value of the token, the search associated to the object would still run behind the scenes, is this correct? If so, would it be possible to prevent the search from running unless the $token_name$ exists? in other works is there a "depends" that we could use at the search level?
TIA!
To keep a search from running until a token is defined, put that token in the search query. You can even put it in a comment.
`comment($token|s$)`
To keep a search from running until a token is defined, put that token in the search query. You can even put it in a comment.
`comment($token|s$)`
This was extremely useful for me, I have a question, how can I append the search based on a second token?
like:
$tk1|s$ index="123" | timechart count AS 123 | append search $tk2|s$ index="456" | timechart count 456
I want the first part to run with the first token set, and the second part to run only if the second token is set too. how can I do this?
Very cool, thanks Rich for your help!
To check if the search actually runs even when it is hidden, you should go to your job history and see if the search has ran even though the token didn't exist and the panel didn't show.
If the search does run (I don't think it does, but am not 100% sure) you could put a token value in the search and unset on start so it doesn't run.
The search will definitely not run if the token in the search does not exist.
Then when you want the search to run, you can make a condition to give the token a value (it could even just be a "" or *) so that the search can run since the token will then exist.
I would check your managed jobs first to see if the search runs even though the panel is hidden.
The answer from @richgalloway would work too. (Would still be good to check the managed jobs though to see if it matters)