> For the complete documentation index, see [llms.txt](https://docs.hostedgraphite.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hostedgraphite.com/add-ons-and-integrations-guide/carbon-c-relay.md).

# Carbon-C-Relay

Carbon-C-Relay is a lightweight, high-performance proxy that acts as an intermediary between metric sources and Hosted Graphite. It is commonly used for pre-aggregation and securely forwarding metrics from private networks to external destinations. You can locate the latest releases/assets [HERE](https://github.com/grobian/carbon-c-relay/releases/tag/v3.8.1), and see configuration syntax [HERE](https://github.com/grobian/carbon-c-relay?tab=readme-ov-file#configuration-syntax). Below is a basic sample configuration and setup:

Installation (Linux):

```
sudo apt install -y carbon-c-relay
```

Modify your configuration file with the following (generally located at: */etc/carbon-c-relay.conf*):

```
rewrite ^([a-zA-Z0-9_\.\-]*)
  into <HG-API-KEY>.\1
  ;

cluster hg
  forward
    carbon.hostedgraphite.com:2003
  ;

# Forward internal relay system metrics with the carbon.relays prefix
match ^carbon\.relays\..*
  send to hg
  stop
  ;

match *
  send to hg
  stop
  ;
```

Restart the service and check status:

```
sudo systemctl restart carbon-c-relay
sudo systemctl status carbon-c-relay
```

Now, any metrics sent to **localhost:2003** will be collected and forwarded by the Carbon-C-Relay service. Additionally, internal relay performance metrics (carbon.relays.\*) will be automatically forwarded to your Hosted Graphite account.

<figure><img src="/files/Hq3FoRzGAmB90eMb2iGB" alt=""><figcaption><p>Carbon-C-Relay Example Dashboard</p></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.hostedgraphite.com/add-ons-and-integrations-guide/carbon-c-relay.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
