How to compile the proto definiton #4232
-
Hi Everyone, I am very new to Mimir (and Python!) trying to figure out how I can push some sample data to our Grafana instance. I did a test using curl which didn't work:
I was not able to work out what the issue is. Then I thought about using Python to push the sample data using protocol buffers. however, not sure about how I could use the proto definition and generate the mimir_pb package. I presume I cannot pip install it? I cloned the repo into /tmp/mimir and:
I was wondering if there is a sample command that I could use to compile the proto definition. thanks for helping. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Hi, What specifically are you trying to do? Usually applications don't write directly to Mimir. Instead, they would expose metrics using a Prometheus client library at an HTTP endpoint (such as Some links that might be helpful:
|
Beta Was this translation helpful? Give feedback.
-
Hi, thanks for reply. I need to study this more then and thanks for providing the links. I was trying to follow discussion 4009 and write data to mimir using python. There is a code sample there but it invokes methods (LabelPair, Exemplar, etc.) from - what seems to be a - package called mimir_pb2. I am not able to compile/construct this package so was wondering if I could be provided with some information as to how to do it. |
Beta Was this translation helpful? Give feedback.
-
Hi, you can try the following commands from inside Mimir repository: First, fetch build image that we use for building Mimir:
This will fetch build image and tag it with
After running this, you should see generated |
Beta Was this translation helpful? Give feedback.
Hi,
What specifically are you trying to do? Usually applications don't write directly to Mimir. Instead, they would expose metrics using a Prometheus client library at an HTTP endpoint (such as
/metrics
) and Prometheus or the Grafana Agent handles scraping each of those applications. Prometheus or the Grafana Agent would then be responsible for remote writing to Mimir.Some links that might be helpful: