I am currently trying to extract data from a text log:
Backup created.
------------------------------------------------------------------------------
Chunk index: 510649 11946505
Unique chunks Total chunks
All archives: 14.57 TB 14.12 TB 744.29 GB
This archive: 851.18 GB 823.80 GB 2.60 GB
Original size Compressed size Deduplicated size
------------------------------------------------------------------------------
I am interested in viewing the deduplicated_size in GB (this should result in “744.29 GB” for this example)
With a regex query, I am able to extract the value (744.29) and view it in a time series:
However, I could not use the extracted label deduplicated_unit to map a unit to deduplicated size.
Do Grafana or Loki have options to map these units? Or are there workarounds to view the data properly?
Thanks for any help on this issue, it bothered me for several days already!
I don’t believe you can dynamically set unit on a Grafana Graph. Your goal is to have an unified unit (byte), and ideally your log should have a unified unit (one should always log with analytics in mind whenever possible), but if that’s not possible then you’ll have to do some processing loki query. Something like this (not tested):