![](<https://www.versio.io/img/supported-technology/clavister.svg>)

# Clavister device importer

Versio.io can import, historize and process data from Clavister NetWall firewalls running cOS Core. Besides the network device itself, the importer reads system information, licenses, IP rules, IDP, threshold, pipe and routing rules, host and route monitors and the neighbor devices of the firewall. Optionally it collects performance metrics such as CPU, memory, connections and interface traffic.

## Configuration

You can find the configuration option in Versio.io at `Environment settings > OneImporter > Configurations > Network devices > Clavister`.

Here you can edit all existing configurations, create new configurations or delete existing configurations. To add a new configuration, enter a `Name` for your importer.

Click `Add` to proceed to the configuration.

To edit an existing configuration, click the arrow on the left of your importer name to expand the configuration options.

The following configuration options are available:

| Field | Description | Advice |
| --- | --- | --- |
| **Name** | Meaningful name | Add the word "Clavister" to identify the importer when viewing the logs |
| **Active** | Option to activate and deactivate the configuration. Data is only imported if the configuration is activated. |  |
| **Credential** | Select authorization for network device access. | Enter the username and password of the REST API remote management object at `Settings > Access Management > Credential Vaults`. See [Enable the Clavister REST API](<#enable-the-clavister-rest-api>). |
| **Domains & IPs** | Enter all firewall domains or IPs. | The OneImporter connects via HTTPS on port 443. Enter `host:port` for another port and `http://host` for a REST API without HTTPS. Enter both peers of an HA cluster. |
| **Use host proxy settings** | Send the requests via the proxy of the OneImporter host. | Disable it if the firewall is reachable only directly. |
| **Entities** | Select the entities to be inventoried by Versio.io. | See [Imported entities](<#imported-entities>). |
| **Metric groups** | Select the performance metrics to be collected (expert mode). | See [Metrics](<#metrics>). |
| **Executing OneImporter** | Select a Versio.io OneImporter to import the data based on the importer configuration. | Requires an installed OneImporter: [Installation instructions](<https://docs.versio.io/setup-one-importer/index.md>) |
| **Schedule time (cron format)** | Determine the frequency of imports in CRON format | Learn more about CRON format: [https://en.wikipedia.org/wiki/Cron](<https://en.wikipedia.org/wiki/Cron>). Run every 10 minutes if you collect metrics. |

*Table: Clavister network device configuration parameters*

## Imported entities

| Entity | Content |
| --- | --- |
| **Network device** | Device name, model, cOS Core version and address. Always imported. |
| **System** | Model, cOS Core version and build type, HA role, installed memory, InControl status, last system event and the limits of the hardware sensors. |
| **Licenses** | Registration key and the expiry dates of the license, technical support and the subscriptions (IDP, antivirus, web content filtering, IP reputation and others). For subscription based licenses also the SECaaS status. |
| **IP rules** | IP rules of all IP rule sets with filter, service and action. |
| **Rules** | IDP, threshold, pipe and routing rules. |
| **Monitors** | Settings of the host monitors and of the monitored routes. |
| **Neighbors** | Devices in the neighbor cache: interface, MAC address, vendor, IP addresses and DHCP hostname. Not selected by default. |

*Table: Imported Clavister entities*

The REST API returns no serial number. The license registration key identifies the network device, since every firewall, also every HA peer, has its own license. Without a license, the address identifies it.

An IP policy consists of up to three IP rules with the same name. They are numbered `<name> #2` and `<name> #3`. Every rule keeps its position in the rule set as `index`.

Versio.io imports no runtime values that change on every run: rule usage counters, monitor reachability and latency, neighbor status, sensor readings, DHCP leases, authenticated users and blacklist entries.

## Metrics

The importer collects the following metric groups for the network device:

| Metric group | Metrics |
| --- | --- |
| **CPU** | CPU load |
| **Memory** | Memory usage |
| **Connections** | Active connections |
| **Network** | Traffic and packets per second per interface |

*Table: Clavister metric groups*

All values reflect the moment of the import.

## Enable the Clavister REST API

Versio.io executes the following read-only requests to your firewall:

```text
# Network device and system
https://${address}/api/about
https://${address}/api/stats
https://${address}/api/oper/ha
https://${address}/api/oper/hwm
https://${address}/api/oper/license

# Rules
https://${address}/api/oper/iprulesets
https://${address}/api/oper/iprules
https://${address}/api/oper/iprules?ruleset=${ruleset}
https://${address}/api/oper/idprules
https://${address}/api/oper/thresholdrules
https://${address}/api/oper/piperules
https://${address}/api/oper/routingrules

# Monitors and neighbors
https://${address}/api/oper/hostmon
https://${address}/api/oper/routemon
https://${address}/api/oper/neighbor_devices

# Metrics
https://${address}/api/oper/statvalues?show=extended
```

*Requests: Executed requests for inventory and metrics*

The REST API is disabled by default. Create a REST API remote management object with read-only access, restricted to the OneImporter host:

1. Create an IP address object `versio-oneimporter` with the IP address of the OneImporter host.
2. Go to `System > Device > Remote Management` and select `Add > REST API Management`.
3. Enter the name `versio-rest-api`.
4. Enable `HTTPS`.
5. Select the `Interface` through which the OneImporter reaches the firewall.
6. Select the `Network` `versio-oneimporter`.
7. Set the `Access Level` to `Read only`.
8. Enable `Basic Auth` and enter a dedicated username and a strong password.
9. Click `OK` and activate the configuration.

The same with the CLI:

```text
add RemoteManagement RemoteMgmtREST versio-rest-api
    Interface=<interface>
    Network=versio-oneimporter
    HTTPS=Yes
    AccessLevel=ReadOnly
    BasicAUTH=Yes
    Username=versio
    Password=<password>
activate
commit
```

*Commands: Create a read-only REST API remote management object for Versio.io*

Store the username and password in the Credential Vault of Versio.io. For an HA cluster, create the object on both peers or in the shared configuration.

## Troubleshooting

| Log message | Cause | Solution |
| --- | --- | --- |
| `/api/about not readable: HTTP 401` | Wrong username or password. | Check the credential against the REST API remote management object. |
| `/api/about not readable: HTTP 403` or `ECONNREFUSED` | The REST API rejects the OneImporter host. | Check the `Interface` and `Network` of the remote management object and that the configuration is activated. |
| `/api/about not readable: ETIMEDOUT` | The firewall is not reachable from the OneImporter host. | Check the route and the port. Disable `Use host proxy settings` for a direct connection. |
| `Not offered by cOS Core <version>` | The cOS Core version does not offer these endpoints. | Update cOS Core. All other entities are imported as usual. |
| `No license registration key at address` | The firewall has no license. | The address identifies the network device. Import the firewall always with the same address. |

*Table: Clavister importer troubleshooting*

## Reference

- [cOS Core REST API Guide](<https://docs.clavister.com/repo/cos-core-rest-api-guide/>)
