Loki, promtail - view logs based on host selected

Hello all,

I am trying to find a way to which I want to be able to view a certain log file based on the selection of an instance. I am using Loki, promtail and prometheus. For example, lets say there are 3 instances and the log file I want to monitor using loki is the syslog. So if I select instance 1, the syslog file for instance 1 will show. If then select instance 2 then the syslog file for instance 2 will show. And so on.

my config-promtail.yml is as follows:

  http_listen_port: 9080
  grpc_listen_port: 0

  filename: /tmp/positions.yaml

  - url:

  - job_name: syslog
    - targets:
        - localhost
        job: syslog
        host: instance1
        agent: promtail
        __path__: /var/log/syslog

I have tried in my loki datasource:

{job=“syslog”, instance=~"$instance"}

Any ideas what is the best way to accomplish this?