Promtail output in JSON on Grafana for /var/log/syslog

Hello Community!

I am pretty new to the Grafana. I would like like to display the contents of the syslog file (var/logs/syslog.log) on the dashboard in table view. I would like to create a dashboard similar to the dashboard (12433 - DashboardID). I am unable to extract the data in json format. I am able to display the contents of the syslog on the dashboard, but I need to put them in a table. The columns that are of my interest are timestamp, loglevel, message and device/instance. Can some one help me over come this point and assist me. I am pretty sure that I do not get the data in json format to use the piping and extract the labels. I thank in advance.

And my scrape config of promtail is:

http_listen_port: 9080
grpc_listen_port: 0

filename: /tmp/positions.yaml



  • job_name: system
    • targets:
      • localhost
        job: varlogs
        path: /var/log/*log