---
title: sFlow
slug: aidc/sflow
createdAt: 2025-12-29T10:35:14.929Z
---

## <font color="#1d50a2">URLs Summary</font>

| **URL**                                      | **GET** | **POST** | **PATCH** | **PUT** | **DELETE** |
| -------------------------------------------- | ------- | -------- | --------- | ------- | ---------- |
| /rest/v1/running/sflow                       | Y       | N        | Y         | N       | N          |
| /rest/v1/running/sflow/collector/&#x7B;name} | Y       | Y        | Y         | N       | Y          |
| /rest/v1/running/sflow/session/&#x7B;port}   | Y       | Y        | Y         | N       | Y          |
| /rest/v1/rpc/show-sflow-interface            | N       | Y        | N         | N       | N          |

## <font color="#1d50a2">Examples</font>

### <font color="#1d50a2">Update sFlow configuration.</font>

```text
PATCH HTTPS://{switch IP}/rest/v1/running/sflow
{
    "enabled": "false",
    "polling-interval": 20
}
```

### <font color="#1d50a2">Create a sFlow collector.</font>

```json
POST HTTPS://{switch IP}/rest/v1/running/sflow/collector
{
    "name": "test",
    "ip": "160.160.160.1",
    "port": 10,
    "vrf": "mgmt",
    "source": "175.0.0.1"
}
```

### <font color="#1d50a2">Create a sFlow session.</font>

```json
POST HTTPS://{switch IP}/rest/v1/running/sflow/session
{
    "port": "Ethernet6",
    "sampling-rate": 8888,
    "enabled": "false"
}
```

### <font color="#1d50a2">Show sFlow interface</font>

```json
POST HTTPS://{switch IP}/rest/v1/rpc/show-sflow-interface
```

## <font color="#1d50a2">Properties Descriptions</font>

### <font color="#1d50a2">sFlow global</font>

**Tree Diagrams**

```plaintext
  +--rw sflow
     +--rw enabled?
     +--rw polling-interval?
     +--rw agent-id?
     +--rw sampling-rate?
```

**Table of Properties**

| **Name**         | **Required** | **Type/Range**              | **Description**                                                                           |
| ---------------- | ------------ | --------------------------- | ----------------------------------------------------------------------------------------- |
| sflow            | M            |                             | Path-only node, has no configurable value.<br />Global sFlow configuration                |
| enabled          | O            | "true"<br />"false"         | (sub-property of sflow)<br />Global admin state of sFlow<br />Default value: "false"      |
| polling-interval | O            | 5..300                      | (sub-property of sflow)<br />Counter sampling polling interval<br />Default value: 20     |
| agent-id         | O            | Interface name<br />"Mgmt0" | (sub-property of sflow)<br />Sflow agent-id                                               |
| sampling-rate    | O            | 4096..1000000               | (sub-property of sflow)<br />Global sampling rate (1/N packets)<br />Default value: 10000 |

### <font color="#1d50a2">sFlow Seesions</font>

**Tree Diagrams**

```plaintext
  +--rw sflow
     +--rw session* [port]
     |  +--rw port
     |  +--rw enabled?
     |  +--rw sampling-rate?
```

**Table of Properties**

| **Name**      | **Required** | **Type/Range**      | **Description**                                                                                                  |
| ------------- | ------------ | ------------------- | ---------------------------------------------------------------------------------------------------------------- |
| sflow         | M            |                     | Path-only node, has no configurable value.<br />Global sFlow configuration                                       |
| session       | M            |                     | (sub-property of sflow)<br />Path-only node, has no configurable value.<br />Interface-level sFlow configuration |
| port          | M            | Ethernet name       | (sub-property of session)<br />port name                                                                         |
| enabled       | O            | "true"<br />"false" | (sub-property of session)<br />Interface-level admin state of sFlow collector<br />Default value: "true"         |
| sampling-rate | O            | 4096..1000000       | (sub-property of session)<br />Sampling rate (1/N packets)<br />Default value: 10000                             |

### <font color="#1d50a2">sFlow Collectors</font>

**Tree Diagrams**

```plaintext
  +--rw sflow
     +--rw collector* [name]
        +--rw name
        +--rw ip
        +--rw port?
        +--rw vrf?
        +--rw source?
        +--rw source-interface?
```

**Table of Properties**

| **Name**         | **Required** | **Type/Range**                              | **Description**                                                                                                        |
| ---------------- | ------------ | ------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| sflow            | M            |                                             | Path-only node, has no configurable value.<br />Global sFlow configuration                                             |
| collector        | M            |                                             | (sub-property of sflow)<br />Path-only node, has no configurable value.<br />Collector configuration                   |
| name             | M            | string                                      | (sub-property of collector)<br />Collector name                                                                        |
| ip               | M            | A.B.C.D<br />XX\:XX\:XX\:XX\:XX\:XX\:XX\:XX | (sub-property of collector)<br />Collector IP address                                                                  |
| port             | O            | 1..65535                                    | (sub-property of collector)<br />Collector destination UDP port (default 6343)<br />Default value: 6343                |
| vrf              | O            | "mgmt"<br />"default"<br />vrf name         | (sub-property of collector)<br />Specify the Collector VRF.                                                            |
| source           | O            | A.B.C.D<br />XX\:XX\:XX\:XX\:XX\:XX\:XX\:XX | (sub-property of collector)<br />Source IP address for collector<br />Mutually exclusive with:<br />- source-interface |
| source-interface | O            | Interface name<br />"Mgmt0"                 | (sub-property of collector)<br />Source interface for collector<br />Mutually exclusive with:<br />- source            |

### <font color="#1d50a2">show-sflow-interface</font>

**Tree Diagrams**

```plaintext
    +---x show-sflow-interface
       +---w input
       |  +---w port?
       +--ro output
          +--ro port-config* [port]
             +--ro port
             +--ro enabled?
             +--ro sampling-rate?
```

**Table of Properties**

| **Name**             | **Required** | **Type/Range**      | **Description**                                                                                              |
| -------------------- | ------------ | ------------------- | ------------------------------------------------------------------------------------------------------------ |
| show-sflow-interface | M            |                     | Path-only node, has no configurable value.<br />Display Sflow Interface information                          |
| port                 | O            | Ethernet name       | (sub-property of input)<br />determining display specific interface information or all interface information |
| port-config          | RO           |                     | (sub-property of output)<br />Path-only node, has no configurable value.<br />sFlow interface status entries |
| port                 | RO           | Ethernet name       | (sub-property of port-config)<br />Port name                                                                 |
| enabled              | RO           | "true"<br />"false" | (sub-property of port-config)<br />Admin status                                                              |
| sampling-rate        | RO           | 0..4294967295       | (sub-property of port-config)<br />Configured sampling rate (1/N)                                            |

