From ae6e7505bc6510e1b575c3578b2f5dd1f416b7bc Mon Sep 17 00:00:00 2001 From: Lucie Dubrunfaut Date: Fri, 22 Nov 2024 11:51:19 +0100 Subject: [PATCH 1/3] Update documentation --- .../network-keysight-nvos-restapi.md | 503 ++++++++-------- .../network-keysight-nvos-restapi.md | 536 ++++++++++-------- 2 files changed, 556 insertions(+), 483 deletions(-) diff --git a/i18n/fr/docusaurus-plugin-content-docs-pp/current/integrations/plugin-packs/procedures/network-keysight-nvos-restapi.md b/i18n/fr/docusaurus-plugin-content-docs-pp/current/integrations/plugin-packs/procedures/network-keysight-nvos-restapi.md index 48067b2493f3..c5d18c41e8ef 100644 --- a/i18n/fr/docusaurus-plugin-content-docs-pp/current/integrations/plugin-packs/procedures/network-keysight-nvos-restapi.md +++ b/i18n/fr/docusaurus-plugin-content-docs-pp/current/integrations/plugin-packs/procedures/network-keysight-nvos-restapi.md @@ -5,6 +5,12 @@ title: Keysight NVOS Rest API import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; +## Dépendances du connecteur de supervision + +Les connecteurs de supervision suivants sont automatiquement installés lors de l'installation du connecteur **Keysight NVOS Rest API** +depuis la page **Configuration > Gestionnaire de connecteurs de supervision** : +* [Base Pack](./base-generic.md) + ## Contenu du pack ### Modèles @@ -17,23 +23,24 @@ Le connecteur apporte les modèles de service suivants (classés selon le modèle d'hôte auquel ils sont rattachés) : - + -| Alias | Modèle de service | Description | -|:---------|:-----------------------------------|:------------------------------------------------------------| -| Hardware | Net-Keysight-Nvos-Hardware-Restapi | Contrôle l'état du matériel | -| Time | Net-Keysight-Nvos-Time-Restapi | Contrôle le décalage de temps | -| Uptime | Net-Keysight-Nvos-Uptime-Restapi | Durée depuis laquelle l'équipement tourne sans interruption | +| Alias | Modèle de service | Description | +|:---------|:------------------------------------------|:------------------------------------------------------------| +| Hardware | Net-Keysight-Nvos-Hardware-Restapi-custom | Contrôle l'état du matériel | +| Licence | Net-Keysight-Nvos-Licence-Restapi-custom | Contrôle l'état de la licence | +| Time | Net-Keysight-Nvos-Time-Restapi-custom | Contrôle le décalage de temps | +| Uptime | Net-Keysight-Nvos-Uptime-Restapi-custom | Durée depuis laquelle l'équipement tourne sans interruption | -> Les services listés ci-dessus sont créés automatiquement lorsque le modèle d'hôte **Net-Keysight-Nvos-Restapi** est utilisé. +> Les services listés ci-dessus sont créés automatiquement lorsque le modèle d'hôte **Net-Keysight-Nvos-Restapi-custom** est utilisé. -| Alias | Modèle de service | Description | Découverte | -|:----------------|:------------------------------------------|:--------------------------------|:-----------| -| Dynamic-Filters | Net-Keysight-Nvos-Dynamic-Filters-Restapi | Contrôle les filtres dynamiques | X | -| Ports | Net-Keysight-Nvos-Ports-Restapi | Contrôle les ports | X | +| Alias | Modèle de service | Description | Découverte | +|:----------------|:-------------------------------------------------|:--------------------------------|:----------:| +| Dynamic-Filters | Net-Keysight-Nvos-Dynamic-Filters-Restapi-custom | Contrôle les filtres dynamiques | X | +| Ports | Net-Keysight-Nvos-Ports-Restapi-custom | Contrôle les ports | X | > Les services listés ci-dessus ne sont pas créés automatiquement lorsqu'un modèle d'hôte est appliqué. Pour les utiliser, [créez un service manuellement](/docs/monitoring/basic-objects/services) et appliquez le modèle de service souhaité. @@ -44,7 +51,7 @@ Le connecteur apporte les modèles de service suivants ### Règles de découverte -#### Découverte de service +#### Découverte de services | Nom de la règle | Description | |:----------------------------------------------|:-----------------------------------------------------------| @@ -56,46 +63,59 @@ pour en savoir plus sur la découverte automatique de services et sa [planificat ### Métriques & statuts collectés -Voici le tableau des services pour ce connecteur, détaillant les métriques rattachées à chaque service. +Voici le tableau des services pour ce connecteur, détaillant les métriques et statuts rattachés à chaque service. -| Métrique | Unité | -|:----------------------------------------------|:------| -| df~dynamic_filter.traffic.pass.bytespersecond | B/s | -| df~dynamic_filter.traffic.insp.bytespersecond | B/s | -| df~dynamic_filter.packets.denied.count | count | -| df~dynamic_filter.packets.pass.count | count | -| df~dynamic_filter.packets.insp.count | count | +| Nom | Unité | +|:------------------------------------------------|:------| +| *df*~dynamic_filter.traffic.pass.bytespersecond | B/s | +| *df*~dynamic_filter.traffic.insp.bytespersecond | B/s | +| *df*~dynamic_filter.packets.denied.count | count | +| *df*~dynamic_filter.packets.pass.count | count | +| *df*~dynamic_filter.packets.insp.count | count | -| Métrique | Unité | -|:------------------------------------------|:------| -| temperatures#temperature-status | N/A | -| temperatures#hardware.temperature.celsius | | -| fans.failed.count | count | -| psus#psu-status | N/A | +| Nom | Unité | +|:--------------------------------------------|:------| +| temperature-status | N/A | +| *temperatures*#hardware.temperature.celsius | C | +| fans.failed.count | count | +| psu-status | N/A | + + + + +| Nom | Unité | +|:-------|:------| +| status | N/A | -| Métrique | Unité | -|:--------------------------------------|:------| -| ports~license-status | N/A | -| ports~port.traffic.out.percentage | % | -| ports~port.traffic.out.bytespersecond | B/s | -| ports~port.packets.out.count | count | -| ports~port.packets.dropped.count | count | -| ports~port.packets.pass.count | count | -| ports~port.packets.insp.count | count | +| Nom | Unité | +|:----------------------------------------|:------| +| license-status | N/A | +| link-status | N/A | +| *ports*~port.traffic.out.percentage | % | +| *ports*~port.traffic.out.bytespersecond | B/s | +| *ports*~port.packets.out.count | count | +| *ports*~port.packets.pass.count | count | +| *ports*~port.packets.invalid.count | count | +| *ports*~port.packets.deny.count | count | +| *ports*~port.crc.alignment.errors.count | count | +| *ports*~port.packets.out.count | count | +| *ports*~port.packets.dropped.count | count | +| *ports*~port.packets.pass.count | count | +| *ports*~port.packets.insp.count | count | -| Métrique | Unité | +| Nom | Unité | |:--------------------|:------| | ntp-status | N/A | | time.offset.seconds | s | @@ -103,7 +123,7 @@ Voici le tableau des services pour ce connecteur, détaillant les métriques rat -| Métrique | Unité | +| Nom | Unité | |:----------------------|:------| | system.uptime.seconds | s | @@ -118,10 +138,10 @@ Pour la supervision, un utilisateur avec des droits de lecture sur l'[Automation ### Pack -1. Si la plateforme est configurée avec une licence *online*, l'installation d'un paquets +1. Si la plateforme est configurée avec une licence *online*, l'installation d'un paquet n'est pas requise pour voir apparaître le connecteur dans le menu **Configuration > Gestionnaire de connecteurs de supervision**. Au contraire, si la plateforme utilise une licence *offline*, installez le paquet -sur le **serveur central** via la commande correspondant au gestionnaire de paquet +sur le **serveur central** via la commande correspondant au gestionnaire de paquets associé à sa distribution : @@ -209,13 +229,13 @@ yum install centreon-plugin-Network-Keysight-Nvos-Restapi 3. Appliquez le modèle d'hôte **Net-Keysight-Nvos-Restapi-custom**. Une liste de macros apparaît. Les macros vous permettent de définir comment le connecteur se connectera à la ressource, ainsi que de personnaliser le comportement du connecteur. 4. Renseignez les macros désirées. Attention, certaines macros sont obligatoires. -| Macro | Description | Valeur par défaut | Obligatoire | -|:----------------------------|:------------------------------------------------------------------------------------------------------|:------------------|:------------| -| KEYSIGHTNVOSAPIPASSWORD | API password | | | -| KEYSIGHTNVOSAPIPORT | Port used | 8000 | | -| KEYSIGHTNVOSAPIPROTO | Specify https if needed | https | | -| KEYSIGHTNVOSAPIUSERNAME | API username | | | -| KEYSIGHTNVOSAPIEXTRAOPTIONS | Any extra option you may want to add to every command (E.g. a --verbose flag). Tous les options sont listées [ici](#options-disponibles) | | | +| Macro | Description | Valeur par défaut | Obligatoire | +|:----------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------|:------------------|:-----------:| +| KEYSIGHTNVOSAPIUSERNAME | API username | | X | +| KEYSIGHTNVOSAPIPASSWORD | API password | | X | +| KEYSIGHTNVOSAPIPROTO | Specify https if needed | https | | +| KEYSIGHTNVOSAPIPORT | Port used | 8000 | | +| KEYSIGHTNVOSAPIEXTRAOPTIONS | Any extra option you may want to add to every command (a --verbose flag for example). Toutes les options sont listées [ici](#options-disponibles). | | | 5. [Déployez la configuration](/docs/monitoring/monitoring-servers/deploying-a-configuration). L'hôte apparaît dans la liste des hôtes supervisés, et dans la page **Statut des ressources**. La commande envoyée par le connecteur est indiquée dans le panneau de détails de l'hôte : celle-ci montre les valeurs des macros. @@ -227,84 +247,101 @@ yum install centreon-plugin-Network-Keysight-Nvos-Restapi -| Macro | Description | Valeur par défaut | Obligatoire | -|:----------------------|:----------------------------------------------------------------------------------------------------|:------------------|:------------| -| FILTERNAME | Filter dynamic filters by name (can be a regexp) | | | -| WARNINGPACKETSDENIED | | | | -| CRITICALPACKETSDENIED | | | | -| WARNINGPACKETSINSP | Thresholds | | | -| CRITICALPACKETSINSP | Thresholds | | | -| WARNINGPACKETSPASS | Thresholds | | | -| CRITICALPACKETSPASS | Thresholds | | | -| WARNINGTRAFFICINSP | | | | -| CRITICALTRAFFICINSP | | | | -| WARNINGTRAFFICPASS | | | | -| CRITICALTRAFFICPASS | | | | -| EXTRAOPTIONS | Any extra option you may want to add to the command (E.g. a --verbose flag). Tous les options sont listées [ici](#options-disponibles) | --verbose | | +| Macro | Description | Valeur par défaut | Obligatoire | +|:----------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------|:------------------|:-----------:| +| FILTERNAME | Filter dynamic filters by name (can be a regexp) | | | +| WARNINGPACKETSDENIED | Threshold | | | +| CRITICALPACKETSDENIED | Threshold | | | +| WARNINGPACKETSINSP | Threshold | | | +| CRITICALPACKETSINSP | Threshold | | | +| WARNINGPACKETSPASS | Threshold | | | +| CRITICALPACKETSPASS | Threshold | | | +| WARNINGTRAFFICINSP | Threshold | | | +| CRITICALTRAFFICINSP | Threshold | | | +| WARNINGTRAFFICPASS | Threshold | | | +| CRITICALTRAFFICPASS | Threshold | | | +| EXTRAOPTIONS | Any extra option you may want to add to the command (a --verbose flag for example). Toutes les options sont listées [ici](#options-disponibles). | --verbose | | -| Macro | Description | Valeur par défaut | Obligatoire | -|:--------------------------|:--------------------------------------------------------------------------------------------------------------------------------|:-----------------------|:------------| -| UNKNOWNTEMPERATURESTATUS | Set unknown threshold for status (Default : '%{status} eq "unknown"'). You can use the following variables: %{status}, %{class} | %{status} eq "unknown" | | -| WARNINGFANSFAILED | Thresholds | | | -| CRITICALFANSFAILED | Thresholds | | | -| CRITICALPSUSTATUS | | %{status} eq "bad" | | -| WARNINGPSUSTATUS | Set warning threshold for status. You can use the following variables: %{status}, %{name} | | | -| WARNINGTEMPERATURE | Thresholds | | | -| CRITICALTEMPERATURE | Thresholds | | | -| WARNINGTEMPERATURESTATUS | Set warning threshold for status (Default : '%{status} eq "warn"'). You can use the following variables: %{status}, %{class} | %{status} eq "warn" | | -| CRITICALTEMPERATURESTATUS | Set critical threshold for status (Default: '%{status} eq "hot"'); You can use the following variables: %{status}, %{class} | %{status} eq "hot" | | -| EXTRAOPTIONS | Any extra option you may want to add to the command (E.g. a --verbose flag). Tous les options sont listées [ici](#options-disponibles) | --verbose | | +| Macro | Description | Valeur par défaut | Obligatoire | +|:--------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------|:-----------------------|:-----------:| +| UNKNOWNTEMPERATURESTATUS | Define the conditions to match for the status to be UNKNOWN. You can use the following variables: %{status}, %{class} | %{status} eq "unknown" | | +| WARNINGFANSFAILED | Threshold | | | +| CRITICALFANSFAILED | Threshold | | | +| CRITICALPSUSTATUS | Threshold | %{status} eq "bad" | | +| WARNINGPSUSTATUS | Define the conditions to match for the status to be WARNING. You can use the following variables: %{status}, %{name} | | | +| WARNINGTEMPERATURE | Threshold | | | +| CRITICALTEMPERATURE | Threshold | | | +| WARNINGTEMPERATURESTATUS | Define the conditions to match for the status to be WARNING. You can use the following variables: %{status}, %{class} | %{status} eq "warn" | | +| CRITICALTEMPERATURESTATUS | Define the conditions to match for the status to be CRITICAL. You can use the following variables: %{status}, %{class} | %{status} eq "hot" | | +| EXTRAOPTIONS | Any extra option you may want to add to the command (a --verbose flag for example). Toutes les options sont listées [ici](#options-disponibles). | --verbose | | + + + + +| Macro | Description | Valeur par défaut | Obligatoire | +|:---------------|:-------------------------------------------------------------------------------------------------------------------------------------------------|:--------------------------------|:-----------:| +| UNKNOWNSTATUS | Define the conditions to match for the status to be UNKNOWN. You can use the following variables: %{status} | | | +| WARNINGSTATUS | Define the conditions to match for the status to be WARNING. You can use the following variables: %{status} | %{status} =~ /MINOR/i | | +| CRITICALSTATUS | Define the conditions to match for the status to be CRITICAL. You can use the following variables: %{status} | %{status} =~ /MAJOR\|CRITICAL/i | | +| EXTRAOPTIONS | Any extra option you may want to add to the command (a --verbose flag for example). Toutes les options sont listées [ici](#options-disponibles). | --verbose | | -| Macro | Description | Valeur par défaut | Obligatoire | -|:-----------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------|:------------| -| FILTERNAME | Filter ports by name (can be a regexp) | | | -| WARNINGLICENSESTATUS | Set warning threshold for status (Default: '%{status} =~ /invalid\_software\_version/'). You can use the following variables: %{status}, %{name} | %{status} =~ /invalid_software_version/ | | -| CRITICALLICENSESTATUS | Set critical threshold for status. You can use the following variables: %{status}, %{name} | | | -| CRITICALLINKSTATUS | Set critical threshold for status (Default: '%{adminStatus} eq "enabled" and %{operationalStatus} ne "up"'). You can use the following variables: %{adminStatus}, %{operationalStatus}, %{name} | %{adminStatus} eq "enabled" and %{operationalStatus} ne "up" | | -| WARNINGLINKSTATUS | Set warning threshold for status. You can use the following variables: %{adminStatus}, %{operationalStatus}, %{name} | | | -| WARNINGPACKETSDROPPED | Thresholds | | | -| CRITICALPACKETSDROPPED | Thresholds | | | -| WARNINGPACKETSINSP | Thresholds | | | -| CRITICALPACKETSINSP | Thresholds | | | -| WARNINGPACKETSOUT | Thresholds | | | -| CRITICALPACKETSOUT | Thresholds | | | -| WARNINGPACKETSPASS | Thresholds | | | -| CRITICALPACKETSPASS | Thresholds | | | -| WARNINGTRAFFICOUT | Thresholds | | | -| CRITICALTRAFFICOUT | Thresholds | | | -| WARNINGTRAFFICOUTPRCT | Thresholds | | | -| CRITICALTRAFFICOUTPRCT | Thresholds | | | -| EXTRAOPTIONS | Any extra option you may want to add to the command (E.g. a --verbose flag). Tous les options sont listées [ici](#options-disponibles) | --verbose | | +| Macro | Description | Valeur par défaut | Obligatoire | +|:-----------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------|:-----------:| +| FILTERNAME | Filter ports by name (can be a regexp) | | | +| FILTERTYPE | Filter ports by type (can be a regexp). You can use the following types: 'Network Port', 'Port Group' and 'Tool Port' | | | +| WARNINGLICENSESTATUS | Define the conditions to match for the status to be WARNING. You can use the following variables: %{status}, %{name} | %{status} =~ /invalid\_software\_version/ | | +| CRITICALLICENSESTATUS | Define the conditions to match for the status to be CRITICAL. You can use the following variables: %{status}, %{name} | | | +| CRITICALLINKSTATUS | Define the conditions to match for the status to be CRITICAL. You can use the following variables: %{adminStatus}, %{operationalStatus}, %{name} | %{adminStatus} eq "enabled" and %{operationalStatus} ne "up" | | +| WARNINGLINKSTATUS | Define the conditions to match for the status to be WARNING. You can use the following variables: %{adminStatus}, %{operationalStatus}, %{name} | | | +| WARNINGPACKETSDROPPED | Threshold | | | +| CRITICALPACKETSDROPPED | Threshold | | | +| WARNINGPACKETSIN | Threshold | | | +| CRITICALPACKETSIN | Threshold | | | +| WARNINGPACKETSINSP | Threshold | | | +| CRITICALPACKETSINSP | Threshold | | | +| WARNINGPACKETSOUT | Threshold | | | +| CRITICALPACKETSOUT | Threshold | | | +| WARNINGPACKETSPASS | Threshold | | | +| CRITICALPACKETSPASS | Threshold | | | +| WARNINGTRAFFICIN | Threshold | | | +| CRITICALTRAFFICIN | Threshold | | | +| WARNINGTRAFFICINPRCT | Threshold | | | +| CRITICALTRAFFICINPRCT | Threshold | | | +| WARNINGTRAFFICOUT | Threshold | | | +| CRITICALTRAFFICOUT | Threshold | | | +| WARNINGTRAFFICOUTPRCT | Threshold | | | +| CRITICALTRAFFICOUTPRCT | Threshold | | | +| EXTRAOPTIONS | Any extra option you may want to add to the command (a --verbose flag for example). Toutes les options sont listées [ici](#options-disponibles). | --verbose | | -| Macro | Description | Valeur par défaut | Obligatoire | -|:------------------|:------------------------------------------------------------------------------------------------------------------------------------|:--------------------------------|:------------| -| TIMEZONE | Override the timezone of distant equipment. Can use format: 'Europe/London' or '+0100' | | | -| NTPHOSTNAME | Set the ntp hostname (if not set, localtime is used) | | | -| NTPPORT | Set the ntp port (Default: 123) | | | -| CRITICALNTPSTATUS | Set thresholds for status (Default critical: '%{status} !~ /in\_reach\|in\_sync/i') You can use the following variables: %{status} | %{status} !~ /in_reach\|in_sync/ | | -| WARNINGNTPSTATUS | | | | -| WARNINGOFFSET | Time offset warning threshold (in seconds) | | | -| CRITICALOFFSET | Time offset critical Threshold (in seconds) | | | -| EXTRAOPTIONS | Any extra option you may want to add to the command (E.g. a --verbose flag). Tous les options sont listées [ici](#options-disponibles) | --verbose | | +| Macro | Description | Valeur par défaut | Obligatoire | +|:------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------|:-----------------------------------|:-----------:| +| TIMEZONE | Override the timezone of distant equipment. Can use format: 'Europe/London' or '+0100' | | | +| NTPHOSTNAME | Set the NTP hostname (if not set, localtime is used) | | | +| NTPPORT | Set the NTP port (default: 123) | | | +| CRITICALNTPSTATUS | Define the conditions to match for the status to be CRITICAL. You can use the following variables: %{status} | %{status} !~ /in\_reach\|in\_sync/ | | +| WARNINGNTPSTATUS | Define the conditions to match for the status to be WARNING | | | +| WARNINGOFFSET | Define the time offset (in seconds) that will trigger a WARNING status | | | +| CRITICALOFFSET | Define the time offset (in seconds) that will trigger a CRITICAL status | | | +| EXTRAOPTIONS | Any extra option you may want to add to the command (a --verbose flag for example). Toutes les options sont listées [ici](#options-disponibles). | --verbose | | -| Macro | Description | Valeur par défaut | Obligatoire | -|:---------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------|:------------------|:------------| -| UNIT | Select the unit for performance data and thresholds. May be 's'for seconds, 'm' for minutes, 'h' for hours, 'd' for days, 'w' for weeks. Default is seconds | | | -| WARNINGUPTIME | Threshold warning | | | -| CRITICALUPTIME | Threshold critical | | | -| EXTRAOPTIONS | Any extra option you may want to add to the command (E.g. a --verbose flag). Tous les options sont listées [ici](#options-disponibles) | | | +| Macro | Description | Valeur par défaut | Obligatoire | +|:---------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------|:------------------|:-----------:| +| UNIT | Select the unit for performance data and thresholds. May be 's' for seconds, 'm' for minutes, 'h' for hours, 'd' for days, 'w' for weeks. Default is seconds | | | +| WARNINGUPTIME | Warning threshold | | | +| CRITICALUPTIME | Critical threshold | | | +| EXTRAOPTIONS | Any extra option you may want to add to the command (a --verbose flag for example). Toutes les options sont listées [ici](#options-disponibles). | | | @@ -316,7 +353,7 @@ yum install centreon-plugin-Network-Keysight-Nvos-Restapi Une fois le plugin installé, vous pouvez tester celui-ci directement en ligne de commande depuis votre collecteur Centreon en vous connectant avec l'utilisateur **centreon-engine** (`su - centreon-engine`). Vous pouvez tester -que le connecteur arrive bien à superviser un serveur en utilisant une commande +que le connecteur arrive bien à superviser une ressource en utilisant une commande telle que celle-ci (remplacez les valeurs d'exemple par les vôtres) : ```bash @@ -328,6 +365,15 @@ telle que celle-ci (remplacez les valeurs d'exemple par les vôtres) : --port='8000' \ --api-username='username' \ --api-password='*****' \ + --unknown-temperature-status='%{status} eq "unknown"' \ + --warning-temperature-status='%{status} eq "warn"' \ + --critical-temperature-status='%{status} eq "hot"' \ + --warning-temperature='' \ + --critical-temperature='' \ + --warning-fans-failed='' \ + --critical-fans-failed='' \ + --warning-psu-status='' \ + --critical-psu-status='%{status} eq "bad"' \ --verbose ``` @@ -347,165 +393,160 @@ des plugins basés sur HTTP/API. ### Modes disponibles +Dans la plupart des cas, un mode correspond à un modèle de service. Le mode est renseigné dans la commande d'exécution +du connecteur. Dans l'interface de Centreon, il n'est pas nécessaire de les spécifier explicitement, leur utilisation est +implicite dès lors que vous utilisez un modèle de service. En revanche, vous devrez spécifier le mode correspondant à ce +modèle si vous voulez tester la commande d'exécution du connecteur dans votre terminal. + Tous les modes disponibles peuvent être affichés en ajoutant le paramètre `--list-mode` à la commande : ```bash /usr/lib/centreon/plugins/centreon_keysight_nvos_restapi.pl \ --plugin=network::keysight::nvos::restapi::plugin \ - --list-mode + --list-mode ``` Le plugin apporte les modes suivants : -| Mode | Modèle de service associé | -|:---------------------|:------------------------------------------| -| dynamic-filters | Net-Keysight-Nvos-Dynamic-Filters-Restapi | -| hardware | Net-Keysight-Nvos-Hardware-Restapi | -| list-dynamic-filters | Used for service discovery | -| list-ports | Used for service discovery | -| ports | Net-Keysight-Nvos-Ports-Restapi | -| time | Net-Keysight-Nvos-Time-Restapi | -| uptime | Net-Keysight-Nvos-Uptime-Restapi | +| Mode | Modèle de service associé | +|:------------------------------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------| +| dynamic-filters [[code](https://github.com/centreon/centreon-plugins/blob/develop/src/network/keysight/nvos/restapi/mode/dynamicfilters.pm)] | Net-Keysight-Nvos-Dynamic-Filters-Restapi-custom | +| hardware [[code](https://github.com/centreon/centreon-plugins/blob/develop/src/network/keysight/nvos/restapi/mode/hardware.pm)] | Net-Keysight-Nvos-Hardware-Restapi-custom | +| license [[code](https://github.com/centreon/centreon-plugins/blob/develop/src/network/keysight/nvos/restapi/mode/license.pm)] | Net-Keysight-Nvos-Licence-Restapi-custom | +| list-dynamic-filters [[code](https://github.com/centreon/centreon-plugins/blob/develop/src/network/keysight/nvos/restapi/mode/listdynamicfilters.pm)] | Used for service discovery | +| list-ports [[code](https://github.com/centreon/centreon-plugins/blob/develop/src/network/keysight/nvos/restapi/mode/listports.pm)] | Used for service discovery | +| ports [[code](https://github.com/centreon/centreon-plugins/blob/develop/src/network/keysight/nvos/restapi/mode/ports.pm)] | Net-Keysight-Nvos-Ports-Restapi-custom | +| time [[code](https://github.com/centreon/centreon-plugins/blob/develop/src/network/keysight/nvos/restapi/mode/time.pm)] | Net-Keysight-Nvos-Time-Restapi-custom | +| uptime [[code](https://github.com/centreon/centreon-plugins/blob/develop/src/network/keysight/nvos/restapi/mode/uptime.pm)] | Net-Keysight-Nvos-Uptime-Restapi-custom | ### Options disponibles #### Options génériques -Les options génériques aux modes sont listées ci-dessous : - -| Option | Description | Type | -|:-------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-------------| -| --mode | Define the mode in which you want the plugin to be executed (see--list-mode). | Global | -| --dyn-mode | Specify a mode with the module's path (advanced). | Global | -| --list-mode | List all available modes. | Global | -| --mode-version | Check minimal version of mode. If not, unknown error. | Global | -| --version | Display the plugin's version. | Global | -| --custommode | When a plugin offers several ways (CLI, library, etc.) to get the an information the desired one must be defined with this option. | Global | -| --list-custommode | List all available custom modes. | Global | -| --multiple | Multiple custom mode objects. This may be required by some specific modes (advanced). | Global | -| --pass-manager | Define the password manager you want to use. Supported managers are: environment, file, keepass, hashicorpvault and teampass. | Global | -| --verbose | Display extended status information (long output). | Output | -| --debug | Display debug messages. | Output | -| --filter-perfdata | Filter perfdata that match the regexp. Eg: adding --filter-perfdata='avg' will remove all metrics that do not contain 'avg' from performance data. | Output | -| --filter-perfdata-adv | Filter perfdata based on a "if" condition using the following variables: label, value, unit, warning, critical, min, max. Variables must be written either %{variable} or %(variable). Eg: adding --filter-perfdata-adv='not (%(value) == 0 and %(max) eq "")' will remove all metrics whose value equals 0 and that don't have a maximum value. | Output | -| --explode-perfdata-max | Create a new metric for each metric that comes with a maximum limit. The new metric will be named identically with a '\_max' suffix). Eg: it will split 'used\_prct'=26.93%;0:80;0:90;0;100 into 'used\_prct'=26.93%;0:80;0:90;0;100 'used\_prct\_max'=100%;;;; | Output | -| --change-perfdata --extend-perfdata | Change or extend perfdata. Syntax: --extend-perfdata=searchlabel,newlabel,target\[,\[newuom\],\[min\],\[m ax\]\] Common examples: Change storage free perfdata in used: --change-perfdata=free,used,invert() Change storage free perfdata in used: --change-perfdata=used,free,invert() Scale traffic values automaticaly: --change-perfdata=traffic,,scale(auto) Scale traffic values in Mbps: --change-perfdata=traffic\_in,,scale(Mbps),mbps Change traffic values in percent: --change-perfdata=traffic\_in,,percent() | Output | -| --extend-perfdata-group | Extend perfdata from multiple perfdatas (methods in target are: min, max, average, sum) Syntax: --extend-perfdata-group=searchlabel,newlabel,target\[,\[newuom\],\[m in\],\[max\]\] Common examples: Sum wrong packets from all interfaces (with interface need --units-errors=absolute): --extend-perfdata-group=',packets\_wrong,sum(packets\_(discard \|error)\_(in\|out))' Sum traffic by interface: --extend-perfdata-group='traffic\_in\_(.\*),traffic\_$1,sum(traf fic\_(in\|out)\_$1)' | Output | -| --change-short-output --change-long-output | Modify the short/long output that is returned by the plugin. Syntax: --change-short-output=pattern~replacement~modifier Most commonly used modifiers are i (case insensitive) and g (replace all occurrences). Eg: adding --change-short-output='OK~Up~gi' will replace all occurrences of 'OK', 'ok', 'Ok' or 'oK' with 'Up' | Output | -| --change-exit | Replace an exit code with one of your choice. Eg: adding --change-exit=unknown=critical will result in a CRITICAL state instead of an UNKNOWN state. | Output | -| --range-perfdata | Change perfdata range thresholds display: 1 = start value equals to '0' is removed, 2 = threshold range is not display. | Output | -| --filter-uom | Masks the units when they don't match the given regular expression. | Output | -| --opt-exit | Replace the exit code in case of an execution error (i.e. wrong option provided, SSH connection refused, timeout, etc). Default: unknown. | Output | -| --output-ignore-perfdata | Remove all the metrics from the service. The service will still have a status and an output. | Output | -| --output-ignore-label | Remove the status label from the beginning of the output. Eg: 'OK: Ram Total:...' will become 'Ram Total:...' | Output | -| --output-xml | Display output in XML format. | Output | -| --output-json | Display output in JSON format. | Output | -| --output-openmetrics | Display metrics in OpenMetrics format. | Output | -| --output-file | Write output in file (can be used with json and xml options) | Output | -| --disco-format | Display discovery arguments (if the mode manages it). | Output | -| --disco-show | Display discovery values (if the mode manages it). | Output | -| --float-precision | Set the float precision for thresholds (default: 8). | Output | -| --source-encoding | Set encoding of monitoring sources (in some cases. Default: 'UTF-8'). Keysight NVOS API | Output | -| --hostname | Set hostname. | Api | -| --port | Port used (Default: 8000) | Api | -| --proto | Specify https if needed (Default: 'https') | Api | -| --api-username | API username. | Api | -| --api-password | API password. | Api | -| --timeout | Set timeout in seconds (Default: 50). | Api | -| --http-peer-addr | Set the address you want to connect to. Useful if hostname is only a vhost, to avoid IP resolution. | Http global | -| --proxyurl | Proxy URL | Http global | -| --proxypac | Proxy pac file (can be a URL or local file) | Http global | -| --insecure | Insecure SSL connections. | Http global | -| --http-backend | Set the backend used (Default: 'lwp') For curl: --http-backend=curl | Http global | -| --ssl-opt | Set SSL Options (--ssl-opt="SSL\_version =\> TLSv1" --ssl-opt="SSL\_verify\_mode =\> SSL\_VERIFY\_NONE"). | Backend lwp | -| --curl-opt | Set CURL Options (--curl-opt="CURLOPT\_SSL\_VERIFYPEER =\> 0" --curl-opt="CURLOPT\_SSLVERSION =\> CURL\_SSLVERSION\_TLSv1\_1" ). | Backend curl | +Les options génériques sont listées ci-dessous : + +| Option | Description | +|:-------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| --mode | Define the mode in which you want the plugin to be executed (see --list-mode). | +| --dyn-mode | Specify a mode with the module's path (advanced). | +| --list-mode | List all available modes. | +| --mode-version | Check minimal version of mode. If not, unknown error. | +| --version | Return the version of the plugin. | +| --custommode | When a plugin offers several ways (CLI, library, etc.) to get information the desired one must be defined with this option. | +| --list-custommode | List all available custom modes. | +| --multiple | Multiple custom mode objects. This may be required by some specific modes (advanced). | +| --pass-manager | Define the password manager you want to use. Supported managers are: environment, file, keepass, hashicorpvault and teampass. | +| --verbose | Display extended status information (long output). | +| --debug | Display debug messages. | +| --filter-perfdata | Filter perfdata that match the regexp. Example: adding --filter-perfdata='avg' will remove all metrics that do not contain 'avg' from performance data. | +| --filter-perfdata-adv | Filter perfdata based on a "if" condition using the following variables: label, value, unit, warning, critical, min, max. Variables must be written either %{variable} or %(variable). Example: adding --filter-perfdata-adv='not (%(value) == 0 and %(max) eq "")' will remove all metrics whose value equals 0 and that don't have a maximum value. | +| --explode-perfdata-max | Create a new metric for each metric that comes with a maximum limit. The new metric will be named identically with a '\_max' suffix). Example: it will split 'used\_prct'=26.93%;0:80;0:90;0;100 into 'used\_prct'=26.93%;0:80;0:90;0;100 'used\_prct\_max'=100%;;;; | +| --change-perfdata --extend-perfdata | Change or extend perfdata. Syntax: --extend-perfdata=searchlabel,newlabel,target\[,\[newuom\],\[min\],\[max\]\] Common examples: =over 4 Convert storage free perfdata into used: --change-perfdata='free,used,invert()' Convert storage free perfdata into used: --change-perfdata='used,free,invert()' Scale traffic values automatically: --change-perfdata='traffic,,scale(auto)' Scale traffic values in Mbps: --change-perfdata='traffic\_in,,scale(Mbps),mbps' Change traffic values in percent: --change-perfdata='traffic\_in,,percent()' =back | +| --change-perfdata | Change or extend perfdata. Syntax: --extend-perfdata=searchlabel,newlabel,target\[,\[newuom\],\[min\],\[max\]\] Common examples: =over 4 Convert storage free perfdata into used: --change-perfdata='free,used,invert()' Convert storage free perfdata into used: --change-perfdata='used,free,invert()' Scale traffic values automatically: --change-perfdata='traffic,,scale(auto)' Scale traffic values in Mbps: --change-perfdata='traffic\_in,,scale(Mbps),mbps' Change traffic values in percent: --change-perfdata='traffic\_in,,percent()' =back | +| --extend-perfdata | Change or extend perfdata. Syntax: --extend-perfdata=searchlabel,newlabel,target\[,\[newuom\],\[min\],\[max\]\] Common examples: =over 4 Convert storage free perfdata into used: --change-perfdata='free,used,invert()' Convert storage free perfdata into used: --change-perfdata='used,free,invert()' Scale traffic values automatically: --change-perfdata='traffic,,scale(auto)' Scale traffic values in Mbps: --change-perfdata='traffic\_in,,scale(Mbps),mbps' Change traffic values in percent: --change-perfdata='traffic\_in,,percent()' =back | +| --extend-perfdata-group | Add new aggregated metrics (min, max, average or sum) for groups of metrics defined by a regex match on the metrics' names. Syntax: --extend-perfdata-group=regex,namesofnewmetrics,calculation\[,\[newuom\],\[min\],\[max\]\] regex: regular expression namesofnewmetrics: how the new metrics' names are composed (can use $1, $2... for groups defined by () in regex). calculation: how the values of the new metrics should be calculated newuom (optional): unit of measure for the new metrics min (optional): lowest value the metrics can reach max (optional): highest value the metrics can reach Common examples: =over 4 Sum wrong packets from all interfaces (with interface need --units-errors=absolute): --extend-perfdata-group=',packets\_wrong,sum(packets\_(discard\|error)\_(in\|out))' Sum traffic by interface: --extend-perfdata-group='traffic\_in\_(.*),traffic\_$1,sum(traffic\_(in\|out)\_$1)' =back | +| --change-short-output --change-long-output | Modify the short/long output that is returned by the plugin. Syntax: --change-short-output=pattern~replacement~modifier Most commonly used modifiers are i (case insensitive) and g (replace all occurrences). Example: adding --change-short-output='OK~Up~gi' will replace all occurrences of 'OK', 'ok', 'Ok' or 'oK' with 'Up' | +| --change-short-output | Modify the short/long output that is returned by the plugin. Syntax: --change-short-output=pattern~replacement~modifier Most commonly used modifiers are i (case insensitive) and g (replace all occurrences). Example: adding --change-short-output='OK~Up~gi' will replace all occurrences of 'OK', 'ok', 'Ok' or 'oK' with 'Up' | +| --change-long-output | Modify the short/long output that is returned by the plugin. Syntax: --change-short-output=pattern~replacement~modifier Most commonly used modifiers are i (case insensitive) and g (replace all occurrences). Example: adding --change-short-output='OK~Up~gi' will replace all occurrences of 'OK', 'ok', 'Ok' or 'oK' with 'Up' | +| --change-exit | Replace an exit code with one of your choice. Example: adding --change-exit=unknown=critical will result in a CRITICAL state instead of an UNKNOWN state. | +| --range-perfdata | Rewrite the ranges displayed in the perfdata. Accepted values: 0: nothing is changed. 1: if the lower value of the range is equal to 0, it is removed. 2: remove the thresholds from the perfdata. | +| --filter-uom | Mask the units when they don't match the given regular expression. | +| --opt-exit | Replace the exit code in case of an execution error (i.e. wrong option provided, SSH connection refused, timeout, etc). Default: unknown. | +| --output-ignore-perfdata | Remove all the metrics from the service. The service will still have a status and an output. | +| --output-ignore-label | Remove the status label ("OK:", "WARNING:", "UNKNOWN:", CRITICAL:") from the beginning of the output. Example: 'OK: Ram Total:...' will become 'Ram Total:...' | +| --output-xml | Return the output in XML format (to send to an XML API). | +| --output-json | Return the output in JSON format (to send to a JSON API). | +| --output-openmetrics | Return the output in OpenMetrics format (to send to a tool expecting this format). | +| --output-file | Write output in file (can be combined with json, xml and openmetrics options). E.g.: --output-file=/tmp/output.txt will write the output in /tmp/output.txt. | +| --disco-format | Applies only to modes beginning with 'list-'. Returns the list of available macros to configure a service discovery rule (formatted in XML). | +| --disco-show | Applies only to modes beginning with 'list-'. Returns the list of discovered objects (formatted in XML) for service discovery. | +| --float-precision | Define the float precision for thresholds (default: 8). | +| --source-encoding | Define the character encoding of the response sent by the monitored resource Default: 'UTF-8'. =head1 DESCRIPTION B\. =cut | +| --filter-counters | Only display some counters (regexp can be used). Example to check SSL connections only : --filter-counters='^xxxx\|yyyy$' | +| --http-peer-addr | Set the address you want to connect to. Useful if hostname is only a vhost, to avoid IP resolution. | +| --proxyurl | Proxy URL. Example: http://my.proxy:3128 | +| --proxypac | Proxy pac file (can be a URL or a local file). | +| --insecure | Accept insecure SSL connections. | +| --http-backend | Perl library to use for HTTP transactions. Possible values are: lwp (default) and curl. | +| --hostname | Set hostname. | +| --port | Port used (default: 8000) | +| --proto | Specify https if needed (default: 'https') | +| --api-username | API username. | +| --api-password | API password. | +| --timeout | Set timeout in seconds (default: 50). | #### Options des modes -Les options spécifiques aux modes sont listées ci-dessus : +Les options disponibles pour chaque modèle de services sont listées ci-dessous : -| Option | Description | Type | -|:-------------------------|:----------------------------------------------------------------------------------------------------------------------------|:----------| -| --memcached | Memcached server to use (only one server). | Retention | -| --redis-server | Redis server to use (only one server). Syntax: address\[:port\] | Retention | -| --redis-attribute | Set Redis Options (--redis-attribute="cnx\_timeout=5"). | Retention | -| --redis-db | Set Redis database index. | Retention | -| --failback-file | Failback on a local file if redis connection failed. | Retention | -| --memexpiration | Time to keep data in seconds (Default: 86400). | Retention | -| --statefile-dir | Directory for statefile (Default: '/var/lib/centreon/centplugins'). | Retention | -| --statefile-suffix | Add a suffix for the statefile name (Default: ''). | Retention | -| --statefile-concat-cwd | Concat current working directory with option '--statefile-dir'. Useful on Windows when plugin is compiled. | Retention | -| --statefile-format | Format used to store cache (can be: 'dumper', 'storable', 'json'). | Retention | -| --statefile-key | Key to encrypt/decrypt cache. | Retention | -| --statefile-cipher | Cipher to encrypt cache (Default: 'AES'). | Retention | -| --filter-name | Filter dynamic filters by name (can be a regexp). | Mode | -| --warning-* --critical-* | Thresholds. Can be: 'traffic-out-prct', 'traffic-out', 'packets-out', 'packets-dropped', 'packets-pass', 'packets-insp'. | Mode | +| Option | Description | +|:-------------------------|:------------------------------------------------------------------------------------------------------------------------------| +| --filter-name | Filter dynamic filters by name (can be a regexp). | +| --warning-* --critical-* | Thresholds. Can be: 'traffic-out-prct', 'traffic-out', 'packets-out', 'packets-dropped', 'packets-pass', 'packets-insp'. | -| Option | Description | Type | -|:------------------------------|:----------------------------------------------------------------------------------------------------------------------------------|:-----| -| --unknown-temperature-status | Set unknown threshold for status (Default : '%{status} eq "unknown"'). You can use the following variables: %{status}, %{class} | Mode | -| --warning-temperature-status | Set warning threshold for status (Default : '%{status} eq "warn"'). You can use the following variables: %{status}, %{class} | Mode | -| --critical-temperature-status | Set critical threshold for status (Default: '%{status} eq "hot"'); You can use the following variables: %{status}, %{class} | Mode | -| --unknown-psu-status | Set unknown threshold for status. You can use the following variables: %{status}, %{name} | Mode | -| --warning-psu-status | Set warning threshold for status. You can use the following variables: %{status}, %{name} | Mode | -| --critical-status | Set critical threshold for status (Default: '%{status} eq "bad"'); You can use the following variables: %{status}, %{name} | Mode | -| --warning-* --critical-* | Thresholds. Can be: 'temperature', 'fans-failed'. | Mode | +| Option | Description | +|:------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------| +| --unknown-temperature-status | Define the conditions to match for the status to be UNKNOWN (default : '%{status} eq "unknown"'). You can use the following variables: %{status}, %{class} | +| --warning-temperature-status | Define the conditions to match for the status to be WARNING (default : '%{status} eq "warn"'). You can use the following variables: %{status}, %{class} | +| --critical-temperature-status | Define the conditions to match for the status to be CRITICAL (default: '%{status} eq "hot"'); You can use the following variables: %{status}, %{class} | +| --unknown-psu-status | Define the conditions to match for the status to be UNKNOWN. You can use the following variables: %{status}, %{name} | +| --warning-psu-status | Define the conditions to match for the status to be WARNING. You can use the following variables: %{status}, %{name} | +| --critical-status | Define the conditions to match for the status to be CRITICAL (default: '%{status} eq "bad"'); You can use the following variables: %{status}, %{name} | +| --warning-* --critical-* | Thresholds. Can be: 'temperature', 'fans-failed'. | + + + + +| Option | Description | +|:------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------| +| --unknown-status | Define the conditions to match for the status to be UNKNOWN. You can use the following variables: %{status} | +| --warning-status | Define the conditions to match for the status to be WARNING (default: '%{status} =~ /MINOR/i'). You can use the following variables: %{status} | +| --critical-status | Define the conditions to match for the status to be CRITICAL (default: '%{status} =~ /MAJOR\|CRITICAL/i'). You can use the following variables: %{status} | -| Option | Description | Type | -|:--------------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:----------| -| --memcached | Memcached server to use (only one server). | Retention | -| --redis-server | Redis server to use (only one server). Syntax: address\[:port\] | Retention | -| --redis-attribute | Set Redis Options (--redis-attribute="cnx\_timeout=5"). | Retention | -| --redis-db | Set Redis database index. | Retention | -| --failback-file | Failback on a local file if redis connection failed. | Retention | -| --memexpiration | Time to keep data in seconds (Default: 86400). | Retention | -| --statefile-dir | Directory for statefile (Default: '/var/lib/centreon/centplugins'). | Retention | -| --statefile-suffix | Add a suffix for the statefile name (Default: ''). | Retention | -| --statefile-concat-cwd | Concat current working directory with option '--statefile-dir'. Useful on Windows when plugin is compiled. | Retention | -| --statefile-format | Format used to store cache (can be: 'dumper', 'storable', 'json'). | Retention | -| --statefile-key | Key to encrypt/decrypt cache. | Retention | -| --statefile-cipher | Cipher to encrypt cache (Default: 'AES'). | Retention | -| --filter-name | Filter ports by name (can be a regexp). | Mode | -| --unknown-license-status | Set unknown threshold for status. You can use the following variables: %{status}, %{name} | Mode | -| --warning-license-status | Set warning threshold for status (Default: '%{status} =~ /invalid\_software\_version/'). You can use the following variables: %{status}, %{name} | Mode | -| --critical-license-status | Set critical threshold for status. You can use the following variables: %{status}, %{name} | Mode | -| --unknown-link-status | Set unknown threshold for status. You can use the following variables: %{adminStatus}, %{operationalStatus}, %{name} | Mode | -| --warning-link-status | Set warning threshold for status. You can use the following variables: %{adminStatus}, %{operationalStatus}, %{name} | Mode | -| --critical-link-status | Set critical threshold for status (Default: '%{adminStatus} eq "enabled" and %{operationalStatus} ne "up"'). You can use the following variables: %{adminStatus}, %{operationalStatus}, %{name} | Mode | -| --warning-* --critical-* | Thresholds. Can be: 'traffic-out-prct', 'traffic-out', 'packets-out', 'packets-dropped', 'packets-pass', 'packets-insp'. | Mode | +| Option | Description | +|:--------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| --filter-name | Filter ports by name (can be a regexp). | +| --filter-type | Filter ports by type (can be a regexp). You can use the following types: 'Network Port', 'Port Group' and 'Tool Port' | +| --unknown-license-status | Define the conditions to match for the status to be UNKNOWN. You can use the following variables: %{status}, %{name} | +| --warning-license-status | Define the conditions to match for the status to be WARNING (default: '%{status} =~ /invalid\_software\_version/'). You can use the following variables: %{status}, %{name} | +| --critical-license-status | Define the conditions to match for the status to be CRITICAL. You can use the following variables: %{status}, %{name} | +| --unknown-link-status | Define the conditions to match for the status to be UNKNOWN. You can use the following variables: %{adminStatus}, %{operationalStatus}, %{name} | +| --warning-link-status | Define the conditions to match for the status to be WARNING. You can use the following variables: %{adminStatus}, %{operationalStatus}, %{name} | +| --critical-link-status | Define the conditions to match for the status to be CRITICAL (default: '%{adminStatus} eq "enabled" and %{operationalStatus} ne "up"'). You can use the following variables: %{adminStatus}, %{operationalStatus}, %{name} | +| --warning-* --critical-* | Thresholds. Can be: 'traffic-out-prct', 'traffic-out', 'packets-out', 'packets-dropped', 'packets-pass', 'packets-insp'. | -| Option | Description | Type | -|:----------------------|:--------------------------------------------------------------------------------------------------------------------------------------|:-----| -| --unknown-ntp-status | | Mode | -| --warning-ntp-status | | Mode | -| --critical-ntp-status | Set thresholds for status (Default critical: '%{status} !~ /in\_reach\|in\_sync/i') You can use the following variables: %{status} | Mode | -| --warning-offset | Time offset warning threshold (in seconds). | Mode | -| --critical-offset | Time offset critical Threshold (in seconds). | Mode | -| --ntp-hostname | Set the ntp hostname (if not set, localtime is used). | Mode | -| --ntp-port | Set the ntp port (Default: 123). | Mode | -| --timezone | Override the timezone of distant equipment. Can use format: 'Europe/London' or '+0100'. | Mode | +| Option | Description | +|:----------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------| +| --unknown-ntp-status | Define the conditions to match for the status to be UNKNOWN. | +| --warning-ntp-status | Define the conditions to match for the status to be WARNING. | +| --critical-ntp-status | Define the conditions to match for the status to be CRITICAL (default: '%{status} !~ /in\_reach\|in\_sync/i') You can use the following variables: %{status} | +| --warning-offset | Define the time offset (in seconds) that will trigger a WARNING status. | +| --critical-offset | Define the time offset (in seconds) that will trigger a CRITICAL status. | +| --ntp-hostname | Set the NTP hostname (if not set, localtime is used). | +| --ntp-port | Set the NTP port (default: 123). | +| --timezone | Override the timezone of distant equipment. Can use format: 'Europe/London' or '+0100'. | -| Option | Description | Type | -|:------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------|:-----| -| --warning-uptime | Threshold warning. | Mode | -| --critical-uptime | Threshold critical. | Mode | -| --unit | Select the unit for performance data and thresholds. May be 's'for seconds, 'm' for minutes, 'h' for hours, 'd' for days, 'w' for weeks. Default is seconds | Mode | +| Option | Description | +|:------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| --warning-uptime | Warning threshold. | +| --critical-uptime | Critical threshold. | +| --unit | Select the unit for performance data and thresholds. May be 's' for seconds, 'm' for minutes, 'h' for hours, 'd' for days, 'w' for weeks. Default is seconds | @@ -517,5 +558,5 @@ affichée en ajoutant le paramètre `--help` à la commande : /usr/lib/centreon/plugins/centreon_keysight_nvos_restapi.pl \ --plugin=network::keysight::nvos::restapi::plugin \ --mode=dynamic-filters \ - --help + --help ``` diff --git a/pp/integrations/plugin-packs/procedures/network-keysight-nvos-restapi.md b/pp/integrations/plugin-packs/procedures/network-keysight-nvos-restapi.md index 86f39ddc10dd..3abeaaad0f9e 100644 --- a/pp/integrations/plugin-packs/procedures/network-keysight-nvos-restapi.md +++ b/pp/integrations/plugin-packs/procedures/network-keysight-nvos-restapi.md @@ -5,6 +5,12 @@ title: Keysight NVOS Rest API import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; +## Connector dependencies + +The following monitoring connectors will be installed when you install the **Keysight NVOS Rest API** connector through the +**Configuration > Monitoring Connector Manager** menu: +* [Base Pack](./base-generic.md) + ## Pack assets ### Templates @@ -16,25 +22,26 @@ The Monitoring Connector **Keysight NVOS Rest API** brings a host template: The connector brings the following service templates (sorted by the host template they are attached to): - + -| Service Alias | Service Template | Service Description | -|:--------------|:-----------------------------------|:--------------------------------------------------------| -| Hardware | Net-Keysight-Nvos-Hardware-Restapi | Check hardware | -| Time | Net-Keysight-Nvos-Time-Restapi | Check time offset | -| Uptime | Net-Keysight-Nvos-Uptime-Restapi | Time since the equipment has been working and available | +| Service Alias | Service Template | Service Description | +|:--------------|:------------------------------------------|:--------------------------------------------------------| +| Hardware | Net-Keysight-Nvos-Hardware-Restapi-custom | Check hardware | +| Licence | Net-Keysight-Nvos-Licence-Restapi-custom | Check license state | +| Time | Net-Keysight-Nvos-Time-Restapi-custom | Check time offset | +| Uptime | Net-Keysight-Nvos-Uptime-Restapi-custom | Time since the equipment has been working and available | -> The services listed above are created automatically when the **Net-Keysight-Nvos-Restapi** host template is used. +> The services listed above are created automatically when the **Net-Keysight-Nvos-Restapi-custom** host template is used. -| Service Alias | Service Template | Service Description | Discovery | -|:----------------|:------------------------------------------|:----------------------|:-----------| -| Dynamic-Filters | Net-Keysight-Nvos-Dynamic-Filters-Restapi | Check dynamic filters | X | -| Ports | Net-Keysight-Nvos-Ports-Restapi | Check ports | X | +| Service Alias | Service Template | Service Description | Discovery | +|:----------------|:-------------------------------------------------|:----------------------|:----------:| +| Dynamic-Filters | Net-Keysight-Nvos-Dynamic-Filters-Restapi-custom | Check dynamic filters | X | +| Ports | Net-Keysight-Nvos-Ports-Restapi-custom | Check ports | X | -> The services listed above are not created automatically when a host template is applied. To use them, [create a service manually](/docs/monitoring/basic-objects/services), then appy the service template you want. +> The services listed above are not created automatically when a host template is applied. To use them, [create a service manually](/docs/monitoring/basic-objects/services), then apply the service template you want. > If **Discovery** is checked, it means a service discovery rule exists for this service template. @@ -45,7 +52,7 @@ The connector brings the following service templates (sorted by the host templat #### Service discovery -| Rule Name | Description | +| Rule name | Description | |:----------------------------------------------|:--------------------------------------------------| | Net-Keysight-Nvos-Restapi-Dynamic-Filter-Name | Discover dynamic filters and monitor utilization | | Net-Keysight-Nvos-Restapi-Port-Name | Discover ports and monitor status and utilization | @@ -55,46 +62,59 @@ and in the [following chapter](/docs/monitoring/discovery/services-discovery/#di ### Collected metrics & status -Here is the list of services for this connector, detailing all metrics linked to each service. +Here is the list of services for this connector, detailing all metrics and statuses linked to each service. -| Metric name | Unit | -|:----------------------------------------------|:------| -| df~dynamic_filter.traffic.pass.bytespersecond | B/s | -| df~dynamic_filter.traffic.insp.bytespersecond | B/s | -| df~dynamic_filter.packets.denied.count | count | -| df~dynamic_filter.packets.pass.count | count | -| df~dynamic_filter.packets.insp.count | count | +| Name | Unit | +|:------------------------------------------------|:------| +| *df*~dynamic_filter.traffic.pass.bytespersecond | B/s | +| *df*~dynamic_filter.traffic.insp.bytespersecond | B/s | +| *df*~dynamic_filter.packets.denied.count | count | +| *df*~dynamic_filter.packets.pass.count | count | +| *df*~dynamic_filter.packets.insp.count | count | -| Metric name | Unit | -|:------------------------------------------|:------| -| temperatures#temperature-status | N/A | -| temperatures#hardware.temperature.celsius | | -| fans.failed.count | count | -| psus#psu-status | N/A | +| Name | Unit | +|:--------------------------------------------|:------| +| temperature-status | N/A | +| *temperatures*#hardware.temperature.celsius | C | +| fans.failed.count | count | +| psu-status | N/A | + + + + +| Name | Unit | +|:-------|:------| +| status | N/A | -| Metric name | Unit | -|:--------------------------------------|:------| -| ports~license-status | N/A | -| ports~port.traffic.out.percentage | % | -| ports~port.traffic.out.bytespersecond | B/s | -| ports~port.packets.out.count | count | -| ports~port.packets.dropped.count | count | -| ports~port.packets.pass.count | count | -| ports~port.packets.insp.count | count | +| Name | Unit | +|:----------------------------------------|:------| +| license-status | N/A | +| link-status | N/A | +| *ports*~port.traffic.out.percentage | % | +| *ports*~port.traffic.out.bytespersecond | B/s | +| *ports*~port.packets.out.count | count | +| *ports*~port.packets.pass.count | count | +| *ports*~port.packets.invalid.count | count | +| *ports*~port.packets.deny.count | count | +| *ports*~port.crc.alignment.errors.count | count | +| *ports*~port.packets.out.count | count | +| *ports*~port.packets.dropped.count | count | +| *ports*~port.packets.pass.count | count | +| *ports*~port.packets.insp.count | count | -| Metric name | Unit | +| Name | Unit | |:--------------------|:------| | ntp-status | N/A | | time.offset.seconds | s | @@ -102,9 +122,9 @@ Here is the list of services for this connector, detailing all metrics linked to -| Metric name | Unit | +| Name | Unit | |:----------------------|:------| -| system.uptime.seconds | | +| system.uptime.seconds | s | @@ -206,19 +226,19 @@ yum install centreon-plugin-Network-Keysight-Nvos-Restapi ### Using a host template provided by the connector 1. Log into Centreon and add a new host through **Configuration > Hosts**. -2. Fill the **Name**, **Alias** & **IP Address/DNS** fields according to your ressource settings. +2. Fill in the **Name**, **Alias** & **IP Address/DNS** fields according to your resource's settings. 3. Apply the **Net-Keysight-Nvos-Restapi-custom** template to the host. A list of macros appears. Macros allow you to define how the connector will connect to the resource, and to customize the connector's behavior. 4. Fill in the macros you want. Some macros are mandatory. -| Macro | Description | Default value | Mandatory | -|:----------------------------|:------------------------------------------------------------------------------------------------------|:------------------|:------------| -| KEYSIGHTNVOSAPIPASSWORD | API password | | | -| KEYSIGHTNVOSAPIPORT | Port used | 8000 | | -| KEYSIGHTNVOSAPIPROTO | Specify https if needed | https | | -| KEYSIGHTNVOSAPIUSERNAME | API username | | | -| KEYSIGHTNVOSAPIEXTRAOPTIONS | Any extra option you may want to add to every command (E.g. a --verbose flag). All options are listed [here](#available-options) | | | +| Macro | Description | Default value | Mandatory | +|:----------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------|:------------------|:-----------:| +| KEYSIGHTNVOSAPIUSERNAME | API username | | X | +| KEYSIGHTNVOSAPIPASSWORD | API password | | X | +| KEYSIGHTNVOSAPIPROTO | Specify https if needed | https | | +| KEYSIGHTNVOSAPIPORT | Port used | 8000 | | +| KEYSIGHTNVOSAPIEXTRAOPTIONS | Any extra option you may want to add to every command (a --verbose flag for example). All options are listed [here](#available-options). | | | -5. [Deploy the configuration](/docs/monitoring/monitoring-servers/deploying-a-configuration). The host appears in the list of hosts, and on page **Resources Status**. The command that is sent by the connector is displayed in the details panel of the host: it shows the values of the macros. +5. [Deploy the configuration](/docs/monitoring/monitoring-servers/deploying-a-configuration). The host appears in the list of hosts, and on the **Resources Status** page. The command that is sent by the connector is displayed in the details panel of the host: it shows the values of the macros. ### Using a service template provided by the connector @@ -228,124 +248,141 @@ yum install centreon-plugin-Network-Keysight-Nvos-Restapi -| Macro | Description | Default value | Mandatory | -|:----------------------|:----------------------------------------------------------------------------------------------------|:------------------|:------------| -| FILTERNAME | Filter dynamic filters by name (can be a regexp) | | | -| WARNINGPACKETSDENIED | | | | -| CRITICALPACKETSDENIED | | | | -| WARNINGPACKETSINSP | Thresholds | | | -| CRITICALPACKETSINSP | Thresholds | | | -| WARNINGPACKETSPASS | Thresholds | | | -| CRITICALPACKETSPASS | Thresholds | | | -| WARNINGTRAFFICINSP | | | | -| CRITICALTRAFFICINSP | | | | -| WARNINGTRAFFICPASS | | | | -| CRITICALTRAFFICPASS | | | | -| EXTRAOPTIONS | Any extra option you may want to add to the command (E.g. a --verbose flag). All options are listed [here](#available-options) | --verbose | | +| Macro | Description | Default value | Mandatory | +|:----------------------|:---------------------------------------------------------------------------------------------------------------------------------------|:------------------|:-----------:| +| FILTERNAME | Filter dynamic filters by name (can be a regexp) | | | +| WARNINGPACKETSDENIED | Threshold | | | +| CRITICALPACKETSDENIED | Threshold | | | +| WARNINGPACKETSINSP | Threshold | | | +| CRITICALPACKETSINSP | Threshold | | | +| WARNINGPACKETSPASS | Threshold | | | +| CRITICALPACKETSPASS | Threshold | | | +| WARNINGTRAFFICINSP | Threshold | | | +| CRITICALTRAFFICINSP | Threshold | | | +| WARNINGTRAFFICPASS | Threshold | | | +| CRITICALTRAFFICPASS | Threshold | | | +| EXTRAOPTIONS | Any extra option you may want to add to the command (a --verbose flag for example). All options are listed [here](#available-options). | --verbose | | -| Macro | Description | Default value | Mandatory | -|:--------------------------|:--------------------------------------------------------------------------------------------------------------------------------|:-----------------------|:------------| -| UNKNOWNTEMPERATURESTATUS | Set unknown threshold for status (Default : '%{status} eq "unknown"'). You can use the following variables: %{status}, %{class} | %{status} eq "unknown" | | -| WARNINGFANSFAILED | Thresholds | | | -| CRITICALFANSFAILED | Thresholds | | | -| CRITICALPSUSTATUS | | %{status} eq "bad" | | -| WARNINGPSUSTATUS | Set warning threshold for status. You can use the following variables: %{status}, %{name} | | | -| WARNINGTEMPERATURE | Thresholds | | | -| CRITICALTEMPERATURE | Thresholds | | | -| WARNINGTEMPERATURESTATUS | Set warning threshold for status (Default : '%{status} eq "warn"'). You can use the following variables: %{status}, %{class} | %{status} eq "warn" | | -| CRITICALTEMPERATURESTATUS | Set critical threshold for status (Default: '%{status} eq "hot"'); You can use the following variables: %{status}, %{class} | %{status} eq "hot" | | -| EXTRAOPTIONS | Any extra option you may want to add to the command (E.g. a --verbose flag). All options are listed [here](#available-options) | --verbose | | +| Macro | Description | Default value | Mandatory | +|:--------------------------|:---------------------------------------------------------------------------------------------------------------------------------------|:-----------------------|:-----------:| +| UNKNOWNTEMPERATURESTATUS | Define the conditions to match for the status to be UNKNOWN. You can use the following variables: %{status}, %{class} | %{status} eq "unknown" | | +| WARNINGFANSFAILED | Threshold | | | +| CRITICALFANSFAILED | Threshold | | | +| CRITICALPSUSTATUS | Threshold | %{status} eq "bad" | | +| WARNINGPSUSTATUS | Define the conditions to match for the status to be WARNING. You can use the following variables: %{status}, %{name} | | | +| WARNINGTEMPERATURE | Threshold | | | +| CRITICALTEMPERATURE | Threshold | | | +| WARNINGTEMPERATURESTATUS | Define the conditions to match for the status to be WARNING. You can use the following variables: %{status}, %{class} | %{status} eq "warn" | | +| CRITICALTEMPERATURESTATUS | Define the conditions to match for the status to be CRITICAL. You can use the following variables: %{status}, %{class} | %{status} eq "hot" | | +| EXTRAOPTIONS | Any extra option you may want to add to the command (a --verbose flag for example). All options are listed [here](#available-options). | --verbose | | + + + + +| Macro | Description | Default value | Mandatory | +|:---------------|:---------------------------------------------------------------------------------------------------------------------------------------|:--------------------------------|:-----------:| +| UNKNOWNSTATUS | Define the conditions to match for the status to be UNKNOWN. You can use the following variables: %{status} | | | +| WARNINGSTATUS | Define the conditions to match for the status to be WARNING. You can use the following variables: %{status} | %{status} =~ /MINOR/i | | +| CRITICALSTATUS | Define the conditions to match for the status to be CRITICAL. You can use the following variables: %{status} | %{status} =~ /MAJOR\|CRITICAL/i | | +| EXTRAOPTIONS | Any extra option you may want to add to the command (a --verbose flag for example). All options are listed [here](#available-options). | --verbose | | -| Macro | Description | Default value | Mandatory | -|:-----------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------|:------------| -| FILTERNAME | Filter ports by name (can be a regexp) | | | -| WARNINGLICENSESTATUS | Set warning threshold for status (Default: '%{status} =~ /invalid\_software\_version/'). You can use the following variables: %{status}, %{name} | %{status} =~ /invalid_software_version/ | | -| CRITICALLICENSESTATUS | Set critical threshold for status. You can use the following variables: %{status}, %{name} | | | -| CRITICALLINKSTATUS | Set critical threshold for status (Default: '%{adminStatus} eq "enabled" and %{operationalStatus} ne "up"'). You can use the following variables: %{adminStatus}, %{operationalStatus}, %{name} | %{adminStatus} eq "enabled" and %{operationalStatus} ne "up" | | -| WARNINGLINKSTATUS | Set warning threshold for status. You can use the following variables: %{adminStatus}, %{operationalStatus}, %{name} | | | -| WARNINGPACKETSDROPPED | Thresholds | | | -| CRITICALPACKETSDROPPED | Thresholds | | | -| WARNINGPACKETSINSP | Thresholds | | | -| CRITICALPACKETSINSP | Thresholds | | | -| WARNINGPACKETSOUT | Thresholds | | | -| CRITICALPACKETSOUT | Thresholds | | | -| WARNINGPACKETSPASS | Thresholds | | | -| CRITICALPACKETSPASS | Thresholds | | | -| WARNINGTRAFFICOUT | Thresholds | | | -| CRITICALTRAFFICOUT | Thresholds | | | -| WARNINGTRAFFICOUTPRCT | Thresholds | | | -| CRITICALTRAFFICOUTPRCT | Thresholds | | | -| EXTRAOPTIONS | Any extra option you may want to add to the command (E.g. a --verbose flag). All options are listed [here](#available-options) | --verbose | | +| Macro | Description | Default value | Mandatory | +|:-----------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------|:-----------:| +| FILTERNAME | Filter ports by name (can be a regexp) | | | +| FILTERTYPE | Filter ports by type (can be a regexp). You can use the following types: 'Network Port', 'Port Group' and 'Tool Port' | | | +| WARNINGLICENSESTATUS | Define the conditions to match for the status to be WARNING. You can use the following variables: %{status}, %{name} | %{status} =~ /invalid\_software\_version/ | | +| CRITICALLICENSESTATUS | Define the conditions to match for the status to be CRITICAL. You can use the following variables: %{status}, %{name} | | | +| CRITICALLINKSTATUS | Define the conditions to match for the status to be CRITICAL. You can use the following variables: %{adminStatus}, %{operationalStatus}, %{name} | %{adminStatus} eq "enabled" and %{operationalStatus} ne "up" | | +| WARNINGLINKSTATUS | Define the conditions to match for the status to be WARNING. You can use the following variables: %{adminStatus}, %{operationalStatus}, %{name} | | | +| WARNINGPACKETSDROPPED | Threshold | | | +| CRITICALPACKETSDROPPED | Threshold | | | +| WARNINGPACKETSIN | Threshold | | | +| CRITICALPACKETSIN | Threshold | | | +| WARNINGPACKETSINSP | Threshold | | | +| CRITICALPACKETSINSP | Threshold | | | +| WARNINGPACKETSOUT | Threshold | | | +| CRITICALPACKETSOUT | Threshold | | | +| WARNINGPACKETSPASS | Threshold | | | +| CRITICALPACKETSPASS | Threshold | | | +| WARNINGTRAFFICIN | Threshold | | | +| CRITICALTRAFFICIN | Threshold | | | +| WARNINGTRAFFICINPRCT | Threshold | | | +| CRITICALTRAFFICINPRCT | Threshold | | | +| WARNINGTRAFFICOUT | Threshold | | | +| CRITICALTRAFFICOUT | Threshold | | | +| WARNINGTRAFFICOUTPRCT | Threshold | | | +| CRITICALTRAFFICOUTPRCT | Threshold | | | +| EXTRAOPTIONS | Any extra option you may want to add to the command (a --verbose flag for example). All options are listed [here](#available-options). | --verbose | | -| Macro | Description | Default value | Mandatory | -|:------------------|:------------------------------------------------------------------------------------------------------------------------------------|:--------------------------------|:------------| -| TIMEZONE | Override the timezone of distant equipment. Can use format: 'Europe/London' or '+0100' | | | -| NTPHOSTNAME | Set the ntp hostname (if not set, localtime is used) | | | -| NTPPORT | Set the ntp port (Default: 123) | | | -| CRITICALNTPSTATUS | Set thresholds for status (Default critical: '%{status} !~ /in\_reach\|in\_sync/i') You can use the following variables: %{status} | %{status} !~ /in_reach\|in_sync/ | | -| WARNINGNTPSTATUS | | | | -| WARNINGOFFSET | Time offset warning threshold (in seconds) | | | -| CRITICALOFFSET | Time offset critical Threshold (in seconds) | | | -| EXTRAOPTIONS | Any extra option you may want to add to the command (E.g. a --verbose flag). All options are listed [here](#available-options) | --verbose | | +| Macro | Description | Default value | Mandatory | +|:------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------|:-----------------------------------|:-----------:| +| TIMEZONE | Override the timezone of distant equipment. Can use format: 'Europe/London' or '+0100' | | | +| NTPHOSTNAME | Set the NTP hostname (if not set, localtime is used) | | | +| NTPPORT | Set the NTP port (default: 123) | | | +| CRITICALNTPSTATUS | Define the conditions to match for the status to be CRITICAL (default: '%{status} !~ /in\_reach\|in\_sync/i') You can use the following variables: %{status} | %{status} !~ /in\_reach\|in\_sync/ | | +| WARNINGNTPSTATUS | Define the conditions to match for the status to be WARNING | | | +| WARNINGOFFSET | Define the time offset (in seconds) that will trigger a WARNING status | | | +| CRITICALOFFSET | Define the time offset (in seconds) that will trigger a CRITICAL status | | | +| EXTRAOPTIONS | Any extra option you may want to add to the command (a --verbose flag for example). All options are listed [here](#available-options). | --verbose | | -| Macro | Description | Default value | Mandatory | -|:---------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------|:------------------|:------------| -| UNIT | Select the unit for performance data and thresholds. May be 's'for seconds, 'm' for minutes, 'h' for hours, 'd' for days, 'w' for weeks. Default is seconds | | | -| WARNINGUPTIME | Threshold warning | | | -| CRITICALUPTIME | Threshold critical | | | -| EXTRAOPTIONS | Any extra option you may want to add to the command (E.g. a --verbose flag). All options are listed [here](#available-options) | | | +| Macro | Description | Default value | Mandatory | +|:---------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------|:------------------|:-----------:| +| UNIT | Select the unit for performance data and thresholds. May be 's' for seconds, 'm' for minutes, 'h' for hours, 'd' for days, 'w' for weeks. Default is seconds | | | +| WARNINGUPTIME | Warning threshold | | | +| CRITICALUPTIME | Critical threshold | | | +| EXTRAOPTIONS | Any extra option you may want to add to the command (a --verbose flag for example). All options are listed [here](#available-options). | | | -3. [Deploy the configuration](/docs/monitoring/monitoring-servers/deploying-a-configuration). The service appears in the list of service, and on page **Resources Status**. The command that is sent by the connector is displayed in the details panel of the service: it shows the values of the macros. +3. [Deploy the configuration](/docs/monitoring/monitoring-servers/deploying-a-configuration). The service appears in the list of services, and on the **Resources Status** page. The command that is sent by the connector is displayed in the details panel of the service: it shows the values of the macros. ## 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`). Test that the connector -is able to monitor a server using a command like this one (replace the sample values by yours): +is able to monitor a resource using a command like this one (replace the sample values by yours): ```bash -/usr/lib/centreon/plugins//centreon_keysight_nvos_restapi.pl \ +/usr/lib/centreon/plugins/centreon_keysight_nvos_restapi.pl \ --plugin=network::keysight::nvos::restapi::plugin \ - --mode=dynamic-filters \ + --mode=hardware \ --hostname='10.0.0.1' \ --proto='https' \ --port='8000' \ - --api-username='' \ - --api-password='' \ - --filter-name='' \ - --warning-packets-denied='' \ - --critical-packets-denied='' \ - --warning-packets-pass='' \ - --critical-packets-pass='' \ - --warning-packets-insp='' \ - --critical-packets-insp='' \ - --warning-traffic-pass='' \ - --critical-traffic-pass='' \ - --warning-traffic-insp='' \ - --critical-traffic-insp='' \ - --verbose\ - + --api-username='username' \ + --api-password='*****' \ + --unknown-temperature-status='%{status} eq "unknown"' \ + --warning-temperature-status='%{status} eq "warn"' \ + --critical-temperature-status='%{status} eq "hot"' \ + --warning-temperature='' \ + --critical-temperature='' \ + --warning-fans-failed='' \ + --critical-fans-failed='' \ + --warning-psu-status='' \ + --critical-psu-status='%{status} eq "bad"' \ + --verbose ``` The expected command output is shown below: ```bash -OK: | 'dynamic_filter.traffic.pass.bytespersecond'=31B/s;;;0; 'dynamic_filter.traffic.insp.bytespersecond'=2B/s;;;0; 'dynamic_filter.packets.denied.count'=90;;;0; 'dynamic_filter.packets.pass.count'=3;;;0; 'dynamic_filter.packets.insp.count'=21;;;0; +OK: temperature 'MAIN' status: normal, reading: 40 C - all power supplies are ok | 'MAIN#hardware.temperature.celsius'=40C;;;; +temperature 'MAIN' status: normal, reading: 40 C +power supply 'power_module_a' status: good +power supply 'power_module_b' status: good ``` ### Troubleshooting @@ -355,26 +392,32 @@ this [chapter](../getting-started/how-to-guides/troubleshooting-plugins.md#http- ### Available modes +In most cases, a mode corresponds to a service template. The mode appears in the execution command for the connector. +In the Centreon interface, you don't need to specify a mode explicitly: its use is implied when you apply a service template. +However, you will need to specify the correct mode for the template if you want to test the execution command for the +connector in your terminal. + All available modes can be displayed by adding the `--list-mode` parameter to the command: ```bash -/usr/lib/centreon/plugins//centreon_keysight_nvos_restapi.pl \ +/usr/lib/centreon/plugins/centreon_keysight_nvos_restapi.pl \ --plugin=network::keysight::nvos::restapi::plugin \ - --list-mode + --list-mode ``` The plugin brings the following modes: -| Mode | Linked service template | -|:---------------------|:------------------------------------------| -| dynamic-filters | Net-Keysight-Nvos-Dynamic-Filters-Restapi | -| hardware | Net-Keysight-Nvos-Hardware-Restapi | -| list-dynamic-filters | Used for service discovery | -| list-ports | Used for service discovery | -| ports | Net-Keysight-Nvos-Ports-Restapi | -| time | Net-Keysight-Nvos-Time-Restapi | -| uptime | Net-Keysight-Nvos-Uptime-Restapi | +| Mode | Linked service template | +|:------------------------------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------| +| dynamic-filters [[code](https://github.com/centreon/centreon-plugins/blob/develop/src/network/keysight/nvos/restapi/mode/dynamicfilters.pm)] | Net-Keysight-Nvos-Dynamic-Filters-Restapi-custom | +| hardware [[code](https://github.com/centreon/centreon-plugins/blob/develop/src/network/keysight/nvos/restapi/mode/hardware.pm)] | Net-Keysight-Nvos-Hardware-Restapi-custom | +| license [[code](https://github.com/centreon/centreon-plugins/blob/develop/src/network/keysight/nvos/restapi/mode/license.pm)] | Net-Keysight-Nvos-Licence-Restapi-custom | +| list-dynamic-filters [[code](https://github.com/centreon/centreon-plugins/blob/develop/src/network/keysight/nvos/restapi/mode/listdynamicfilters.pm)] | Used for service discovery | +| list-ports [[code](https://github.com/centreon/centreon-plugins/blob/develop/src/network/keysight/nvos/restapi/mode/listports.pm)] | Used for service discovery | +| ports [[code](https://github.com/centreon/centreon-plugins/blob/develop/src/network/keysight/nvos/restapi/mode/ports.pm)] | Net-Keysight-Nvos-Ports-Restapi-custom | +| time [[code](https://github.com/centreon/centreon-plugins/blob/develop/src/network/keysight/nvos/restapi/mode/time.pm)] | Net-Keysight-Nvos-Time-Restapi-custom | +| uptime [[code](https://github.com/centreon/centreon-plugins/blob/develop/src/network/keysight/nvos/restapi/mode/uptime.pm)] | Net-Keysight-Nvos-Uptime-Restapi-custom | ### Available options @@ -382,138 +425,127 @@ The plugin brings the following modes: All generic options are listed here: -| Option | Description | Type | -|:-------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-------------| -| --mode | Define the mode in which you want the plugin to be executed (see--list-mode). | Global | -| --dyn-mode | Specify a mode with the module's path (advanced). | Global | -| --list-mode | List all available modes. | Global | -| --mode-version | Check minimal version of mode. If not, unknown error. | Global | -| --version | Display the plugin's version. | Global | -| --custommode | When a plugin offers several ways (CLI, library, etc.) to get the an information the desired one must be defined with this option. | Global | -| --list-custommode | List all available custom modes. | Global | -| --multiple | Multiple custom mode objects. This may be required by some specific modes (advanced). | Global | -| --pass-manager | Define the password manager you want to use. Supported managers are: environment, file, keepass, hashicorpvault and teampass. | Global | -| --verbose | Display extended status information (long output). | Output | -| --debug | Display debug messages. | Output | -| --filter-perfdata | Filter perfdata that match the regexp. Eg: adding --filter-perfdata='avg' will remove all metrics that do not contain 'avg' from performance data. | Output | -| --filter-perfdata-adv | Filter perfdata based on a "if" condition using the following variables: label, value, unit, warning, critical, min, max. Variables must be written either %{variable} or %(variable). Eg: adding --filter-perfdata-adv='not (%(value) == 0 and %(max) eq "")' will remove all metrics whose value equals 0 and that don't have a maximum value. | Output | -| --explode-perfdata-max | Create a new metric for each metric that comes with a maximum limit. The new metric will be named identically with a '\_max' suffix). Eg: it will split 'used\_prct'=26.93%;0:80;0:90;0;100 into 'used\_prct'=26.93%;0:80;0:90;0;100 'used\_prct\_max'=100%;;;; | Output | -| --change-perfdata --extend-perfdata | Change or extend perfdata. Syntax: --extend-perfdata=searchlabel,newlabel,target\[,\[newuom\],\[min\],\[m ax\]\] Common examples: Change storage free perfdata in used: --change-perfdata=free,used,invert() Change storage free perfdata in used: --change-perfdata=used,free,invert() Scale traffic values automaticaly: --change-perfdata=traffic,,scale(auto) Scale traffic values in Mbps: --change-perfdata=traffic\_in,,scale(Mbps),mbps Change traffic values in percent: --change-perfdata=traffic\_in,,percent() | Output | -| --extend-perfdata-group | Extend perfdata from multiple perfdatas (methods in target are: min, max, average, sum) Syntax: --extend-perfdata-group=searchlabel,newlabel,target\[,\[newuom\],\[m in\],\[max\]\] Common examples: Sum wrong packets from all interfaces (with interface need --units-errors=absolute): --extend-perfdata-group=',packets\_wrong,sum(packets\_(discard \|error)\_(in\|out))' Sum traffic by interface: --extend-perfdata-group='traffic\_in\_(.*),traffic\_$1,sum(traf fic\_(in\|out)\_$1)' | Output | -| --change-short-output --change-long-output | Modify the short/long output that is returned by the plugin. Syntax: --change-short-output=pattern~replacement~modifier Most commonly used modifiers are i (case insensitive) and g (replace all occurrences). Eg: adding --change-short-output='OK~Up~gi' will replace all occurrences of 'OK', 'ok', 'Ok' or 'oK' with 'Up' | Output | -| --change-exit | Replace an exit code with one of your choice. Eg: adding --change-exit=unknown=critical will result in a CRITICAL state instead of an UNKNOWN state. | Output | -| --range-perfdata | Change perfdata range thresholds display: 1 = start value equals to '0' is removed, 2 = threshold range is not display. | Output | -| --filter-uom | Masks the units when they don't match the given regular expression. | Output | -| --opt-exit | Replace the exit code in case of an execution error (i.e. wrong option provided, SSH connection refused, timeout, etc). Default: unknown. | Output | -| --output-ignore-perfdata | Remove all the metrics from the service. The service will still have a status and an output. | Output | -| --output-ignore-label | Remove the status label from the beginning of the output. Eg: 'OK: Ram Total:...' will become 'Ram Total:...' | Output | -| --output-xml | Display output in XML format. | Output | -| --output-json | Display output in JSON format. | Output | -| --output-openmetrics | Display metrics in OpenMetrics format. | Output | -| --output-file | Write output in file (can be used with json and xml options) | Output | -| --disco-format | Display discovery arguments (if the mode manages it). | Output | -| --disco-show | Display discovery values (if the mode manages it). | Output | -| --float-precision | Set the float precision for thresholds (default: 8). | Output | -| --source-encoding | Set encoding of monitoring sources (in some cases. Default: 'UTF-8'). Keysight NVOS API | Output | -| --hostname | Set hostname. | Api | -| --port | Port used (Default: 8000) | Api | -| --proto | Specify https if needed (Default: 'https') | Api | -| --api-username | API username. | Api | -| --api-password | API password. | Api | -| --timeout | Set timeout in seconds (Default: 50). | Api | -| --http-peer-addr | Set the address you want to connect to. Useful if hostname is only a vhost, to avoid IP resolution. | Http global | -| --proxyurl | Proxy URL | Http global | -| --proxypac | Proxy pac file (can be a URL or local file) | Http global | -| --insecure | Insecure SSL connections. | Http global | -| --http-backend | Set the backend used (Default: 'lwp') For curl: --http-backend=curl | Http global | -| --ssl-opt | Set SSL Options (--ssl-opt="SSL\_version =\> TLSv1" --ssl-opt="SSL\_verify\_mode =\> SSL\_VERIFY\_NONE"). | Backend lwp | -| --curl-opt | Set CURL Options (--curl-opt="CURLOPT\_SSL\_VERIFYPEER =\> 0" --curl-opt="CURLOPT\_SSLVERSION =\> CURL\_SSLVERSION\_TLSv1\_1" ). | Backend curl | +| Option | Description | +|:-------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| --mode | Define the mode in which you want the plugin to be executed (see --list-mode). | +| --dyn-mode | Specify a mode with the module's path (advanced). | +| --list-mode | List all available modes. | +| --mode-version | Check minimal version of mode. If not, unknown error. | +| --version | Return the version of the plugin. | +| --custommode | When a plugin offers several ways (CLI, library, etc.) to get information the desired one must be defined with this option. | +| --list-custommode | List all available custom modes. | +| --multiple | Multiple custom mode objects. This may be required by some specific modes (advanced). | +| --pass-manager | Define the password manager you want to use. Supported managers are: environment, file, keepass, hashicorpvault and teampass. | +| --verbose | Display extended status information (long output). | +| --debug | Display debug messages. | +| --filter-perfdata | Filter perfdata that match the regexp. Example: adding --filter-perfdata='avg' will remove all metrics that do not contain 'avg' from performance data. | +| --filter-perfdata-adv | Filter perfdata based on a "if" condition using the following variables: label, value, unit, warning, critical, min, max. Variables must be written either %{variable} or %(variable). Example: adding --filter-perfdata-adv='not (%(value) == 0 and %(max) eq "")' will remove all metrics whose value equals 0 and that don't have a maximum value. | +| --explode-perfdata-max | Create a new metric for each metric that comes with a maximum limit. The new metric will be named identically with a '\_max' suffix). Example: it will split 'used\_prct'=26.93%;0:80;0:90;0;100 into 'used\_prct'=26.93%;0:80;0:90;0;100 'used\_prct\_max'=100%;;;; | +| --change-perfdata --extend-perfdata | Change or extend perfdata. Syntax: --extend-perfdata=searchlabel,newlabel,target\[,\[newuom\],\[min\],\[max\]\] Common examples: =over 4 Convert storage free perfdata into used: --change-perfdata='free,used,invert()' Convert storage free perfdata into used: --change-perfdata='used,free,invert()' Scale traffic values automatically: --change-perfdata='traffic,,scale(auto)' Scale traffic values in Mbps: --change-perfdata='traffic\_in,,scale(Mbps),mbps' Change traffic values in percent: --change-perfdata='traffic\_in,,percent()' =back | +| --change-perfdata | Change or extend perfdata. Syntax: --extend-perfdata=searchlabel,newlabel,target\[,\[newuom\],\[min\],\[max\]\] Common examples: =over 4 Convert storage free perfdata into used: --change-perfdata='free,used,invert()' Convert storage free perfdata into used: --change-perfdata='used,free,invert()' Scale traffic values automatically: --change-perfdata='traffic,,scale(auto)' Scale traffic values in Mbps: --change-perfdata='traffic\_in,,scale(Mbps),mbps' Change traffic values in percent: --change-perfdata='traffic\_in,,percent()' =back | +| --extend-perfdata | Change or extend perfdata. Syntax: --extend-perfdata=searchlabel,newlabel,target\[,\[newuom\],\[min\],\[max\]\] Common examples: =over 4 Convert storage free perfdata into used: --change-perfdata='free,used,invert()' Convert storage free perfdata into used: --change-perfdata='used,free,invert()' Scale traffic values automatically: --change-perfdata='traffic,,scale(auto)' Scale traffic values in Mbps: --change-perfdata='traffic\_in,,scale(Mbps),mbps' Change traffic values in percent: --change-perfdata='traffic\_in,,percent()' =back | +| --extend-perfdata-group | Add new aggregated metrics (min, max, average or sum) for groups of metrics defined by a regex match on the metrics' names. Syntax: --extend-perfdata-group=regex,namesofnewmetrics,calculation\[,\[newuom\],\[min\],\[max\]\] regex: regular expression namesofnewmetrics: how the new metrics' names are composed (can use $1, $2... for groups defined by () in regex). calculation: how the values of the new metrics should be calculated newuom (optional): unit of measure for the new metrics min (optional): lowest value the metrics can reach max (optional): highest value the metrics can reach Common examples: =over 4 Sum wrong packets from all interfaces (with interface need --units-errors=absolute): --extend-perfdata-group=',packets\_wrong,sum(packets\_(discard\|error)\_(in\|out))' Sum traffic by interface: --extend-perfdata-group='traffic\_in\_(.*),traffic\_$1,sum(traffic\_(in\|out)\_$1)' =back | +| --change-short-output --change-long-output | Modify the short/long output that is returned by the plugin. Syntax: --change-short-output=pattern~replacement~modifier Most commonly used modifiers are i (case insensitive) and g (replace all occurrences). Example: adding --change-short-output='OK~Up~gi' will replace all occurrences of 'OK', 'ok', 'Ok' or 'oK' with 'Up' | +| --change-short-output | Modify the short/long output that is returned by the plugin. Syntax: --change-short-output=pattern~replacement~modifier Most commonly used modifiers are i (case insensitive) and g (replace all occurrences). Example: adding --change-short-output='OK~Up~gi' will replace all occurrences of 'OK', 'ok', 'Ok' or 'oK' with 'Up' | +| --change-long-output | Modify the short/long output that is returned by the plugin. Syntax: --change-short-output=pattern~replacement~modifier Most commonly used modifiers are i (case insensitive) and g (replace all occurrences). Example: adding --change-short-output='OK~Up~gi' will replace all occurrences of 'OK', 'ok', 'Ok' or 'oK' with 'Up' | +| --change-exit | Replace an exit code with one of your choice. Example: adding --change-exit=unknown=critical will result in a CRITICAL state instead of an UNKNOWN state. | +| --range-perfdata | Rewrite the ranges displayed in the perfdata. Accepted values: 0: nothing is changed. 1: if the lower value of the range is equal to 0, it is removed. 2: remove the thresholds from the perfdata. | +| --filter-uom | Mask the units when they don't match the given regular expression. | +| --opt-exit | Replace the exit code in case of an execution error (i.e. wrong option provided, SSH connection refused, timeout, etc). Default: unknown. | +| --output-ignore-perfdata | Remove all the metrics from the service. The service will still have a status and an output. | +| --output-ignore-label | Remove the status label ("OK:", "WARNING:", "UNKNOWN:", CRITICAL:") from the beginning of the output. Example: 'OK: Ram Total:...' will become 'Ram Total:...' | +| --output-xml | Return the output in XML format (to send to an XML API). | +| --output-json | Return the output in JSON format (to send to a JSON API). | +| --output-openmetrics | Return the output in OpenMetrics format (to send to a tool expecting this format). | +| --output-file | Write output in file (can be combined with json, xml and openmetrics options). E.g.: --output-file=/tmp/output.txt will write the output in /tmp/output.txt. | +| --disco-format | Applies only to modes beginning with 'list-'. Returns the list of available macros to configure a service discovery rule (formatted in XML). | +| --disco-show | Applies only to modes beginning with 'list-'. Returns the list of discovered objects (formatted in XML) for service discovery. | +| --float-precision | Define the float precision for thresholds (default: 8). | +| --source-encoding | Define the character encoding of the response sent by the monitored resource Default: 'UTF-8'. =head1 DESCRIPTION B\. =cut | +| --filter-counters | Only display some counters (regexp can be used). Example to check SSL connections only : --filter-counters='^xxxx\|yyyy$' | +| --http-peer-addr | Set the address you want to connect to. Useful if hostname is only a vhost, to avoid IP resolution. | +| --proxyurl | Proxy URL. Example: http://my.proxy:3128 | +| --proxypac | Proxy pac file (can be a URL or a local file). | +| --insecure | Accept insecure SSL connections. | +| --http-backend | Perl library to use for HTTP transactions. Possible values are: lwp (default) and curl. | +| --hostname | Set hostname. | +| --port | Port used (default: 8000) | +| --proto | Specify https if needed (default: 'https') | +| --api-username | API username. | +| --api-password | API password. | +| --timeout | Set timeout in seconds (default: 50). | #### Modes options -All modes specific options are listed here: +All available options for each service template are listed below: -| Option | Description | Type | -|:-------------------------|:----------------------------------------------------------------------------------------------------------------------------|:----------| -| --memcached | Memcached server to use (only one server). | Retention | -| --redis-server | Redis server to use (only one server). Syntax: address\[:port\] | Retention | -| --redis-attribute | Set Redis Options (--redis-attribute="cnx\_timeout=5"). | Retention | -| --redis-db | Set Redis database index. | Retention | -| --failback-file | Failback on a local file if redis connection failed. | Retention | -| --memexpiration | Time to keep data in seconds (Default: 86400). | Retention | -| --statefile-dir | Directory for statefile (Default: '/var/lib/centreon/centplugins'). | Retention | -| --statefile-suffix | Add a suffix for the statefile name (Default: ''). | Retention | -| --statefile-concat-cwd | Concat current working directory with option '--statefile-dir'. Useful on Windows when plugin is compiled. | Retention | -| --statefile-format | Format used to store cache (can be: 'dumper', 'storable', 'json'). | Retention | -| --statefile-key | Key to encrypt/decrypt cache. | Retention | -| --statefile-cipher | Cipher to encrypt cache (Default: 'AES'). | Retention | -| --filter-name | Filter dynamic filters by name (can be a regexp). | Mode | -| --warning-* --critical-* | Thresholds. Can be: 'traffic-out-prct', 'traffic-out', 'packets-out', 'packets-dropped', 'packets-pass', 'packets-insp'. | Mode | +| Option | Description | +|:-------------------------|:------------------------------------------------------------------------------------------------------------------------------| +| --filter-name | Filter dynamic filters by name (can be a regexp). | +| --warning-* --critical-* | Thresholds. Can be: 'traffic-out-prct', 'traffic-out', 'packets-out', 'packets-dropped', 'packets-pass', 'packets-insp'. | -| Option | Description | Type | -|:------------------------------|:----------------------------------------------------------------------------------------------------------------------------------|:-----| -| --unknown-temperature-status | Set unknown threshold for status (Default : '%{status} eq "unknown"'). You can use the following variables: %{status}, %{class} | Mode | -| --warning-temperature-status | Set warning threshold for status (Default : '%{status} eq "warn"'). You can use the following variables: %{status}, %{class} | Mode | -| --critical-temperature-status | Set critical threshold for status (Default: '%{status} eq "hot"'); You can use the following variables: %{status}, %{class} | Mode | -| --unknown-psu-status | Set unknown threshold for status. You can use the following variables: %{status}, %{name} | Mode | -| --warning-psu-status | Set warning threshold for status. You can use the following variables: %{status}, %{name} | Mode | -| --critical-status | Set critical threshold for status (Default: '%{status} eq "bad"'); You can use the following variables: %{status}, %{name} | Mode | -| --warning-* --critical-* | Thresholds. Can be: 'temperature', 'fans-failed'. | Mode | +| Option | Description | +|:------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------| +| --unknown-temperature-status | Define the conditions to match for the status to be UNKNOWN (default : '%{status} eq "unknown"'). You can use the following variables: %{status}, %{class} | +| --warning-temperature-status | Define the conditions to match for the status to be WARNING (default : '%{status} eq "warn"'). You can use the following variables: %{status}, %{class} | +| --critical-temperature-status | Define the conditions to match for the status to be CRITICAL (default: '%{status} eq "hot"'); You can use the following variables: %{status}, %{class} | +| --unknown-psu-status | Define the conditions to match for the status to be UNKNOWN. You can use the following variables: %{status}, %{name} | +| --warning-psu-status | Define the conditions to match for the status to be WARNING. You can use the following variables: %{status}, %{name} | +| --critical-status | Define the conditions to match for the status to be CRITICAL (default: '%{status} eq "bad"'); You can use the following variables: %{status}, %{name} | +| --warning-* --critical-* | Thresholds. Can be: 'temperature', 'fans-failed'. | + + + + +| Option | Description | +|:------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------| +| --unknown-status | Define the conditions to match for the status to be UNKNOWN. You can use the following variables: %{status} | +| --warning-status | Define the conditions to match for the status to be WARNING (default: '%{status} =~ /MINOR/i'). You can use the following variables: %{status} | +| --critical-status | Define the conditions to match for the status to be CRITICAL (default: '%{status} =~ /MAJOR\|CRITICAL/i'). You can use the following variables: %{status} | -| Option | Description | Type | -|:--------------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:----------| -| --memcached | Memcached server to use (only one server). | Retention | -| --redis-server | Redis server to use (only one server). Syntax: address\[:port\] | Retention | -| --redis-attribute | Set Redis Options (--redis-attribute="cnx\_timeout=5"). | Retention | -| --redis-db | Set Redis database index. | Retention | -| --failback-file | Failback on a local file if redis connection failed. | Retention | -| --memexpiration | Time to keep data in seconds (Default: 86400). | Retention | -| --statefile-dir | Directory for statefile (Default: '/var/lib/centreon/centplugins'). | Retention | -| --statefile-suffix | Add a suffix for the statefile name (Default: ''). | Retention | -| --statefile-concat-cwd | Concat current working directory with option '--statefile-dir'. Useful on Windows when plugin is compiled. | Retention | -| --statefile-format | Format used to store cache (can be: 'dumper', 'storable', 'json'). | Retention | -| --statefile-key | Key to encrypt/decrypt cache. | Retention | -| --statefile-cipher | Cipher to encrypt cache (Default: 'AES'). | Retention | -| --filter-name | Filter ports by name (can be a regexp). | Mode | -| --unknown-license-status | Set unknown threshold for status. You can use the following variables: %{status}, %{name} | Mode | -| --warning-license-status | Set warning threshold for status (Default: '%{status} =~ /invalid\_software\_version/'). You can use the following variables: %{status}, %{name} | Mode | -| --critical-license-status | Set critical threshold for status. You can use the following variables: %{status}, %{name} | Mode | -| --unknown-link-status | Set unknown threshold for status. You can use the following variables: %{adminStatus}, %{operationalStatus}, %{name} | Mode | -| --warning-link-status | Set warning threshold for status. You can use the following variables: %{adminStatus}, %{operationalStatus}, %{name} | Mode | -| --critical-link-status | Set critical threshold for status (Default: '%{adminStatus} eq "enabled" and %{operationalStatus} ne "up"'). You can use the following variables: %{adminStatus}, %{operationalStatus}, %{name} | Mode | -| --warning-* --critical-* | Thresholds. Can be: 'traffic-out-prct', 'traffic-out', 'packets-out', 'packets-dropped', 'packets-pass', 'packets-insp'. | Mode | +| Option | Description | +|:--------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| --filter-name | Filter ports by name (can be a regexp). | +| --filter-type | Filter ports by type (can be a regexp). You can use the following types: 'Network Port', 'Port Group' and 'Tool Port' | +| --unknown-license-status | Define the conditions to match for the status to be UNKNOWN. You can use the following variables: %{status}, %{name} | +| --warning-license-status | Define the conditions to match for the status to be WARNING (default: '%{status} =~ /invalid\_software\_version/'). You can use the following variables: %{status}, %{name} | +| --critical-license-status | Define the conditions to match for the status to be CRITICAL. You can use the following variables: %{status}, %{name} | +| --unknown-link-status | Define the conditions to match for the status to be UNKNOWN. You can use the following variables: %{adminStatus}, %{operationalStatus}, %{name} | +| --warning-link-status | Define the conditions to match for the status to be WARNING. You can use the following variables: %{adminStatus}, %{operationalStatus}, %{name} | +| --critical-link-status | Define the conditions to match for the status to be CRITICAL (default: '%{adminStatus} eq "enabled" and %{operationalStatus} ne "up"'). You can use the following variables: %{adminStatus}, %{operationalStatus}, %{name} | +| --warning-* --critical-* | Thresholds. Can be: 'traffic-out-prct', 'traffic-out', 'packets-out', 'packets-dropped', 'packets-pass', 'packets-insp'. | -| Option | Description | Type | -|:----------------------|:--------------------------------------------------------------------------------------------------------------------------------------|:-----| -| --unknown-ntp-status | | Mode | -| --warning-ntp-status | | Mode | -| --critical-ntp-status | Set thresholds for status (Default critical: '%{status} !~ /in\_reach\|in\_sync/i') You can use the following variables: %{status} | Mode | -| --warning-offset | Time offset warning threshold (in seconds). | Mode | -| --critical-offset | Time offset critical Threshold (in seconds). | Mode | -| --ntp-hostname | Set the ntp hostname (if not set, localtime is used). | Mode | -| --ntp-port | Set the ntp port (Default: 123). | Mode | -| --timezone | Override the timezone of distant equipment. Can use format: 'Europe/London' or '+0100'. | Mode | +| Option | Description | +|:----------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------| +| --unknown-ntp-status | Define the conditions to match for the status to be UNKNOWN. | +| --warning-ntp-status | Define the conditions to match for the status to be WARNING. | +| --critical-ntp-status | Define the conditions to match for the status to be CRITICAL (default: '%{status} !~ /in\_reach\|in\_sync/i') You can use the following variables: %{status} | +| --warning-offset | Define the time offset (in seconds) that will trigger a WARNING status. | +| --critical-offset | Define the time offset (in seconds) that will trigger a CRITICAL status. | +| --ntp-hostname | Set the NTP hostname (if not set, localtime is used). | +| --ntp-port | Set the NTP port (default: 123). | +| --timezone | Override the timezone of distant equipment. Can use format: 'Europe/London' or '+0100'. | -| Option | Description | Type | -|:------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------|:-----| -| --warning-uptime | Threshold warning. | Mode | -| --critical-uptime | Threshold critical. | Mode | -| --unit | Select the unit for performance data and thresholds. May be 's'for seconds, 'm' for minutes, 'h' for hours, 'd' for days, 'w' for weeks. Default is seconds | Mode | +| Option | Description | +|:------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| --warning-uptime | Warning threshold. | +| --critical-uptime | Critical threshold. | +| --unit | Select the unit for performance data and thresholds. May be 's' for seconds, 'm' for minutes, 'h' for hours, 'd' for days, 'w' for weeks. Default is seconds | @@ -522,8 +554,8 @@ All available options for a given mode can be displayed by adding the `--help` parameter to the command: ```bash -/usr/lib/centreon/plugins//centreon_keysight_nvos_restapi.pl \ +/usr/lib/centreon/plugins/centreon_keysight_nvos_restapi.pl \ --plugin=network::keysight::nvos::restapi::plugin \ --mode=dynamic-filters \ - --help + --help ``` From dfe530d586d81400f8d03254b8d4b39eaf19cb27 Mon Sep 17 00:00:00 2001 From: Lucie Dubrunfaut <123162035+lucie-dubrunfaut@users.noreply.github.com> Date: Fri, 22 Nov 2024 13:53:44 +0100 Subject: [PATCH 2/3] Apply suggestions from code review --- .../procedures/network-keysight-nvos-restapi.md | 10 +++++----- .../procedures/network-keysight-nvos-restapi.md | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/i18n/fr/docusaurus-plugin-content-docs-pp/current/integrations/plugin-packs/procedures/network-keysight-nvos-restapi.md b/i18n/fr/docusaurus-plugin-content-docs-pp/current/integrations/plugin-packs/procedures/network-keysight-nvos-restapi.md index c5d18c41e8ef..f0291e8d21c3 100644 --- a/i18n/fr/docusaurus-plugin-content-docs-pp/current/integrations/plugin-packs/procedures/network-keysight-nvos-restapi.md +++ b/i18n/fr/docusaurus-plugin-content-docs-pp/current/integrations/plugin-packs/procedures/network-keysight-nvos-restapi.md @@ -28,7 +28,7 @@ Le connecteur apporte les modèles de service suivants | Alias | Modèle de service | Description | |:---------|:------------------------------------------|:------------------------------------------------------------| | Hardware | Net-Keysight-Nvos-Hardware-Restapi-custom | Contrôle l'état du matériel | -| Licence | Net-Keysight-Nvos-Licence-Restapi-custom | Contrôle l'état de la licence | +| License | Net-Keysight-Nvos-License-Restapi-custom | Contrôle l'état de la licence | | Time | Net-Keysight-Nvos-Time-Restapi-custom | Contrôle le décalage de temps | | Uptime | Net-Keysight-Nvos-Uptime-Restapi-custom | Durée depuis laquelle l'équipement tourne sans interruption | @@ -87,7 +87,7 @@ Voici le tableau des services pour ce connecteur, détaillant les métriques et | psu-status | N/A | - + | Nom | Unité | |:-------|:------| @@ -279,7 +279,7 @@ yum install centreon-plugin-Network-Keysight-Nvos-Restapi | EXTRAOPTIONS | Any extra option you may want to add to the command (a --verbose flag for example). Toutes les options sont listées [ici](#options-disponibles). | --verbose | | - + | Macro | Description | Valeur par défaut | Obligatoire | |:---------------|:-------------------------------------------------------------------------------------------------------------------------------------------------|:--------------------------------|:-----------:| @@ -413,7 +413,7 @@ Le plugin apporte les modes suivants : |:------------------------------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------| | dynamic-filters [[code](https://github.com/centreon/centreon-plugins/blob/develop/src/network/keysight/nvos/restapi/mode/dynamicfilters.pm)] | Net-Keysight-Nvos-Dynamic-Filters-Restapi-custom | | hardware [[code](https://github.com/centreon/centreon-plugins/blob/develop/src/network/keysight/nvos/restapi/mode/hardware.pm)] | Net-Keysight-Nvos-Hardware-Restapi-custom | -| license [[code](https://github.com/centreon/centreon-plugins/blob/develop/src/network/keysight/nvos/restapi/mode/license.pm)] | Net-Keysight-Nvos-Licence-Restapi-custom | +| license [[code](https://github.com/centreon/centreon-plugins/blob/develop/src/network/keysight/nvos/restapi/mode/license.pm)] | Net-Keysight-Nvos-License-Restapi-custom | | list-dynamic-filters [[code](https://github.com/centreon/centreon-plugins/blob/develop/src/network/keysight/nvos/restapi/mode/listdynamicfilters.pm)] | Used for service discovery | | list-ports [[code](https://github.com/centreon/centreon-plugins/blob/develop/src/network/keysight/nvos/restapi/mode/listports.pm)] | Used for service discovery | | ports [[code](https://github.com/centreon/centreon-plugins/blob/develop/src/network/keysight/nvos/restapi/mode/ports.pm)] | Net-Keysight-Nvos-Ports-Restapi-custom | @@ -502,7 +502,7 @@ Les options disponibles pour chaque modèle de services sont listées ci-dessous | --warning-* --critical-* | Thresholds. Can be: 'temperature', 'fans-failed'. | - + | Option | Description | |:------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------| diff --git a/pp/integrations/plugin-packs/procedures/network-keysight-nvos-restapi.md b/pp/integrations/plugin-packs/procedures/network-keysight-nvos-restapi.md index 3abeaaad0f9e..f6b8b60873d9 100644 --- a/pp/integrations/plugin-packs/procedures/network-keysight-nvos-restapi.md +++ b/pp/integrations/plugin-packs/procedures/network-keysight-nvos-restapi.md @@ -27,7 +27,7 @@ The connector brings the following service templates (sorted by the host templat | Service Alias | Service Template | Service Description | |:--------------|:------------------------------------------|:--------------------------------------------------------| | Hardware | Net-Keysight-Nvos-Hardware-Restapi-custom | Check hardware | -| Licence | Net-Keysight-Nvos-Licence-Restapi-custom | Check license state | +| License | Net-Keysight-Nvos-License-Restapi-custom | Check license state | | Time | Net-Keysight-Nvos-Time-Restapi-custom | Check time offset | | Uptime | Net-Keysight-Nvos-Uptime-Restapi-custom | Time since the equipment has been working and available | @@ -280,7 +280,7 @@ yum install centreon-plugin-Network-Keysight-Nvos-Restapi | EXTRAOPTIONS | Any extra option you may want to add to the command (a --verbose flag for example). All options are listed [here](#available-options). | --verbose | | - + | Macro | Description | Default value | Mandatory | |:---------------|:---------------------------------------------------------------------------------------------------------------------------------------|:--------------------------------|:-----------:| @@ -412,7 +412,7 @@ The plugin brings the following modes: |:------------------------------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------| | dynamic-filters [[code](https://github.com/centreon/centreon-plugins/blob/develop/src/network/keysight/nvos/restapi/mode/dynamicfilters.pm)] | Net-Keysight-Nvos-Dynamic-Filters-Restapi-custom | | hardware [[code](https://github.com/centreon/centreon-plugins/blob/develop/src/network/keysight/nvos/restapi/mode/hardware.pm)] | Net-Keysight-Nvos-Hardware-Restapi-custom | -| license [[code](https://github.com/centreon/centreon-plugins/blob/develop/src/network/keysight/nvos/restapi/mode/license.pm)] | Net-Keysight-Nvos-Licence-Restapi-custom | +| license [[code](https://github.com/centreon/centreon-plugins/blob/develop/src/network/keysight/nvos/restapi/mode/license.pm)] | Net-Keysight-Nvos-License-Restapi-custom | | list-dynamic-filters [[code](https://github.com/centreon/centreon-plugins/blob/develop/src/network/keysight/nvos/restapi/mode/listdynamicfilters.pm)] | Used for service discovery | | list-ports [[code](https://github.com/centreon/centreon-plugins/blob/develop/src/network/keysight/nvos/restapi/mode/listports.pm)] | Used for service discovery | | ports [[code](https://github.com/centreon/centreon-plugins/blob/develop/src/network/keysight/nvos/restapi/mode/ports.pm)] | Net-Keysight-Nvos-Ports-Restapi-custom | @@ -501,7 +501,7 @@ All available options for each service template are listed below: | --warning-* --critical-* | Thresholds. Can be: 'temperature', 'fans-failed'. | - + | Option | Description | |:------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------| From 2747be6825f7369d395146152d06d0a5909d71ee Mon Sep 17 00:00:00 2001 From: Lucie Dubrunfaut <123162035+lucie-dubrunfaut@users.noreply.github.com> Date: Fri, 22 Nov 2024 13:54:06 +0100 Subject: [PATCH 3/3] Apply suggestions from code review --- .../plugin-packs/procedures/network-keysight-nvos-restapi.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pp/integrations/plugin-packs/procedures/network-keysight-nvos-restapi.md b/pp/integrations/plugin-packs/procedures/network-keysight-nvos-restapi.md index f6b8b60873d9..4a21f9fb64c0 100644 --- a/pp/integrations/plugin-packs/procedures/network-keysight-nvos-restapi.md +++ b/pp/integrations/plugin-packs/procedures/network-keysight-nvos-restapi.md @@ -86,7 +86,7 @@ Here is the list of services for this connector, detailing all metrics and statu | psu-status | N/A | - + | Name | Unit | |:-------|:------|