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

# Metric Endpoints

> Configure nxtRadar metric scrape targets, manage endpoint discovery, and organize metrics by namespace for alert rules and dashboards.

## Overview

nxtRadar scrapes metrics from standardized metric endpoints exposed by services across
the infrastructure. Most infrastructure services are auto-detected via agent registration.
This page covers configuring additional endpoints for application-specific exporters
and managing the namespace organization of collected metrics.

<Warning>
  **Administrator Access Required** — This operation requires the `admin` role. Contact your
  NxtSight administrator if you do not have sufficient permissions.
</Warning>

<Note>
  **Prerequisites**

  * Administrator credentials with the `admin` role
  * Target endpoints must be reachable from the nxtRadar collector nodes
</Note>

***

## Viewing Configured Targets

<Tabs>
  <Tab title="Dashboard" icon="gauge">
    Navigate to **Monitor Center > Monitoring** (Scrape Targets, admin view). Each entry shows:

    * **URL**: The endpoint being scraped
    * **Status**: `UP` (healthy) or `DOWN` (not reachable)
    * **Last Scrape**: Timestamp of the most recent successful scrape
    * **Labels**: Metadata tags applied to all metrics from this target
  </Tab>

  <Tab title="CLI" icon="terminal">
    ```bash title="List all scrape targets" theme={null}
    nxtradar target list
    ```

    ```bash title="Check target health with details" theme={null}
    nxtradar target health --verbose
    ```

    Targets with status `DOWN` are not being scraped. Review connectivity and
    authentication configuration for affected targets.
  </Tab>
</Tabs>

***

## Adding Custom Metric Endpoints

<Tabs>
  <Tab title="Dashboard" icon="gauge">
    Navigate to **Monitor Center > Monitoring** (Add Scrape Target, admin view):

    | Field               | Description                                                              |
    | ------------------- | ------------------------------------------------------------------------ |
    | **URL**             | Full endpoint URL (e.g., `http://10.0.1.71:9399/metrics`)                |
    | **Scrape Interval** | How often to collect (default: `30s`)                                    |
    | **Labels**          | Key-value metadata tags for the target (e.g., `service=NxtSight-filefs`) |
    | **TLS Config**      | CA certificate path for HTTPS endpoints                                  |
    | **Auth**            | Basic auth credentials or bearer token for secured endpoints             |
  </Tab>

  <Tab title="CLI" icon="terminal">
    ```bash title="Add scrape target" theme={null}
    nxtradar target add \
      --url http://10.0.1.71:9399/metrics \
      --interval 30s \
      --label service=NxtSight-filefs \
      --label host=xd1
    ```

    ```bash title="Add target with basic auth" theme={null}
    nxtradar target add \
      --url https://10.0.1.71:9291/metrics \
      --interval 60s \
      --label service=storage-cluster \
      --auth-user admin \
      --auth-password <PASSWORD>
    ```

    ```bash title="Remove a target" theme={null}
    nxtradar target remove <TARGET_ID>
    ```
  </Tab>
</Tabs>

***

## Metric Namespaces

nxtRadar organizes metrics by namespace. Use the namespace prefix when writing alert
rules and dashboard queries:

| Namespace          | Source                  | Example Metrics                            |
| ------------------ | ----------------------- | ------------------------------------------ |
| `NxtSight_compute` | Compute node agents     | `cpu_utilization`, `memory_used_bytes`     |
| `NxtSight_storage` | nxtStore cluster        | `pool_used_bytes`, `osd_latency_ms`        |
| `NxtSight_network` | Network agents          | `interface_rx_bytes`, `packet_loss_pct`    |
| `NxtSight_vm`      | nxtVirt Guest Agent     | `vm_cpu_usage`, `vm_memory_rss`            |
| `NxtSight_filefs`  | File FS service         | `requests_total`, `guestfs_handles_active` |
| `nxtDR`            | Disaster recovery agent | `replication_lag_seconds`, `site_health`   |

***

## Firewall Requirements

Metric endpoints must be accessible from the nxtRadar collector nodes. Configure
security groups or firewall rules to permit:

| Source                | Destination                  | Port                   | Protocol |
| --------------------- | ---------------------------- | ---------------------- | -------- |
| nxtRadar collector IP | Target node                  | Configured scrape port | TCP      |
| nxtRadar collector IP | 9100 (node exporter default) | All nodes              | TCP      |
| nxtRadar collector IP | 9283 (nxtStore metrics)      | Storage nodes          | TCP      |

<Note>
  nxtRadar collector IPs are listed under **Monitor Center > Monitoring** (Collectors, admin view).
  Update security group rules to include all collector IPs when adding new collectors
  during scale-out.
</Note>

***

## Next Steps

<CardGroup cols={2}>
  <Card title="Agent Configuration" href="/services/monitoring/admin-guide/agent-config" color="#0b5ed7">
    Configure agents and their default scrape targets on managed nodes
  </Card>

  <Card title="Alert Channels" href="/services/monitoring/admin-guide/alert-channels" color="#0b5ed7">
    Configure notification channels using the metric namespaces defined here
  </Card>

  <Card title="Retention Policies" href="/services/monitoring/admin-guide/retention" color="#0b5ed7">
    Configure how long metric data from each namespace is retained
  </Card>

  <Card title="Troubleshooting" href="/services/monitoring/admin-guide/troubleshooting" color="#0b5ed7">
    Diagnose targets in DOWN state and missing metric series
  </Card>
</CardGroup>
