<!--startmeta
custom_edit_url: "https://github.com/netdata/netdata/edit/master/src/go/plugin/go.d/collector/cato_networks/README.md"
meta_yaml: "https://github.com/netdata/netdata/edit/master/src/go/plugin/go.d/collector/cato_networks/metadata.yaml"
sidebar_label: "Cato Networks"
learn_status: "Published"
learn_rel_path: "Network Performance Monitoring/Device Metrics/Integrations"
keywords: ['cato', 'cato networks', 'sase', 'sd-wan', 'bgp', 'topology']
message: "DO NOT EDIT THIS FILE DIRECTLY, IT IS GENERATED BY THE COLLECTOR'S metadata.yaml FILE"
endmeta-->

# Cato Networks


<img src="https://netdata.cloud/img/network-wired.svg" width="150"/>


Plugin: go.d.plugin
Module: cato_networks

<img src="https://img.shields.io/badge/maintained%20by-Netdata-%2300ab44" />

## Overview

This collector monitors Cato Networks accounts through the Cato GraphQL API.

It discovers sites, collects site, device, and interface status, traffic and quality metrics, collects BGP peer status, and exposes Cato site/device/PoP/BGP topology data.
Metrics for each selected site are emitted under a generated virtual node named after the Cato site and keyed by the Cato account ID and site ID. Site labels are still attached to metric series for grouping and aggregation.


The collector uses the Cato GraphQL API endpoint with an account ID and API key.


This collector is supported on all platforms.

This collector supports collecting metrics from multiple instances of this integration, including remote instances.

A Cato API key with permission to read account snapshot, account metrics, entity lookup, and site BGP status data is required.


### Default Behavior

#### Auto-Detection

This collector does not auto-detect Cato accounts. Configure at least one job with `account_id` and `api_key`.


#### Limits

Site discovery is paginated and refreshed hourly. The optional `site_selector` filters sites before snapshot, metrics, BGP, topology, and generated site virtual-node creation. Account metrics use bounded concurrent one-site API requests to preserve per-Socket device and interface attribution. BGP status uses one per-site API request for each selected site that is not currently cached as having no BGP peers.


#### Performance Impact

The default interval is 60 seconds. Sites that return a successful BGP response with no peers are cached as non-BGP sites for about one hour, with deterministic per-site jitter across multiple collection cycles to avoid synchronized refresh bursts. If BGP is enabled on such a site, BGP metrics can appear after that cache expires.


## Setup


You can configure the **cato_networks** collector in two ways:

| Method                | Best for                                                                                 | How to                                                                                                                                 |
|-----------------------|------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------|
| [**UI**](#via-ui)     | Fast setup without editing files                                                         | Go to **Nodes → Configure this node → Collectors → Jobs**, search for **cato_networks**, then click **+** to add a job. |
| [**File**](#via-file) | If you prefer configuring via file, or need to automate deployments (e.g., with Ansible) | Edit `go.d/cato_networks.conf` and add a job.                                                                        |

:::important

UI configuration requires paid Netdata Cloud plan.

:::


### Prerequisites

#### Cato API credentials

Create or obtain a Cato API key and account ID with read access to the required GraphQL API surfaces.



### Configuration

#### Options

The following options can be defined globally: update_every, autodetection_retry.


<details open><summary>Config options</summary>



| Group | Option | Description | Default | Required |
|:------|:-----|:------------|:--------|:---------:|
| **Collection** | update_every | Data collection interval, in seconds. Must be at least 60. | 60 | no |
|  | autodetection_retry | Autodetection retry interval, in seconds. Set 0 to disable. | 0 | no |
| **Target** | url | Cato GraphQL API endpoint. Production endpoints must use HTTPS; HTTP is accepted only for loopback test endpoints. | https://api.catonetworks.com/api/v1/graphql2 | no |
| **Authentication** | account_id | Cato account ID. |  | yes |
|  | api_key | Cato API key. |  | yes |
| **HTTP** | timeout | HTTP request timeout. | 30 | no |
|  | proxy_url | HTTP proxy URL. Empty value uses environment proxy variables. |  | no |
| **Cardinality** | site_selector | Space-separated simple patterns matched against the Cato site name when present, otherwise the site ID. Patterns use first-match ordering; put exclusions before broad includes, for example `!lab-* *`. | * | no |
| **Virtual Node** | vnode | Associates this data collection job with a Virtual Node. |  | no |


</details>


#### via UI

Configure the **cato_networks** collector from the Netdata web interface:

1. Go to **Nodes**.
2. Select the node **where you want the cato_networks data-collection job to run** and click the :gear: (**Configure this node**). That node will run the data collection.
3. The **Collectors → Jobs** view opens by default.
4. In the Search box, type _cato_networks_ (or scroll the list) to locate the **cato_networks** collector.
5. Click the **+** next to the **cato_networks** collector to add a new job.
6. Fill in the job fields, then click **Test** to verify the configuration and **Submit** to save.
    - **Test** runs the job with the provided settings and shows whether data can be collected.
    - If it fails, an error message appears with details (for example, connection refused, timeout, or command execution errors), so you can adjust and retest.


#### via File

The configuration file name for this integration is `go.d/cato_networks.conf`.

The file format is YAML. Generally, the structure is:

```yaml
update_every: 1
autodetection_retry: 0
jobs:
  - name: some_name1
  - name: some_name2
```
You can edit the configuration file using the [`edit-config`](https://github.com/netdata/netdata/blob/master/docs/netdata-agent/configuration/README.md#edit-configuration-files) script from the
Netdata [config directory](https://github.com/netdata/netdata/blob/master/docs/netdata-agent/configuration/README.md#locate-your-config-directory).

```bash
cd /etc/netdata 2>/dev/null || cd /opt/netdata/etc/netdata
sudo ./edit-config go.d/cato_networks.conf
```

##### Examples

###### Basic

Collect Cato Networks account metrics and topology.

<details open><summary>Config</summary>

```yaml
jobs:
  - name: account
    account_id: "12345"
    api_key: "replace-with-cato-api-key"

```
</details>



## Alerts


The following alerts are available:

| Alert name  | On metric | Description |
|:------------|:----------|:------------|
| [ cato_networks_site_disconnected ](https://github.com/netdata/netdata/blob/master/src/health/health.d/cato_networks.conf) | cato_networks.site_connectivity_status | Cato site ${label:site_name} reports disconnected connectivity status |
| [ cato_networks_site_degraded ](https://github.com/netdata/netdata/blob/master/src/health/health.d/cato_networks.conf) | cato_networks.site_connectivity_status | Cato site ${label:site_name} reports degraded connectivity status |
| [ cato_networks_site_packet_loss ](https://github.com/netdata/netdata/blob/master/src/health/health.d/cato_networks.conf) | cato_networks.site_packet_loss | Cato site ${label:site_name} packet loss over the last 10 minutes |
| [ cato_networks_bgp_session_down ](https://github.com/netdata/netdata/blob/master/src/health/health.d/cato_networks.conf) | cato_networks.bgp_session_status | Cato BGP session to peer ${label:peer_ip} (${label:peer_asn}) is down |



## Metrics

Metrics grouped by *scope*.

The scope defines the instance that the metric belongs to. An instance is uniquely identified by a set of labels.




### Per site

These metrics refer to a Cato site.

Labels:

| Label      | Description     |
|:-----------|:----------------|
| site_id | Cato site ID. |
| site_name | Cato site name. |
| pop_name | Cato PoP name. |

Metrics:

| Metric | Description | Dimensions | Unit |
|:------|:------------|:----------|:----|
| cato_networks.site_connectivity_status | Site connectivity status. | connected, disconnected, degraded, unknown | status |
| cato_networks.site_operational_status | Site operational status. | active, disabled, locked, unknown | status |
| cato_networks.site_hosts | Site hosts. | hosts | hosts |
| cato_networks.site_traffic | Site traffic. | upstream, downstream | bytes |
| cato_networks.site_packet_loss | Site packet loss. | upstream, downstream | percentage |
| cato_networks.site_discarded_packets | Site discarded packets. | upstream, downstream | packets |
| cato_networks.site_jitter | Site jitter. | upstream, downstream | milliseconds |
| cato_networks.site_latency | Site latency. | rtt, last_mile | milliseconds |
| cato_networks.site_last_mile_packet_loss | Site last mile packet loss. | loss | percentage |


### Per device

These metrics refer to a Cato Socket or vSocket attached to a site.

Labels:

| Label      | Description     |
|:-----------|:----------------|
| site_id | Cato site ID. |
| site_name | Cato site name. |
| device_id | Cato device ID. |
| device_name | Cato device name. |

Metrics:

| Metric | Description | Dimensions | Unit |
|:------|:------------|:----------|:----|
| cato_networks.device_connection_status | Device connection status. | connected, disconnected | status |


### Per interface

These metrics refer to a Cato site interface.

Labels:

| Label      | Description     |
|:-----------|:----------------|
| site_id | Cato site ID. |
| site_name | Cato site name. |
| device_id | Cato device ID when the interface owner is known. |
| device_name | Cato device name when the interface owner is known. |
| interface_id | Cato interface ID. |
| interface_name | Interface name. |

Metrics:

| Metric | Description | Dimensions | Unit |
|:------|:------------|:----------|:----|
| cato_networks.interface_connection_status | Interface connection status. | connected, disconnected | status |
| cato_networks.interface_tunnel_uptime | Interface tunnel uptime. | uptime | seconds |
| cato_networks.interface_traffic | Interface traffic. | upstream, downstream | bytes |
| cato_networks.interface_packet_loss | Interface packet loss. | upstream, downstream | percentage |
| cato_networks.interface_discarded_packets | Interface discarded packets. | upstream, downstream | packets |
| cato_networks.interface_jitter | Interface jitter. | upstream, downstream | milliseconds |
| cato_networks.interface_latency | Interface latency. | rtt | milliseconds |


### Per bgp peer

These metrics refer to a Cato site BGP peer.

Labels:

| Label      | Description     |
|:-----------|:----------------|
| site_id | Cato site ID. |
| site_name | Cato site name. |
| peer_ip | BGP peer IP. |
| peer_asn | BGP peer ASN. |

Metrics:

| Metric | Description | Dimensions | Unit |
|:------|:------------|:----------|:----|
| cato_networks.bgp_session_status | BGP session status. | up, down, unknown | status |
| cato_networks.bgp_routes | BGP route counts. | accepted, limit, rib_out | routes |
| cato_networks.bgp_routes_limit_status | BGP route limit exceeded status. | ok, exceeded | status |



## Troubleshooting

### Debug Mode

**Important**: Debug mode is not supported for data collection jobs created via the UI using the Dyncfg feature.

To troubleshoot issues with the `cato_networks` collector, run the `go.d.plugin` with the debug option enabled. The output
should give you clues as to why the collector isn't working.

- Navigate to the `plugins.d` directory, usually at `/usr/libexec/netdata/plugins.d/`. If that's not the case on
  your system, open `netdata.conf` and look for the `plugins` setting under `[directories]`.

  ```bash
  cd /usr/libexec/netdata/plugins.d/
  ```

- Switch to the `netdata` user.

  ```bash
  sudo -u netdata -s
  ```

- Run the `go.d.plugin` to debug the collector:

  ```bash
  ./go.d.plugin -d -m cato_networks
  ```

  To debug a specific job:

  ```bash
  ./go.d.plugin -d -m cato_networks -j jobName
  ```

### Getting Logs

If you're encountering problems with the `cato_networks` collector, follow these steps to retrieve logs and identify potential issues:

- **Run the command** specific to your system (systemd, non-systemd, or Docker container).
- **Examine the output** for any warnings or error messages that might indicate issues.  These messages should provide clues about the root cause of the problem.

#### System with systemd

Use the following command to view logs generated since the last Netdata service restart:

```bash
journalctl _SYSTEMD_INVOCATION_ID="$(systemctl show --value --property=InvocationID netdata)" --namespace=netdata --grep cato_networks
```

#### System without systemd

Locate the collector log file, typically at `/var/log/netdata/collector.log`, and use `grep` to filter for collector's name:

```bash
grep cato_networks /var/log/netdata/collector.log
```

**Note**: This method shows logs from all restarts. Focus on the **latest entries** for troubleshooting current issues.

#### Docker Container

If your Netdata runs in a Docker container named "netdata" (replace if different), use this command:

```bash
docker logs netdata 2>&1 | grep cato_networks
```

### API rate limits

Increase `update_every` or narrow `site_selector` if the Cato API reports rate limiting.


### Connection, TLS, or proxy failures

Check DNS, firewall egress, TLS inspection, proxy settings, endpoint region, and the collector logs.
