graphite_exporter icon indicating copy to clipboard operation
graphite_exporter copied to clipboard

Document scenarios for sending graphite metrics to graphite_exporter

Open idling11 opened this issue 6 years ago • 3 comments

Hi all: I tried graphite_exporter for the first time. I have graphite and graphite_exporter running on different hosts already, but how can i send the metrics which graphite received to the graphite_exporter? Is there a way to config this or must i write codes to achieve this goal ? In graphite , I only run carbon-cache. should I run carbon-relay or carbon-agg to send metrics to graphite_exporter?

can someone tell me how to do it ? appreciate it

idling11 avatar Jan 14 '19 03:01 idling11

Yes, how you send metrics to the exporter is up to you. You can do this in your code, or use carbon-relay. For the best results, I would recommend running the exporter and (if necessary) carbon-relay as sidecars, that is, local to each application instance:

+-----------------------------------------------------+
|                                                     |
|                                                     |
|      host/VM/pod                                    |
|                                                     |
|                                                     |
|                                                     |
|                                                     |
|    +----------------------------------------+       |
|    |                                        |       |
|    |                                        |       |
|    |      Application                       |       |
|    |                                        |       |
|    |                                        |       |
|    +------------------+---------------------+       |                                                                   +---------------------------------------------------+
|                       |                             |                                                                   |                                                   |
|                       |                             |                                                                   |                                                   |
|                       |                             |                                                                   |                                                   |
|                       v                             |                                                                   |                                                   |
|                                                     |                                                                   |                                                   |
|    +----------------------------------------+       |                                                                   |            Graphite                               |
|    |                                        |       |                                                                   |                                                   |
|    |    carbon-relay                        +-------------------------------------------------------------------------> |                                                   |
|    |                                        |       |                                                                   |                                                   |
|    +------------------+---------------------+       |                                                                   |                                                   |
|                       |                             |                                                                   |                                                   |
|                       |                             |                                                                   |                                                   |
|                       |                             |                                                                   |                                                   |
|                       v                             |                                                                   +---------------------------------------------------+
|                                                     |
|    +----------------------------------------+       |
|    |                                        |       |
|    |     graphite_exporter                  | <---------------------------------------+
|    |                                        |       |                                 |                                 ----------------------------------------------------+
|    +----------------------------------------+       |                                 |                                 |                                                   |
|                                                     |                                 |                                 |                                                   |
|                                                     |                                 |                                 |                                                   |
|                                                     |                                 |                                 |                                                   |
+-----------------------------------------------------+                                 |                                 |                                                   |
                                                                                        |                                 |           Prometheus                              |
                                                                                        +---------------------------------+                                                   |
                                                                                                                          |                                                   |
                                                                                                                          |                                                   |
                                                                                                                          |                                                   |
                                                                                                                          |                                                   |
                                                                                                                          |                                                   |
                                                                                                                          +---------------------------------------------------+

This gets you better (per-instance) metrics in a Prometheus-native way. Additionally, by tying the metric producer and the exporter together, you avoid a few classes of issues with inconsistent metrics.

matthiasr avatar Jan 14 '19 09:01 matthiasr

I think this could be explained better in the README. I'll update the issue title to reflect that.

matthiasr avatar Jan 14 '19 09:01 matthiasr

@matthiasr thank you very much for your detailed answers and I also think that this information needs to be added to the README. I will try it and consult with you if i have any question.

idling11 avatar Jan 15 '19 09:01 idling11