How to export Prometheus raw metric data?

Hey guys,

I’ve been working with Prometheus to gather data for an AI project (i.e., all of the gathered raw data is needed) and was able to set it up correctly. However, I now wish to export the raw data and I tried using the HTTP API. It works with 1 metric but I wasn’t able to get it working for multiple. This is my current solution:

What am I doing wrong? Is it even possible? Is there a better solution for exporting all of the gathered metric data? Otherwise I may have to turn to a Python client…

I think it’s due to the spaces before and after the pipe. Try:

if you wish to export all metrics from one job, rather take the {job="my_ai_job"} matcher

Nice, thank you for your solution! As I am using a Kubernetes cluster on Google Cloud, do you think there are metrics not related to a job (i.e., node in the cluster)?