> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pelanor.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview & Examples

> Learn how to use the Custom Metrics API endpoints

<Card icon="github" title="Custom Metrics API Example" href="https://github.com/pelanororg/pelanor-custom-metrics-example" target="_blank" rel="noopener">
  A complete, runnable script that injects a dimensional custom metric into Pelanor using Python.
</Card>

With **Custom Metrics**, you can inject additional metrics from observability or BI platforms—such as Prometheus or QuickSight—into Pelanor.\
Once added, these metrics can be used for:

* **Unit‑economics reports:** e.g., add a *Daily Active Users* metric to view *Cost per Active User*.
* **Context‑enriched cost reports:** e.g., add RAM‑usage data per EC2 instance.

<Note>
  Pelanor automatically collects many metrics (CPU, memory, network utilization, and more) through built‑in integrations. Before adding custom metrics, check with your Pelanor Solution Engineer.
</Note>

### Typical Flow

<Steps>
  <Step title="Create a Custom Metric">
    Declare the metric via the **Create Custom Metric** endpoint. This step is one‑time only; initial creation can take up to 1–2 hours. Track progress and manage metrics in **Economics → Custom Metrics**.
  </Step>

  <Step title="Push Metric Data">
    Use the **Update Metric** endpoint to insert data, referencing the metric ID returned earlier. Set the update frequency (daily, weekly, etc.) according to your SLA and data‑volume needs.
  </Step>

  <Step title="Consume the Metric">
    You can now use the metric in several ways:

    * **Add to a report:** *Customize Columns → Add Metric → Custom Metrics*.
    * **View in the dashboard:** *Economics → Custom Metrics*, then select the metric.
    * **Retrieve via API:** call **Get Custom Metric Values** to fetch the data programmatically.
  </Step>
</Steps>

### Examples

Visit the example repo above for a full Python walkthrough of adding a dimensional custom metric to Pelanor.
