Loki on OpenShift 3.9 scrape Logs from single Pod

Hello together,

i have installed Loki and Promtail on my OpenShift 3.9 cluster.

I use this Promtail ConfigMap:

# Client Config
clients:
  - url: http://loki.grafana-test.svc:3100/loki/api/v1/push  
  
# Server Config
server:
  http_listen_port: 9080
  grpc_listen_port: 0
  log_level: debug
  
positions:
  filename: /tmp/positions.yaml
  
scrape_configs:
- job_name: system
  entry_parser: raw
  static_configs:
  - targets:
      - localhost
    labels:
      job: varlogs
      __path__: /var/log/*log

So far it works like expected. I can see the logs from the Promtail Pod itself in my Grafana.

Now I like to scrap the Logs from a single Pod “Pod-A”.
Is this possible with Loki on OpenShift 3.9?

Thanks in advance

Hi @manfredgnaedig, trying to run loki on OCP 3.11, but running into security issues. Can you let me know how you were able to run it on 3.9 ?

Thanks
Raj