Skip to main content

Vectra Rest API

Pack Assets​

Templates​

The Centreon Pack Vectra Rest API brings a host template:

  • Net-Vectra-Restapi-custom

It brings the following service templates:

Service AliasService TemplateService DescriptionDefaultDiscovery
CpuNet-Vectra-Cpu-RestapiCheck the rate of utilization of CPU for the machineX
DiskNet-Vectra-Disk-RestapiCheck disk usageX
InterfacesNet-Vectra-Interfaces-RestapiCheck interfacesX
MemoryNet-Vectra-Memory-RestapiCheck memory usageX
SensorsNet-Vectra-Sensors-RestapiCheck sensorsX
UptimeNet-Vectra-Uptime-RestapiTime since the server has been working and availableX

Discovery rules​

Rule NameDescription
Net-Vectra-Restapi-Interface-NameDiscover network interfaces and monitor bandwidth utilization
Net-Vectra-Restapi-Sensor-NameDiscover network sensors and monitor utilization

More information about discovering services automatically is available on the dedicated page and in the following chapter.

Collected metrics & status​

Metric NameUnit
cpu.utilization.percentage%

Prerequisites​

The Pack uses the following API endpoints:

  • /health/connectivity
  • /health/cpu
  • /health/disk
  • /health/memory
  • /health/sensors
  • /health/system
  • /health/trafficdrop

Setup​

Monitoring Pack​

If the platform uses an online license, you can skip the package installation instruction below as it is not required to have the pack displayed within the Configuration > Monitoring Connector Manager menu. If the platform uses an offline license, install the package on the central server with the command corresponding to the operating system's package manager:

dnf install centreon-pack-network-vectra-restapi

Whatever the license type (online or offline), install the Vectra Rest API Pack through the Configuration > Monitoring Connector Manager menu.

Plugin​

Since Centreon 22.04, you can benefit from the 'Automatic plugin installation' feature. When this feature is enabled, you can skip the installation part below.

You still have to manually install the plugin on the poller(s) when:

  • Automatic plugin installation is turned off
  • You want to run a discovery job from a poller that doesn't monitor any resource of this kind yet

More information in the Installing the plugin section.

Use the commands below according to your operating system's package manager:

dnf install centreon-plugin-Network-Vectra-Restapi

Configuration​

Host​

  • Log into Centreon and add a new host through Configuration > Hosts.
  • Fill the Name, Alias & IP Address/DNS fields according to your Vectra server settings.
  • Apply the Net-Vectra-Restapi-custom template to the host.
  • Once the template is applied, fill in the corresponding macros. Some macros are mandatory.
MandatoryMacroDescription
APIEXTRAOPTIONS--insecure
APIPORT(Default: '443')
APIPROTO(Default: 'https')
XAPITOKEN

How to check in the CLI that the configuration is OK and what are the main options for?​

Once the plugin is installed, log into your Centreon poller's CLI using the centreon-engine user account (su - centreon-engine) and test the plugin by running the following command:

/usr/lib/centreon/plugins/centreon_vectra_restapi.pl \
--plugin=network::vectra::restapi::plugin \
--mode=memory \
--hostname='10.0.0.1' \
--port='443' \
--proto='https' \
--token='mytoken'

The expected command output is shown below:

OK: Ram total: 187.39 GB used (-buffers/cache): 85.47 GB (45.61%) free: 59.08 GB (31.53%) - All dimm are ok | 'memory.usage.bytes'=91772731392B;;;0;201210691584 'memory.free.bytes'=63436963840B;;;0;201210691584 'memory.usage.percentage'=45.61%;;;0;100
Dimm 'mc0' status: ok
Dimm 'mc1' status: ok
Dimm 'mc2' status: ok

All available options for a given mode can be displayed by adding the --help parameter to the command:

/usr/lib/centreon/plugins/centreon_vectra_restapi.pl \
--plugin=network::vectra::restapi::plugin \
--mode=memory \
--help

All available modes can be displayed by adding the --list-mode parameter to the command:

/usr/lib/centreon/plugins/centreon_vectra_restapi.pl \
--plugin=network::vectra::restapi::plugin \
--list-mode

Troubleshooting​

Please find the troubleshooting documentation for the API-based plugins in this chapter.