'Grafana strange column title after json aprsing
I used the promtail config file to parse a json file and load the fields as labels into grafana:
example of log line:
{"time": 1647531679.5431354, "location": "Milano", "serialNumber": "hype3", "hostname": "hype3-hostname", "vmName": "vm9", "status": "WARNING"}
promtail.cfg:
....
- job_name: backup-status
static_configs:
- targets:
- localhost
labels:
__path__: /var/log/backup/jobs.log
pipeline_stages:
- json:
expressions:
time: time
vmName: vmName
status: status
hostname: hostname
location: location
- timestamp:
format: Unix
source: time
- labels:
vmName:
status:
time:
hostname:
location:
- output:
source: status
....
The labels load correctly in Grafan:

But when I go and try to create a plot with this data source the table view looks like this:

I was expecting to see as column names the labels of the log lines. Did anyone encounter a similar problem?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
