# Exporting PCD metrics

Users might want to scrape <code class="expression">space.vars.product\_name</code> metrics and store in their own observability stack. This page lists the steps for doing that.

**Host Metrics**

Each host has these exporters running on it:

| Exporter         | Port | Endpoint              |
| ---------------- | ---- | --------------------- |
| Libvirt exporter | 9177 | host\_ip:9177/metrics |
| Node exporter    | 9388 | host\_ip:9388/metrics |

Users will have their own observability stack, which can scrape from the above two endpoints.

Libvirt exporter exports all VM related metrics, including cpu, mem, storage etc. of each VM. Node exporter exports all host related metrics like cpu, mem, storage of the entire host.

**Prometheus agent on host**

Each host also has a Prometheus running as a systemctl service, which scrapes metrics from the above endpoints. This Prometheus has Prometheus rules configured, to convert above metrics for ease of use.

```none
pcd:vm_mem_total
pcd:vm_mem_allocated
pcd:vm_mem_usage_percent
pcd:vm_mem_usage
pcd:vm_cpu_usage
pcd:vm_cpu_total
pcd:hyp_cpu_total
pcd:hyp_mem_total
pcd:hyp_mem_usage
pcd:hyp_cpu_usage
pcd:vm_total
pcd:hyp_total
pcd:vm_cpu_throttling_percentage
pcd:vm_total_storage
pcd:vm_allocated_storage
pcd:vm_used_storage
pcd:vm_read_throughput
pcd:vm_write_throughput
pcd:vm_read_iops
pcd:vm_write_iops
pcd:vm_read_latency
pcd:vm_write_latency
pcd:hyp_disk_space
pcd:hyp_disk_usage
pcd:vm_rx_bytes
pcd:vm_tx_bytes
pcd:vm_rx_packets_drop
pcd:vm_tx_packets_drop
pcd:hyp_net_rx_throughput
pcd:hyp_net_tx_throughput
pcd:hyp_disk_read_throughput
pcd:hyp_disk_write_throughput
```

**User using their own observability stack**

If users choose to use their own observability stack, they can directly scrape from the libvirt exporter and node exporter listed above and ignore the Prometheus instance. They can then create their own Prometheus rules similar to the ones listed above for readability.

{% hint style="warning" %}
Benefits of using your own observability stack:

* Host the observability stack within your own network without exposing it externally.
* With the raw metrics, configure and transform metrics as needed without contacting platform9 support.
  {% endhint %}
