skip to Main Content

Ubuntu – How do I extract multiple pieces of information using a regex?

I need to extract multiple pieces of information from a returned collection of strings. The strings consist of a number of "fields", for example: {container="node-exporter", device="/dev/mapper/ubuntu--vg-ubuntu--lv", endpoint="http-metrics", fstype="ext4", instance="172.20.32.10:9100", job="node-exporter", mountpoint="/", namespace="prometheus", pod="prometheus-prometheus-node-exporter-xvz7v", service="prometheus-prometheus-node-exporter"} {container="node-exporter", device="/dev/mapper/ubuntu--vg-ubuntu--lv", endpoint="http-metrics", fstype="ext4", instance="172.20.32.11:9100", job="node-exporter",…

VIEW QUESTION
Back To Top
Search