In Grafana I added an Exclude parameter to the Dashboard. If the Exclude field is empty, I would want it to do nothing, otherwise exclude lines that contain the regex in Exclude field.
I would want to write something like:
{label="this"} ( if "$Exclude" != "" then !~ "$Exclude" else <do nothing> fi )
How could I write this in LogQL? I tried reading documentation, but to no avail. Currently, I just set the default value of Exclude to a unique UUID, however would be nice for it to be empty.